Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help needed with horse racing game
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
AParaipan




PostPosted: 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)
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: 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.
Alex C.




PostPosted: 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
Velocity




PostPosted: 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 ?
tg851




PostPosted: 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
Aange10




PostPosted: 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?
tg851




PostPosted: 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.
DemonWasp




PostPosted: 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!
Sponsor
Sponsor
Sponsor
sponsor
tg851




PostPosted: 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
zainokay




PostPosted: Fri Oct 25, 2013 1:16 pm   Post subject: Re: Help needed with horse racing game

can someone post a horse race game?
Raknarg




PostPosted: Fri Oct 25, 2013 8:45 pm   Post subject: RE:Help needed with horse racing game

I could make one, what for?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 11 Posts ]
Jump to:   


Style:  
Search: