Computer Science Canada

Help needed with horse racing game

Author:  AParaipan [ Mon Jan 09, 2012 9:04 pm ]
Post subject:  Help needed with horse racing game

Hello!
I am new to this turing world and so i have an assignment to do for my class. Like the subject says i am making a horse racing game. The problem i have is : I dont know how to make the horses move
Can anyone help me ?
i attached the code in here http://uploading.com/files/bc8fdmc2/game.rar/ (click free download box)

Author:  Raknarg [ Tue Jan 10, 2012 11:32 am ]
Post subject:  RE:Help needed with horse racing game

You should fill out the template; tell us everything that you have tried. first.

Author:  Alex C. [ Tue Jan 10, 2012 10:29 pm ]
Post subject:  RE:Help needed with horse racing game

well u could try using a loop and increasing the value of the horses "x & y" coordinates each time

Author:  Velocity [ Wed Jan 11, 2012 12:07 am ]
Post subject:  RE:Help needed with horse racing game

is the game played by a human or an A.I ?

Author:  tg851 [ Wed Jan 11, 2012 11:26 am ]
Post subject:  RE:Help needed with horse racing game

its an easy fix using the "randint" command is the easy and lays way,and by no means the best(its not actual random at all,and can get predictable) doing that that multiple times till the horses move across the screen and then see who gets to the y coordinate at the other end of the screen first. there's ways that are WAY better,but this is a help forum,not a give away the answers forum,one more thing please,PLEASE,PLEASE don't use offsite uploads,the site has an add attachment to post feature with an unusually large upload limit,please use it,it makes thing less of a headache to help you

Author:  Aange10 [ Wed Jan 11, 2012 5:42 pm ]
Post subject:  RE:Help needed with horse racing game

Quote:

there's ways that are WAY better,


For example?

Author:  tg851 [ Thu Jan 12, 2012 10:55 am ]
Post subject:  Re: RE:Help needed with horse racing game

Aange10 @ Wed Jan 11, 2012 5:42 pm wrote:
Quote:

there's ways that are WAY better,


For example?

make your own algorithm,using the processor clock,then put through BEDMAS with other system processes,nigh impossible to predict unless you are REALLY(think the flash)fast at math and have all of them displayed.pretty much like random seed gen in minecraft on steroids.

Author:  DemonWasp [ Thu Jan 12, 2012 11:18 am ]
Post subject:  RE:Help needed with horse racing game

You have to be careful when writing random number generators. It is important to make sure you're actually generating the uniform distribution you expect to be producing (surprisingly difficult to prove mathematically). If you really must implement your own PRNG, at least use a published algorithm, such as the Mersenne Twister: http://en.wikipedia.org/wiki/Mersenne_twister

Otherwise, you will almost certainly find (on inspection) that you get a non-uniform distribution. Try it on your custom PRNG today!

Author:  tg851 [ Thu Jan 12, 2012 11:28 am ]
Post subject:  Re: RE:Help needed with horse racing game

DemonWasp @ Thu Jan 12, 2012 11:18 am wrote:
You have to be careful when writing random number generators. It is important to make sure you're actually generating the uniform distribution you expect to be producing (surprisingly difficult to prove mathematically). If you really must implement your own PRNG, at least use a published algorithm, such as the Mersenne Twister: http://en.wikipedia.org/wiki/Mersenne_twister

Otherwise, you will almost certainly find (on inspection) that you get a non-uniform distribution. Try it on your custom PRNG today!


thanks for that,it be helpful to say the least, that's relay useful,my code was using 6 system variables,and was pretty good,if overtly archaic and easy to break,now il only need a few

Author:  zainokay [ Fri Oct 25, 2013 1:16 pm ]
Post subject:  Re: Help needed with horse racing game

can someone post a horse race game?

Author:  Raknarg [ Fri Oct 25, 2013 8:45 pm ]
Post subject:  RE:Help needed with horse racing game

I could make one, what for?


: