F
F
fresheed2014-06-28 23:50:07
Algorithms
fresheed, 2014-06-28 23:50:07

How to generate an endless game world?

The hero jumps in a horizontal direction over obstacles until he falls between them or until the "energy" runs out. I tried to compose the environment with a choice of ready-made pieces on a half-screen, but they end pretty soon and get bored. The random arrangement of obstacles can lead, for example, to impassable walls, in addition, the difficulty changes all the time. Are there ways to arrange them so that there is always 1-2 passages between them? Maybe there are variants of maze generation algorithms (no dead ends, walls are not perpendicular)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lookid, 2014-06-29
@lookid

Use chunks ( minecraft-ru.gamepedia.com/%D0%A7%D0%B0%D0%BD%D0%B... )
If you download any minecraft clone, you will see that while playing it created 100500 on disk files. These are the chunks of the world that it loads, generates and saves.
Procedural generation:
1) Perlin noise
2) fractals There is no ready-made
algorithm for procedural generation of the world, usually they google it, put it together or come up with their own.
How to draw?
5 chunks loaded: screen before-before, screen before, current screen, screen after, screen after-after. When we are at the border of the screens, we can load another one, in the direction of travel. But here it is already possible to fool around.

V
Vsevolod Zhdanov, 2014-07-09
@jobsstar

I think it's worth generating everything. And writing a generation according to the rules is quite possible and quite simple. Here you just need to sit and think a little. What language are you writing the game in? Do you know programming?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question