#Rush Hour Generation
1 messages · Page 1 of 1 (latest)
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
is your objective to generate solvable rush hour maps?
is it for the purposes of a procedural, infinite game?
yes
is it ordinary rush hour gameplay with unlimited levels
or is it a rush hour "infinite runner"
ordinary rush hour puzzle gameplay
i feel like there are a lot of ways to do this
have you ever procedurally generated puzzle levels before?
i haven't
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
thats true
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
You need to decided where to spawn car and this is the hardest part
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
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
i guess you would spawn the truck right in front of AA
where it was moved
but one tile moves aren't interesting
And randomly pick the state in visited as start board
it seems easy to move the red car one tile at a time to generate levels
lol i just want to be able to understand generation but this is another level
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
there is Rush by Michael Fogman
https://www.michaelfogleman.com/rush/
https://github.com/fogleman/rush
which basically is this but already done but i don't know how to implement outside sources into unity especially ones in different programming language
even though its slightly similar to C#
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
I remember it just talking about the solver but not the generation
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
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
it really depends on what you want to learn
hosting this thing as a server makes sense to me
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
true
but: having seen a rush hour game get prototyped a decade ago... you know, you had better make the game more fun lol
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
referencing ketchapp is very based
lmao
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
im just saying there wouldnt be level selection thered just be main menu and levels
yes