Question: Generating Randomness in a game

For discussion about scenarios! Post your scenarios, comment on others' scenarios, discuss triggers, and so on.
Post Reply
miketwenty1
Novice Member
Posts: 12
Joined: Tue Oct 20, 2009 7:58 pm
Lobby Username: miketwenty1

Question: Generating Randomness in a game

Post by miketwenty1 »

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.

Neotje
Intermediate Member
Posts: 84
Joined: Sun Mar 29, 2009 10:02 am

Re: Question: Generating Randomness in a game

Post by Neotje »

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.

User avatar
Arntzen
Administrator
Posts: 1939
Joined: Sun Jan 17, 2010 4:13 am
Lobby Username: _[eC]_Arntzen_
Location: Norway

Re: Question: Generating Randomness in a game

Post by Arntzen »

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.
A Good Place to Start: viewtopic.php?f=75&t=3884
Click to download: eC Civilization

Post Reply

Return to “Scenario Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests