by date
TGB Procedural Planets - Part 1
TGB Procedural Planets - Part 1
| Name: | Gregory Stewart | ![]() |
|---|---|---|
| Date Posted: | Mar 31, 2008 | |
| Rating: | Not Rated | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Gregory Stewart |
Blog post
The Goal
The goal is to create procedural planets in TGB that can be used in a space game I want to create. My inspiration comes from Starflight for Sega Genesis. This game used fractal-generated planets but used bitmap tiles to keep the graphics more interesting without having to overload the system with detailed fractals.
Although there are many aspects to creating a planet, I will mainly be concentrating on creating the tilemaps. So, the plan is:
* Create a fractal/noise-based image that can be used for the topographical features of the planet
* Convert this image into a tile map by substituting each pixel with a tile
* Create smooth transitions between tile types using tile transition pieces (great article on this is available on GameDev.net here: www.gamedev.net/reference/articles/article934.asp)
* Wrapping planet--If you go long enough in one direction on the planet, you can end back up where you started. Yes, wrapping tilemaps already exist, but I also need objects that appear on the tilemap to wrap as well (useful for enemies, particles, and anything that's not a tile)
Part 1
Why reinvent the wheel? I own a license for TGE as well and remembered that there are some fractal-based terrain features in the terrain editor. And, to top it off, the heightfields created by this code are already tileable! So, with some small modifications, I managed to rip out the noise and heightfield code from TGE and put it into TGB.
After some further modifications to the generation code, I clamped the values into several sections and assigned colors to each elevation range. The result:

Nothing too impressive yet, but it's a start. The next step is to make the planet surface a little more interesting and somehow generate non-square heightmaps so it looks more like a flattened planet. I am not planning on using the fractal generated image from space, only as a guide for creating the planetary surface and some sort of overview map, so it doesn't have to look great, it just has to function well.
See you next time for Part 2.
The goal is to create procedural planets in TGB that can be used in a space game I want to create. My inspiration comes from Starflight for Sega Genesis. This game used fractal-generated planets but used bitmap tiles to keep the graphics more interesting without having to overload the system with detailed fractals.
Although there are many aspects to creating a planet, I will mainly be concentrating on creating the tilemaps. So, the plan is:
* Create a fractal/noise-based image that can be used for the topographical features of the planet
* Convert this image into a tile map by substituting each pixel with a tile
* Create smooth transitions between tile types using tile transition pieces (great article on this is available on GameDev.net here: www.gamedev.net/reference/articles/article934.asp)
* Wrapping planet--If you go long enough in one direction on the planet, you can end back up where you started. Yes, wrapping tilemaps already exist, but I also need objects that appear on the tilemap to wrap as well (useful for enemies, particles, and anything that's not a tile)
Part 1
Why reinvent the wheel? I own a license for TGE as well and remembered that there are some fractal-based terrain features in the terrain editor. And, to top it off, the heightfields created by this code are already tileable! So, with some small modifications, I managed to rip out the noise and heightfield code from TGE and put it into TGB.
After some further modifications to the generation code, I clamped the values into several sections and assigned colors to each elevation range. The result:

Nothing too impressive yet, but it's a start. The next step is to make the planet surface a little more interesting and somehow generate non-square heightmaps so it looks more like a flattened planet. I am not planning on using the fractal generated image from space, only as a guide for creating the planetary surface and some sort of overview map, so it doesn't have to look great, it just has to function well.
See you next time for Part 2.
Recent Blog Posts
| List: | 03/31/08 - TGB Procedural Planets - Part 1 05/03/07 - Where to go from here? 09/16/06 - Marble Tactics - Free T2D/TGB Game! 03/27/06 - Marble Tactics - A first look |
|---|
Submit your own resources!| David Montgomery-Blake (Mar 31, 2008 at 16:29 GMT) |
| Melv May (Mar 31, 2008 at 18:55 GMT) |
There was once a time when I thought procedural stuff was soooo very cool. I guess I still do in a way so I can't wait to see where you go with this.
Melv.
| Kevin James (Mar 31, 2008 at 20:23 GMT) |
| Nauris Krauze (Apr 01, 2008 at 16:28 GMT) |
| Gregory Stewart (Apr 02, 2008 at 00:04 GMT) |
I'm a huge fan of Starflight. I was briefly involved with the two official "sequels":
Starflight III
www.starflightcentral.com/
Starflight: The Lost Colony
starflightgame.com/
I left both of the above for several reasons, but mainly because I don't play well with others.
| Jesse (Midhir) Liles (Apr 02, 2008 at 05:53 GMT) |
You must be a member and be logged in to either append comments or rate this resource.



Not Rated


