Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / New and powerful program of Jumping FPS.

Author
Message
Jedi Lord
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Jedi Temple
Posted: 23rd Jul 2005 16:28
I made this program to work on my first FPS game.
Check them out at the source.
I hope yer enjoy it.

1THz, 20GB RAM, NVidia Quadro FX3000/20GB, 2TB HD, XP Pro(MINI SUPER COMPUTER)
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 23rd Jul 2005 18:35 Edited at: 23rd Jul 2005 18:35
Thats pretty nice Tyler!! Well done. A few suggestions on how to take it further...

You know when you jump, you add +0.4 everytime and then -0.4 everytime for the up and down parts.. How about you try to make it more realistic.. Make another variable called speed# and when you jump, set it to a positive number (like 1.0).. Then every loop ass speed# to the y position. This will make it move upwards, obviously... Next, make it so that it subtracts from speed# every frame, something like -0.01. This means speed# will get smaller every frame and the upward jump will gradualyl slow down and eventually will start moving your character downwards again. You need to make it stop moving the character down when it has collided with the floor.

Also - have you looked into timer-based movement? That way you wouldnt have to limit the frame rate to 60fps. Have you done much about speed/time maths at school yet (if memory serves me, you are one of the younger members of the forum?)

Finally, Code neatness. I remember when I did my degree they were VERY strict on this and you could lose up to 25% of your marks if your code wasn't indented and remarked properly. Now lets face it, most programmers never put remarks because it breaks the train of thought - however, the odd remark about when a section starts and ends can be usefull.. The biggest problem is indenting. Basically, whenever you "nest" something, like a for or do loop, you should indent the contents, like this:


Or



That is much easier to read than fully left-aligned code, such as you submission at the top.

FYI: The current challenge in the challenges thread is a program that will automatically indent and neaten code up. I think Ric might be doing a 20-liner compressor/decompressor too Anyone care to challenge us? Hehehe

Anyways - well done on that, its a nice program! Keep it up.

My Website:

Login to post a reply

Server time is: 2025-06-03 17:42:56
Your offset time is: 2025-06-03 17:42:56