Proper Random and Gates
Spisix 1 » Devlog
First off "gates" or warp gates are the yellow tiles in Spisix. They teleport her to another gate which closes until she leaves it.
So I was using int(rand_range(0, #Gates)) to pick one (it's random if not set) but this always gave me 0 or 1. Instead I had to add a RandomNumberGenerator (RNG) and use RNG.randi_range(0, #Gates).
It was poorly thought out and, in programming, the machine is "always" (99.99% of the time) right.
So now, random Gates pick a destination correctly. This is mostly seen on Dream 3 where a random Gate is picked and Dream 4 where a random direction is picked and its Gate/last wall is removed.
Files
S1_Web_2020-05-27.zip 7.2 MB
May 27, 2020
Spisix 1
Spisix 1, The Escape
Status | In development |
Author | Hyperagon |
Genre | Puzzle |
Tags | 2D, Physics |
More posts
- Godot ShenanigansOct 18, 2021
- Dream 10 and the first BossMay 29, 2020
- More levelsMay 25, 2020
- Areas!May 15, 2020
- Levels!May 13, 2020
- Switches!Apr 30, 2020
- 20x10 CellsApr 29, 2020
Leave a comment
Log in with itch.io to leave a comment.