Basic Math For Quasi-Realistic Space Games

Post your own tutorials, guides and demos.

Post » Tue Oct 28, 2008 7:44 pm

Hello All!

I have been a big fan of space games since playing the original Star Control and Star Control 2 back in their heyday. With a little help from these forums, I was able to recreate a pretty similar quasi-realistic movement scheme that utilizes the physics object and a little original math to form a very controllable method of moving sprites with inertia. In the hopes that others (in addition to the project I have planned) can also make good use of this, I decided to upload it for everyone to enjoy and use.

http://www.2shared.com/file/4177110/23d5774e/test.html

Art: Sprites are from the internet. Other art is made by me.
Controls:
Up arrow = Apply thrust
Left/Right arrows = turn left/right
Enter = Turn inertia on/off

*Note*
Being a pretty massive beginner in programming as well as to using construct, my timedeltas may be a bit wrong. If so, please let me know so that I can fix them. Thanks!
B
2
G
4
Posts: 49
Reputation: 1,148

Post » Tue Oct 28, 2008 7:49 pm

Does this link work?
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Tue Oct 28, 2008 7:52 pm

yes it does.

Go all the way to the bottom , right hand side is the link.
B
15
S
10
G
8
Posts: 107
Reputation: 4,944

Post » Tue Oct 28, 2008 8:13 pm

Since you mentioned SC2 I was expecting Earthling Cruiser insted of this unknown ship ^^. I'm sure you can grab some sprites from TimeWarp.

This engine's really good. Are you going to reprocude full functionality of SC2 Hyper-Melee fighting? It'd be nice if there was planet as well. And it's good to think about limiting maximal velocity = sqrt(velX^2 + velY^2) instead of limiting velX and velY separately.
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Tue Oct 28, 2008 9:35 pm

Good call on those timewarp sprites. Those would work wonderfully for testing out more of the engine. I am intending to make a full function hypermelee style fighting system, albit with more of my own ship designs than ones from any of the SC games. As much as I love the SC ship designs, I dont want to rip them off TOOOO much. The planet will be added later, as I figure out more on how to make it work properly. I will also try that new block of code. That should work a lot better.
B
2
G
4
Posts: 49
Reputation: 1,148

Post » Sat Nov 01, 2008 1:53 pm

reminded me of Swarm, that game was amazing, you guys should try it if u havnt
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest