Jump to content


Photo

5 Week Project


  • This topic is locked This topic is locked
143 replies to this topic

#121 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 30 April 2008 - 09:40 AM

An update. I figured out why the super speed seemed to work, but seemed not to:

My code is this (and of course I have code to take it away too):

function GivenTo(Pawn NewOwner, bool bDoNotActivate)
{
	local UTPawn P;

	Super.GivenTo(NewOwner, bDoNotActivate);

	P = UTPawn(NewOwner);
	if (P != None)
	{
		// apply overlay
		P.SetOverlayMaterial(OverlayMaterialInstance);
		P.SetPawnAmbientSound(SpeedAmbientSound);
		
			// boost speed
		P.GroundSpeed *= 1600;
		P.AirSpeed *= 1600;
		P.AccelRate *= 2000;
	}
	// set timer for ending sounds
	SetTimer(TimeRemaining - 3.0, false, 'PlaySpeedFadingSound');
}

But the player has two acceleration rates in walking, like this:
function Timer()
  {
	local int currentPercentX, currentPercentY;
	currentPercentX = (Abs(Pawn.Velocity.X) * 100) / class'FiveWeek_Pawn'.default.GroundSpeed;
	currentPercentY = (Abs(Pawn.Velocity.Y) * 100) / class'FiveWeek_Pawn'.default.GroundSpeed;

	if(currentPercentX > speedThresholdInPercent || currentPercentY > speedThresholdInPercent)
	   Pawn.AccelRate =  class'FiveWeek_Pawn'.default.AccelRate;
	else
	   Pawn.AccelRate =  class'FiveWeek_Pawn'.default.AccelRate * speedFactor;
  }

They conflict, because AccelRate is being set in that manner. I'll work a fix :p

#122 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 30 April 2008 - 10:22 AM

ah Indeed, I should not set the Acceleration at each Timer call. A boolean telling in which previous state the player was should be enough.

I've worked yesterday on Scoreboard, message display, it's almost done. I still have a problem with MidGameMenu, I want to keep UT3 MidGameMenu and only change the ScoreTab by integrating our scoreboardPanel. (for info about displaying a MidGameMenu tab see ShowScoreboard in UTPlayerController)
Is there an easy way to change a tab in the midGameMenu or do I need to copy/paste the UISceneMidGameMenu, create a new one and change the scoreboardPanel?
Tomorrow is Labor Day, I 'll stay online late tonight :p

#123 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 30 April 2008 - 10:36 AM

The power up now sets a boolean (bSuperSpeed) in the Pawn. Pawn now (for Ron1n's convenience) now contains separate default properties for AccelRate, InstantAccelRate (used to let the player initially accelerate very quickly) and SuperAccelRate (used with the super speed power up), and a SuperGroundSpeed and SuperAirSpeed.

The boolean is used by the Timer() function in PlayerWalking, to correctly assign the relevant values. Should work, wants a little testing. Still not the most elegant solution, but I have limited programming time, and it functions.

Edited by ambershee, 30 April 2008 - 10:37 AM.


#124 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 30 April 2008 - 11:20 PM

Hi All,
I've uploaded new files (sources and UPK) so update your repository :p
New Feature:
- ScoreboardMenu appears when entering FinishVolume
- Once ScoreboardMenu displayed, any mouse clik or key presssed will restart the game
- Messages are displayed when faild and win they can be configured in the IniFile as follow
[FiveWeek.FiveWeek_HUD]
YouWin=blabla
YouFail=blabla
- bug has been fixed for message when leaving startVolume it can be now modified as follow
[FiveWeek.FiveWeek_Game]
startGameMessage=blabla

Here is the end scoreboardMenu

Posted Image
Posted Image

Enjoy :p

#125 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 01 May 2008 - 09:40 AM

Just had a brain-wave regarding the pickups.

When the player dies, or finishes a level we need to respawn all the pickups.

#126 MikePurvis

MikePurvis
  • Members
  • 10 posts

Posted 01 May 2008 - 09:22 PM

Hello:

I apologize that I completely disapeared. I'm in 5 classes right now and 4 of them are programming courses.

I honestly am too busy right now to be of any real assistence.

Mike :p

#127 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 01 May 2008 - 09:27 PM

Doesn't matter now anyway - we should be finished tommorow / saturday.

#128 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 01 May 2008 - 10:28 PM

Waiting for Michael'sFeedBack. How's it going ? :p

#129 R0n1n

R0n1n
  • Members
  • 34 posts
  • Location:Zürich

Posted 02 May 2008 - 09:53 AM

Well it's going bad and well at the same time.
Bad: Leveldesign takes even more time than i expected and in addition i do have to write a 50pages documentation as well now. So i start to feel a little crunchy .
Good: On the other side i finished a tutorial section in the level that teaches a new player how to move, jump and how the rules of the game work (Kismet & Triggers).
I also develop a system of staticmeshes now with elements like curves, straigt, T-Sections and so on. If something goes wrong i can rely on them to get enough playable content done.

I entered some win and fail messages inside the *.ini file but the dont get displayed when i play. But i guess this will be solved as quick as the other things we solved in MSN lately

#130 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 02 May 2008 - 11:22 AM

I'm off work with a migraine today, but I'll sit down and finish off the power-up issue. I'll make myself available on MSN tonight around 7-8PM CET, if it's convenient for you two?

#131 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 02 May 2008 - 11:58 AM

Guess not for me, I have a Beer meeting at "The Frog & British Library". I'm pretty sure I won't be mentally available :xd:
I can be online this afternoon between now and 6PM CET. If I'm not there please update Wiki,I can see what has to be done.

#132 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 02 May 2008 - 01:27 PM

I'll see what I can do :xd:

#133 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 02 May 2008 - 10:07 PM

I check all my Wiki's Points, it should be allright, update your repository :xd:

#134 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 03 May 2008 - 11:56 AM

Got the powerups respawning properly when the player is restarted. I still can't get subversion running on this machine, so someone will have to merge these changes on my behalf. It's all pretty simple anyway. I'll have that posted on here ASAP.

Edit: Here it is, shouldn't take long to merge.

Super speed pickup.

class FiveWeek_PickupFactorySuperSpeed extends UTPowerupPickupFactory;

State WaitingForMatch
{
	ignores Touch;

	function MatchStarting()
	{
		GotoState('Pickup');
	}

	event BeginState(Name PreviousStateName)
	{
		SetPickupVisible();
	}
}

defaultproperties
{
	InventoryType=class'FiveWeek.FiveWeek_SuperSpeed'

	BaseBrightEmissive=(R=50.0,G=1.0)
	BaseDimEmissive=(R=5.0,G=0.1)

	RespawnSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_Berzerk_SpawnCue'

	Begin Object Class=UTParticleSystemComponent Name=BerserkParticles
		Template=ParticleSystem'Pickups.Berserk.Effects.P_Pickups_Berserk_Idle'
		bAutoActivate=false
		SecondsBeforeInactive=1.0f
		Translation=(X=0.0,Y=0.0,Z=+5.0)
	End Object
	ParticleEffects=BerserkParticles
	Components.Add(BerserkParticles)

	Begin Object Class=AudioComponent Name=BerserkReady
		SoundCue=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_Berzerk_GroundLoopCue'
	End Object
	PickupReadySound=BerserkReady
	Components.Add(BerserkReady)

	bHasLocationSpeech=false
}

Super Speed object.

/**
 * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
 */
class FiveWeek_SuperSpeed extends UTTimedPowerup;

/** sound played when the UDamage is running out */
var SoundCue SpeedFadingSound;
/** ambient sound played while active*/
var SoundCue SpeedAmbientSound;
/** last time we played that sound, so it isn't too often */
var float LastSpeedSoundTime;
/** overlay material applied to owner */
var MaterialInterface OverlayMaterialInstance;

function GivenTo(Pawn NewOwner, bool bDoNotActivate)
{
	local UTPawn P;

	Super.GivenTo(NewOwner, bDoNotActivate);

	// boost speed
	NewOwner.GroundSpeed = 1600;
	NewOwner.AirSpeed = 1600;
	NewOwner.AccelRate = 400;
	
	
	P = UTPawn(NewOwner);
	if (P != None)
	{
		// apply overlay
		P.SetOverlayMaterial(OverlayMaterialInstance);
		P.SetPawnAmbientSound(SpeedAmbientSound);
	}
	// set timer for ending sounds
	SetTimer(TimeRemaining - 3.0, false, 'PlaySpeedFadingSound');
}

function ItemRemovedFromInvManager()
{
	local UTPlayerReplicationInfo UTPRI;
	local UTPawn P;

	Pawn(Owner).GroundSpeed = 800;
	Pawn(Owner).AirSpeed = 800;
	Pawn(Owner).AccelRate = 100;
	
	for (i = 0; i <FiveWeek_Game(WorldInfo.Game).SuperSpeedFactories.length; i++)
	{
		FiveWeek_Game(WorldInfo.Game).SuperSpeedFactories[i].GotoState('Pickup');
		FiveWeek_Game(WorldInfo.Game).SuperSpeedFactories[i].SetPickupVisible();
	}
	
	P = UTPawn(Owner);
	if (P != None)
	{
		//clear overlay
		//P.ClearOverlay(OverlayMaterialInstance);
		P.SetOverlayMaterial(None);
		P.SetPawnAmbientSound(none);
		//Stop the timer on the powerup stat
		if (P.DrivenVehicle != None)
		{
			UTPRI = UTPlayerReplicationInfo(P.DrivenVehicle.PlayerReplicationInfo);
		}
		else
		{
			UTPRI = UTPlayerReplicationInfo(P.PlayerReplicationInfo);
		}
		if (UTPRI != None)
		{
			UTPRI.StopPowerupTimeStat(GetPowerupStatName());
		}
	}
	SetTimer(0.0, false, 'PlaySpeedFadingSound');
}

/** called on a timer to play UDamage ending sound */
function PlaySpeedFadingSound()
{
	// reset timer if time got added
	if (TimeRemaining > 3.0)
	{
		SetTimer(TimeRemaining - 3.0, false, 'PlaySpeedFadingSound');
	}
	else
	{
		Instigator.PlaySound(SpeedFadingSound);
		SetTimer(0.75, false, 'PlaySpeedFadingSound');
	}
}

defaultproperties
{
	PickupMessage="SUPER SPEED!!!"
	SpeedFadingSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_UDamage_WarningCue'
	OverlayMaterialInstance=Material'PICKUPS.UDamage.M_UDamage_Overlay'
	SpeedAmbientSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_UDamage_PowerLoopCue'
	PowerupOverSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_UDamage_EndCue'
	PowerupStatName="POWERUPTIME_UDAMAGE"
	IconCoords=(U=792.000000,V=41.000000,UL=43.000000,VL=58.000000)
	PP_Scene_HighLights=(X=-0.100000,Y=0.040000,Z=-0.200000)
	bRenderOverlays=True
	bReceiveOwnerEvents=True
	PickupSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_UDamage_PickupCue'
	Begin Object Class=StaticMeshComponent Name=MeshComponentA ObjName=MeshComponentA Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
	  StaticMesh=StaticMesh'PICKUPS.UDamage.Mesh.S_Pickups_UDamage'
	  CullDistance=8000.000000
	  CachedCullDistance=8000.000000
	  bUseAsOccluder=False
	  CastShadow=False
	  bForceDirectLightMap=True
	  bCastDynamicShadow=False
	  CollideActors=False
	  BlockRigidBody=False
	  Translation=(X=0.000000,Y=0.000000,Z=5.000000)
	  Scale3D=(X=0.600000,Y=0.600000,Z=0.600000)
	  Name="MeshComponentA"
	  ObjectArchetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
	End Object
	DroppedPickupMesh=MeshComponentA
	PickupFactoryMesh=MeshComponentA
	Begin Object Class=UTParticleSystemComponent Name=PickupParticles ObjName=PickupParticles Archetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
	  Template=ParticleSystem'PICKUPS.UDamage.Effects.P_Pickups_UDamage_Idle'
	  bAutoActivate=False
	  Translation=(X=0.000000,Y=0.000000,Z=5.000000)
	  Name="PickupParticles"
	  ObjectArchetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
	End Object
	DroppedPickupParticles=PickupParticles
	//Begin Object Class=SpriteComponent Name=Sprite ObjName=Sprite Archetype=SpriteComponent'UTGame.Default__UTTimedPowerup:Sprite'
	//   ObjectArchetype=SpriteComponent'UTGame.Default__UTTimedPowerup:Sprite'
	//End Object
	//Components(0)=Sprite
	Name="SuperSpeed"
	ObjectArchetype=UTTimedPowerup'UTGame.Default__UTTimedPowerup'
}

Five Week Game
var array <Actor> out_Speed, out_Time;
var array <FiveWeek_PickupFactorySuperSpeed> SuperSpeedFactories;
var array <FiveWeek_BonusTime> BonusTimeFactories;

//message displayed on PlayerController when leaving the startVolume
var() String startGameMessage;

simulated function PostBeginPlay()
{
	local int i;
	
	Super.PostBeginPlay();
	
	if (FindActorsOfClass(class'FiveWeek_PickupFactorySuperSpeed', out_Speed))
	{
		for (i = 0; i < out_Speed.length; i++)
		{
			SuperSpeedFactories[i] = FiveWeek_PickupFactorySuperSpeed(out_Speed[i]);
		}
	}
	
	if (FindActorsOfClass(class'FiveWeek_BonusTime', out_Time))
	{
		for (i = 0; i < out_Speed.length; i++)
		{
			BonusTimeFactories[i] = FiveWeek_BonusTime(out_Time[i]);
		}
	}
}

function RestartPlayer(Controller aPlayer)
{
local int i;
  super.RestartPlayer(aPlayer);
  if(PlayerController(aPlayer) != None)
	PlayerController(aPlayer).SetCameraMode('ThirdPerson');

	for (i = 0; i <SuperSpeedFactories.length; i++)
	{
		SuperSpeedFactories[i].GotoState('Pickup');
		SuperSpeedFactories[i].SetPickupVisible();
	}
	
	for (i = 0; i <BonusTimeFactories.length; i++)
	{
		BonusTimeFactories[i].GotoState('Pickup');
		BonusTimeFactories[i].SetPickupVisible();
	}
}

Edited by ambershee, 03 May 2008 - 01:12 PM.


#135 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 04 May 2008 - 10:53 AM

Merge and SVN update done :xd:

#136 R0n1n

R0n1n
  • Members
  • 34 posts
  • Location:Zürich

Posted 04 May 2008 - 12:11 PM

Okay i just played for 30 minutes. I couldn't produce any bugs and even my girlfriend (eehhh.. computers are scary) managed to beat the tutorial and play the mod.

The wiki is updated to show the last remaining issues.
I am not sure about the motion blur you said you are working on Luke? Are you still working on this feature?

Edited by R0n1n, 04 May 2008 - 12:43 PM.


#137 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 04 May 2008 - 02:23 PM

I can play with motion blur, but I'm not sure when I can have it done by. Tommorow is a bank holiday, so we may be lucky. The issue is that somewhere (I think natively, in the C++ code), UT over-writes the motion blur portion of the post processing, which is why even if you apply it in the editor, it doesn't appear in game.

#138 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 04 May 2008 - 03:30 PM

I've fixed the following bugs:

Bug List (completed but not yet working as intended)
[ ] If the Player dies and respawns the counter measuring time is still running. We should stop the time if he dies.

Improvement List (working, should be improved further)
[ ] The Player dies. As he respawns the hud also appears. The hud should not pop up on respawn. [ ]


the following improvement is much complicated:

If the Player wins (reaches Finish_Volume) everything is fine except for this: After the camera moves back to the playerstart it takes about 3 seconds until the player respawns. Would be nice if he would respawn immediately.

I search a nice way to handle this but it's not easy as I think because we altered the standard mechanism which is when finish a map we load a new one even if it's the same. :xd:

#139 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 04 May 2008 - 04:47 PM

Got camera based motion blur working. Now to explore per-object, which will be much more complicated.

#140 R0n1n

R0n1n
  • Members
  • 34 posts
  • Location:Zürich

Posted 04 May 2008 - 07:39 PM

the following improvement is much complicated:

If the Player wins (reaches Finish_Volume) everything is fine except for this: After the camera moves back to the playerstart it takes about 3 seconds until the player respawns. Would be nice if he would respawn immediately.

I search a nice way to handle this but it's not easy as I think because we altered the standard mechanism which is when finish a map we load a new one even if it's the same. :xd:


It is only an improvement suggestion. Honestly i don't think it will make a big impact on the quality of the mod. If its too much we don't do it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users