#Rush Hour Generation

1 messages · Page 1 of 1 (latest)

magic lark
#

okay so this is the test I have so far, the blocks in the playing field where the camera is positioned (the portrait outline) are what generates when i hit play, there are a ton of blocks layered on top of each other. The Grid there is a visualization of the grid being generated, the four blocks next to it are the prefab blocks, however im just using the first two in portrait for testing right now.

#

This is what I have edited the code to

#

actually i forgot to stop using colliders im going to edit that rq rn

prime bane
#

is your objective to generate solvable rush hour maps?

prime bane
#

is it for the purposes of a procedural, infinite game?

magic lark
#

yes

prime bane
#

is it ordinary rush hour gameplay with unlimited levels

#

or is it a rush hour "infinite runner"

magic lark
#

ordinary rush hour puzzle gameplay

prime bane
#

i feel like there are a lot of ways to do this

#

have you ever procedurally generated puzzle levels before?

magic lark
#

i haven't

prime bane
#

here is an idea: start from the end, and work backwards

#

because then it's guaranteed to be solvable

#

if you have a good heuristic approach, you can also make unsolvable stuff solvable

magic lark
#

thats true

prime bane
#

but in order to make unsolvable stuff solvable, your journey will transit all the same work as generating levels from the end

#

you must eventually model your puzzles as a graph of actions

#

no matter what

#

if you want something that is solvable

#

so suppose you initialize an exit, the red car, and a grid of a certain size

#

you have to enumerate all the possible actions that could lead the car there; then, filter some you want to actually use; then, spawn trucks that would yield those actions. repeat.

#

these are interesting when there are multiple choices for a maneuver

#

so this doesn't seem easy to me

#

not easy at all

misty condor
#

You need to decided where to spawn car and this is the hardest part

prime bane
#

i think trying to come up with a "conjugate" action for every ordinary action is actually quite hard

#

@magic lark do you want to become a scientist of traffic games

misty condor
#

Ok suppose you have a board
xxxxxx
xxxxxx
xxxxAA
xxxxxxx
xxxxxxx
xxxxxxx
And the next state is move AA left by one unit, and spawn truck, but where?
You have another approach is run bfs in a solved board (all the cars is placed) and try to maximum the distance from exit by a star

prime bane
#

where it was moved

#

but one tile moves aren't interesting

misty condor
#

And randomly pick the state in visited as start board

prime bane
#

it seems easy to move the red car one tile at a time to generate levels

magic lark
prime bane
#

it's hard to make every correct move put you in a position where you have multiple choices, and X/(X+1) of them are bad

magic lark
#

even though its slightly similar to C#

prime bane
#

especially ones in different programming language
fortunately this is the most exciting time to be a programmer, maybe in the history of the world

#

because chatgpt gpt4 can translate it for you

misty condor
#

I remember it just talking about the solver but not the generation

prime bane
#

i'm surprised simulated annealing is needed for this

#

that's a heuristic approach

#

you can turn any solver into a generator

#

it just won't necessarily generate interesting boards

#

hmm he more or less does what i describe

magic lark
#

im not sure if i need to translate all the scripts or if i need to just figure out how to do a web request from unity

prime bane
#

it really depends on what you want to learn

#

hosting this thing as a server makes sense to me

misty condor
#

Generator is slightly different, you start from empty state, but solver you already had the initial input,
Though as i said you can start from a random solved state and “run backwards” in the recursive tree of solver generated, this maybe easier but the dfs may stuck

magic lark
#

true

#

maybe just scrap and change game to something slightly more doable

prime bane
#

i like the server idea

#

i mean this thing you found is done

magic lark
#

true

prime bane
#

but: having seen a rush hour game get prototyped a decade ago... you know, you had better make the game more fun lol

magic lark
#

loll

#

my idea was mostly trying to make it a less wooden type design and make it more simple

#

be just infinite generation right from launching the game

#

similar to that ketchapp game where when you launch the game and press on the screen the goal is to drop the ball to the bottom and it adds +1 to your level counter and then generates another game

#

was meant to be a short side project , something to dip my feet into releases before working on my main project for 6m - 1y

prime bane
magic lark
#

lmao

prime bane
#

i think that would be like

#

the trucks are moving frogger style, and you flick at the right time and in the right direction

#

and the red car smoothly moves through all the cracks in the vehicles and reaches the exit

#

then next level

#

one move frogger, where your decision is direction X time

#

hmm... kind of just sounds like 1 item Chu Chu Rocket

magic lark
#

im just saying there wouldnt be level selection thered just be main menu and levels

prime bane
#

yes