Tag Info

New answers tagged

0

It sounds like you're doing a two-player version of Pole Position. The way this was done in "old school" racing games (PP and others like it) was that the road didn't move at all. The illusion of motion was gained by rapidly cycling/scrolling the colors of the road's borders relative to the speed of the player. The other objects on the track had world ...


1

As you know, if you want to generate the road so that both players see the same thing, then you need to start from a common seed value. If you always start generating the road from the beginning then you can just keep calling your random number generator and the values it produces should be consistent for both players at each step. (Assuming that both ...


1

Your observation about the convex hull of intersection points still works in 3d & can be computed relatively quickly. You could simplify things by restricting the the orientation of the corridors. E.G. restricting to 90 degree turns reduces the 3d problem to a series of 2d problems.


2

Since these rooms are Graph vertices embedded in a 2d plain, this could in theory be done by solving the traveling salesman problem (which would be fine with only a few rooms). Obviously, a simple heuristic would be fine and allow reasonable scalability. You compute the edges (corridor lengths) between all rooms. You sort them by length. You add the ...


1

There are simple ways to generate cities, depending on your needs. Some time ago, I wanted to generate cities for a fantasy setting, so I started playing with a generator. Like I said in another SE post: "rough on the edges" is an understatement. But it suits my needs (it may meet your needs too). This is what it looks like: Some terms I use internally: ...


1

You should do some research about l-systems, they allow you to specify some basic rules and then procedurally generate the map. You could for example specify that every building must be surrounded by roads, and every road must continue in a straight line or eventually end, and every road is surrounded by buildings or empty space. Then, the algorithm will ...


1

Like stated by Shiro in a comment , it's difficult to give a precise answer. I can suggest a possible starting point. Use random voronoi generation where , given a set of random points P , each point in space is weighted relative to the distance from the nearest p in P. Now , instead of considering euclidean distance use Manhattan distance and you get ...


0

You're currently checking if i.y == 0 and only creating the new road section if this is true. If you accelerate and the roads stop lining up perfectly with the bounds of the world, this statement will never be true because the y value will jump from positive to negative without hitting exactly zero. Try i.y<=0; this way, even if the road stops lining up ...


1

Here's a quick little overview. Dynamic Generation The word 'dynamic' means changing. The word 'generation' means creation of things therefore 'dynamic generation' is changing generation. Therefore 'dynamic generation' refers to content that is constantly changing. Procedural Generation The word 'procedural' refers to content ...


19

"Procedural" means that some algorithm made the content. This is opposed to content being created manually by a human. "Dynamic" means that the content changes over time. This is opposed to "static" content that does not change after being created, or only changes in predefined ways e.g. key-framed character animation. You can also have in-game ...


1

There's no difference. Dynamic refers to dynamic content, which is exactly what procedural generation is. It's worth noting that there is now such a thing as dynamic generation of entire games, i.e. the program instructions (code) and possibly also the content, by an AI. That could obviously also be referred to as dynamic generation.


3

"Dynamic" means "(of a process or system) characterized by constant change, activity, or progress." (says google.) To distinguish those two terms, I'd go with "dynamic generation" meaning "created just in time, on the fly, while you play"... And "procedural generation" meaning algorithmically generated, either up front or on-the-fly.


0

Consider a grid in your space, take the grid cross points. P1 .. Pn Consider a pseudo random generation function f(x,y,z,k). Foreach P you can call f(x,y,z,k1) to get dx coord of a star from P, f(x,y,z,k2) to get dy, f(x,y,z,k3) to get dz. Repeat this incrementing k to get all stars near P. Consider your radius. For each point P on your radius generate its ...


0

What you have is two separate problems. One generating/saving/loading stars. The other is finding nearest stars. It seems that you already have star generator, which means that you can save and load seed or entire list of stars via PlayerPrefs or Application.persistentDataPath. Read about serialization if you are not sure. To find nearest stars you can use ...


0

You could use playerPrefs() to save the location of the stars so you could restore it later.



Top 50 recent answers are included