Chance and numbers
Dev: Jacob Zhu
Today the post is about randomization. Specifically, randomization down in programming.
Because of the way randomization algorithms work, it leads to "predictable randomization", and an article that talks more about this phenemonon is this: How random are the random numbers generated by your computer?
For our game, we want our AI to not spawn in all the time in the buildings, to give an element of freshness to each playthrough. How I've designed the code is from the basis that there is a pecentage chance that an AI will be spawned when the proximity volume is triggered by the player's position. As shown in the screenshot below, which uses Unreal Engine's randomization algorithm.
To minimize the predicatability aspect, I have used another random math function to provide the seed for the the spawn chance randomization. a sort of "double whammy" to allow for better prevent predicatablity.
Get Lustrat Somnia
Lustrat Somnia
Horror game with horde defence
Status | Prototype |
Authors | The Vermilion Chocobos, Sun, Ren, TheCephaloDev |
Languages | English |
More posts
- Winning randomNov 18, 2023
- Components Vs ActorsNov 10, 2023
- UI subsystem abstractionNov 03, 2023
- UI versus Shared PointersOct 28, 2023
- AI Accidental MartydomOct 23, 2023
- Clashing systemsOct 20, 2023
- Positioning a randomized objectOct 16, 2023
- Dev Log: Issues with Turning MeshOct 14, 2023
- UI Player Feedback and DirectionOct 14, 2023
- DevLog: Point System and Random ItemsOct 07, 2023
Leave a comment
Log in with itch.io to leave a comment.