Jump to content


Photo

5 Week Project


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

#21 ambershee

ambershee

    Nimbusfish Rawks

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

Posted 05 April 2008 - 07:20 PM

I'll check DamageVolume this weekend. The background story is a good start. :shiftee:

[Edit] I found the field PainTimer in PhysicsVolume which is the timer that cause pain every second in LavaVolume for example but I think we can't use it as each volume has its own timer. In our case, we want a timer which is shared between all volumes. However we could use the VolumeTimer of each volume to affect the main Timer located in the UTGame class.

What do you think ?


I think seperate volumes is the way to go - but record the time based statistics in the pawn or controller; that way it's on a per player basis (as it should be, and that's where health or 'energy' is already contained), so that when it comes to multiplayer or random other feature support, it's in the right place. The timer itself would never be a timer per se - it would be a volume decreasing time. The pawn can record the relevant statics (time lost, time gained) in seperate variables in its own class.

Hi:

Looks like a lot went on the last couple days. I've been in class most of that time. I was in a discussion earlier this week about changing the rate of accelleration in a game. I think that acceleration should be constant.

It looks like the camera is up for grabs so I'll work on that. I have a version of the ActionCam as reference. Is there anythingwrong with writing functions that can be integrated into the Pawn and Player Controller classes AmberShee?

I like the additional story ideas as well that explain why the character is running. However, I think it is not neccesarry and it could stand on gameplay alone. I had fun in the level shell.


Go ahead and write the code - I'll upload the basic stuff I slapped together as soon as I actually get home - and if I get time after you've done it, I'll merge it. I'm going away on Tuesday for a week - taking the girlfriend away - so I won't be easily available, during that time you'll probably not hear much from me, but I'll try and get into the forums as much as possible so that I can keep track of what's going on, and keep up to date with the discussion :)

#22 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 06 April 2008 - 01:26 PM

I understand now, I believed it was one timer for all players; the first player who touch the startVolume starts the single timer. But it's true that taking into account damage and powerups are per player basis. Anyway my timer is still working just need to change the UTGame field with the UTPawn Field :p

Have nice Holidays :)

#23 R0n1n

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

Posted 06 April 2008 - 11:03 PM

I've been working on the style for the Levels. You will get some Pics in the next days.

And enjoy your holiday :p I hope you have a great time!

#24 ambershee

ambershee

    Nimbusfish Rawks

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

Posted 07 April 2008 - 05:07 PM

Some code, should be largely functional - some 5week stuff, and some old TCTest stuff.

You need to create a scene with a button bar, embed it in a map, and launch from a shortcut for the TCTest stuff to work.


Attached File  Classes.zip   2.1KB   86 downloads
Attached File  Classes.zip   2.52KB   84 downloads

#25 ninjadave

ninjadave
  • Members
  • 13 posts

Posted 07 April 2008 - 09:28 PM

I don't really even know what I could do to help. =/

It looks like the essential areas are being developed on, I could always do programming or mapping for anything extra.
What something extra that needs to be done?

#26 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 08 April 2008 - 07:33 AM

You can take a look at the menu ( An Example ) You have to discuss with michael (R0n1n) about design issue.

#27 R0n1n

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

Posted 08 April 2008 - 08:11 AM

You can take a look at the menu ( An Example ) You have to discuss with michael (R0n1n) about design issue.


I agree. If you want to discuss any design issues about it you can e-mail me at ut3jumpnrun@yahoo.de or use this Forum.

#28 MikePurvis

MikePurvis
  • Members
  • 10 posts

Posted 11 April 2008 - 09:00 PM

Hi:

Just checking in. I took a look at the classes that Ambershee zipped up. Looking forward to seeing Michael's Art pics.

I finally beat the hard level. It's a fun game mechanic.

I started on the camera but it is messed up right now. I need to spend some more time working on it.

I havn't made a custom camera in UT3 before this so any suggestions will be appreciated. I am familiar with camera's in OpenGL so I do have so it's not learning about them from scratch.

#29 ambershee

ambershee

    Nimbusfish Rawks

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

Posted 11 April 2008 - 11:27 PM

Not having any code to hand - but set behindview to 1, set the camera distance and then set the rotation and position to be appropriate in dodgy instances?

#30 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 12 April 2008 - 06:32 PM

Got a simple example of custom Camera.
There's a weird behavior with method GetPlayerViewPoint of UTPlayerController, I had to copy GetPlayerViewPoint of PlayerController without that, the camera is never used ?? :p I don't take much time to do this and I'm not interested in understanding why :p
Note the setCameraMode in postBeginPlay of FiveWeekPlayerController, if you don't do this you will only see arms and weapons :p

Following code works like a charm, the beginning of a RTS Game why not ? :unsure:

Posted Image


class FiveWeekCamera extends Camera
	  config(Camera);

/**
 * Query ViewTarget and outputs Point Of View.
 *
 * @param	OutVT		ViewTarget to use.
 * @param	DeltaTime	Delta Time since last camera update (in seconds).
 */
function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
{

	  local vector		Loc;
	local rotator		Rot;
	local bool			bDoNotApplyModifiers;

	// Default FOV on viewtarget
	OutVT.POV.FOV = DefaultFOV;

	 Loc = ViewTarget.Target.Location;
   Loc.Z = ViewTarget.Target.Location.Z + 500;

   Rot = ViewTarget.Target.Rotation;
   Rot.pitch = -16000;

   ViewTarget.POV.Location = Loc;
   ViewTarget.POV.Rotation = Rot;

}

The player Controller

class FiveWeekPlayerController extends UTPlayerController;

simulated event postBeginPlay()
{
 super.PostBeginPlay();
 SetCameraMode('ThirdPerson');
}

exec function ShowMenu()
{
	`log("exec ShowMenu");
	DisplayGameMenu();
}

function DisplayGameMenu()
{
	local UIInteraction UIController;

	UIController = GetUIController();
	if ( UIController != None )
	{
		`log("Open 5WeekUI.FrontEnd");
		//UIController.OpenScene( UIScene'5WeekUI.FrontEnd', LocalPlayer(Player) );
	}
}


/**
 * Returns Player's Point of View
 * For the AI this means the Pawn's 'Eyes' ViewPoint
 * For a Human player, this means the Camera's ViewPoint
 *
 * @output	out_Location, view location of player
 * @output	out_rotation, view rotation of player
 */
simulated event GetPlayerViewPoint( out vector out_Location, out Rotator out_Rotation )
{
	local Actor TheViewTarget;

	// sometimes the PlayerCamera can be none and we probably do not want this
	// so we will check to see if we have a CameraClass.  Having a CameraClass is
	// saying:  we want a camera so make certain one exists by spawning one
	if( PlayerCamera == None )
	{
		if( CameraClass != None )
		{

			// Associate Camera with PlayerController
			PlayerCamera = Spawn(CameraClass, self);
			if( PlayerCamera != None )
			{
				PlayerCamera.InitializeFor( Self );
			}
			else
			{
				`log("Couldn't Spawn Camera Actor for Player!!");
			}
		}
	}

	if( PlayerCamera != None )
	{
		PlayerCamera.GetCameraViewPoint(out_Location, out_Rotation);
	}
	else
	{
		TheViewTarget = GetViewTarget();

		if( TheViewTarget != None )
		{
			out_Location = TheViewTarget.Location;
			out_Rotation = TheViewTarget.Rotation;
		}
		else
		{
			super.GetPlayerViewPoint(out_Location, out_Rotation);
		}
	}
}

function DrawHUD( HUD H )
{
	//`log("Draw HUD");
	if( (Pawn != None) && (Pawn.Weapon != None) )
	{
		//DrawSomething(H)?
	}
}

DefaultProperties
{
  CameraClass=class'FiveWeekCamera'
}

Edited by xiongmao, 12 April 2008 - 06:39 PM.


#31 R0n1n

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

Posted 12 April 2008 - 11:24 PM

Okay to keep you updated i uploaded some imagery of what im working on. At the moment i try to find some graphical style that works well with Jump n' Run type Levels as well fits the story and looks good. It still needs more work but i think its a start. Feel free to give feedback :unsure:

Posted Image

#32 R0n1n

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

Posted 12 April 2008 - 11:34 PM

I will be ready to start building the real level tuesday or wednesday. But i cant really do any serious leveldesign as long as we haven't finished the players movement. I must be able to testplay the levels with the correct movement metrics and moves.

That's why i need some feedback about your progress. Could you guys please post quickly what you're working on and how long it will take you roughly to finish the task?
Because leveldesign takes a lot of time (if done right) i would like to start as early as possible.

#33 ambershee

ambershee

    Nimbusfish Rawks

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

Posted 13 April 2008 - 10:34 AM

I'm still on holiday at the moment - back on Tuesday. If someone wants to do a code merge of the 5week classes I posted, and the TC framework, then the metrics are all ready to go and use - the sooner it's merged and uploaded to the SVN, the sooner we can start pushing features.

As for the level concepts, the shapes in the second shot look more interesting from my perspective. My main criticism so far of the speed running levels are all totally linear. Whilst linear sections are alright, they tend to force too few options if entire stages are too linear.

#34 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 13 April 2008 - 10:31 PM

I prefer the third pic, I think it suits best for Jump n' Run, The second one has too much straight ways.
An idea: as it's often done in race game, you could provide two ways to win the match, one shorter but more difficult and the standard one.
I've done some littles works this weekend. I've reimplemented Timer in Pawn, Start/Stop/Consume Volume, I also implemented the first powerup item (inspired from health vial). I created a simple HUD which display remaining time and a bar on the upper left corner.
ConsumeVolume is based on DamageVolume but I still don't understand why health has to be linked to time???. My ConsumeVolume takes only the timer of PhysicsVolume, no damage is done to the player when entering this volume for now.

What do you think?

Posted Image
Posted Image

class FiveWeekPawn extends UTPawn;

var int totalTime;
var float remainingTime;
var bool isTimerStarted;

simulated event PostBeginPlay()
{
	`log("Pawn Type is 5week");
	super.PostBeginPlay();
}

//function TakeFallingDamage()
//{
	//Over-ridden to prevent falling damage
//}


//Timer Methods   ============================================================
function startTimer()
{
  remainingTime = totalTime;
  isTimerStarted=true;
  LogInternal("StartTimer");
}

function stopTimer()
{
  isTimerStarted=false;
  LogInternal("StopTimer");
}

function increaseTimer(int amountSeconds)
{
   LogInternal("increase timer: "$amountSeconds);
   if(isTimerStarted)
   {
	  remainingTime += amountSeconds;
   }
}

function decreaseTimer(int amountSeconds)
{
   LogInternal("idecrease timer: "$amountSeconds);
   if(isTimerStarted)
   {
	  remainingTime -= amountSeconds;
	  checkTime();
   }
}

function checkTime()
{
  if(remainingTime <= 0)
	  stopTimer();

  LogInternal("remainingTime: "$remainingTime);
}

defaultproperties
{
	GroundSpeed=550
	WaterSpeed=330
	AirSpeed=550
	JumpZ=433
	AirControl=0.35
	WalkingPct=0.4
	CrouchedPct=0.4
	AccelRate=256

	totalTime=100
}


class FiveWeek_StartVolume extends PhysicsVolume
	  placeable;


simulated event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal )
{
  if(FiveWeekPawn(Other) != None && !FiveWeekPawn(Other).isTimerStarted)
	 FiveWeekPawn(Other).startTimer();
}


class FiveWeek_StopVolume extends PhysicsVolume
	  placeable;

simulated event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal )
{
  if(FiveWeekPawn(Other) != None && FiveWeekPawn(Other).isTimerStarted)
	 FiveWeekPawn(Other).stopTimer();

}


class FiveWeek_ConsumeVolume extends PhysicsVolume
	  placeable;

var() int LossSecondsPerSec;

function CausePainTo(Actor Other)
{
   //decrease the Actor timer id FiveWeekPawn
   if(FiveWeekPawn(Other) != None && FiveWeekPawn(Other).isTimerStarted)
	 FiveWeekPawn(Other).decreaseTimer(LossSecondsPerSec);
}

defaultproperties
{
 LossSecondsPerSec = 1;
 bPainCausing = true;
}


class FiveWeek_BonusTime extends UTItemPickupFactory
	  placeable;

var() int timeBonusAmount;

//method call when item picked up
simulated static function UpdateHUD(UTHUD H)
{
	super.UpdateHUD(H);
}

function float BotDesireability(Pawn P, Controller C)
{
 return super.BotDesireability(P, C);
}

function SpawnCopyFor( Pawn Recipient )
{
   super.SpawnCopyFor(Recipient);

   if(FiveWeekPawn(Recipient) != None)
		FiveWeekPawn(Recipient).increaseTimer(timeBonusAmount);
}

auto state Pickup
{
	/* DetourWeight()
	value of this path to take a quick detour (usually 0, used when on route to distant objective, but want to grab inventory for example)
	*/
	function float DetourWeight(Pawn Other,float PathWeight)
	{
		return 0;
	}

	/* ValidTouch()
	 Validate touch (if valid return true to let other pick me up and trigger event).
	*/
	function bool ValidTouch( Pawn Other )
	{
		if ( !Super.ValidTouch(Other) )
		{
			return false;
		}

		return true;
	}
}

defaultproperties
{
	bMovable=FALSE
	bStatic=FALSE

	PickupStatName=Pickups_BonusTime

	BaseBrightEmissive=(R=2.0,G=50.0,B=10.0,A=1.0)
	BaseDimEmissive=(R=0.20,G=5.0,B=1.0,A=0.0)

	RespawnSound=SoundCue'A_Pickups.Health.Cue.A_Pickups_Health_Respawn_Cue'

	Begin Object class=StaticMeshComponent Name=TimePickUpMesh
		CastShadow=FALSE
		bCastDynamicShadow=FALSE
		bAcceptsLights=TRUE
		bForceDirectLightMap=TRUE
		LightEnvironment=PickupLightEnvironment

		AlwaysLoadOnClient=true
		AlwaysLoadOnServer=true

		CollideActors=false
		BlockActors=false
		BlockRigidBody=false

		CullDistance=4500
		bUseAsOccluder=FALSE

		StaticMesh=StaticMesh'Pickups.Health_Small.Mesh.S_Pickups_Health_Small'
		Scale3D=(X=1.0,Y=1.0,Z=1.0)

	End Object


	PickupMesh=TimePickUpMesh
	Components.Add(TimePickUpMesh)

	bIsSuperItem=false
	RespawnTime=5.000000
	MaxDesireability=0.3

	PickupSound=SoundCue'A_Pickups.Health.Cue.A_Pickups_Health_Small_Cue_Modulated'

	bRotatingPickup=true
	YawRotationRate=32000

	bFloatingPickup=true
	bRandomStart=false

	Begin Object name=CollisionCylinder
		CollisionRadius=+00030.000000
		CollisionHeight=+00020.000000
		CollideActors=true
	End Object

	//default class field value
	timeBonusAmount=5
 }

Edited by xiongmao, 13 April 2008 - 10:35 PM.


#35 R0n1n

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

Posted 14 April 2008 - 09:53 AM

about the pics.. it's just some brushes stiched together to play with colours and textures :popcorn: Of course the real level will have lots of different ways you can beat the level.

I would change the bars colour to white but besides that i like it.

but I still don't understand why health has to be linked to time???.


Basically i just want the player to run against a timer. While i thought about creating a stand alone variable and timer for this, ambershee pointed out that it will probably be a lot easier to implement if we use health (because it's already there). And im convinced it works well using health.. oops.. did i say health? I meant energy :p To the player it will feel as if he is invincible except for the fact of a constant loss of energy and some extra loss of energy when falling from high places.

#36 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 14 April 2008 - 11:41 AM

All right, I admit Energy could be equal to time :popcorn:.
I'd like to know the powerups' characteristics in order to define it precisely. I will add some config fields like this you will be able to set the specific value yourself when adding the actor on the map (Example amountBonusTime).
If you have any powerup staticmeshes could you upload them somewhere?

#37 ambershee

ambershee

    Nimbusfish Rawks

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

Posted 14 April 2008 - 04:33 PM

Just use existing meshes for prototyping. They can be easily replaced later.

#38 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 14 April 2008 - 06:57 PM

What a useful advice, go back to holidays :xcahik_:

#39 MikePurvis

MikePurvis
  • Members
  • 10 posts

Posted 14 April 2008 - 09:21 PM

xiongmao:

Your rockin this stuff out. I wish I could be more help. I got a camera working but yours is much cleaner.

Mike

#40 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 14 April 2008 - 10:26 PM

Hey Mike
that was just an example, I won't make the camera stuff. You're still helpful :xcahik_: I was just answering your question.
I just make a top down view, that's not what we're looking for the game. If you think mine is much cleaner then merge it with yours :sad2:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users