0 registered members (),
1,089
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Kingdom Hearts Movement Tutorial
[Re: Locoweed]
#86299
09/06/06 23:19
09/06/06 23:19
|
Joined: Jul 2004
Posts: 4,206 Innsbruck, Austria
sPlKe
Expert
|
Expert
Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
|
sweet stuff... i have to figure out a few things though, but all in all, if this just gets a little better adaptable, to not rely on the implemented code, one can easily use this as base for a 3rd person game of any kind, like action, fighting, jump and run ect...
as said, i have to play around with it a bit. maybe i find a good way to implementy MY camera with this code, sicne im not very good at coding. then i just have to find out how to implement shooting and im ready to go:-p
|
|
|
Re: Kingdom Hearts Movement Tutorial
[Re: Ludochrist]
#86302
09/08/06 13:44
09/08/06 13:44
|
Joined: Nov 2004
Posts: 862 Australia
DavidLancaster
OP
User
|
OP
User
Joined: Nov 2004
Posts: 862
Australia
|
It's pretty easy to set up a simple camera that way. The player moves relative to the camera so you pan the camera as the player moves left and right rather than have the camera controlled by the mouse. This may not be the best code to do the job but it works: Code:
IF (key_w == 1 && key_s == 0 && key_a == 0 && key_d == 0) { temp.x = camera.pan; } IF (key_s == 1 && key_w == 0 && key_a == 0 && key_d == 0) { temp.x = camera.pan + 180; } IF (key_a == 1 && key_s == 0 && key_w == 0 && key_d == 0) { temp.x = camera.pan + 90; camera.pan += 5 * time; } IF (key_d == 1 && key_s == 0 && key_a == 0 && key_w == 0) { temp.x = camera.pan - 90; camera.pan -= 5 * time; } IF (key_w == 1 && key_a == 1 && key_d == 0 && key_s == 0) { temp.x = camera.pan + 45; camera.pan += 2.5 * time; } IF (key_w == 1 && key_d == 1 && key_a == 0 && key_s == 0) { temp.x = camera.pan - 45; camera.pan -= 2.5 * time; } IF (key_s == 1 && key_a == 1 && key_d == 0 && key_w == 0) { temp.x = camera.pan + 135; camera.pan += 6 * time; } IF (key_s == 1 && key_d == 1 && key_a == 0 && key_w == 0) { temp.x = camera.pan - 135; camera.pan -= 6 * time; }
Use that concept, introduce some new variables and you can set up a camera like that pretty easily if you have the experience.
|
|
|
Re: Kingdom Hearts Movement Tutorial
[Re: TigerTao]
#86304
09/16/06 16:44
09/16/06 16:44
|
Joined: Sep 2005
Posts: 42
SusanJ
Newbie
|
Newbie
Joined: Sep 2005
Posts: 42
|
can someone please upload this somewhere so i can download it. it looks realy good and im drooling to try it . thank you.
|
|
|
Re: Kingdom Hearts Movement Tutorial
[Re: TWO]
#86306
09/25/06 19:24
09/25/06 19:24
|
Joined: Sep 2006
Posts: 292
Mythran
Member
|
Member
Joined: Sep 2006
Posts: 292
|
Did anyone changed the code so that the player may kill monters and die? If so, can you give me that piece of code? Thanks for this great code! & Thanks in advance.
Last edited by Mythran; 09/25/06 19:43.
|
|
|
Re: Kingdom Hearts Movement Tutorial
[Re: DavidLancaster]
#86307
10/14/06 14:49
10/14/06 14:49
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
This may be a temporary problem but... i can't download it...:(... looks awesome, I really wanna try it, but I can't download... ? Thx for giving this to the community!! Micha
Take that back. I got it from the AUM recources.. thanks!
Last edited by Germanunkol; 10/14/06 14:58.
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
|