Re: help with endless map generation please?

Hm, well if there's no need to care about previous tiles, there may be no need to retain them in memory either. When moving forward, can they move left or right? Or is it just a straight line? How far ahead can they see along this path? Internally what you could do is just move the player back when they cross the threshold and randomize the tiles ahead of them, perhaps something like this:

import random

x = 0
world = []
for a in range(0,10,1):
    world.append(random.randint(0,50))

print(world)

count = 0
while count < 5:
    if x == 10:
        x = 0
        world.insert(0,world.pop(9))
        for a in range(1,10,1):
            world[a] = random.randint(0,50)
        print(world)
        count += 1
    x += 1
-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ivan_soto via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector

Reply via email to