11 ms·
Procedural Planet Generation
- joewrong 12y agogoogle cache version: http://webcache.googleusercontent.com/search?q=cache:http://experilous.com/1/blog/post/procedural-planet-generation http://webcache.googleusercontent.com/search?q=cache:http://...
- opless 12y agoThanks
- Symmetry 12y agoAwesome work. I really sympathize with his "Why did they use Javascript instead of Lua" point. Of course I mostly do embedded programming so this might be my biases talking but every time I find myself using Javascript I keep wishing it was more like Lua.
- RobertKerans 12y agoWhy Lua? I was just reading through the Red Blob Games articles, and on the subject of scripting languages, he says something to the effect of 'if you have to use a general purpose scripting language, just go for Lua', written as if this is kind of self-evident. What is it about Lua that makes it attractive?
- Alphasite_ 12y agoIsd assume it's because luajit is very lightweight when compared to javascript systems, which tend to be very memory hungry.
- renox 12y agoPerformance, it's one of the fastest scripting languages.
- divs1210 12y agoHello, Slartibartfast! I look forward to playing a "race to the south pole" rts. Brilliant work.
- forrestthewoods 12y agoIt looks like there is supposed to be an interactive demo. Doesn't work on the google cache. Is there a mirror of that anywhere?
- mmanfrin 12y agohttp://experilous.com/1/planet-generator/2014-09-28/version-1 http://experilous.com/1/planet-generator/2014-09-28/version-...
- icoder 12y agoVery nice! This goes into my (small) collection of proc-gen bookmarks. I've taken a (side) interest into this field, which, inspite of classics like perlin noise, still seems quite young. I've been reading about plate tectonics last week and it's good to see it working for someone else. Maybe I should give them a try as well.
- robinsloan 12y agoDo you have that collection of bookmarks posted/shared anywhere? Always curious to see more stuff like this.
- icoder 12y agohttp://jsfiddle.net/rL0qmee9/ http://jsfiddle.net/rL0qmee9/
- zem 12y agoi have fond memories of playing with terragen back in the day. no idea what techniques they used, but they got startlingly good results.
- scott_karana 12y agoIf memory serves, Terragen also used Perlin noise by default, unless you imported your own bitmaps or selected a different algorithm. :)
- bjz_ 12y agoYeah, in Terragen 1&2 it was just a simple heightmapl, but Terragen 3 was a huge rewrite - not sure what they use now.
- mrsharpoblunto 12y agoI use some of my spare time to hack around on proc gen stuff - mainly targeted toward generating starfields & planets using GPU's. Here's something I worked on recently regarding generating realistic nebulas and starfields http://www.junkship.net/News/2014/02/02/my-god-its-full-of-stars http://www.junkship.net/News/2014/02/02/my-god-its-full-of-s...
- epscylonb 12y agoAs a huge Civ fan the idea of having a game take place on a truly spherical world is very appealing.
- KeytarHero 12y agoReally cool - I, too, have long been bothered by the cylindrical map in Civ and wondered what a spherical Civ would be like. (At least Civ V's switch to a hex grid solved the biggest pet peeve I had with the game's geometry, since with a square grid, moving diagonally was just as fast as moving orthogonally.) However, the irregular tiles actually bother more than if it was a standard geodesic sphere which only had 12 pentagons. For one, the fact that tiles are different sizes looks kind of weird. More importantly, this tile layout could actually make an important strategic difference (much more than if there were only 12 pentagonal tiles). Assuming movement costs between adjacent cells are constant, a straight line may not be the fastest way between points anymore! Looking at the heavily distorted mesh example, I can see several places where a path through a few large cells has the same movement cost as the straightest path. Also, a realistic simulation of global wind patterns isn't actually that hard. Since it's only long-term trends that matter (at least when it comes to shaping overall climate), it's not like you'd have to calculate detailed fluid mechanics models. A simple model of Hadley & Ferrel cells (which is key to having realistic deserts) would get you most of the way there. [1] [1] http://en.wikipedia.org/wiki/Atmospheric_circulation http://en.wikipedia.org/wiki/Atmospheric_circulation
- RickHull 12y ago> However, the irregular tiles actually bother more than if it was a standard geodesic sphere which only had 12 pentagons. For one, the fact that tiles are different sizes looks kind of weird. More importantly, this tile layout could actually make an important strategic difference (much more than if there were only 12 pentagonal tiles). Assuming movement costs between adjacent cells are constant, a straight line may not be the fastest way between points anymore! Looking at the heavily distorted mesh example, I can see several places where a path through a few large cells has the same movement cost as the straightest path. I would say there is nothing wrong with strategic differences, so long as they are irregularly distributed. Regular or predictable distribution would cause strategic ruts. Also, irregular movement costs are a feature. Ancient spice trading routes and deer paths in the woods rarely follow straight lines either.
- KeytarHero 12y ago
- bazzargh 12y agoAnother idea for folk who want to generate equally spaced points on a sphere for things like this - a while back I did an answer on codegolf.stackexchange: http://codegolf.stackexchange.com/a/24961/16869 http://codegolf.stackexchange.com/a/24961/16869 for showing a daylight map of the earth. You need to store a map of the earth to do this, but I didn't want to waste storage on the poles as you would with most projections, and couldn't be bothered calculating tilings; so the path I took was to use a spiral sampling of the surface of the earth giving approximately equal area, then flood filling. I hadn't seen this approach before, but guessed someone would have thought of it so hunted down a discussion; The spiral I used is taken from here: https://groups.google.com/forum/#!msg/sci.math/CYMQX7HO1Cw/tFhJvkWHSjUJ https://groups.google.com/forum/#!msg/sci.math/CYMQX7HO1Cw/t... (see the rest of the thread, their motivation is minimising the potential energy of charged particles on the sphere).
- Figs 12y agoI was bugged by games not having proper polar regions too a while back. One solution I thought of (but never got around to implementing) was to use a cube map to represent the surface of the sphere. I thought it'd be easier to work with six flat faces than to figure out how to index the tiles on a soccer ball...
- kakali 12y agoA similar but different idea is the TOAST projection. However here it starts with an octahedron instead of a cube. The benefit is the texture can all be stored on a square and is argued has a more uniform sampling that equirectangular projection. http://www.worldwidetelescope.org/docs/worldwidetelescopeprojectionreference.html#TOASTProjection http://www.worldwidetelescope.org/docs/worldwidetelescopepro...
- btbuildem 12y agoIt'd be rad if you could elevate individual tiles proportionately to their mean elevaton - kind of a Causeway of Giants effect, it would give a sense of the elevation in any of the other modes (esp. in terrain mode!)
- lsjroberts 12y agoThis is excellent, though I wonder what it would take to do a simulation from the beginning and change over time as opposed to a fixed state. Then let the features, biomes and weather patterns arise naturally from the given physics (and perhaps some nudging).
- thret 12y agoIt would be pretty cool if the game actions could effect the environment too - global warming, pollution, nuclear disasters, that kind of thing.
- hypertexthero 12y agoAlso check out [Elite: Dangerous][ed] for some awesome procedural planet generation. [ed]: http://hypertexthero.com/logbook/2014/07/elite-dangerous-education/ http://hypertexthero.com/logbook/2014/07/elite-dangerous-edu...
- touristtam 12y agoreminds me of this article: http://www.pyxisinnovation.com/pyxwiki/index.php?title=Mathematics_for_a_New_Grid_System http://www.pyxisinnovation.com/pyxwiki/index.php?title=Mathe... And: "Climate Modeling with Spherical Geodesic Grids" from Sept/Oct 2002 - Computing in Science & Engineering