Reply to comment

Matt Barton's picture

Dev Diary 023: Procedurating Solar Systems

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

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Images can be added to this post.
  • You may quote other posts using [quote] tags.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.