Looking For Special Random Number Generator

Looking For Special Random Number Generator

Re: Looking For Special Random Number Generator Posted by Niborius on Fri Jul 30th 2010 at 7:21pm
Niborius
1007 posts
Posted 2010-07-30 7:21pm
Niborius
member
1007 posts 1116 snarkmarks Registered: Mar 23rd 2009 Location: The Netherlands
I am looking for a special number generator where the lowest number has the most chance, and the highest number has the least chance.

So, if you generate a number between 1 and 100 a few times, you will see low numbers more than high numbers.

Thanks!
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Looking For Special Random Number Generator Posted by mazemaster on Fri Jul 30th 2010 at 7:35pm
mazemaster
890 posts
Posted 2010-07-30 7:35pm
890 posts 438 snarkmarks Registered: Feb 12th 2002
Throw darts at the following graph. If the dart lands below the curve, return the x coordinate. If the dart lands above the curve, throw again until one lands below the curve.
User posted image
In a computer program, you wouldnt actually throw a dart, but rather simulate throwing one by choosing 2 evenly distributed random numbers (x coordinate and y coordinate of thrown dart).
Re: Looking For Special Random Number Generator Posted by Niborius on Sat Jul 31st 2010 at 2:18pm
Niborius
1007 posts
Posted 2010-07-31 2:18pm
Niborius
member
1007 posts 1116 snarkmarks Registered: Mar 23rd 2009 Location: The Netherlands
Sorry, I'm confused, what does that has to do with the random number generator I'm looking for? I just need it for my excel game.
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Looking For Special Random Number Generator Posted by mazemaster on Sat Jul 31st 2010 at 5:34pm
mazemaster
890 posts
Posted 2010-07-31 5:34pm
890 posts 438 snarkmarks Registered: Feb 12th 2002
ok, so say that the function rand(1,10) generates a random number between 1 and 10, and rand(1,100) generates a random number between 1 and 100. Then you could write something like this (pseudo code):

function custom_random()
while true
....trial_x_coordinate = rand(1,100)
....trial_y_coordinate = rand(1,10)
....if 10 * trial_y_coordinate < 100 - trial_x_coordinate
........break
end
return trial_x_coordinate

(Ignore the extra ...'s, the site won't indent it right without them)
Re: Looking For Special Random Number Generator Posted by mazemaster on Mon Aug 2nd 2010 at 1:27am
mazemaster
890 posts
Posted 2010-08-02 1:27am
890 posts 438 snarkmarks Registered: Feb 12th 2002
If this is still confusing let me know I will try to explain more.
Re: Looking For Special Random Number Generator Posted by omegaslayer on Mon Aug 2nd 2010 at 1:44am
omegaslayer
2481 posts
Posted 2010-08-02 1:44am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
Which language is this in? Java (yarr) has a random class that can do this stuff for you actually. Anything else your gonna have to use maze master's algorithm.
Re: Looking For Special Random Number Generator Posted by Niborius on Mon Aug 2nd 2010 at 7:39am
Niborius
1007 posts
Posted 2010-08-02 7:39am
Niborius
member
1007 posts 1116 snarkmarks Registered: Mar 23rd 2009 Location: The Netherlands
Well, as much as I appreciate the help, I actually meant a special random number generator found on the internet, I don't do scripts. (I did before but not so much)
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Looking For Special Random Number Generator Posted by Riven on Mon Aug 2nd 2010 at 11:31pm
Riven
1640 posts
Posted 2010-08-02 11:31pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Seems pretty straight-forward to me!

Why NOT create your own? It's your game right? :lookup:
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: Looking For Special Random Number Generator Posted by Crono on Tue Aug 3rd 2010 at 5:15am
Crono
6628 posts
Posted 2010-08-03 5:15am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Niborius said:
I am looking for a special number generator where the lowest number has the most chance, and the highest number has the least chance.

So, if you generate a number between 1 and 100 a few times, you will see low numbers more than high numbers.

Thanks!
[quot=TheTopic,Mofo.]Looking For Special Random Number Generator[/quote]

Not really random ...

You'll probably find something if you go scouring on sourceforge. Otherwise, just do it yourself, it isn't that hard.

The basic idea Mazemaster is talking about is to ensure you try to pick lower valued numbers ... you generate a pool (in this case, a pool of size 2) of "random" numbers using some built in random function ... then all you have to do is choose the minimum between the two. You can do some biasing or weighting to try to get it to choose lower random numbers, but this should work fairly well.

Then again, I have no idea why you want this. If you're trying to do something like ... make dice ... there's better ways to go about it.
Blame it on Microsoft, God does.
Re: Looking For Special Random Number Generator Posted by Niborius on Tue Aug 3rd 2010 at 8:18am
Niborius
1007 posts
Posted 2010-08-03 8:18am
Niborius
member
1007 posts 1116 snarkmarks Registered: Mar 23rd 2009 Location: The Netherlands
Guess I have to make my own then, I have little c++ knowledge, but probably enough to make such program.

In my game you get a random item after each battle, and I want it like if you get item no. 100 you will get the best item of the game, but there's a very small chance in getting that.

What I could also do is that I make a list like this:

1 - no item
1 - no item
1 - no item
2 - dagger
2 - dagger
3 - sword

That is just an example of course, but if I generate a random number between 1 and 3, there's a 1\2 chance you get nothing, and only a 1\6 chance you get the sword.

Can ya still follow me? :D
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Looking For Special Random Number Generator Posted by Niborius on Tue Aug 3rd 2010 at 5:23pm
Niborius
1007 posts
Posted 2010-08-03 5:23pm
Niborius
member
1007 posts 1116 snarkmarks Registered: Mar 23rd 2009 Location: The Netherlands
Success! I did the technique I posted in my previous post and also made a program within Microsoft Visual Basic 2010.

There's also a 1/2 chance you will not get the item.

Picture:
[IMG]http://i33.tinypic.com/f09aaw.jpg[/IMG]
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Looking For Special Random Number Generator Posted by Niborius on Thu Aug 5th 2010 at 8:53am
Niborius
1007 posts
Posted 2010-08-05 8:53am
Niborius
member
1007 posts 1116 snarkmarks Registered: Mar 23rd 2009 Location: The Netherlands
For the ones who got a little curious about the game, here's a picture of the status screen.

[IMG]http://i38.tinypic.com/219xfdk.jpg[/IMG]
(Click to enlarge)

Note that I will never release it to the internet though, it's just for people I know IRL.
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Looking For Special Random Number Generator Posted by Riven on Fri Aug 6th 2010 at 3:08am
Riven
1640 posts
Posted 2010-08-06 3:08am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Say, that's pretty cool. I've never heard of this kind of gaming although, I think I 'get' it. That's in Excel right? -I know how to use formulas in Excel, but how do you get that health bar to show up?

That looks really cool!

I've been getting into board gaming lately. I think I'd like to build up a collection. I just bought "Settlers of Catan", which is a great game, and then a friend and myself are thinking of going into Warhammer 40K, and something like this might come in handy.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: Looking For Special Random Number Generator Posted by Niborius on Fri Aug 6th 2010 at 8:52am
Niborius
1007 posts
Posted 2010-08-06 8:52am
Niborius
member
1007 posts 1116 snarkmarks Registered: Mar 23rd 2009 Location: The Netherlands
Riven said:
Say, that's pretty cool. I've never heard of this kind of gaming although, I think I 'get' it. That's in Excel right? -I know how to use formulas in Excel, but how do you get that health bar to show up?

That looks really cool!

I've been getting into board gaming lately. I think I'd like to build up a collection. I just bought "Settlers of Catan", which is a great game, and then a friend and myself are thinking of going into Warhammer 40K, and something like this might come in handy.
The bars are basically graphs, with a little tweaking though of course. If the amount of health changes, the bar changes by itself as well! So it is up-to-date.
I can't really explain them now, but I can explain it sometime in Steam if u like.

I can explain how the game works by then as well.

The background is artwork from Gothic 4: Arcania.

The level system is still in progress.

Ps: lol I make short sentences :uncertain:
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Looking For Special Random Number Generator Posted by omegaslayer on Sat Aug 7th 2010 at 4:16am
omegaslayer
2481 posts
Posted 2010-08-07 4:16am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
You can do a lot on excel. If M$ did something right, it was excel.
Re: Looking For Special Random Number Generator Posted by Riven on Sat Aug 7th 2010 at 4:37am
Riven
1640 posts
Posted 2010-08-07 4:37am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Yea, that program is pretty versatile. I'll have to keep in mind that functionality next time I'm thinking of a game to play with friends.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: Looking For Special Random Number Generator Posted by Niborius on Thu Apr 14th 2011 at 9:17pm
Niborius
1007 posts
Posted 2011-04-14 9:17pm
Niborius
member
1007 posts 1116 snarkmarks Registered: Mar 23rd 2009 Location: The Netherlands
While looking through some older topics, I found this one again. Here's a more recent screenshot of the main menu of my game (still not finished though):

[IMG]http://i51.tinypic.com/15x77lu.jpg[/IMG]
Click to enlarge

And don't mention the level Exp's, I didn't work on those yet :P this calculation was from my previous game
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Looking For Special Random Number Generator Posted by Orpheus on Thu Apr 14th 2011 at 9:27pm
Orpheus
13860 posts
Posted 2011-04-14 9:27pm
Orpheus
member
13860 posts 2024 snarkmarks Registered: Aug 26th 2001 Occupation: Long Haul Trucking Location: Long Oklahoma - USA
You think you could post that background screen? It would make a cool desktop.. Or maybe its secret material and I should shut up.. :P

The best things in life, aren't things.
Re: Looking For Special Random Number Generator Posted by Le Chief on Sat Apr 16th 2011 at 1:48am
Le Chief
2605 posts
Posted 2011-04-16 1:48am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Ah I've heard of these Microsoft Excel games, that's awesome! Is it in a playable state at the moment?
Aaron's Stuff