Ratchet and Clank basic controls and jumping?

Blitz3D Forums/Blitz3D Beginners Area/Ratchet and Clank basic controls and jumping?

Cubed Inc.(Posted 2010) [#1]
The reason that I put up this somewhat "familiar" post was so I could start fresh with learning 3d action/adventure platforming controls and jumping.

I am looking to learn and understand the basic controls and jumping that is in the new Ratchet and Clanks games.
I've played the newer games(I don't own a PS3 though) and I felt the controls to be very reliable, and I thought that it would be a good "role model" for my first big project.

I want to learn how to create the basic controls and jumping that are in the newer Ratchet and Clanks game(as I already stated)
If you could be considerent enough to watch a gameplay video of it to help "grasp" the concept, that would be great.

You don't even have to search it, here's a link(hope it isn't broken)
http://www.youtube.com/watch?v=DgJZGEj_txI

I'm only trying to learn the "basic controls" and jumping in the game.
The video show footage of him shimying and zooming in while shooting. I DON'T need to know that.

I just want to make it as easy as possible for you guys to help me out.

The help would be EXTREMELY apprechiative.
So please reply, thanks:)


Who was John Galt?(Posted 2010) [#2]
So, it looks like it just gives you the option of a 'second jump' while you are in the air. Do it like this:

When your player hits jump, perform the normal jump code, and set a flag 'not_hit_ground_1st_jump', then, if that flag is set and the player hits jump again, add a fixed value to their z velocity for the second jump (you may want to make it smaller than the first jump), and of course set the flag to zero.

You really haven't understood a simple jump yet and now you're working on Ratchet and Clank.....


stanrol(Posted 2010) [#3]
illegal ROMS?


Cubed Inc.(Posted 2010) [#4]
John Galt
I understand jumping the basics of jumping, I just wanted to start fresh with my camera and controls becuase I didn't really understand the other control sceme that I used, so I want to relearn and understand it.

stanrol
what about illegal roms?


Nate the Great(Posted 2010) [#5]
here ya go basic 3d jumping like in the game, experiment and change the numbers and you can get it just right.

Graphics3D 800,600,0,2

cam = CreateCamera()
TurnEntity cam,45,0,0
MoveEntity cam,0,0,-10

ball = CreateSphere()
Local x#,y#,z#
Local dy#

l = CreateLight()
TurnEntity l,60,90,0
EntityColor ball,255,0,0

ground = CreatePlane()
EntityColor ground,0,0,255
MoveEntity ground,0,-1,0

While Not KeyDown(1)
	Cls
	
	y = y + dy
	dy = dy - .01
	
	If KeyHit(56) Then
		If y < .01 Then dy = .3
	EndIf
	
	If y < 0 Then y = 0
	
	PositionEntity ball,x,y,z
	
	RenderWorld()
	Flip
Wend



Cubed Inc.(Posted 2010) [#6]
Nate the Great
That's a nice example, and it did allow you to only jump once(with modifications of my own it could jump twice). I also have a small question.

How could I make a camera system so that the camera can pan up to the player. I understand how to make the player jump and fall correctly, it just that the camera needs to work with the jumping.

I'm trying to make it so that when the player jumps, the Y of the camera stays in place, but when the player moves and lands on a platform, the camera would move and pan with the player.

Is there any way of doing this?


Nate the Great(Posted 2010) [#7]
well I suppose you could test when a collision has happened with the ground and if it has then find the new target y for the player... this should be updated every frame that the player is touching the ground and should have a smooth transition when the target y jumps dont just snap to it, move the camera there slowly so its a smooth transition


Cubed Inc.(Posted 2010) [#8]
Nate the Great
This is kind of a dumb questions, but how would I make the new target for the y of the player update?


Nate the Great(Posted 2010) [#9]
well im not sure what you mean exactly, I think you misunderstood...

so lets assume you took care of the x and z of the camera and all you care about now is fixing the y. ill assume you want the target y of the camera 5 units above the player.

if playerisonground then
targety = playery+5
endif

now the camera will jump if you jump and land at a different height. This can be fixed by taking the target y and moving the camera toward it slowly.