I'm thinking about a dice mechanic in my head..
I already have some ideas.. but wanted to see what other people's thoughts were on generating randomness..
Ideally would love to come up a random number. let's say between 1 and 6 for a die roll..
I would maybe traverse a unit over a grid for all to see .. so they can see the die roll happening and maybe where ever the unit stops is the die roll.. but would want him to walk a random amount of time.. between 1 and 10 seconds maybe..
Any thoughts would be appreciated. Still not sure how to easily create "randomness" that can then be used to drive some other functions/triggers.
Question: Generating Randomness in a game
-
- Novice Member
- Posts: 12
- Joined: Tue Oct 20, 2009 7:58 pm
- Lobby Username: miketwenty1
-
- Intermediate Member
- Posts: 93
- Joined: Sun Mar 29, 2009 10:02 am
Re: Question: Generating Randomness in a game
I'm not familiar with building scenario's - as in, I never build any, but looked at triggers ~10 years ago a bit - so I don't know a lot of techniques.
However, there is an option to spawn a random number of units in a certain area of the map, I think there is also one to count the number of units in an area. If the distribution of the first one is flat, that can give you a technique for throwing random numbers.
[Edit]
I know this technique is used in Vortex TD, to spawn a random number of goldminers between I think 2 and 6. I'm not sure about the chance distribution, might be flat, might be Gaussian or might be something else.
However, there is an option to spawn a random number of units in a certain area of the map, I think there is also one to count the number of units in an area. If the distribution of the first one is flat, that can give you a technique for throwing random numbers.
[Edit]
I know this technique is used in Vortex TD, to spawn a random number of goldminers between I think 2 and 6. I'm not sure about the chance distribution, might be flat, might be Gaussian or might be something else.
- Arntzen
- Administrator
- Posts: 1983
- Joined: Sun Jan 17, 2010 4:13 am
- Lobby Username: _[eC]_Arntzen_
- Location: Norway
Re: Question: Generating Randomness in a game
What about:
Have 6 units spawn from 6 different computers in a small space so they can all see each other. All are enemies. The different computers are assigned a number from 1-6. Whichever unit survives is the number of the dice.
Example one:
1 Marine from Computer 1, 2, 3, 4, 5, 6 spawns. Computer 2's marine survived = Dice roll 2.
Example two:
1 Marine from Computer 1, 2, 3, 4, 5, 6 spawns. Computer 5's marine survived = Dice roll 5.
Have 6 units spawn from 6 different computers in a small space so they can all see each other. All are enemies. The different computers are assigned a number from 1-6. Whichever unit survives is the number of the dice.
Example one:
1 Marine from Computer 1, 2, 3, 4, 5, 6 spawns. Computer 2's marine survived = Dice roll 2.
Example two:
1 Marine from Computer 1, 2, 3, 4, 5, 6 spawns. Computer 5's marine survived = Dice roll 5.
Who is online
Users browsing this forum: No registered users and 7 guests