How to generate doorways procedurally, on the fly, and guarantee acessibility I'm currently creating a spaceship exploration game, and I have a massive problem I've been trying to solve for months, and through the rest of my group deciding to opt for a rewrite to fix some massive spaghetti. Anyway, the problems goes as follows The player starts in a room, from which they can travel to some other adjacent rooms through doorways. These doorways are stored in a map of the direction they're in, and the doorway object they reference. Each Doorway object keeps track of the two rooms it links, and will direct the player to each one when necessary. However, all rooms need to be accessible by at least one route, and going through a doorway on the starboard side means that the other room needs to have the same doorway on the port side. I can do this by just having every wall be a door, but that gets boring to explore. Pre generating these proved enough of a glitchy mess for me to fail it, but now, the spec has changed. The world will be theoretically infinite, and as such, the pathing cannot be pre generated, and instead must be done as new rooms are needed, or expected to be requested soon. So I need to generate what is essentially a maze, with loops allowed, drawn on a grid, one square at a time, where not only is every room not directly aware the others exist, but acessible from every other. On top of this, going through a doorway on one side of a room means that the same doorway needs to be on the opposite side of the next room. What's a good way to guarantee all these properties? I am willing to part with rooms having no knowledge of others, but would rather keep it this way for ease of re generating a room's type later, should that become necessary. Below is a text file ascii mockup of a 5x5 example I created https pastebin.com EtdAWAwD Lines are walls, Xs are doors, and the S is the player starting position. Any advice at all is appreciated, even on alternate routes to consider for generating these.


2d Procedural universe generation I want to create a flat universe, where at first the whole universe is blank. That would be represented by a parallax scrolling nebula background image. What I want to do is represent the planets as disc shaped objects in the universe. They can be of various sizes. The inside of the discs will consist of a landmass, then outside that will be a body of water and after that air. what would be the best way to go about creating those tiles procedurally as for example the air would consist of various gases and the land of various minerals and resources. My first thought is to create texture images and then stamp out the circles out of those textures, but problem is that those textures would have to wrap horizontal and vertically. Is there a fully procedural way of doing this?


How can I ensure procedural levels in an RTS are fair? I've seen that symmetry and coherance is important in RTS level design, but I'm lazy and want to do procedurally generated levels. How can I ensure I generate a fair playing field when procedurally creating levels for an RTS?


Procedural terrain in the Style of "Zelda A Link to the Past" I am working to create a system that randomly generates pseudo 3d terrain on a tile grid using the methods used in the legend of zelda games between link to the past and minish cap. I have created a tileset for it, and after manually making some maps and getting a feel for what the tile placement algorithm needs to do, I've implemented one of four possible layer transitions. There are still some special edge cases which will likely need special tiles, but the image shows a fully procedural map using it. My implementation keeps track of the altitude of each vertex (not center) of a tile. By comparing the altitudes at each corner, and in some cases those around the focused tile, I can determine which sprite to use. This system needs to be "infinite" in that I can generate chunks adjacent to existing ones using the same noise function. I have plans to make a worldmap system similar to a LOD system too, which wouldn't be too hard with perlin noise, but alternative suggestions should keep this in mind. I have several questions about this system. The first is this How I can make my noise more like the example, preferring to line up edges which are nearby (but only to a degree)? How can I make it prefer less complex shapes, more similar to octagons than realistic messy hills? The second is about how I can connect the layers for altitude changes greater than 1 level, I want to require the player to use ramps. Unfortunately I don't have a solid example of this in my current tileset, but essentially, two disconnected altitudes should have a "slope" (really just the neutral tile) between them... I could use A or similar, but how do I detect where it needs to be used? Or is there a better way to ensure connectivity? Excuse the programmer ""art"" please What I have What I want


How is a 3d perlin noise function used to generate terrain? I can wrap my head around using a 2d perlin noise function to generate the height value but I don't understand why a 3d perlin noise function would be used. In Notch's blog, http notch.tumblr.com post 3746989361 terrain generation part 1, he mentioned using a 3d perlin noise function for the terrain generation on Minecraft. Does anyone know how that would be done and why it would be useful? If you are passing x,y, and z values doesn't that imply you already have the height?


Help with concrete examples of Perlin Noise variables for terrain generation I believe this question can help beginner game developers. I've looked through a dozen or so answers on perlin noise here and on Stackoverflow, and found only 1 concrete implementation of perlin noise that I have listed below. There's a lot of advice, but it's hard to translate into what I have to do with X and Y values, and if I have to do this at all times, or only when I want specific features to appear. Here's what I got from Stackoverflow I believe this was advised as mixing various noise octaves. It seems to generate a fairly interesting terrain, although it rarely generates mountains for me. float perlinNoiseValue 1 15.0 fabsf( generator perlinNoiseX perlinX y localYIndex z 0 t 0 ) 2 15.0 fabsf( generator perlinNoiseX 2 perlinX y 2 localYIndex z 0 t 0 ) 4 15.0 fabsf( generator perlinNoiseX 4 perlinX y 4 localYIndex z 0 t 0 ) 8 15.0 fabsf( generator perlinNoiseX 8 perlinX y 8 localYIndex z 0 t 0 ) I'm looking at this answer on Perlin Noise by Byte56, and it's hard for me to translate verbal descriptions into what I have to do with X Y inputs. Can someone provide concrete examples, along with descriptions of what terrain features such noise generates? For example, does mixing noise by picking the max value equates to something along the lines of float perlinNoiseValue1 fabsf( generator perlinNoiseX perlinX y localYIndex 300 z 0 t 0 ) float perlinNoiseValue2 fabsf( generator perlinNoiseX perlinX y localYIndex z 0 t 0 ) float finalValue fmax(perlinNoiseValue1,perlinNoiseValue2) Do I always pick the max value in the case above, or only in some cases when I want a certain feature to manifest? Does flatter terrain look like ? float flatterTerrain fabsf( generator perlinNoiseX perlinX y 0.2 localYIndex z 0 t 0 ) Does wider valleys and hills look like? float widerValleys fabsf( generator perlinNoiseX perlinX 3.0 y localYIndex z 0 t 0 )


Procedural 3D Environment Generation I am concerning a 3D Scroller game which is like Subway Surf or Temple Run. The thing I am confused about is their way of generating 3D environment. For example for 2D games like Flappy Bird, there is a camera and player which have fixed positions respect to the X axis. And the environment is being generated, moved into camera's viewport, and finally gets destroyed after getting out of viewport. I mean, player and camera does not move in general, the environment does. Is this approach efficient by means of performance for 3D scrollers? Do they use a box which covers the camera's viewport, and when objects get out of the box, destroy them? Or do they create the environment via code as the player goes further, then make the camera follow the player and they are moving both? Is this a valid approach and what are the advantages or disadvantages of these implementations? Thanks in advance!


Getting name fragments for a name generator Back again to ask more about name generation this time about the dictionary of syllables which I apparently need to reliably generate a name. For reference, my last question. I've written a little bit of code which, given a file, uses the first line to determine how long the name can be (with multiple options for variability), then builds one from the syllables given in the rest of it. It works decently enough, given example syllables in an example file. For those wanting to try out a set of syllables of their own, I've made a version on Ideone.com. stdin contains the list of lengths and syllables. That's where I'm having an issue, though. What should I use for the syllables? I've looked around, but I've been unable to find a good list of names to draw from. Maybe it's just that I'm bad at this or something, but I can't really get a good list of syllables that make names. To add to that, I have to do it by hand, and I'd much rather make a program to split a list of names into syllables, but I can't get that to work. I'll post the source for my attempt once I'm home. In short, how can I get a good list of syllables for use in a name generator? Is there pre existing code I can use or modify and pass it a list of names to chop into syllables, then save those to a file? If not, how would I go about writing my own?


How to combine embedded generated graphs in a finite 2D plane? I'm pretty new to working with graphs but I'm looking at using them to create the world map for our game (a text mud with rooms nodes and paths edges between rooms). There are a number of interesting small world generators, for example Watts Strogatz (http en.wikipedia.org wiki Watts and Strogatz model) that I'd like to combine. My question is how to combine different generators. All the rooms will have coordinates in an XY plane (the rooms themselves won't have real dimensions). I can easily generate a graph, and then laying it out I can work out the XY coordinates of its nodes. But then I'd like to generate a new graph and connect at least one of its nodes to a node on the previous graph. My first idea is to figure out the XY bounding box of a graph, and use that to place it in the larger XY plane next to the previous graph (kind of tiling the graphs). Are there other methods I should be aware of?


Procedural Dungeon Generation Is there a simple algorithm to make sure all of these rooms get connected using minimal corridors? Is it possible to get a hive like structure, connecting all the rooms without having too many corridors? (Too many being 3 4 corridors coming from a single room) Below is the output of how my rooms look, basically they randomly placed. What I'm hoping to get corridor wise.


What is the state of the art in procedural character animations? I'm a programmer and I'm interested in programmatic character animation walking or running, bipedal or many legged what is the state of the art today? I heard about NaturalMotion's Euphoria system and Ubisoft's IK Rig, and they look amazing. Where can I find more info about similar algorithms?


How to structure a non rectangular maze I have built a few mazes and are familiar with maze algorithms however all examples I have learnt from are square or rectangular. In these mazes the code structure usally has a 2d array of maze cells and it is easy to navigate or test to adjacent cells. How do you structure the code for a say a Y or circular shaped maze to know what the avaliable joints between cells nodes in the maze are?


How are voxel terrain engines made? A few days ago I found something called voxel terrains and I think that they're pretty cool. But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on wikipedia that voxels are like 3d pixels or volumetric pixels. After I make the voxel terrain, how can I take these voxels and make them destroyable diggable? I will pick the best answer based on code and algorithms. preferably based in C explanations. I am a beginner with algorithms but I'm very familiar with object oriented programming step by step demonstrations. Not only concept but direction. diagrams illustrations. No, not screenshots of other engines. I know that this is a complicating subject. But, thanks for any help! No, I'm not trying to make a minecraft clone. Edit Thanks to everyone for your great help (especially Nick Wiggill)! This is what I managed to make (Work in progress).


How to generate a city street network? I would like to create a city generator for a game, but I am facing a problem at the very start of the generation the road system. As it is a medieval world, I don't want a grid plan like many modern cities. I would ideally prefer a pseudo random generation of large avenues and smaller streets, where it could be possible to get lost, but with still some logic not a complete labyrinth. Something that would look like a naturally grown town. In order to keep it simple, let's say my cities would be on flat and stable terrains, without any river crossing or relief problems. I could try to integrate it to a solution after. I didn't decide of a precise size or disposition for my cities, so if you have a solution that would work only with cities of a precise form (square, circle, rectangle etc), I would take it.


How can I procedurally generate the right difficulty of enemy waves? I'm programming a space shooter mobile game with a sandbox gameplay style similar to Defender's. The player faces infinite waves of enemies moving towards his ship. The game has many upgrades the player can buy to increase his ship's strength. It is important that the difficulty of each level matches the player's skill and strength. This includes setting the right number of enemy waves per level and the number and toughness of the enemies in them. This must be done procedurally, since the game has no predefined set of levels laid out by a designer. I'm interested in straightforward solutions with more or less the desired effect, simple enough to quickly implement and test. How should I approach this?


Are there any methods for generating rivers on demand with Perlin Simplex noise? I'm aware of many methods for procedurally generating rivers, but they require an entire heightmap beforehand in order to work. For instance, they may require to find a high position on the map and find a path to the ocean. But when working with on demand on the fly procedural generation (generating the map around the player as he moves), those requirements are unfeasible. For instance, Minecraft doesn't have "true rivers" the river does not in fact have a start and end point, it is actually just dividing the two biomes, this means that it uses the distance between the point and the edge of the biome to determine how deep the water should be, with some variance of course. This mod seems to solve the issue, but how? Probably it takes advantage of the fact that entire chunks are generated and thus is not entirely on demand per position. So, the question is how can I generate rivers procedurally on demand? More preciselly, I want a function f(x, y) which tells me whether there is a river at (x,y) or not (and its flow direction). It seems pretty unsolvable for me, but maybe people have come with some solution.


Manipulating Perlin Noise I've been learning about Procedurally Generated Content lately (in particular, Perlin noise). Perlin noise works great for making things like landscapes, height maps, and stuff like that. But now I am trying to generate structures more like mountain ranges (in 2D, as 3D would be way over my head right now) or underground veins of ores. I can't manage to manipulate Perlin Noise to do this. Making a cut off point (i.e. using only the tops of the 'mountains' of a heightmap) wouldn't work, because I would get lumps of mountains veins. Any suggestions? Thanks, Numeri


UE4 Procedural Planet Design I am building a game that requires a full planet but it would be too complicated to create it as one mesh, so I decided that I will use procedural generation to create the (partially) editable landscape, rocks, trees, caves, etc. I was wondering on what server side a procedural planet is generated? For example, is it generated when the player first plays the game, and is it the same for every player? Or is it completely rebuilt each time the player enters the game? If the answer is the latter, is there any way to somehow save the planet and make it into one map for everybody using the game and not change if they reload the game? If possible, I would strongly prefer any answers in Blueprints rather than C . FYI I haven't started building the game yet and am still researching my options for how to create the world. I didn't find much about saving the character's location anywhere so far.


Dynamically Generated Mesh Not Visible Unless In Wireframe Mode I'm trying to create a dynamic mesh using ArrayMesh but my mesh isn't visible unless I turn on wireframe debug mode. Here is a minimal example of a plane mesh consisting of 2 triangles (this script is currently placed on a Spatial node) func ready() With these two lines added I can see the wireframe of the mesh (picture below) otherwise I see nothing. VisualServer.set debug generate wireframes(true) get viewport().set debug draw(Viewport.DEBUG DRAW WIREFRAME) var ve PoolVector3Array PoolVector3Array() ve.push back(Vector3(0, 0, 0)) ve.push back(Vector3(10, 0, 0)) ve.push back(Vector3(0, 0, 10)) ve.push back(Vector3(10, 0, 10)) var uv PoolVector2Array PoolVector2Array() uv.push back(Vector2(0, 0)) uv.push back(Vector2(1, 0)) uv.push back(Vector2(0, 1)) uv.push back(Vector2(1, 1)) var co PoolColorArray PoolColorArray() co.push back(Color(1, 1, 1)) co.push back(Color(1, 1, 1)) co.push back(Color(1, 1, 1)) co.push back(Color(1, 1, 1)) var id PoolIntArray PoolIntArray() id.push back(0) id.push back(2) id.push back(1) id.push back(1) id.push back(2) id.push back(3) var no PoolVector3Array PoolVector3Array() no.push back(Vector3(0, 1, 0)) no.push back(Vector3(0, 1, 0)) no.push back(Vector3(0, 1, 0)) no.push back(Vector3(0, 1, 0)) var array mesh ArrayMesh.new() var arrays arrays.resize(ArrayMesh.ARRAY MAX) arrays ArrayMesh.ARRAY VERTEX ve arrays ArrayMesh.ARRAY COLOR co arrays ArrayMesh.ARRAY INDEX id arrays ArrayMesh.ARRAY NORMAL no arrays ArrayMesh.ARRAY TEX UV uv var m i MeshInstance.new() array mesh.add surface from arrays(Mesh.PRIMITIVE TRIANGLES, arrays) m i.mesh array mesh add child(m i) Now with wireframe debug mode on I see the following Otherwise, I can't see anything. If I add an albedo color to the material override then the lines will change to be that color. I'm pretty new into procedural generation but I've found that a similar thing will work in Unity so I'm not sure what I'm missing here.


What does the "random element" do in Cellular Automata I'm reading this post on TutsPlus regarding procedural level generation using cellular automata. My question arises in this code snippet float chanceToStartAlive 0.45f public boolean initialiseMap(boolean map) for(int x 0 x lt width x ) for(int y 0 y lt height y ) if(random() lt chanceToStartAlive) map x y true return map In the first line, the author declares a float that represents 45 . This makes sense. However, the role of this is unclear to me. In this line if(random() lt chanceToStartAlive) A random number is being generated, and being tested if it's less than 0.45f. Since it is an inequality, this expression can either return true or false correct? How exactly is this percentage affecting this loop? Thank you!


Procedural generation of jagged peaks I would like to generate random cave type backgrounds similar to the one shown below. I doubt anything I generate will look as good as the image, but something with that feel of sharp, jagged peak should be possible. I don't have any experience in procedural generation and as such have no idea where to start.... Note I am using libGdx on Android


Huge procedurally generated subway transit map How could I generate a single transit map image , which is not based on any real map, on a massive scale? Are there algorithms or tools which could do something like this already? Unlike conventional maps, transit maps are usually not geographically accurate instead they use straight lines and fixed angles, and often illustrate a fixed distance between stations, compressing those in the outer area of the system and expanding those close to the center. The scale I'm looking for is earth like. If a line ran horizontally across it could have 40,075 stations kind of map. Ideally, It should also wrap around, like on a sphere. I want it to look just like any local transit map (I'm basing myself on the Montreal metro map) which means I don't care about what a metro system of this scale should look like or how useless this would be. So far, the research Nathan Hellinga's Processing.py subway map generator resembles what I'm looking for and looks great but the algorithm wouldn't scale well to a very large grid. Jannis Redmann's generating transit map theory is really interesting but bases itself on real world data. Maybe it could be used with generated data but how do you generate that data then? Fractal generators! But how do I make it look like a transit map? With Graphviz, I would still need an algorithm to generate data. Slime is a really interesting idea! But how do you procedurally generate that? Wave function collapse algorithm!! Generating a random heightmap, making a graph out of it, and then making it pretty My idea, a random walker. You all know what this is, I just don't think that's the best option there is.


How can I create beautiful, random, abstract images? To generate random, beautiful, abstract images which algorithms are not too complex and give good results?


generating random block based worlds with 3D noise I want to create a 3D block based infinite world. For any block, I want to be able to compute its block type. 3D perlin noise is the usual building block of such a world. If you ask the 3D noise function the value for a 3D point, it'll give you a value between 1 and 1. How do you turn this number into a block type? I want blocks on the surface to be turf, and different minerals to have different probabilities based on depth. I want sprawling caves and caverns and lava flows but not small ones. And so on. So how do you turn noise into block types into a coherent subterranean world? Particularly how do you make things like coal appear in seams and crystals only appear in caves and any other rules that can be invented that make the type of a block dependent upon its neighbours? And how to do this efficiently, in an oracle function rather than by having to create large 3D arrays to store the decided outcomes of some terraforming?


How can you use Fractals to perturb an image? I've been playing around with Procedurally Generated World. I've so far managed to create the Height Map, and a translate map, but now i'm attempting to create Caves, The main idea is to use another Noise map, with values being either 0 or 1, and multiply it with the Height Map. I've managed to achieve this This is currently described with a float Width, Height , which has value 0 for those points (x,y) such that (x,y) is black, or 1, for those which (x,y) is white. I want to apply some fractal to this to achieve this However, i have no idea how to do this! (I also apologize for any grammatical errors. I haven't slept in like 18 hours and i can't think straight)


Combining Minecraft and Dwarf Fortress Simulating autoplay in a pseudo infinite procedurally generated world? One of the interesting things about Dwarf Fortress (and other procedurally generated games like Civilization) is that the game simulates multiple AI factions interacting with each other over time (what might be termed "autoplay") to generate an evolving world which changes over time, even whilst the player is playing the game. On the other hand, simulating all the factions simultaneously is surely going to become a bottleneck as the map grows. With a bigger map and more factions, the performance requirements become exorbitant. Minecraft gets around this problem by simply storing the inactive chunk in memory as is as soon as the player leaves the area. The minecraft world is a static, never changing place. When a player comes back from a trip, the chunk is exactly as he left it. No world evolution occurs. Everything is always the same. The most straightforward approach to this, which is to just to make chunks remain loaded in memory even after the player is no longer in them, has the same performance issues as mentioned earlier as the player moves across thousands of blocks, you will sooner or later run into computation limits. Moreover, this does not solve the general problem of faction simulation factions can expand or contract through many chunks, whereas keeping one chunk loaded in memory would not affect its neighboring chunks, so that doesn't quite achieve the same effect as autoplay. The "solution" that I thought of is to come up with a closed form formula that simulates autoplay somehow. That is, a function f(time,coordinates), such that given the time and and coordinates of a block, will tell you what state that block should be in. The problem with this is that this assumes a truly predeterministic world evolution, in which players have control over only their local chunk and no others. In other words, no butterfly effect. Furthermore, when a player leaves a chunk, he has made some changes to it, but the function cannot take those changes into account when computing the state of the block the next time the player enters it, in other words all changes that the player made to the block are lost as soon as he leaves. This is obviously not ideal. Am I asking for something impossible?


Where can I find code examples of different variations of Perlin noise? I have seen the PCG wiki, and it is a great resource. But a lot of the articles are very brief and it is hard to find good links on specific things. I have been searching for ways to transform my Perlin noise height maps to make ridges, rivers, and other terrain features. I also can't find any articles on how to divide up the map into different areas for calculating texture coordinates or other values specific to the game. I have only been able to find websites detailing their software that can generate the different things, but no code or explanations. Are there any good sources of code examples explanations on how to do the above mentioned with Perlin noise? PS. This should probably be a community wiki. I don't know how to make it as one though.


map world "decorator" algorithms patterns I've spent a lot of time working with perlin simplex noise for different styles of map gen, but I'm having a hard time finding advice resources on how to populate the map with "world decor" that have some patterns to them... not just a random flower or tree. I can control where on the map they spawn based on the height temp values, but what are some good ways to control "patterns" the items spawn in? For example, I want a specific plant to always spawn in clusters, but I want it to look natural and random a bunch all together in a cluster and some individuals further out. I don't want all spawn instances to look the same. A good reference is the Minecraft ore spawner they're always in random configurations with some min max size variations. Larger veins are even more rare.


Procedural dungeon algorithms for a more open dungeon I'm working on a game that I want dungeon generating in, but I plan on having ranged weapons in it, so I want it a bit more open. I'd like to avoid corridors and I don't want to use a grid of custom rooms. I don't want to use perlin noise and make it like random blotches, so that's not an option. All I need is a summary of how the ideal algorithm for this works. EDIT Something that gives a result like this It doesn't need to be so rounded. The point is that there aren't really corridors. I'm also fine with a modular approach where the areas are hand made as long as it's still not on a grid. The issue is that if it's not on a grid, the areas are normally connected by corridors. EDIT2 I made this a while ago, which works when it comes to shape, but it works with a modular system and it looks like this because I intentionally put rooms on top of other rooms. This causes problems if I start decorating the rooms and filling them with interesting stuff.


Zooming into generated map I have generated a 1024 X 1024 heightmap using Open simplex noise. Now i want to zoom into a 64X64 area. Every pixel in the 64X64 is not 16X16 on the larger scale. I tried just generating the area, but problem is, that I want to also calculate normals from it, and the normals are different for the zoomed in area from the big map. The difference comes from the fact that on the big map the height difference between 2 pixels can be quite large, but when zoomed in, new pixels are place between the original 2 so if now normals are calculated, they are totally different. How can I zoom into an area of a generated heightmap but retain the normals? On the left is the large scale map and on the right is the zoomed in area. Zoomed in area is the upper left corner of the large scale map. As you can see the normals are completely different. Both of these images are textures. There are no meshes or anything only textures, and there will not be any meshes in future either. This is how I calculate normals from heightMap. u noiseValues x (y 1) width r noiseValues x 1 y width Vector3 up new Vector3(0, 1, (noiseValues index u) 100) Vector3 across new Vector3(1, 0, (r noiseValues index ) 100) normal across.Cross(up).Normalized() normal (normal new Vector3(1, 1, 1)) 2.0f After updating these lines in normal calculation Vector3 up new Vector3(0, 1 zoomFactor, (noiseValues index u) 100) Vector3 across new Vector3(1 zoomFactor, 0, (r noiseValues index ) 100) This is the result after adjusting normal calculation


Create vertices indices for cylinder with triangle strips I'm trying to create vertex and index buffer for a cylinder (in OpenGL, but it shouldn't matter). I think my vertex buffer is fine (I checked drawing with GL POINTS). Here's the code that builds it int sides 10, slices 40 float radius 3.5 10.0 numVertices sides slices Vertices malloc(sizeof(Vertex) numVertices) int angleincs 2 M PI sides int cs angleincs 2 M PI slices float zval float zstep height (float)sides float i for(int m 0 m lt slices m ) int index (m sides) for (int n 0 n lt sides n ) Vertices index n .Position.x cosf(i) Vertices index n .Position.y sinf(i) Vertices index n .Position.z zval i angleincs zval zstep I'm stuck at the index buffer generation. Any help on how to build it? I tried to adapt some code from a torus generator, and I get something that apparently resembles a cylinder but it's a bit weird and has a few extra weird triangles. numIndices (2 (sides 1) slices slices) Indices malloc(sizeof(GLushort) numIndices) int n 0 for (int i 0 i lt slices i ) for (int j 0 j lt sides j ) Indices n i sides j Indices n ((i 1) slices) sides j Indices n i sides Indices n ((i 1) slices) sides Indices n ((i 1) slices) sides Thanks in advance.


How to make noise generated terrain more square? I use a perlin noise generator to create a map. All works fine and dandy. It uses the following formula Generate perlin noise Posterize the height values to be an integer between 0 and 5. What I get works well. Just, the terrain is TOO organic for my purposes. Is there a way to make it a little more square and chunky?


Question about CDLOD quad tree I have been digging and researching into CDLOD and there are some things I dont understand. https github.com fstrugar CDLOD blob master cdlod paper latest.pdf states The quadtree structure is generated from the input heightmap. It is of constant depth, predetermined by memory and granularity requirements. Once created, the quadtree does not change unless the source heightmap changes. Every node has four child nodes and contains minimum and maximum height values for the rectangular heightmap area that it covers. Doe's this mean I calculate every node and child nodes to the finest level at the setup phase (i do not split and unsplit at run)? If so, what's the roughest level I start with? And how do I get the minimum and maximum height from my perlin noise height map for an node area? Lastly how CDLOD would work, when I zoom in out into a big planet (up factor)? Can get that into my imagination.


Procedural terrains in 3D what has been done ? Are there common algo and or theories about it? Besides programming, modeling an environment takes a great deal of time. I don't know about the work time involved, for example, in a WoW dungeon level, or other beautiful city like, future environment, jungles, fantasy, etc, but this kind of work is made from scratch by artists. What are the techniques involved in the TorchLight level randomizer, and does other titles have similarities with this ? Is there a family name for such techniques ?


Voxel River Generation at Biome Borders or Biome Blending I'm creating a voxel (block, Minecraft like) game and I have different biomes (flatland, mountains, ect) and the problem is they are abrupt changes when biomes end begin. I'm using 3d perlin noise, so I can't just quot average out quot the heights. So I thought to make rivers when biomes end begin. Does anyone know how I could do this, or how it could work? With 3d noise I get very nice features, however the noise represents density rather than height, so I'm not sure how to go about doing quot weight quot and such. If not, how can I do blending with 3d perlin noise? Many thanks in advance. I'm also wondering of how Currently, for each chunk of the world I have a certain chunkGen set, and when the biome changes (randomly determined) the chunkGen changes. Even if I were to generate on a block by block basis, I'm not exactly too sure how that could help me as the 3d perlin value I'm getting is of density. I think my best bet would be using 2d perlin with 3d perlin, the 2d for height and the 3d for ridges but I have no idea of how to implement this. Would it also be possible to create a buffer terrain between the biomes? with the averages of the octaves, gain, frequency? EDIT I've actually just tried buffer terrain but it doesn't work well, often enough it moves up randomly or happens in the middle of lakes.


Correct way to "randomly" generate flowing terrain I'm creating a simple top down RTS game. I plan on it "randomly" generating maps on the fly when I need to. I plan on it all working in 'passes' Fill the terrain in with all grass Go back and add some random spurts of gravel Round out the gravel Draw Mountain Landscape on second layer Round out mountains etc. etc. Now, take a look at this picture below I hand created this using my map editor but I plan on this basically being the result after hopefully pass step 3. How should I go about deciding when and were to place my gravel so that it is at least irregularly shaped and sporadic enough to look natural? Thanks if you can! Any and all help is appreciated! As a side note Each pass is basically me iterating through all of my tiles (The map is divided into 40x40 tiles) similar to this for (int x 0 x lt GRIDMAX 1 x ) for (int y 0 y lt GRIDMAX 1 y ) Terrain(x, y, 0) SomethingHere


how to generate road in racing game I'm making a racing game in python and I kind of wrote myself into a corner. This for loop for i in objects if i.name "road" if i.y 0 road Road(road x, 20,road width,20) objects.append(road) is how I generate new road tiles as the old ones move down the screen. When a block spawns 20 pixels offscreen, it falls down until its top left corner hits 0 and then a new block spawns above it. if you run this code https github.com hailfire006 economy game blob master racing 20game you can see that it works great, right up until the player accelerates by pressing up or "w", at which point the road stops spawning. What I think is happening is that the road is skipping the 0 mark and that's why no new road is spawning, but increasing the acceleration in the code doesn't seem to mess it up, it's only when it's changed dynamically in game. Can soneone explain what's happening here because nothing I try is working and I've been stuck on this for days...


Procedurally placing buildings on noise field So, I have a procedurally generated planet. In my case it's 3D (hexagon pentagon globe) but for simplicity let's assume it is a 2D grid. I have distributed resources over this planet, using Simplex Noise, with a cut off value, giving me a binary distribution. One of the things I generate in this way, are fields of wheat, shown in yellow below. After the wheat fields are generated, I want to procedurally place farms on the planet. If I would just randomly pick a "yellow tile" (tile with wheat on it) then I run the danger of having them poorly distributed, as shown on the left. What I want, is a nice distribution where farms favour large wheat areas that are still unoccupied by other farms, as shown on the right. Is there a simple algorithm that can do this placement? NOTE I want to use this approach for other buildings like mines, quarries, lumberjack operations, etc. So I want to avoid placing first, and then growing resources around it. I want the noise field to drive the placement, not the other way around. NOTE Farms will not consume the wheat. I've made wheat fields binary wheat no wheat but also have scaled distributions with "potency" for e.g. forests, where the number of trees per tile can vary.


Basic procedural generated content works, but how could I do the same in reverse? My 2D world is made up of blocks. At the moment, I create a block and assign it a number between 1 and 4. The number assigned to the nth block is always the same (i.e if the player walks backwards or restarts the game.) and is generated in the function below. (Image shows a small portion of the game, in practice there are much more blocks) As shown here by this animation, the colours represent the number. function generate data(n) math.randomseed(n) resets the random so that the 'random' number for n is always the same math.random() fixes lua random bug local no math.random(4) print(no, n) return no end Now I want to limit the next block's number a block of 1 will always have a block 2 after it, while block 2 will either have a block 1,2 or 3 after it, etc. The next block's number is taken at random from the next table 1 next 2 , 2 next 1,2,3 , 3 next 4 , 4 next 1,3,4 , Before, all the blocks data was randomly generated, initially, and then saved. This data was then loaded and used instead of being randomly called. While working this way, I could specify what the next block would be easily and it would be saved for consistency. I have now removed this saving loading in favour of procedural generation as I realised that save whiles would get very big after travelling. Back to the present. While travelling forward (to the right), it is easy to limit what the next blocks number will be. I can generate it at the same time as the other data. The problem is when travelling backwards (to the left) I can not think of a way to load the previous block so that it is always the same. Does anyone have any ideas on how I could sort this out?


How to report bugs found on procedurally generated levels? There is many topics on how procedural generating works but I couldn't find any info on how to test and what's more important how to report bugs that may occur on procedurally generated levels. What is the best way to describe a bug, for example related to level design, on a map that will look different each time you play new game? What information should be included in bug report so reproducing it would be easier for level designer, level artist, etc. and then also during regression process? EDIT It is worth mentioning that the game, I am preparing to test, is in very early phase of developing and is constantly changing along with the systems responsible for generating levels. The purpose of this research is to learn how to describe bugs (what info to include in report) so the regression in a changing environment would be as less time consuming and as effective as possible.


How can I generate biome borders? I'm looking for ways to generate random biome borders (like what Minecraft has). One technique involves choosing specific biomes based on (eg) a rainfall map and a temperature map. But that just determines which biome to place, not where the borders between biomes are. I don't want to use quantized Perlin noise directly that would generate certain quantized values strictly within other zones, whereas I'd like finer control over which biomes can abut others. For example, in Minecraft one can see mountainous terrain, forests, plains, or deserts right next to the ocean. Many of the solutions to "the biome problem" propose computing the whole universe in a heuristic manner. I want to generate infinite terrain, and to me that suggests the algorithm be strictly functional given an X,Y value (and a world seed) the algorithm can easily spit out a biome value. So, my question what are some techniques for identifying random, non trivial sized, contiguous chunks of terrain to be of a given biome?


How irregularly shaped rooms should be placed in a dungeon I have made a procedurally generated dungeon that places every room successfully so it is accessible via at least one other room. A 'successfully' placed room is a room who's wall cells are right net to another room's wall cells. This is because there are no corridors in my dungeon, but doorways, 2 cells thick ......... Where ' ' is the Doorway. ......... ..... ......... ..... ..... However I have now moved on to procedurally generate irregular shaped rooms, such as 'L' shaped rooms, 'T' shaped rooms, and so on. I am wondering how I can place, for example, a square room next to an 'L' shaped room, without wasting any space i.e. ........ ........ ... ........ ... ... ... ......... ......... This is not possible with my previous algorithm because it only took into account the room's bounds, where as now an 'L' shaped room's bounds contains empty space that a square room could possibly fit.


What is the mesh generation technique shown in Chrome Music Lab? The Google toy of the day, https musiclab.chromeexperiments.com Spectrogram, features a continuously scrolling 3D render of a shape with cross sections that seem to equal the spectrograph of sound at a single instant. Assuming the frequency information is available as input, how does that information become a mesh that updates continuously?


How can I optimise a Minecraft esque voxel world? I found Minecraft's marvelous large worlds extremely slow to navigate, even with a quad core and meaty graphics card. I assume Minecraft's slowness comes from Java, as spatial partitioning and memory management are faster in native C . Weak world partitioning. I could be wrong on both assumptions. However, this got me thinking about the best way to manage large voxel worlds. As it is a true 3D world, where a block can exist in any part of the world, it is basically a big 3D array x y z , where each block in the world has a type (i.e BlockType.Empty 0, BlockType.Dirt 1, etc.) I assume that to make this sort of world perform well, you would need to Use a tree of some variety (oct kd bsp) to split all the cubes out it seems like an oct kd would be the better option, as you can just partition on a per cube level not a per triangle level. Use some algorithm to work out which blocks can currently be seen, as blocks closer to the user could obfuscate the blocks behind, making it pointless to render them. Keep the block object themselves lightweight, so it is quick to add and remove them from the trees. I guess there is no right answer to this, but I would be interested to see peoples' opinions on the subject. How would you improve performance in a large voxel based world?


Are there any methods for generating rivers on demand with Perlin Simplex noise? I'm aware of many methods for procedurally generating rivers, but they require an entire heightmap beforehand in order to work. For instance, they may require to find a high position on the map and find a path to the ocean. But when working with on demand on the fly procedural generation (generating the map around the player as he moves), those requirements are unfeasible. For instance, Minecraft doesn't have "true rivers" the river does not in fact have a start and end point, it is actually just dividing the two biomes, this means that it uses the distance between the point and the edge of the biome to determine how deep the water should be, with some variance of course. This mod seems to solve the issue, but how? Probably it takes advantage of the fact that entire chunks are generated and thus is not entirely on demand per position. So, the question is how can I generate rivers procedurally on demand? More preciselly, I want a function f(x, y) which tells me whether there is a river at (x,y) or not (and its flow direction). It seems pretty unsolvable for me, but maybe people have come with some solution.


How to structure a non rectangular maze I have built a few mazes and are familiar with maze algorithms however all examples I have learnt from are square or rectangular. In these mazes the code structure usally has a 2d array of maze cells and it is easy to navigate or test to adjacent cells. How do you structure the code for a say a Y or circular shaped maze to know what the avaliable joints between cells nodes in the maze are?


map world "decorator" algorithms patterns I've spent a lot of time working with perlin simplex noise for different styles of map gen, but I'm having a hard time finding advice resources on how to populate the map with "world decor" that have some patterns to them... not just a random flower or tree. I can control where on the map they spawn based on the height temp values, but what are some good ways to control "patterns" the items spawn in? For example, I want a specific plant to always spawn in clusters, but I want it to look natural and random a bunch all together in a cluster and some individuals further out. I don't want all spawn instances to look the same. A good reference is the Minecraft ore spawner they're always in random configurations with some min max size variations. Larger veins are even more rare.


How do "procedural" and "random" generation differ? To my understanding, everything that isn't directly created by a human is called "procedural". Procedural generation systems have different complexities and may consist of various algorithmic processes, some of which may be "random". Some games explicitly refer to their systems as "random", while others call them "procedural", as if indicating a distinct difference. Is there such a distinct difference? Where do you draw the line? For example, here are contrasting examples of RPG loot generation Type A Loot generation is ultimately left to chance, but it's based on a large intial factor of deterministic, specifically encoded knowledge. Boss characters drop loot, which type is determined by the boss' characteristics (e.g. species, character class, elemental affinity, ) and additionally influenced by the player's play style, to create more enjoyable gameplay For example, more likely drop a fire damage sword to a player who prefers fire based melee attacks, along with gold. Type B Loot generation is almost completely random, based on minimal explicit knowledge. Bosses have a randomised loot table (e.g. 1 legendary, 2 epics, 5 blues). If the roll is right to drop a legendary, random attributes are generated for that legendary, which may be high in value. Stuff like character attributes, player behaviour and such don't matter. Both designs qualify as procedural by the initial definition, since their output is automatic, but Type A is significantly more sophisticated in crafting player experience. Must an algorithm seem as if a person had designed its output by hand, to qualify as "procedural" rather than "random"?


Floating point determinism with respect to procedural generation, clustering and GPU offloading I've been designing a distributed procedural generation system for a while now in my spare time and one of the problem's I've been thinking about recently, with respect to the broader architecture, is that of floating point determinism inconsistency when you can't ensure that you have a homogeneous cluster of machines running a persistent world. Part of my design requires that any given machine can regenerate procedural content as needed, allowing for unimportant but resource hungry content to be destroyed and recreated as needed on whatever machine is available to do the work. I have been running on the basic idea that I will use high precision 32 64 bit integers for most things, and that generally works fine, but the standard coherent noise algorithms all use floating point values in their calculations. Do I need to implement custom non floating point versions of all those algorithms (i.e. using longs) or is there a better approach? Should I be using fixed point types for this kind of thing, and if so, how does that impact my desire to have the option to offload some of the PCG work to the GPU, when possible? Also, are fixed point types fast enough for heavy use within a game engine? Can I ignore floating point precision issues if I can get away with a maximum level of precision? i.e. If I'm happy to use no more than, say, six decimal places of a result, does that keep me safe across different machines and architectures? Note my engine is purely the simulation side of things. It doesn't matter to me if there are slight rendering inconsistencies when a user is playing the game all that matters is that the procedurally generated source data is consistently regenerated no matter which machine in a cluster is doing the work.


3D terrain generation with overhangs caves 3D terrain with 2D noise function as heightmap is kind of 'easy'. Make a plane and adjust height based on the noise. How would one start working on 3D terrain with overhangs caves? There are some older topics (for example related to Minecraft) on the thema, but non of them cover overhangs and in general techniques that can be applied to heightmap generated terrain.


Procedural generation of jagged peaks I would like to generate random cave type backgrounds similar to the one shown below. I doubt anything I generate will look as good as the image, but something with that feel of sharp, jagged peak should be possible. I don't have any experience in procedural generation and as such have no idea where to start.... Note I am using libGdx on Android


How to change chance of spawn based on distance? I am trying to make a cellular automate cave but want to keep the middle empty. How should I change the chance based on the distance from the middle? I don't want to completely deny it just want a small enough chance to keep it almost empty.


Procedural terrains in 3D what has been done ? Are there common algo and or theories about it? Besides programming, modeling an environment takes a great deal of time. I don't know about the work time involved, for example, in a WoW dungeon level, or other beautiful city like, future environment, jungles, fantasy, etc, but this kind of work is made from scratch by artists. What are the techniques involved in the TorchLight level randomizer, and does other titles have similarities with this ? Is there a family name for such techniques ?


Create Full Tile Map Zone in an Art Software, then generate corresponding tile name list? I'm completely new to tile map creation. I'm a programmer and I'd like to make life easier for myself. It's a bit long to explain the problem I think I have, but bear with me. The Scenario From what I understand, in my code I need an array which holds my tile information for a zone area in my game. Lets say for simplicity this zone was a 10x10 grid, so 100 indexes in the array. Now, lets say each index holds a number that corresponds to a specific tile. ex) Number 1 means grass tile. Number 4 means rock tile. etc. So far so good. From this array (and additional coding), my tile map will be generated on my game screen. The problem As it stands I have to individually type each tile identifier for each index in the array. Now let's say that I have already fully designed the visual tile grid map for my zone in a particular art software. Simply put, I am staring at my fully completed zone in my art software screen and it is my visual aid for creating my array. My strategy now is to look at each grid cell, see what tile I put in there, and type its identifying number into my array. Rinse and repeat hundreds of times, looking at each individual tile until I manually complete the array. This is an extremely tedious and long process. What I want So my full tile map is already in my art software. What I want is for the software to more or less generate the array for me! I press a button, and It will see what tile is in each grid square, and accordingly generate a list in a text document with each tile's identifying number that I give it. That's literally all I need. I can then copy and paste the list into my array in my code. It shaves off tons of time. The Question Notice that I have used the generic term "art software". Is there any art software that can do what I described? Is there any art software (e.g. adobe illustrator, photoshop, gimp, etc.) which upon having a fully completed tile map, will be able to generate a text file list of each tile's identifying name?


Combining Minecraft and Dwarf Fortress Simulating autoplay in a pseudo infinite procedurally generated world? One of the interesting things about Dwarf Fortress (and other procedurally generated games like Civilization) is that the game simulates multiple AI factions interacting with each other over time (what might be termed "autoplay") to generate an evolving world which changes over time, even whilst the player is playing the game. On the other hand, simulating all the factions simultaneously is surely going to become a bottleneck as the map grows. With a bigger map and more factions, the performance requirements become exorbitant. Minecraft gets around this problem by simply storing the inactive chunk in memory as is as soon as the player leaves the area. The minecraft world is a static, never changing place. When a player comes back from a trip, the chunk is exactly as he left it. No world evolution occurs. Everything is always the same. The most straightforward approach to this, which is to just to make chunks remain loaded in memory even after the player is no longer in them, has the same performance issues as mentioned earlier as the player moves across thousands of blocks, you will sooner or later run into computation limits. Moreover, this does not solve the general problem of faction simulation factions can expand or contract through many chunks, whereas keeping one chunk loaded in memory would not affect its neighboring chunks, so that doesn't quite achieve the same effect as autoplay. The "solution" that I thought of is to come up with a closed form formula that simulates autoplay somehow. That is, a function f(time,coordinates), such that given the time and and coordinates of a block, will tell you what state that block should be in. The problem with this is that this assumes a truly predeterministic world evolution, in which players have control over only their local chunk and no others. In other words, no butterfly effect. Furthermore, when a player leaves a chunk, he has made some changes to it, but the function cannot take those changes into account when computing the state of the block the next time the player enters it, in other words all changes that the player made to the block are lost as soon as he leaves. This is obviously not ideal. Am I asking for something impossible?


How can I create beautiful, random, abstract images? To generate random, beautiful, abstract images which algorithms are not too complex and give good results?


Procedural Breakout level generation I am currently developing a Breakout game for a school project, and I've decided to use it as an opportunity to get started with procedural content generation. I took a quick look at some of the basic procedural stuff, but I wanted to know if there is a known good method to generate levels for this kind of game (block patterns, "power up" distribution, etc). Any articles or ideas are greatly appreciated.


How to pass the correct data into a continuous world I'm having a hard time implementing the player moving around my world of 2048x2048 tiles that is generated using a noise function. I'm in it for weeks, and I can not, I mess around with the coordinates, and there's always a bug. I was trying like this 1 I paint the map around the player (I'm using a tilemap) I paint a 64x64 area, with the player positioned in the center 2 create a rectangle and center it in the player, the rectangle has an equivalent size of 32x32, and each frame creates another rectangle that is compared with the old one, so I take the area that has not yet been painted, so I can paint. The problem is that when I reach the extremes of the map, when x 0 or x 2048 for example, I need that "x" equals 2048, and equals 0, respectively, as if the world had "turned" and I'm not sure how to deal with the world's data and the coordinates of the tilemap, because when I start by painting the map around the player, it will be in a position that would be 32.32, and the rectangle 16.16, I can not understand what I have to do it, I mess up everything with the coordinates, in this question, it helped me, I'm using the mod Make a 2d top down game with round map it works, but what I am not able to do is pass the x and y correct, there are always bugs of this type, where I struggle with the numbers, but no use, if I fix the floor to one side the bug appears on the other here was to be water, and it has a land line for example. I'm using Godot 3. Up 1 I'm not sure, but it seems everything is going very well, what I was wrong was forgetting that, for example, a 64x64 array starts from 0 to 63, I was really dumb. The image below shows what it would look like in a 64x64 world As I solved it was just doing this "map size 1" and decreasing and adding values to the left or right, 0, 31, respectively, since the rectangle starts at position 16, 16. but when I do this now, there is another problem when this happens which occurs because of the "map size 1", but without it it is still more messy. Up 2 I was able to fix the up 1 error, I was calling the wrong mod function, without adding the x and y, so it arrived at 33 and it is no more than the verification "map size 1", now it is working in the horizontal and vertical movements, however I'm still wrong to move diagonally. or Up 3 I think I got it, the problem if I was not mistaken was in the "stairs", so it works LEFT UP RIGHT UP DOWN LEFT DOWN RIGHT But I still have to hit the pieces of map that are behind, but I think it's in the "turn them off" function. I confess that I do not quite understand why this works, I would like to understand. Note 1 Still the rare cases that the map generates wrong, but actually abusing the keys, quickly clicking for all meaningless directions, such as varying up and down, pressing low, a very strange movement, but the failure happens.


How do I create a spherical world to explore? So to preface this question, I have done a lot of research on this, but most of it has proven unhelpful, possibly because I'm not sure the proper way to phrase what it is that I'm trying to ask, so I might make this a little long winded to get my point across. The basic idea that I am trying to explore is a small planet that can be navigated by the player, but I also want this planet to be similar, but different for each playthrough (hence the procedural generation tag). At first, I looked into doing this by simply creating a sphere which has it's own type of gravity (doesn't have to be too realistic), but research proved that this had many (too many) obstacles to overcome. Making the gravity work on this sphere would have been complicated, but doable, but then I read that the terrain tools wouldn't work properly and that could be a problem. The last issue that I saw for this, which makes me think that this idea is dead is how strenuous this might be for the systems, since I want the planet to be fairly full of interesting things to explore. This led me to the idea of a modular system of tiles (if I'm using that term correctly), where I could procedurally generate these tiles, and align them in a spherical shape. I could instantiate and destroy the tiles as needed to preserve system resources, and would make the procedural generation aspect of this easier for me as well (at least I think it will). The problem I see with this model is how to make square (or any other shaped tiles) form a sphere. I am attempting to build this in UE4. If this is impossible, or at least prohibitively difficult, to do in the engine, then I rather find out now before I get too far along in the project. And any help or resources on how I can do this if possible will be greatly appreciated.


Coherence between 2d tile maps In dwarf fortress, there are 3 levels of maps in the screen you pick your starting position, and they all coincide with each other perfectly. I am assuming that the top level tile accounts for lets say 36 smaller map blocks, and when the player spawns on the map, that is just a noise value at a different level or frequency of even more tiles. The selection screen looks like this How is such a level of coherence achieved? It doesn't seem like simply adjusting noise frequency octave values would work perfectly, or maybe it does, I am just not grasping the workflow properly?


Transitioning Heightmaps Using Voronoi Cells I'm partitioning a procedurally generated world into regions using voronoi noise. The goal is to create individual regions in a world each unique from each other. Each region has a distinct set of properties, one of which is having a procedurally generated heightmap. The issue I am having is transitioning from one region's heightmap to another. Each region's heightmap is composed of multiple 'layers' of simplex fractal noise. Because the regions are using voronoi cells, and each region has its own distinct heightmap, they do not smoothly transition into each other. Any guidance on how to solve this issue would be greatly appreciated!


How to vectorize a raster image edges into SVG paths? I'm having a lot of trouble figuring out how to convert a 2D list of points into an SVG Path representing a political map border. I have completed all parts of a 2D terrain generator, including climate simulation, rivers, lakes, rainfall, temperature, biomes, and finally territories. This last part is where the problem lies. The entire script is written in Python. I have a list of territories, which are represented as dicts with several properties. One of which is Color, used as an ID and to output a pretty map. Another is a list of Pixels, list of Borders, and list of Neighbors. Pixels refers to all points in the territory. Territories can be thought of a polygons. They have Border pixels, which are defined as any outside (meaning not part of the Pixels list) pixel not belonging to this territory (whether it be a River, Ocean, or Unowned pixel). I also keep a list of neighboring territories. Now, I can't store an array of 3000 coordinates in a database efficiently when I only really need the border. I aim to draw only the world map with the borders of each territory drawn in a layer above. So I need to convert the border to an SVG Path string. The Borders list is unordered when the generator finishes. For each border pixel, I go clockwise around the pixel and look for another, and progressively create a SVG Path string. I can't seem to efficiently parse the borders without getting stuck. Another problem is that there may be "lakes" in the middle of the Territory, and Borders are added around those as well. These don't have to be included in the path string. Territories can also wrap around horizontally (like Google Maps for instance), splitting the territory in two. So the final result of my algorithm would ideally be an LIST of SVG Paths, each representing individual parts of the territory polygons. But, how do I do this efficiently? Is there another way to efficiently store a list of potentially thousands of coordinates representing the shape of the territory? Each white line that sticks out from the coastline is a river. You can also see a lake in the middle of the lower green territory. PS I was unsure of a title, if a mod would like to change it.


Procedural generation of heightmap for non rectangular surface I'm working on procedural generation of terrain for a continent, meaning I need a wide range of hills, mountains and valleys generated around the continent. For mountains I've adopted Amit's algorithm for island generation, which produces quite good looking mountain with very clear ridges, slopes and everything else mountain tend to have. Now my problems is with some smoother hilly terrain. Due to a hexagonic nature of my continent, the mesh is subdivided into triangles. Also due to needing multiple mountains hills valleys I also split my continent into sectors, which are then stitched together easily due to the fact the edges of the sectors always have zero elevation. So the constraints are the following The surface is hexagonal, this actually is less of a problem, since I can still generate elevation for "square" grid and use bilinear interpolation on "real" hexagon verts. The surface is not a square, this I have absolutely no idea how to deal with. Now most of the terrain generating algorithms always generate the terrain on a square surface, midpoint displacement, noise, you name it. Also they don't generate zero values on the edges, which is a strict requirement for me. Now I would really like to adopt the double simplex noise approach, but once again, I need a way to force it to always generate zeroes outside of the bounds of my polygonal sector (which obviously varies), and smooth values inside the bounds, which would form nice hilly terrain. Question is... is it even possible, or should I be looking for a diferent approach?


How can I generate natural looking tree leaves in a Minecraft like world? I'm moving from working on 3D block world terrain to more specific features like tree leaves and ore veins (the ore veins will likely be done with my existing Perlin noise for the terrain). One thing I'm having with is properly generate clusters of blocks (for example, leaves for trees). I've tried looping through a radius and randomly skipping blocks so it seems more natural but this still doesn't look natural enough and also makes it based on a cube shape to start. I want some trees to have more of an overall sphere shape to the leaves, or some to have a cone shape. I haven't really found helpful info on how to loop through coordinates of shapes other than a cube. What technique(s) should I employ to generate natural looking clumps of tree leaf blocks?


How do I perform interpolation between noise values sampled at a lower resolution? I'm doing some experimentation with terrain generating using a method similar to that described in this blog post by Markus Persson, where I use 3D simplex noise as a "density" value. Like him, sampling every single position in a chunk was simply too much of a performance drain, so I sample at a lower resolution. This works perfectly fine if I just use the noise values sampled at a lower resolution as densities, but this obviously leads to very "chunky" terrain, like this The relevant code used to generate the noise values and the voxels that make up the above terrain looks like this Initialize the width, height and depth of the noise values map, and initialize the noise value map itself. int noiseValuesMapWidth (this.ChunkWidth this.HorizontalNoiseResolutionDivisor) 2 int noiseValuesMapHeight (this.ChunkHeight this.VerticalNoiseResolutionDivisor) 2 int noiseValuesMapDepth (this.ChunkDepth this.HorizontalNoiseResolutionDivisor) 2 float ,, noiseValuesMap new float noiseValuesMapWidth, noiseValuesMapHeight, noiseValuesMapDepth Fill the noise values map with noise values. for(int x 0 x lt noiseValuesMapWidth x ) for(int y 0 y lt noiseValuesMapHeight y ) for(int z 0 z lt noiseValuesMapDepth z ) float xSeed Mathf.Abs((x this.HorizontalNoiseResolutionDivisor) this.transform.position.x seed) float ySeed Mathf.Abs((y this.VerticalNoiseResolutionDivisor) this.transform.position.y seed) float zSeed Mathf.Abs((z this.HorizontalNoiseResolutionDivisor) this.transform.position.z seed) noiseValuesMap x, y, z Noise.Generate( xSeed this.NoiseScaleX, ySeed this.NoiseScaleY, zSeed this.NoiseScaleZ ) NoiseFalloff( this.FalloffACoefficient, this.FalloffBCoefficient, this.FalloffCCoefficient, (float)(y this.VerticalNoiseResolutionDivisor) (float)this.ChunkHeight ) Generate the chunk's terrain itself by iterating over every voxel position and generating simplex noise values at a lower resolution. for(int x 0 x lt this.ChunkWidth x ) for(int y 0 y lt this.ChunkHeight y ) for(int z 0 z lt this.ChunkDepth z ) int noiseValuesMapX (x this.HorizontalNoiseResolutionDivisor) 1 int noiseValuesMapY (y this.VerticalNoiseResolutionDivisor) 1 int noiseValuesMapZ (z this.HorizontalNoiseResolutionDivisor) 1 if(noiseValuesMap noiseValuesMapX, noiseValuesMapY, noiseValuesMapZ gt 0.0f) this.SetVoxel(new Stone(), x, y, z) Obviously, the solution to the "chunky" terrain is to interpolate between each of the sampled noise values, but I have no idea how to perform that interpolation. How is it done?


Generating a town layout in a grid I want to generate a town layout in a square grid (rendered isometrically, but that doesn't matter) using the following elements 2x2 Houses Roads, 1 unit wide Canals, 1 unit wide Sample layout I always have a specific number of houses, and as many roads and canals as necessary to connect them all. The houses need to have two pieces of road in front of their front door (which is always pointing to the right) It would be nice to have fields of grass (emptiness) inbetween. Is there a ready made algorithm for this? If not, what direction should I be thinking of to implement this?


Zooming into generated map I have generated a 1024 X 1024 heightmap using Open simplex noise. Now i want to zoom into a 64X64 area. Every pixel in the 64X64 is not 16X16 on the larger scale. I tried just generating the area, but problem is, that I want to also calculate normals from it, and the normals are different for the zoomed in area from the big map. The difference comes from the fact that on the big map the height difference between 2 pixels can be quite large, but when zoomed in, new pixels are place between the original 2 so if now normals are calculated, they are totally different. How can I zoom into an area of a generated heightmap but retain the normals? On the left is the large scale map and on the right is the zoomed in area. Zoomed in area is the upper left corner of the large scale map. As you can see the normals are completely different. Both of these images are textures. There are no meshes or anything only textures, and there will not be any meshes in future either. This is how I calculate normals from heightMap. u noiseValues x (y 1) width r noiseValues x 1 y width Vector3 up new Vector3(0, 1, (noiseValues index u) 100) Vector3 across new Vector3(1, 0, (r noiseValues index ) 100) normal across.Cross(up).Normalized() normal (normal new Vector3(1, 1, 1)) 2.0f After updating these lines in normal calculation Vector3 up new Vector3(0, 1 zoomFactor, (noiseValues index u) 100) Vector3 across new Vector3(1 zoomFactor, 0, (r noiseValues index ) 100) This is the result after adjusting normal calculation


How to paint regions of a map with visually different colors I'm learning some concepts of procedural content generation. Now I'm generating a map with regions and each region has a diferent colors generated in a pseudo random way. My problem right now is that most of times (more probably when more regions exists), some regions has colors that are visually similar. I want to control that adjacent colors are visually different, but still with some random component. What make colors different?


map world "decorator" algorithms patterns I've spent a lot of time working with perlin simplex noise for different styles of map gen, but I'm having a hard time finding advice resources on how to populate the map with "world decor" that have some patterns to them... not just a random flower or tree. I can control where on the map they spawn based on the height temp values, but what are some good ways to control "patterns" the items spawn in? For example, I want a specific plant to always spawn in clusters, but I want it to look natural and random a bunch all together in a cluster and some individuals further out. I don't want all spawn instances to look the same. A good reference is the Minecraft ore spawner they're always in random configurations with some min max size variations. Larger veins are even more rare.


How to generate a city street network? I would like to create a city generator for a game, but I am facing a problem at the very start of the generation the road system. As it is a medieval world, I don't want a grid plan like many modern cities. I would ideally prefer a pseudo random generation of large avenues and smaller streets, where it could be possible to get lost, but with still some logic not a complete labyrinth. Something that would look like a naturally grown town. In order to keep it simple, let's say my cities would be on flat and stable terrains, without any river crossing or relief problems. I could try to integrate it to a solution after. I didn't decide of a precise size or disposition for my cities, so if you have a solution that would work only with cities of a precise form (square, circle, rectangle etc), I would take it.


How to build a better game save? I am making a roguelike card game like dream quest, and I want to improve my dungeon level save method. Here's what my levels look like I checked dream quest saves but I don't like their method because it uses a simple text file for all the information. it's also really messy, repetitive and not extendable. I used the format below for the first couple of months "Wall", "Wall", "Room", "Room", "Room", "Merchant", "Room", "Room", "Wall", "Wall", , "Wall", "Wall", ... But at the time I did not have multiple enemies, merchants, items. I simply read the file by using an enum which matched the strings used in the save format (item, enemy, merchant etc.) then passed them into an array to create the board. As I started to create different kinds of enemies, items, and merchants, my current game wouldn't support this. I don't want to create an enum like enemy1, enemy2, enemy3 ... How can I improve the scalability amp legibility of this save game format, so I don't have to keep adding new enum categories for each variety of content?


Deterministic Procedural Wave Function Collapse I've been looking into the Wave Function Collapse algorithm and was wondering if there is a way to make it (appear) deterministic regardless of starting position. I can see how this is trivial if the starting position remains the same. We can simply always collapse the tile with the lowest entropy and use a seeded pseudo random number generator or a noise function to decide which is next whenever there isn't a clear winner. Now what would be the best solution if I wanted to procedurally generate a world around the player? Say I generate the world in chunks. If a player moves far enough away distant chunks get unloaded and new chunks are generated. This works perfectly fine until the player starts to backtrack. Since tiles depend on their neighbors, a revisited chunk might very well look completely different if approach from a different direction. I can think of two possible solutions a) Always generate the world from a set starting position. This doesn't seem feasible in big worlds, as it would require more resources the further away from the starting position the player is. b) Only generate chunks once and then save them. I don't really like this approach, because it could potentially require a lot of disk space. It's also not really deterministic, because the order in which the player explores the world would still influence what individual chunks look like. Is there a solution I'm overlooking or is this simply not possible because of how the algorithm works? Keep in mind that I don't care if the algorithm itself is actually deterministic regardless of starting position. The result just has to appear that way, so that already visited chunks can be recreated unchanged.


2D Procedural resource generation I'm currently building a Mars colonization game and I'm wondering if anyone can point me to resources on how to procedurally create resources and biomes within a 2d game. Much like in a game like Factorio were different resources and such are spread around the map. Thanks in advance!


Help Improving Map Generation I've recently attempt for the first time to implement a map generation system and while it does work, it doesn't work exactly the same I want but I'm not really sure on what changes I can make it to make it generate the type of map I want. This is my map generation code lt summary gt Generates a Room at a Start Position lt summary gt void GenerateMap(Vector2 roomStartPos) Vector2 startPos roomStartPos int roomTileNum random.Next(minRoomTiles, maxRoomTiles) for (int i 0 i lt roomTileNum i ) if (CheckTilePosValid(startPos)) Checks if a position is taken by a tile already Tile newTile CreateTile(startPos) Creates a Tile at a passed in Position startPos GetRandomEdgeDirection(newTile.SpritePosition) Gets a Random position next to the passed in Position else startPos GetRandomEdgeDirection(startPos) i It's likely a really bad way of generating a map. It basically gets a random number of tiles to generate, it will then place a Tile at the start position and select a new position in a random direction (Up, Down, Left, Right). It'll then place a new tile at that new position specified, it will then simply loop through that till it's placed every tile. The "CheckTilePosValid()" function is used to determine if the random position that is gathered has already been taken by a tile. If the position isn't taken then it will create the tile and continue through the loop, while if the position is taken then it will get a new position and basically keeping doing that till it gets a position that hasn't been taken already. This generates maps like this The issue is mainly with the first image since as you can see, the map is very stretched out which isn't what I want. I'd more want a map similar to the second image, tiles much closer together and not so stretched out but is still random enough. I'm just not sure how exactly I can achieve this so I was wondering if anyone would be able to help me? Would I need to completely rework my generation system or can I just make simple changes to fix this? I'd very much appreciate the help )


How can I incrementally generate an graph? I just started a new project in which I'd like the game world to consist of procedurally generated locations connected by teleporters. After a bit of research, I've discovered this to be called either "graph theory" or "bloody complicated", depending on who is discussing it. Unfortunately, I've found very little information on generating graphs most of the tools I've seen are directed toward examining existing graphs. Assuming I have the terminology correctly sorted out, my requirements are that the graph be simple no location (vertex) should have a teleporter (edge) which connects back to itself, nor should two vertices have multiple edges connecting them connected it should be possible to travel between any two vertices in the graph (though I don't foresee ever needing to find the path simply knowing the player could find one if they chose to is sufficient) cyclic there should be more than one path between any two vertices undirected all edges can be traveled in either direction infinite if the player so wishes, they should be able to travel indefinitely, with the graph continuing to generate incrementally as they approach its outermost unexplored vertices locally finite a vertex's degree should never change after the player has visited it stably labelled each vertex represents a location which will itself be procedurally generated from a seed the same seed must be assigned to a vertex regardless of what path the player used to travel there or how large the graph is when they do I've had some ideas (which I've not yet tried to implement) regarding using the local maxima of 2D perlin noise as vertices (the input x and y could then be used as its label), but that feels clunky and overcomplicated. Is there a better way to generate a graph like this? I'm developing in Python 2.6 using Panda3D and numpy, and would of course be willing to look at including other libraries if they'll help with this problem! Edit I think I've done a poor job explaining some of my requirements, so it's illustration time! Hopefully, this will clear things up. What I mean by having stable labels is that I want, for example, Player A to be able to do a bunch of exploring and find, among other things, a cyclic path back to their starting location and a mountain that looks like a cat. His game now looks something like the following (vertices are numbered with their seed and edges with the order in which the player traversed them). He started on vertex 8329 (green) and Happycat Mountain is in vertex 6745 (blue). Player A's good friend Player B is a fan of cats, so he wants to show it to her. He gives her the root seed for his world and directions along the shorter route to the mountain of interest. Her game should now look like this The problem I'm currently having the most difficulty with is "How do I generate the same seeds for Player B when her exploration hasn't followed the same path?" That's what led me to the idea of using Perlin noise as long as the same root seed is used, the maxima won't move, so their coordinates could be used as stable vertex seeds.


Creating a set of islands by subtracting gradient values from a Perlin noise The answers to this question explains fairly well how to create a big island in the center of the screen by setting up a gradient and then subtracting its value from a Perlin Noise. Anyway they explain how to create only one gradient at the center of the screen to create a big, sort of circular island. But what if I want to create an island which has more than one gradient to create a less regular shape, or if I want to create multiple separated islands by setting multiple gradients in different positions? What value should I subtract from the Perlin Noise function for each point? The sum of the distance from each gradient to that point? The average? Edit Jon's method of multiplying and normalizing worked, got this result with 4 gradient points


Performance problem with chunked LOD I managed to create Zoomable planet. When I get closer to it the respective chunks are splitting and every split holds 4 x 16x16 grid (1024 verts). When getting closer the respective chunks split again and so on. AT the end (let's say when Im on ground), there is so much splits, that when looking on horizont its about 120000 vertices, what is way to much and drops fps to around 7 12. Where I really want like 3 4 layers near detailed, far less detailed, farest coarse. I can't get my brain around how to fix this. Any advice appreciated.


Zooming in on procedural generated 2D terrain? (LOD) My question is what methods are there to "zoom in" on a procedurally generated map using Perlin Noise (or Simplex). If I have for example this generated and I wanted to "zoom" into that little red square I drew, how could I achieve something to the likes of this (ugly drawn) example While staying true to the terrain above? I have heard of 3D methods but couldn't find any meant for 2D maps. Any advice or help would be appreciated.


How do I generate platforms in a specific position in godot? I am making a rogue like game in Godot. Currently, I am stuck with the world generation. I know how to add children, but I am wondering if there is a way to add those children in a specific position. I also need to know how to add nodes to an array, and then choose one from the array to spawn.


How can you use Fractals to perturb an image? I've been playing around with Procedurally Generated World. I've so far managed to create the Height Map, and a translate map, but now i'm attempting to create Caves, The main idea is to use another Noise map, with values being either 0 or 1, and multiply it with the Height Map. I've managed to achieve this This is currently described with a float Width, Height , which has value 0 for those points (x,y) such that (x,y) is black, or 1, for those which (x,y) is white. I want to apply some fractal to this to achieve this However, i have no idea how to do this! (I also apologize for any grammatical errors. I haven't slept in like 18 hours and i can't think straight)


Biome Transition in a Grid Borderless World I have a universe a list of "Systems", each with their own center, type and radius. A small part of such a universe could look like this Systems Can be very close to a different system, e.g. overlap Can be inside another, much bigger system Can be very far away from any other systems Spawn system specific entities and particles inside the system radius Have some properties like background color So far so good. However, the player can fly around freely, inside and outside of systems, in real time. How do I interpolate and determine things like the background color now, depending on camera position? E.g. if you are halfway between a green and a red system you should see a background halfway between red and green, or if you are inside a lilac system near the center and at the border of a green system you should get a mostly lilac background etc.


What GPU culling techniques are appropriate for voxel spheres other than octrees? I'm creating a dynamic smooth voxel based world in the shape of a sphere. Right now my current approach is to spherize a cube, generate voxel terrain on each of the six patches, and then use octrees to cull the data further. Octree's are best served with cubes. Is there a better system for storing accessing data in a sphere? I've heard some talk of Octree's not being the best way to store voxel data, even for cube worlds. How can this be? What would be better? A Hash Table? Surely multidimensional arrays wouldn't be faster? Perhaps it's just more of a design decision than performance? As in, maybe someone didn't like chunks popping in so they would rather load individual rows and columns? If it matters, I'm probably going to keep relevant geometry in GPU memory and stream in the surrounding area over time as the player gets closer to it from main memory. I bring this up because I'm really not sure if GPU memory benefits from any particular structure. All I really know is that the parallel powers of the GPU are, well, unparalleled (I had to). How can I tap into that?


Making dialogue different with each playthrough I'm making a little demo game where roughly half of the NPCs in a little town have a profession, as well as a personality. I'm trying to have the game procedurally create dialogue, so when an NPC is talking about what they do, they describe it with some personality. So for example, I may have a farmer who's an over achiever. He may have dialogue like this "I farm from sun up to sun down. And I have the most cows around!" In another incarnation, a brainiac farmer may say, "Hi, my farm has exactly five cows, and is run very efficiently." In the demo, the town will be procedurally generated, with a small number of townsfolk (around ten or twelve). Some will be peasants, others will be farmers. One or two will be merchants shopkeepers. When the player talks to some of these folk, the NPC may greet the player and say something about what they do. Or they may describe themselves, as well as something about their town. On occasion, the NPC will also say something about their family. I have thought of using a templating system, where it would fill in some of the dialogue. But I would like the sentences to vary with each playthough. I have also thought of using parts of speech so as to create sentences. The problem with using parts of speech (at least with using NLTK) is that I need some form of grammar to string them all together, and this is mainly meant for a small demo. Another option is to use a natural language generator (NLG), but that's getting into the realm of advanced AI. And I would like to steer away from that. So should I use a templating system for the dialogue (I have tried using Rant, but I got into some really complicated syntax with that)? Or, should I use a dialogue system that uses parts of speech, and strings them together with some kind of grammar? For what it's worth, I'm restricting the NPCs to a group of personalities. Also, some of what they say is based upon their stats. So if their intelligence is low, yet their charisma is high, maybe they'll be a xenophobe, or an over achiever.


How to detect if an object is upright? I have a cartoon car and it has a skid sound with the car skids. But when the car flips over the skid sound plays endlessly and its really annoying. I have a basic script that is meant to detect when the car is upright and only play the skid sound with the car is upright. Here is the code This script is on the car itself public bool IsUpright () Vector3 rotationInEuler transform.rotation.eulerAngles float tiltX Mathf.Abs(rotationInEuler.x) float tiltZ Mathf.Abs(rotationInEuler.z) if(tiltX lt uprightThreshold amp amp tiltZ lt uprightThreshold) return true else return false This script is on a skid sound prefab void Update () if(motor.IsUpright()) if(motor.IsMoving()) transform.GetComponent lt WheelCollider gt ().GetGroundHit(out tireHit) currentFrictionValue Mathf.Abs(tireHit.sidewaysSlip) if(skidAt lt currentFrictionValue amp amp skidWait lt 0) Instantiate(skidSound, tireHit.point, Quaternion.identity) skidWait 1 skidWait Time.deltaTime skidEmission When the IsUpright bool (first script) is printed to the console it keeps flickering between true and false and it isn't detecting when the car is upright. By the way the uprightThreshold from the first script has a value of 40. I have also check in the inspector and the rotation of the car on both the x and z axis are not constant at 0, it is flickering up and down between about 1 and 1, but unfortunately unity doesn't support having negative rotation values, so rather it goes to 359, which is mucking up the system. Could someone show me how to fix this? Thanks in advance.


How to achieve realistic fake physics? In my opinion, games that are most entertaining to watch and play implement fake physics, the difficult issue is how to implement the fake physics and still allow it to appear realistic. Most popular car driving games implement this really well. Question Anyone has any tips or know of anywhere I can learn more about how these are implemented? Long Story For example, Need For Speed is entertaining when the player car crashes into the computer car, but it would not be fun if we land off the track each time the player collide. In the game, it is obvious that some game logic is in place to steer or land the player car upright, face correct direction and on track most of the time even after a massive collisions. The game instead causes the computer car to suffer heavier damages like flying of the screen after many spins etc to enhance effects. As another example, suppose at a time instance, a speeding player car is driving at the close rear left of a computer car and real physics dictates in the next time instance the player will definitely bump into the computer and lose speed and control. Then at this point, the player could steer right to avoid the car, or steer left to bump into its rear. In an entertaining game, we may still want the player to avoid the front car completely if he steers away and experience an exciting near miss. In NFS, this experience appears to be implmented in a few ways such as player auto steer avoidance, scraping pass and rebound to right of computer, computer car steer away to avoid, computer gets hit but lose control and spin off track to give way to player. On the other hand, it the player steers to engage in a collision, we want to add excitement to spin the computer very badly but still keep the player on track with a good speed. In NFS, these fake collisions and steering are not easily noticeable as they feel very realistic even though if we study them closely, it looks almost like the are scripted. One method I have tried is to determine the final state of collision and then compute the path backwards. But this only ensures the car is in a desired final state, does not address the realism.


How did EA DICE create destructible environments in Battlefield Bad Company 2 and Battlefield 3? How did the folks at EA DICE create destructible environments in Battlefield Bad Company 2 and Battlefield 3? Did they just assemble the buildings out of predefined sub regions, that break apart when there is an explosion or something similar? I can't think of anything else.


How to make a character in a Box2D world jump faster? I have a question about using Box2D to simulate a physics platformer. I manage to make the character move to the right and left, and jumping as well. However, jumping seems extremely slow when compared to most tile based platformers. Is there a way to speed up the jumping and falling of the player? I of course know from my basic physics lessons that 'heavier' objects don't fall faster in the real world, but is there a way to simulate this in Box2D?


Simple physics for modelling ship submarine movement for a first iteration of my sim, I need a very basic physics model for ship submarine movement. I'd guess it might be a good approach to use vectors here (ship heading but also considering sea states etc.). Basic acceleration and that stuff should be taken into account I do not need any 3D stuff...the 'client' for that 'ship movement' physics is only the 2D rendering of a navigation map. I've found some papers on the net but they are far too complex for my needs. Anybody does know some 'simplified' vector algorithms etc. for that? Thanks a lot. EDIT To be clear I do not want to simulate ship movement ocean physics in detail, because this is not the focus of my (naval) simulation. It 'just' must be somewhat believable in that sense that if you have different sea states(wind waves currents) that the vessel is somewhat believable influenced (on the navigation map) by those forces. The main issue for me is how I model calculate those forces (wind etc.) by simple vectors and (eg. for a given wind velocity like 50kn) in an easy way withouth studying physics ).


Lunar lander why is my descent module crashing I've been reading this awesome simulation of the actual Apollo 17 descent http www.braeunig.us apollo LM descent.htm I've been trying to make my own simulation using Euler integration, with a time step of 100ms. The problem is my descent module is crashing during the first two minutes with a vertical speed of 220 m s. During the initial stage of the descent (braking), the lander is tilted 90 and almost all the thrust is spent in the horizontal component, with no force to counter gravity. In my simulation the vertical speed quickly builds up while the pitch is 80 90 , and then gravity does it job. Here's a trace t 0 s x 0 y 17234.6112 vx 1697.1264 m s vy 20.4216 m s ax 1.2995855485404475 m s2 ay 1.6121564579144938 m s2 pitch 90 throttle 0.1297 fuel 8874.2Kg t 10.015 s x 17062.974621379497 y 16948.14950433809 vx 1710.2669538608811 m s vy 36.64853435841286 m s ax 1.3247309786564347 m s2 ay 1.628484797082333 m s2 pitch 90 throttle 0.1297 fuel 8855.501190599978Kg t 20.019 s x 34239.89169813059 y 16498.912567960208 vx 1723.6514116543285 m s vy 53.026163503416676 m s ax 1.3509707026458686 m s2 ay 1.6456786784409965 m s2 pitch 90 throttle 0.1297 fuel 8836.82291908347Kg t 30.026 s x 51527.03405575163 y 15884.74450896862 vx 1725.5675762461628 m s vy 69.5834660661016 m s ax 0.9584923539027193 m s2 ay 1.663174744204344 m s2 pitch 90 throttle 1 fuel 8756.011226046036Kg t 40.041 s x 68759.3217349438 y 15103.315677459259 vx 1715.7571868391299 m s vy 86.32821281208818 m s ax 1.0003892381595199 m s2 ay 1.6806337716945954 m s2 pitch 90 throttle 1 fuel 8611.841531365935Kg t 50.502 s x 86651.75776002374 y 14107.047450672597 vx 1705.0564069549016 m s vy 104.00697912916615 m s ax 1.0452064683102156 m s2 ay 1.6991809596193168 m s2 pitch 90 throttle 1 fuel 8461.251498809865Kg t 134.865 s x 226365.92349700694 y 5.915270639694082 vx 1602.384872970266 m s vy 225.9485740506923 m s ax 1.382111636427434 m s2 ay 1.224439728661491 m s2 pitch 78 throttle 1 fuel 7246.814359289593Kg FINISHED at t 2.24775 minutes However, in the original simulation, vertical speed never exceeds 20 m s. I don't know how could this be possible, as there's no drag due to atmosphere. And I've coded initial acceleration and velocity values exactly as in this very same page. You can check the original trace here http www.braeunig.us apollo LM descent.pdf Here we can see the Moon's gravity is aprox. 1.5 m s which heavily influences ay in my simulation. However in the real descent trace it was kept to lower values ( 0.1) most of the time, even during the first minute when there was no vertical thrust due to the engine. I must be making very stupid mistakes but right now I can't see where. BTW this is how I update my vars in each step Calculate acceleration as a function of mass, velocity, thrust and gravity ax vx vx (y MOON MEAN RADIUS M) (thrust x mass) ay (vx vy (y MOON MEAN RADIUS M)) g (thrust y mass) This would be the acceleration for a flat moon. Don't work either. ax thrust x mass ay g (thrust y mass) Update velocity as a function of acceleration and time. vx vx ax dtSecs vy vy ay dtSecs Update position x x vx dtSecs y y vy dtSecs Any hint would be appreciated. Thanks in advance.