Page 1 of 1

Experienced Help Needed

Posted: Wed Feb 04, 2009 4:49 pm
by no1g8tor
I have completed a project for a friend that included statistical data for horse racing. He has now asked if it is possible to draw a chart that would show potential positions at the 4 turns on the track.

What he would like to do is have a graphic of the track, just a simple 2 ovals to represnt it and at each turn, have a square of pic of horse with the horse number in the position that is calculated by the stats.

How would i do something like this.

Thanks for the input

Posted: Wed Feb 04, 2009 6:08 pm
by gyroscope
Hi no1g8tor

One approach might be to use your racetrack graphic as a path. If you use move without waiting, I'm guessing, then when the moving image of the horse reaches the corner co-ordinates, it'll beep or whatever is required.

If you look at Moving objects (with move) in the multimedia.rev file from the Runtime Revolution website page:

http://www.runrev.com/developers/explor ... ultimedia/

that'll give you the stuff for moving on a path.

I'm sure there's other ways to "skin this cat" though...

Anyhow, hope that helps.

:)

Posted: Fri Feb 06, 2009 3:46 pm
by no1g8tor
Thanks for the reply but I dont want to simulate the race just have say 8 squares with different colors in them with the number of the horse at each turn.

So I would have 8 blocks at the break and at the first turn and back turn.

the blocks would represent where the horse "should" be at that turn.

if horse 1's stats say he should be the leader at turn 1, his block would be in front of all the others and then we would to to horse 2 and see where he would be in the pack and so forth.

basically this program tries to predict the outcome of a horse race based on past stats. I am not a gambler so I dont know a lot about it only what the customer tells me to program.

The outcome I am looking for is a printable "chart" of the data with the blocks to visualize where they will be.

Thanks again and I hope this is a better explanation.

Posted: Fri Feb 06, 2009 6:15 pm
by SparkOut
Does the position of the horse's icon need to be representative of its position on the track at the relevant stage?
(eg horse 1 makes the first turn ahead, and horses 3 and 5 are shoulder to shoulder behind by a neck, and so on?)
Or is it more simply when the first horse rounds turn 1, the order is 1,3,5,7,8,2,4,6?
I would do this by drawing the (plain "oval" with four turns?) track and using the centre space to have a legend keying the images representing the 8 runners, with 8 appropriate images.
At the places you want to display the order of the runners (ie the turns) put 8 transparent buttons, set not to show the name.
Get your running list and set the icon of each button to the id of the appropriate key image. (You could do the same by placing empty images and setting the imageData of each placeholder to match the key image in the same way, but I think the icon of a transparent button is kind of simpler.)
If you need to be more representative of track position, you could do the same as above, but add some calculations and move the loc of the buttons accordingly.


I put a knock-up on RevOnline for you to have a look at - under SparkOut, title HorseCourse

Posted: Mon Feb 09, 2009 5:13 pm
by no1g8tor
WOW. Thank you so much for the reply. This forum is awesome.

I would like it to reprosent when the horse is located i.e. horse 1 in front of horse 2 and so forth. If horse 1 is 10 lenghts faster it would show him with a large lead and then horse 2 would fall into place behind and if horse 3 was tied with 2 they would be next to each other or otherwise be bihind.

Also I need to tell if the horse likes to run the inside(rail) or outside of the track. Meaning if horse 1 likes the inside, be button(horse) would be close to the track oval or if outside it would be several spaces away toward the "grandstands"

Also, How I come up with the stats is fisrt turn will give me 8 numbers ranging from 600 to 0 based on his past performances. I assign 100pts for a first at the turn and 75 for 2nd and so on. So if the horse has 6 past lines and he was first at the fist turn all 6 he/she would get 600 pts.

I hope this is more helpfull for what I am looking for.

I will take a look at your example