Game Development Community

Massive Gravitic Bodies System

by Kevin James · in Torque Game Builder · 06/19/2008 (7:36 pm) · 8 replies

Hey everyone!

I've been hard at work on a TGB project recently. It's called the Massive Gravitic Bodies (MGB) System. To my disappointment, I just found out that Gravitic isn't a word.

Anyways, I did a quick alpha build with source. You can download it here:

MGB System Alpha (1.5 megs)

Current features include:

*Different density constants for terrestrial planets, gas giants, stars and black holes
*Realistic gravity effect from all active MGB's to all active objects (such as players)
*Minimap that auto updates position of player and MGB's
*Surreal background squares (ala diBALLic) that are only drawn as the player can see them. (Its hard to explain, set the zoom level to 0.2 on sceneWindow to see what I mean.)
*Basic movement for a player ship (Forward, reverse, turn left and right)

Planned features:

I'm not telling you.

Some things you need to know:

arrows are for movement
escape is for quit
f5 is for debug banner
f4 is for pause and only pause (unpause doesn't work -- I'll look into it. ;)

The resolution can be changed by editing the "game/settings.txt" file. ( and then saving it. )

About the author

Computer security, digital forensics, and platform jumper enthusiast. shells.myw3b.net/~syreal/


#1
06/21/2008 (2:44 am)
Looks interesting. I found the ship acceleration didn't do anything - or maybe it's just very weak. I could rotate, but not thrust at all.
#2
06/21/2008 (4:59 am)
Thanks Conor.

That's strange about not being able to tell that the ship is accelerating. It is pretty weak, but you should be able to tell that it is accelerating. The only reason that I can think of is that maybe you were caught in a gravity well, and you tried to escape it by applying your acceleration in the opposite direction as the gravity. Sometimes when you do that, it looks like your thrust is doing nothing whatsoever. You have to apply your acceleration perpendicular -- if the body is pulling you down, you should go left or right -- kind of like a rip tide.

I've been doing a lot more work on this project. I got orbits down -- though I haven't tested all the features that I want them to have. (centers based on objects, vertical/horizontal stretch/shrink) I'm also working on a to-scale version of our home solar system, Sol.

1 world unit is equal to 1000 kilometers.

The sun is 696 by 696 world units.
The Earth is 6.8 by 6.8 world units.
They are really far apart too, but I forget the number.
#3
06/21/2008 (7:41 am)
Hehe, I hope you're not making it visually to scale or you won't be able to see any of the planets. They'll be like grains of dust hundreds of meters apart. Scale up the planets by a few thousand times so that they're visible.
#4
06/21/2008 (1:37 pm)
Yeah - you have an excellent point, Conor -- other people have brought it up as well. I originally planned to do everything to scale, but that is a massive undertaking -- in more ways than one. It'd take a lot of research, time for implementation -- and probably would turn out to not be very fun in 2D.
#5
06/21/2008 (6:16 pm)
I'm abandoning this project.

The only other useful thing it produced was circular orbits but even that function was really unstable.

It is abandoned because it was turning out to be 0 fun. The only thing the planets and the sun did were annoy me, and it was hard to control the ship. There was also the paradox of making the planets too big, and you'd just run straight into them without seeing them at all, or too small and they didn't look like planets. There is no happy medium that I could find.

Now I know why games like Freelancer forwent orbits and gravity. Its incredibly difficult to figure out, and maybe it was no fun anyway.
#6
08/25/2008 (4:11 am)
MGB System Alpha (1.5 megs) link not working
I'm interested in mini-map ideas with tgb
Any thoughts -
thnx
#7
08/25/2008 (4:59 am)
Sorry for the broken link, John -- try it again and it should work.

I hope you can get something useful from the project.
#8
08/25/2008 (5:07 am)
Many thanx kevin
Have u seen any more links for tgb & mini maps?
I would be very grateful
cheers