UnderwareDESIGN

PlayBASIC => Show Case => Topic started by: micky4fun on May 17, 2012, 07:29:03 PM

Title: Let It Be , now released !! horse racing game
Post by: micky4fun on May 17, 2012, 07:29:03 PM
Hi all

long time no see , will comment on other post asap ,

but heres a little simple horse racing game i have knocked up over the last 2 days , just the early stages , nothing fantasic but just a bit of fun

video here
http://www.youtube.com/watch?v=4Emf9xrhksU



race is 1 and a half laps

very late here , so see you soon
mick  :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 17, 2012, 11:18:09 PM
haha. looks sweet mick. nice work mate!
ps: i saw this one (http://ultimatedogracer.com/) the other day
Title: Re: Horse racing derby ? wip
Post by: ATLUS on May 18, 2012, 03:20:43 AM
Nice work!
Title: Re: Horse racing derby ? wip
Post by: Sigtrygg on May 18, 2012, 02:04:07 PM
it looks really funny!  :)
Title: Re: Horse racing derby ? wip
Post by: monkeybot on May 18, 2012, 03:47:19 PM
nice to see you back Micky.

BlinkOk that dog racing game is ace!
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 18, 2012, 05:18:31 PM
Hi All

yep BlinkOk , that dog game plays quite well , but not easy thats for shure , will have to see if i can grab that track for myself , and starting gates

yep i seem to wonder a bit monkeybot , but hopefully back for a while , thing with this program you soon come back for more

well its not that easy to tie in all the speed ups and slow down of horses to make game interesting , as was only a bit of fun , just place bets and watch a random race
still quite a few graphics bits to do , starting gate , background , winning post etc , and betting screen , ie winner and forcast , but will do all in time
anyway here is a little demo to play with , horses will run around 1 and a half laps and stop back at start , just press mousebutton 1 to restart another race or same race

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 18, 2012, 06:00:28 PM
hey mick.
i don't think it's as difficult as it looks. the only real area where it could be difficult is the NPC dogs. but you could simplify that just by recording it one time when you drive it around the track.
so you could have recordings for each NPC on each track. there is no player or NPC collision except for the walls/obstacles. just my 2c.
would you like me to mock something up?
thanks
blink
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 19, 2012, 03:05:22 AM
Hi All

ok BlinkOk , see what you mean , i have just loaded up Kevin's PathBasedObjectMovement code , seems this is what i might need to record the paths of the other dogs , not unless there an easier way maybe ?
so i will look through the code and i can use the program to record the path's and then just just a bit that loads the code to play it back when needed ,
i am out to this evening , so i will start then , sure if i get stuck Kevin might jump in and help me , think this coding needs to be learn't anyway will come in handy in the future ,
so yes if you have some spare time and what to knock something up then thats fine , we will give it a bash

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 19, 2012, 03:09:33 AM
for me i would just record the keystrokes in an array and play them back. even if a race lasts a minute you only have (at 60fps) 60x60 (3600) elements (which compressed would be far less). then you could just plug them back into the NPC at game time
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 19, 2012, 07:28:17 AM
Hi all

right see what you mean blinkOk , i will give it a go tonight

mick :)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 19, 2012, 04:57:42 PM
Hi all

ok had quick try on ai for one horse , think you get the gist of it as the demo shows horse 8 going all over the track , just need to get the ai path a little less erratic , but will work on that, yep BlinkOk it take about 3600 for each x and y for 1 and a half laps , so a 1 lap would be less

this is a rolling demo
Title: Re: Horse racing derby ? wip
Post by: ATLUS on May 19, 2012, 05:03:01 PM
micky4fun, nice demo! What will we do in complete game? bets? =)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 20, 2012, 05:44:38 PM
looks good mick. so that was the keystroke recorder version or the AI version?
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 20, 2012, 08:36:22 PM
ok here is my feeble attempt at a horse. i'm no good at the small sprites.
(http://i93.photobucket.com/albums/l75/blinkok/horse.gif)

one of my favorite films of all time is "let it ride" http://www.imdb.com/title/tt0097731/. if you haven't seen it you should check it out
it's just a funny movie, even if your not into horse racing.

i thought maybe we could do this;
call it "let it ride" (after the movie)
exactly the same game play as the dog race one except we have three tracks; country, small town and city.
you choose your horse at the start and stick with it until you win/loose.
so you make a bet and then race; say 4 races per track (12 races in all)
minimum bet goes up and the opponents get faster as the tracks progress.

ps: it's a two horse race! (a little better)
(http://i93.photobucket.com/albums/l75/blinkok/horses.gif)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 21, 2012, 02:04:05 AM
Hi all

Quotelooks good mick. so that was the keystroke recorder version or the AI version?
no i just got the horse to follow the mouse in this version , but i will do a keystroke version as well to see how they compare, see which is the smoother moving one

the horse's look good to me , the idea of the game sounds fine to ,  i will try and watch that film as it sounds like one of my type of films , will see if my mate has it in he's dvd shop
QuoteWhat will we do in complete game? bets? =)
thanks ATLUS , yep there will be

ok will try a few more things out today

mick :)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 21, 2012, 05:53:00 PM
Hi All

Quoteone of my favorite films of all time is "let it ride"
well managed to get this on dvd , and found it pretty good worth a watch , not quite like horse racing in the uk , but the begining was not a milllion miles away from how i recieved some tips a few years ago
away after watching film , i tried the key input way of mapping the ai horses and its a lot more acurate than the one i did before with the mouse method , so i will hang about for the courses and obsticales
before mapping othe runners out , no rush on them as i will be taking my time anyway , trying a few ways of doing things , must admit first time i looked at writing and reading files for the ai , quite easy and could be quite handy in the future ,

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 22, 2012, 05:22:38 PM
good to see you got to watch it. it reminded me of my punting days. guys would NEVER jump up and down when they were winning. they would always quietly say "im having a good day". there was even a bar
at my track that was a lot like the one in the movie.
anyway. to show i'm not woking on what i should be i did a horse selection screen.
(http://i93.photobucket.com/albums/l75/blinkok/donkey.jpg)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 22, 2012, 06:17:38 PM
Hi all

gfx's look really good at the moment great cartoon looking horses , see a slight change to Charity and dont see faith healer in the ones to pick and hoping the jockey does not fall off of lord byron , lol
ahh you was a punter to , intesresting ! , well a few still jump up and down here , the day out a year punter that is.

rather that start anything yet , i am just tinkering about at the moment and will wait till most gfx's are in , there no rush what so ever ,

thanks
mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 24, 2012, 02:24:49 AM
no worries mick. i just got those names off the top of my head. been a little while since i've seen the movie (generally i watch it after if had a punt which is about Melbourne cup day for me)
i hustled up a bit of a splash screen as well as the stuff i sent you.
(http://i93.photobucket.com/albums/l75/blinkok/splash-2.jpg)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 24, 2012, 06:16:14 AM
Hi All

ok thanks BlinkOk , yep got the file , all looks fine to me and dont think the oval shape track will cause any problems  , splash screen looks good to , i am at work at the mo , but will av a muck around with it tonight and see what it looks like in action

thanks
mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 24, 2012, 04:40:20 PM
no worries mick. could you try something for me; could you try going around the track counter-clockwise instead of clockwise. for some reason it seems a lot easier to me. (maybe i'm just dreamin)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 25, 2012, 06:35:07 AM
Hi All

blinkOk , well did not have as much time as i wanted last night as traffic getting home was a nightmare , anyway did a bit of tinkering and playing the other dog game as well to get a feel of it , so all i managed to do is below , just your dog going around the track , no animations , shadows or fence collisions yet , but just wanted to know if the control is our you want it , it can be adjusted with the values in program , also playing the other game and this one i think the straights are a bit to narrow , what do you think?

will get much more time this weekend , also i need to adjust my ai input program for the other horses so they have the rotation angles in it as well , for when they avoid things in the straights and bends

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 25, 2012, 05:44:01 PM
looks superb mate! feels good too. no rush. take your time. do you think it might bet a bit crowded in the straights
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 26, 2012, 10:39:50 AM
Hi All

Quotelooks superb mate! feels good too. no rush. take your time. do you think it might bet a bit crowded in the straights
well its not to bad , depends as the horses do take up a bit of space when not running in a straight line , just seemed the straights in the other game were quite wide so horses could turn easy to avoid things

here is what i have come up with , just a quick demo , paths will be more persise and not so erratic as this demo , but just to show paths , 3 horse will race around still in wrong direction at mo , just press spacebar and they will reset and run at a random speed but still  the same paths as before, still no animations yet as still trying a few ways of doing things , think there is proberly an easier way of loading the files and putting them in the dim statments , but this works if a little out of the way method ,

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 26, 2012, 05:03:47 PM
looks awesome. i'll make sure i make the straights wider maybe the turns too, just a wider track in general.
i had a bit of a brain fart on the direction last night so don't worry about making them go the other way round.
clockwise should be fine
Title: Re: Horse racing derby ? wip
Post by: kevin on May 26, 2012, 08:59:19 PM
Quote
think there is proberly an easier way of loading the files and putting them in the dim statments , but this works if a little out of the way method

  Had a quick look at the example and yeah,  it's really not an ideal long term method.  It'll work, but ultimately you're making more work for yourself for no real benefit.  If you're going to store data externally, then it's preferable to no avoid hard coding things like files names, sizes into the program.  

  For example, since the file names are sequential, we can construct the file name inside the loop and load them with a slight variation.

[pbcode]
 for b=1 to 3

   ; Make this file name
   File$="horse"+str$(b)+"_track1.txt"

   ; make sure it exists
   if FileExist(File$)

       readfile file$,1

        for a=1 to 3000
           hx(b,a)=Readint(1)
        next a

        for a=1 to 3000
              hy(b,a)=Readint(1)
        next a
        for a=1 to 3000
              hr(b,a)=Readint(1)
        next a

        CloseFile 1
      endif
 next b

[/pbcode]

  This is preferable as now to add more paths, we don't need to hard code file names into the program, we just bump the 'b loop end counter'    
 
  But, do we really need 3 fixed sized loops ?  The answer is no, as by saving the data in triplet form, we can remove the two extra loops.  In other words we store the X,Y and R values all together in save data.

 If we did that we've end up with a loader a little more like this.

[pbcode]
 for b=1 to 3

   ; Make this file name
   File$="horse"+str$(b)+"_track1.txt"

   ; make sure it exists
   if FileExist(File$)

       readfile file$,1

        for a=1 to 3000
           hx(b,a)=Readint(1)
           hy(b,a)=Readint(1)
           hr(b,a)=Readint(1)
        next a

        CloseFile 1
      endif
 next b

[/pbcode]


 The  next thing to look at would be only storing the needed data.   Since the path data seems to be storing every precomputed position (a better idea is use delta paths), the length of the paths will differ.    So why store and load back more data than is needed ?   To do that, we can store the number of points in the file.  So the first integer say in the file would be the number of triplets following it.

  Which gives us a loader looking something a little like this

[pbcode]
 for b=1 to 3

   ; Make this file name
   File$="horse"+str$(b)+"_track1.txt"

   ; make sure it exists
   if FileExist(File$)

       readfile file$,1

                Path_Size=ReadInt(1)

        for a=1 to Path_Size
           hx(b,a)=Readint(1)
           hy(b,a)=Readint(1)
           hr(b,a)=Readint(1)
        next a

        CloseFile 1
      endif
 next b

[/pbcode]



 This has a knock on affect,  since the loader gets the path length, we don't have to hard code the value in the program anymore.  So you can alter the path externally without touching the program code at all.  


     
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 27, 2012, 02:00:19 AM
Hi All

ok BlinkOk , yep think a slightly wider track will make thinks lest crowded , ok i will stick to the way round its going at the moment , but can alway flip it around later
Kevin , thanks for the code for loading the files , i will amend the writing program for the paths so this new code works , thought there was an easier way , makes it much more simpler

mick :)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 29, 2012, 04:31:30 PM
Hi All

ok here is a little playable demo , you are the bottom horse , press spacebar once to start , the upkey to move forward and left and right key to steer , then to reset kinda ,, press spacebar again
this is just a playable feel demo

later demo in forward posts

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 29, 2012, 05:42:16 PM
lookin very nice mick. (i'll shoot you some stuff later on today)
i dunno if we've been over this before but have you had a look at [plink]FLASH INTEGRATION WITH PLAYBASIC (http://www.underwaredesign.com/forums/index.php?topic=1159.0)[/plink]
if you're comfortable with that then i could handle all the GUI stuff in flash so you could concentrate on the gameplay.
let me know what you think huh.
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 30, 2012, 05:04:10 AM
Hi all

BlinkOk ,

Quotei'll shoot you some stuff later on today
ok mate , no rush , as it gives me time to experiment with a few things within the game
Quote[FLASH INTEGRATION WITH PLAYBASIC

well will give it ago , and look good with some of your work in the game , if i can't suss anything out im sure someone might help me , but i seem to have trouble getting the demo in that thread working properly , tried with pb 1.64n and 1.64m
the arrow keys do nothing and i cannot get out of the program with out doing a hard playbasic reset
so that might not help us

mick :)

added

just tried that demo within my game and i am having the same problem as above , cannot esc out of program and arrow keys do nothing , when mouse is moved over putter etc they work ok , but nothing else
tried on 3 pc's now all the same , wonder if you get the same results and will this effect your flash program within the game ?

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 30, 2012, 06:30:24 PM
ok no worries mick. if it's not working right off the bat it is probably not worth pursuing.
i got delayed with the updates. will try to get something to you today
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on May 30, 2012, 10:21:19 PM
ok sent some stuff. i thought the layout could look a little like this. with the horse/bet down the bottom left. i added an outline around the horses and made them slightly smaller. still not sure about the crowd
they look a little zombie like. what do you think?
(http://i93.photobucket.com/albums/l75/blinkok/screen.jpg)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on May 31, 2012, 09:36:24 AM
hi all

Yep got other gfx's thanks blinkOk , horses look good , crowd looks ok , cant really think of anything else you could do apart a packed grandstand , but this is ok though , will put stalls in tonight hopefully ,
well ashame you cant do the user interface due to the pbflash ,maybe just a small bug that could be easy sorted ?, i was looking forward to that , think it would have made the game stand out ,

well one of the hardest courses to get around ive seen lol

mick :)
Title: Re: Horse racing derby ? wip
Post by: kevin on June 03, 2012, 01:34:19 AM
Mick,

  Had a go at your last demo and it's looking pretty good.     In this type of game, is  one of those situations where you really should look into using the vector collision or at least shapes to create the collision mask.    With vector / world collision you can use sliding sliding mode that's built into the sprite system.    It just means creating outlines for the hard objects in the scene.  Like the track railing or any barriers that might be placed around the track.   So these are drawn (line by line) and captured to the world, then collision is run against that.  Alternatively,  you can create vector shapes that represent the hardware edges then drawn those out to form a collision mask image.  This offers one big benefit in that we no longer have to draw the masks for each level, since they can be drawn inside the program..  Reducing not only the in memory footprint, but the 'on disc' foot print also.  

 For the actual sprites in the scene, i'd be using the Z value to sort the characters upon their screen height.  You could probably get away with just setting the sprites Z to that of it's inverted screen Y position. So the lower down the screen, the lower the depth of the sprite, meaning it'll render in the foreground of something above it.   The shadows would need to drawn in a prepass though. So a character infront of another doesn't shadow  on top of it..   There's an example over here.    Vertical Sprite Depth Ordering (http://www.underwaredesign.com/forums/index.php?topic=3848.0)


 Here's a quick mock up of using shape to create the mask.
 



Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 03, 2012, 05:35:12 PM
Hi all

thanks for info and demo Kevin , i have been aving a little muck around with it
at the moment i have done this level one demo with your horse needed to be steered around , this is by no way the final first track just seeing how it plays , dont know if it has to many horses or not
also needed is some things that slow you down , some bonus items or speed ups maybe , anyway here is a general feel

later demo below

mick :)

Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 04, 2012, 06:29:56 PM
just on that flash thingy mick. the idea is that you click on the different club names and the playbasic program can detect which club your selecting (top left).
is that whats happening for you?
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 05, 2012, 04:06:06 AM
Hi all

Quotejust on that flash thingy mick. the idea is that you click on the different club names and the playbasic program can detect which club your selecting (top left).
yep that works ok , but i cannot exit the program , and the arrow keys are supposed to toggle the flash screen , but they do nothing

did a fair bit yesterday , will post later tonight as off out now

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 05, 2012, 04:46:07 PM
i have 1.64l and the up/down arrows work ok (hide/show flash screen)
if we can get it to work i can handle all the GUI stuff for you (http://www.swfcabin.com/open/1338927830)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 05, 2012, 05:38:03 PM
hi all


Quoteif we can get it to work i can handle all the GUI stuff for you
well that would be great , i know it would be a good job much better than my effort , im using 1.64n so it could be just a simple fix , wonder if Kevin knows why it works ok in 1.64l and not 1.64m and 1.64 n
hopefully this will be sorted out ,

thanks for the latest demo's that you have put up kevin , i have had a good look at these as well

anyway in the mean time i have done this so far as time went so fast today , but i will hang on a bit to see if the pbflash can be sorted out for us,
as normal spacebar resets game

i will release the souce code towards end of game as it is always changing at the moment

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 05, 2012, 11:35:19 PM
i just tried it with 1.64n and it doesn't work. something between l and n has stuffed it up.
so much for making games easier to make huh?
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 06, 2012, 01:17:49 AM
Hi all

Quotei just tried it with 1.64n and it doesn't work. something between l and n has stuffed it up.
ok it aint just me then , the club selection works ok , it could just be a keyboard input thing ?

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 06, 2012, 01:22:57 AM
yeah.
also the game window starts minimized (in l & n) and i need to start it twice (F5) before it gains focus.
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 06, 2012, 08:51:17 AM
Hi all

I notice that the library is 6 years old , maybe that's why , wondering Kevin  if there could be an update as its so old?

Mick
Title: Re: Horse racing derby ? wip
Post by: Big C. on June 06, 2012, 02:05:06 PM
Hello,

the flash problem sounds interesting to me... is there any example with code maybe?
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 06, 2012, 02:14:34 PM
hi all



Quotethe flash problem sounds interesting to me... is there any example with code maybe?
here is a link to the thread , hope this is what you are looking for Big C.
[plink]http://www.underwaredesign.com/forums/index.php?topic=1159.0[/plink]

mick :)
Title: Re: Horse racing derby ? wip
Post by: kevin on June 06, 2012, 02:25:31 PM

you don't need that library, it's been include in the retail editions of PB for years.    As for it's status, like most slibs it's   discontinued.   
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 06, 2012, 05:13:25 PM
copy the pbflash.dll from the playbasic folder to the demo library and it should work.
i don't know how you reference it if you don't copy it.
let me know how this goes mick and if it's ok then i will put the GUI together for you

the game window still starts and loses focus
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 06, 2012, 05:15:09 PM
Hi All

Thanks for clearing that up Kevin ,

well today i have cleared a few bugs in the last code , now displays your horse if you win at bottom of screen , well used the same gui at the mo as i only have one ,
made it so you cannot not cheat by going wrong way to win ,
will now make 3 tracks for the first stage , then also do 3 horse patterns per horse per stage , so there is a 3x3x3x3x3 pattern a 243 combernation per race

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 06, 2012, 05:16:45 PM
if you have a recorder proggy i can help with that if you want
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 06, 2012, 05:31:38 PM
Hi all

[quotecopy the pbflash.dll from the playbasic folder to the demo library and it should work][/quote]

i have copied from playbasic folder in the slib folder and copied the file pbflash.dll and put it the the same folder as demo , but still no joy , exactly the same as before
did it work ok for you then ?

yep got a basic recorder program , but it wont take me to long i think , let you get on with the flash gui

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 06, 2012, 05:40:38 PM
yeah. i have 1.64N and the mouse and UP/DOWN keys work (did you recompile?)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 06, 2012, 05:56:14 PM
Hi ALL

Quote(did you recompile?)
I take it re-boot pb , yes tried on 2 pc's still no joy

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 06, 2012, 09:13:47 PM
did you go into the IDE, load up the project file again and hit F5?
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 07, 2012, 02:26:58 AM
Hi All

Quotedid you go into the IDE, load up the project file again and hit F5?

yes , what i did was copy the pbflash.dll from playbasic/slib into the same folder where i extracted the demo to , that overwrite the older pbflash.dll file
i then started pb ide , loaded demo and run with f5 , still no joy for me though , still the same

is what i done correct ?


mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 07, 2012, 04:51:05 PM
yep. looks like you're doing the GUI mate.
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 07, 2012, 05:30:17 PM
Hi All

Quotelooks like you're doing the GUI mate

well thats shame as i know you would have done a brilliant job , well try my best , maybe if its not going to take to long you may want to do a mock up in flash and i could try and copy it
well maybe ! , with you doing it would have saved a load of time though

i thought adding some water / mud to slow you down rather that stopping and maybe some speed ups or bonus odds/winning if collect
also could make the computer horses slow down if there get stuck in water/mud as well , just an idea
the 3x3x3x3x3 combo thing wont take long as im only doing 3 of each so only 18 per track for 6 horses  to come up with 243 combo's for the 5 left running on their own
here is a pic of pretty much 1 layout of track one , no bonus items here yet and ok ish water

mick :)
Title: Re: Horse racing derby ? wip
Post by: kevin on June 07, 2012, 11:55:43 PM
 i don't get it, why would you need 243 path combo's per track ??   That's 243*32 K per track, about 7.8 meg of data.

Most racing games use racing lines much like a slot car racer, where the path is a set of way points, rather than fixed positions.   So when the character AI attempts to move/orient the character, it's trying to match it's preferred racing line.   If you included collision/line of sight into this model ,  characters could be made to slow down or turn away from a potential impacts, so the paths are more dynamic and the race outcomes are less predictable.

 Ideally the AI brain feeds the computer controlled character the same input as the human controlled one.  Turn Left/Right, Move Forward/ Stop.  So the computer controlled game characters can't do things that player can't.  
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 08, 2012, 05:36:54 AM
Hi all

Thats wierd , i was driving to work thinking i might do the other horses just as you said , but was going to do it the path way first still as i have started that way , then after try your way . the path way is more predicable thats why i thought to do more paths per horse , but the winner is still random amoungst the computer horses

as it happens though theres only 18 paths per track (6 horses) so thats about 0.567 meg , 5 computer horses times 3 paths each,
there for any 1 path out of 3 from horse 1 , any 1 path out of 3 from horse 2 and so on , thats 243 comos or races that could happen
as the horse you control would not be included , by hes path is there incase you chose another horse and so on

track design is not the easy part thats for sure , as need to make sure the player does not stick to the inner shorter way round all the way

thanks for ups on lap counter , my way is track divided into 4 with 4 pointinbox checks ,

mick :)
Title: Re: Horse racing derby ? wip
Post by: kevin on June 09, 2012, 11:04:13 AM

   The nice thing about way points styled systems is the characters don't need to be fixed onto the path.  The path is used as a guide line which they aspire to be on, allowing characters to make decisions during the race, such as speeding up/slowing down, changing paths, not to mention interact with the other horses and the course obstacles ikn much the same way the player does. 



Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 13, 2012, 02:34:04 AM
Hi All

blinkOk , do you have a 1024x768 image of the title screen ? as im using the 800x600 one you posted at the moment and resized it to 1024x768 and its quite blurry


thanks
mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 13, 2012, 04:25:27 PM
no worries mick. i'll shoot you some stuff today
Title: Re: Horse racing derby ? wip
Post by: stevmjon on June 13, 2012, 06:52:23 PM
hey micky4fun

good to see yet another fun game. you and blinkok are a good team.

keep up the good work,  stevmjon
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 18, 2012, 06:16:56 PM
Hi all

Quoteno worries mick. i'll shoot you some stuff today
yep thanks for the latest gfx's , BlinkOk , will get a demo up asap so you can see how its going ,

Quotegood to see yet another fun game. you and blinkok are a good team
yep thanks stevmjon , but i count myself lucky as with good gfx's you are halfway there i think and BlinkOk has been very kind to help me out on a few of my efforts and only to sure with a good programmer
he and them would come up with an amazing game.

ok i have now done 3 courses for track one of the game , think BlinkOk said there will be 3 tracks , so that 9  courses in total , my courses for track one are shown below ,
i have play tested 2 out the 3 so far , this has taken hours of time and when 3rd is play tested i will put demo up , as the game is called let it ride i take it that winnings won on one race will all be put on the next race , ie an accumulater until you lose or win all 9 races , this however does make the payout rather large , as there are 6 horses in the race the odds would be 5/1 on each horse , in the real world if all had a equal chance for the bookie or tote to make a profit the would all be 4/1 , even at these odds thats a 1953125 payout for a 1 unit stake , so this would be the maxium score that could be achived.
so just an idea , as your horse is the fastest as long as you get around the course without bumping into things or slowed down in the water , you would be the favourite to win
so im thinking along the lines of your horse being 2/1 to win , but as you can see i have 2 horse shoes on each course , you have to be a good player to collect these on your way round , so if you win and collect 1 you will get odds of 3/1 and if you collect 2 then get 4/1 , thus making a few more combo's in the scoring department , also picking the right horse for the course will make it slightly easier , this will take a few goes to suss out , all this will extend the games life i think ,
so is this the way to go ? , or any other ideas welcome , but maynot be used , lol

also the game has been speed up by about 50% , this makes it more faster paced
i have still got the pre-defind computer horses at the moment , with a 1 in 3 chance of them also slowing down if they go though the water as well

ok back soon
mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 18, 2012, 06:38:03 PM
very good track design mick. it's important to not let the player hug the rail. luv the horseshoe. i gotta get my finger out and generate some more stuff.
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 19, 2012, 06:22:25 PM
Hi All

ok here is a slightly rushed 3 track demo to try out , 1st track is just to get you into game , differcaulty still to be tweaked on all tracks , got the layout for all 9 tracks on paper
you must win to goto next track , if not start of again were you left off , in real game you will start again , horse shoes in real game will increase your prize
if you win it will show same gfx's no matter what horse you choose as this is the only gfx's i have at mo ,
think at maybe horse selection screen it should show current winnings and next track you are racing on , maybe left and right of the choose you donkey banner

anyway times up tonight so heres demo , run the 3 track demo.exe , will tidy tracks into a folder later as late now

also do not press the spacebar as this will stop game !! , use mouse to select start and horse and up left right keys to stear horse

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 19, 2012, 08:09:06 PM
you got some sexy looking transitions there mick. nice work
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 19, 2012, 11:11:00 PM
i'm away till next week so i don't think i'll get much done till then. sorry mate
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 20, 2012, 12:38:53 AM
Hi All

Quoteyou got some sexy looking transitions there mick. nice work
well just some simple swipes , they seem ok
Quotei'm away till next week so i don't think i'll get much done till then. sorry mate
no worries , no rush , i will do all the courses on this track , then just drop the other 2 tracks on top , wont be a lot more to do in the gfx's department after that , maybe just the other 5 winners at bottome of screen
i will then give a good test , tidy and tighten thing up any other ideas welcome

mick :)

ps just a slight bug as i was rushing last night , you still come up as winner on all tracks by being a close 2nd or 3rd  even if you dont win
now fixed
Title: Re: Horse racing derby ? wip
Post by: kevin on June 20, 2012, 10:27:01 AM
 It's looking good,  you could clean up some stuff with a bit of filtering and alpha... Can't really play it on my system as the demo is running too fast.  I've a feeling you're using Vsync to limit the frame rate.   Not ideal, as different systems can have different Vsync rates, moreover the sync can also be turned off in drivers or worse not be supported at all.    Graphics FAQ (http://www.underwaredesign.com/forums/index.php?topic=2784.0)
 
Title: Re: Horse racing derby ? wip
Post by: ATLUS on June 22, 2012, 11:21:46 AM
new alpha! very good job and fun play micky4fun
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on June 23, 2012, 09:46:21 PM
how about that black caviar huh? jockey couldn't even bugger it up
Title: Re: Horse racing derby ? wip
Post by: micky4fun on June 30, 2012, 07:35:55 AM
Hi All

Thanks ATLUS , its getting there

Quotehow about that black caviar huh? jockey couldn't even bugger it up
lol , nearly did , he thought it would still coast along without him riding it out , but Ascot is a stiff cousre , uphill finish , not like the flat Austrailian tracks but he did the job
think jockey would have been in a lot of trouble if he did not , err

Just to say sorry to here about Kevins dad , wish him all the best , not easy looking after people as i know myself , its hard work

well been doing a few bits here and there to game , heres all the 9 tracks done now , just going to program horse paths next and other bits over the next week or so ,
then when other 2 tracks are ready i can just drop them into game , so there will be 3 tracks each with 3 courses
anyway heres a few pic's
will be back soonish

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on July 01, 2012, 03:44:39 AM
sorry to hear about kevs dad too. i'm still out of the loop as far as this game is concerned. hopefully i'll get the betting screen and HUD done this week
Title: Re: Horse racing derby ? wip
Post by: micky4fun on July 02, 2012, 06:29:06 AM
Hi All

Quotehopefully i'll get the betting screen and HUD done this week
no worries , whenever you get time BlinkOk , think i can get away with a few things , betting screen might not be needed as in title let it ride , think it would be bet all in , an accumulator so all onto next race
win or lose , carry on or stop, so i could just have the wad of dollor notes getting bigger as you stake highers the further you go , could get away with just the one track we have as well , but upto you
so at a bare minimum just the other 5 horse pics when they win , the bit that pops up at bottom of screen when you win could be fine
was a shame that the flash thing did not work , as think that would have pollished it off , nevermind.

just going to try a few other little bits on game see what they look like or even work , but im a week or to away to complete game i think

mick :)

UPDATE:
well i have managed to do the pop up winner gui at bottom of screen for all 6 runners , so pretty much got every thing to make a playable game , unless you want to do any other tracks , but not to worried either way mate , leave that to you

ok will be a week or so to put it all together now and post when ready

mick :)
Title: Re: Horse racing derby ? wip
Post by: micky4fun on July 09, 2012, 03:03:38 PM
Hi All

well i have just a few things to do now and the post game , i have decieded not to have a complete all in money staking system as it goes up to quickly , and doing it the way im doing it i could add another few more courses if needed without the money going crazy

heres a few more screenies to release

mick :)
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on July 09, 2012, 06:52:31 PM
looking awesome mick. those are all great ideas. very sorry i haven't got anything together on this yet.
Title: Re: Horse racing derby ? wip
Post by: ATLUS on July 10, 2012, 07:20:55 AM
Pretty good game Mick!!!
Title: Re: Horse racing derby ? wip
Post by: micky4fun on July 15, 2012, 08:11:14 AM
Hi all

no worries BlinkOk , you have done some great work on the graphics i all ready have , i have managed to use paint.net to cut out some images and add them to others to get enough to do all the game.
its very nearly done now just 1 bug that i will iron out later and a few track horse timings to do and then i will post up

thanks ATLUS , aint to bad for a quick fun play game , just trying to get it so it aint to hard or easy

heres a video of the first 4 courses , as i have now done it slightly different ,
will go something like this , you pick your horse , you will automatically stake $1000 on it , then while in race you can try and up your stake by collecting the horse shoes , $1000 added to stake per horse shoe but this will come out of your current wallet, 2 horse shoes per race , so a $3000 is the max stake ,
if you win you will get 5 to 1 your stake and so on to next course , starting at $1000 again , to help you along getting to the tricky horse shoes there are 2 apples per course , these will give you a little burst of speed that you may of lost trying to get bonus horse shoes
once all 9 races are complete that is the days racing finished and end of game , now try and beat your last score , or game will end when you dont win your last race , you will have finished in a win situation with the total won so far upto the last defeat as shown in video

mick :)

Watch On Youtube (http://www.youtube.com/watch?v=6mWu0NB_ZOQ)


Title: Re: Horse racing derby ? wip
Post by: ATLUS on July 15, 2012, 09:31:56 AM
a very attractive video micky4fun!
Title: Re: Horse racing derby ? wip
Post by: kevin on July 15, 2012, 11:54:44 PM

Yes it's looking very nice.. Shame the races are so short though, since the races seem pretty arcade styled ..   
Title: Re: Horse racing derby ? wip
Post by: BlinkOk on July 16, 2012, 02:54:09 AM
haha. that looks absolutely bloody marvelous mick! i luv the money cursor. great idea.
i agree with kevin on the short races. maybe you could make later races go for 2 or 3 laps.
Title: Re: Horse racing derby ? wip
Post by: micky4fun on July 20, 2012, 07:10:16 AM
Hi All

Thanks all for comments , after plenty of play testing i think that the one circuit will work ok , as going around a few times may make it a bit boring , i think just adding a few more tracks maybe better , but i have 9 here so far and with tight gameplay and with the horse shoe to up your stake that maybe enough but can add if required , anyway will post up the full game weekend , as its all done now apart from 3 sound effects
will do them tonight/tomorrow , then after someone esle as played the game can comment if to easy or hard , as i am quite used to it now , lol

thanks
mick :)
Title: Re: let it ride , released
Post by: micky4fun on July 20, 2012, 05:32:21 PM
Hi all

ok here is the let it ride game , if anyone can let me know if to hard or easy that would be great

idea of game ,
you start with $1000 in your wallet , once you picked you horse you automaticlly stake $1000 on it , this comes out of your wallet
one way around track you can pick up a apple to give a small burst of speed , only 2 apples , you may need 1 or both to help you
also there is a horse shoe , this will increase your stake by $1000 per horse shoe , the first 2 horse shoes on track 1 come free , but
after they will take $1000 out of your wallet and use it as a stake unit on your horse

on some tracks picking the right horse might help you a little to win , ie where the horse is drawn in the stalls
maybe an idea to just complete the tracks first of all without horse shoes to get feel of track
the tracks do not really get harder as the game goes , so getting past one track may get you past a few more ,

keyboard up left and right are the controlls and mouse to pick horse and start game , thats about it

apart from spacebar on main first screen will toggle screenvsync on and off
and of course a Big Big thanks to BlinkOk for all the Graphics that he kindly did for this game

http://rghost.net/39328899

mick :)
Title: Re: Let It Be , now released !! horse racing game
Post by: ATLUS on July 21, 2012, 02:51:00 AM
Very good game! great work Mick!

my best place 3, i think this is hard =)
Title: Re: Let It Be , now released !! horse racing game
Post by: micky4fun on July 21, 2012, 03:21:06 PM
Hi all

yep thanks ATLUS , thought it might be on the hardish side , did not want to make it to easy so you do all the tracks in a few goes , so i will wait a day or so see how other people do and change the speed down a little of the other horses,
i am pretty use to it now and nearly complete the game every go , without the horse shoes , and get a faie way in collecting 1 or 2 horse shoes per course

ok i had a few mates over this afternoon , and they seem to think its to hard so i am going to ease it to the level they seem to play ok with , so give me a little while and i will post an easier version of game

thanks
mick :)
Title: Re: Let It Be , now released !! horse racing game
Post by: kevin on July 22, 2012, 11:50:20 AM
 Had a bit of a play around with this yesterday..  Barely made it through to the third race also.   Having the shorter races doesn't make it very forgiving, so a tiny mistake and bingo your out,  which affects the replay factor negatively.   One of the cool things about racing games (to me at least) is having an opportunity to fight your way through to win, even when you make mistakes.   What keeps me playing once familiar with the tracks is the randomness of the racing. 

Title: Re: Let It Be , now released !! horse racing game
Post by: micky4fun on July 22, 2012, 03:42:39 PM
Hi All

well i have now made it a lot easier , well i think as i have fully competed it 2 times in 3 goes , lol , but thats the problem of playing it so many time i think
i must have played this 100's of time now

ok i have taken in to account what Kevin has said as well a little , you now break last , well only just behind and have to catch up , rather than lead and hold on as in last version
i knew the maths thing is what would let me down , as maths is a very weak point for me , lol amoungst others ,

also some of the courses are a lot easier to do one way than the other , so pick right horse will help a little and right path around track will help a lot
also picking up apples is a great help , even if you can only pick up one on some tracks, i have included a pic of how course 1 should be done , will post other course paths if required
anyway heres version 1.2 , code now included , though i have not had time to tidy it up a little yet , anyone may want to amend for a better game

mick :)
http://rghost.net/39360271
Title: Re: Let It Be , now released !! horse racing game
Post by: ATLUS on July 22, 2012, 03:57:28 PM
at once I was the first in one ride =) thanks Mick ^__^
source this is really nice, i going to see how you create this good game! Thanks again Mick!
Title: Re: Let It Be , now released !! horse racing game
Post by: BlinkOk on July 22, 2012, 05:03:13 PM
very well balanced mick. i have played all the demos to date and this one is balanced just right i think. took me 3 goes to win track 1.
Title: Re: Let It Be , now released !! horse racing game
Post by: micky4fun on July 23, 2012, 07:49:28 AM
Hi All

ok thanks ATLUS and thanks again BlinkOk for comments and of course Gfx's , will have a few days off now before mucking about with some other code see if anything comes to light
as the Olympics is only just a few days away now may not get that much time , so back soonish

mick :)
Title: Re: Let It Be , now released !! horse racing game
Post by: kevin on July 23, 2012, 10:03:52 AM
Mick,
   
   How/where is the animation code located as the program doesn't work 100% in PlayBASIC V1.64N2.. 
Title: Re: Let It Be , now released !! horse racing game
Post by: micky4fun on July 23, 2012, 12:52:02 PM
Hi All

The animation fram bump up is at line 910 , 911 bumps up 0.5 in horse(a).image_ani#
line 914 lets it go up to 10 frames the resets
line 935 changes spriteimage horse(a).sprite
and 936 changes shadow(a).sprite,901+horse(a).image , for shadow animations

hope that helps

mick :)
Title: Re: Let It Be , now released !! horse racing game
Post by: kevin on July 24, 2012, 01:34:57 AM

After some searching, the problem was caused from a change in SpriteImage, so after restoring that, it works just the same.