Questions tagged [random]
Algorithms or methods to produce events or behavior that is random in nature.
292 questions
0
votes
1
answer
211
views
How to implement random children selection using a behavior tree framework that doesn't support it?
How to implement random children selection using a behavior tree framework that doesn't support it? Assuming that I want to select one of three possible actions with equal probability this is the best ...
0
votes
2
answers
112
views
Generating random "roughly circular" polygons
I am trying to generate a set of points distributed in such a way as to give a "rough circle" sort of shape. The points should not deviate too far from neighboring points, with larger jumps ...
0
votes
1
answer
162
views
Checking combat on the server to prevent cheating - how to keep two codebases in sync?
I'm making an idle game with semi-multiplayer.
My game uses Unity as a client and as a server Unity Gaming Services (UGS) C# Cloud Code Modules with UGS Cloud Save, this server is non-persistent, ...
0
votes
0
answers
106
views
Efficient PRNG for WASM and x86_64?
For a game I am finishing, I need a random sequence that can be generated in Wasm and in the server, yielding the same result.
This generated 64-bit(or more if supported by WASM) numbers sequence is ...
0
votes
2
answers
272
views
Random Grid Generation with Random Density
I have a 2D grid of cells in Unity, and each cell can be on or off. I want to randomly generate the on cells, and when I just assign a probability to each cell, the entire grid has the same density, ...
1
vote
1
answer
149
views
Random display of a character in Godot 4
I made a character in Godot 4 that enters from one side of the image and exits from the other side, which shows its different modes randomly each time.
I have written these codes for it:
...
-1
votes
1
answer
760
views
The Random.Range function isn't activating when I call it. How do I get the function to work properly and call from a range of numbers?
As you can see, I'm attempting to set the random prey integer to a number within a random range like so:
randomPrey= Random.Range(0,10);
As I type the code out the .Range doesn't turn yellow and the ...
0
votes
2
answers
156
views
Randomization algorithm that trades between more variance and higher total value
I need to generate discrete integer variables that each have meaning, so does their sum. I am essentially looking to partition a normal distribution into n bins. You can think of them as stats. The ...
19
votes
5
answers
4k
views
1v1 bartering brain game – see any problems?
While in line at Disneyland, my friends and I came up with a 1v1 bartering game. Here's how it works:
Two players are negotiating the price of a good. One player is the buyer, one is the seller.
...
0
votes
1
answer
115
views
Navmesh agents trying to go to destroyed objects
I am still working on the RTS and have added a system that allows enemies to randomly wander. However, when multiple enemies fight one of my units, they will just clump up Afterwords instead of going ...
0
votes
0
answers
62
views
Techniques for "fairer" dice rolls? [duplicate]
Suppose I have a game with 6 players, each of which gets a payout on a different side of a D6 roll. The D6 is rolled many times over the course of the game.
This yields an even payout in the long run, ...
1
vote
2
answers
250
views
Methods for generating unevenly distributed item stats?
Conceptually, generating item stats is the same as placing balls into buckets. An even distribution of 50 balls into 5 buckets looks like this: [10,10,10,10,10] whereas an uneven distribution might ...
16
votes
5
answers
4k
views
Looking for a middle ground between raw random and shuffle bags
I am working on a RPG that I have implemented spells with status effects that can be applied x% of the time. For instance a fire spell has a 25% chance to apply a burning debuff.
Initially I just put ...
1
vote
1
answer
573
views
Generate random line path with no intersection
The idea is to generate a path with a certain distance m.
Currently the generation pseudo code is as follows:
...
0
votes
1
answer
250
views