Dev Diary 023: Procedurating Solar Systems

Matt Barton's picture

Sparkles!Sparkles!The ol' dev diary has been quiet lately as I had some very tough times getting over the next hump of my gravity game. By the way, how does "Outlaws of Gravity" strike you as a title? Little play on "Law of Gravity." But, anyway, I've been busy trying to make a system for procedurally generating the solar system, giving you a random distribution of planets and moons. Of course, later on I'll add some different textures for the planets, so that they don't all look the same.

I had a really tough time with the moons. I don't want them to be smashing into planets or each other, so I had to keep spacing out the planet orbits more and more, until finally it just wasn't practical. I went down a dead end of just making them decorative. Didn't like that, so went back to the old way. Finally, decided I just had to limit the number of them. I originally wanted three as the max, but just wasn't feasible unless I really went big with the resolution. I'm still not really happy about the moons. I think they're cool, and make it more realistic, but they don't seem to serve much purpose. I guess one strategy could be trying to put your ship right next to one, so that hopefully it might catch a bullet. Other than that, I don't see a point, so I might end up taking them out. IIRC, they didn't have them in gravity wars anyway.

There were lots of ways I could have handled "the moon problem." I could have just made the planets orbit at the same speed. That way, I wouldn't have to worry about collisions, and just could make sure they were spaced out enough. However, I think the varying speeds will make the game more fun. I could always just say that there are moons, but their size is small compared to the planets (and the ship???) that you don't see them. Of course, there must be some solar systems out there without any moons of significant size, and we could just be looking at an inner solar system (the huge gas giants are simple presumed to be far away). It's my understanding that this is how our solar system is built; smaller planets up close; giants much farther away.

I also implemented a crude camera control. If you hold down the middle mouse button, you can "drag" the screen around. The wheel zooms in. This system will definitely need some tweaking, but I think I have the right idea. I need to add a "default view" button somehow in case you get mixed up, and it might be nice to have a cam option that follows your ship. Of course, in the real game, you're going to need to see the other player.

So, to give this version a shot, click on a planet to spawn your ship. Left/right aims, space fires, and of course you have the above mentioned camera controls.

Unity Web Player | WebPlayer


Bill Loguidice
Bill Loguidice's picture
Joined: 12/31/1969
Very nice work. It's an

Very nice work. It's an intriguing bit of physics sand boxing.

Matt Barton
Matt Barton's picture
Joined: 01/16/2006
Thanks, Bill. I have to

Thanks, Bill. I have to admit, I find the demo alone strangely fascinating...I thought I might be just exercising vanity, but it does seem interesting just firing bullets and watching their trajectories. I'd love to capture that "ooh ahh" type stuff in the finished game.

Sadly, it looks like I'm into world of tanks now. Thanks. Clok!!! :)

Joined: 01/21/2009
Matt Barton wrote:

Sadly, it looks like I'm into world of tanks now. Thanks. Clok!!! :)

Whats you handle.. so I know when i blow your tank up! we are farily close on the map so I would guess we might get matched up in a game... I have alot of tanks i run (I didnt just work up one line, I have a light/med/heavy in all the 3 main ones and one in each of the two French tank lines.. so i have about 14 tanks I need to run everyday (for the 2X exp for first win of day). and if you get on a bad run.. i can play a match in some tanks 5-10 time before a win.. Frustration!!!!! Im still at a better win then loss ratio.. and am close to a tank kill per match... early games when your new can be quite frustrating .. and fun.. those littel tanks can be One shot quite often, bu the up side is most of the low battles the enmey tanks are alot like yours.. easy to kill so you can if smart kill them too.

Look for SoulSyco everytime you blow up.. it might be me :)

this is the only online game i still play almost everyday.. i can get so mad i could spit fire.. but then you have a match where the team works well toghter and you kill a few tanks and its such a good feeling.. succes.. teamwork.. killing that big slow tank with your little fast one! Davids Sling wins again!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.