A Flash Developer Resource Site

Page 3 of 3 FirstFirst 123
Results 41 to 49 of 49

Thread: Pole Position-style 3D racer

  1. #41
    Senior Member
    Join Date
    Jul 2003
    Posts
    138
    Yet another update:

    http://ant.simianzombie.com/Road31Retro.html

    This one has a higher resolution road, so it is possible to actually see cars/roadsigns before you smack into them. There doesn't seem to be any significant speed loss incurred.

  2. #42
    Senior Member
    Join Date
    Jul 2003
    Posts
    138
    And another:

    http://ant.simianzombie.com/Road35Retro.html

    New things:

    - Some presentation (logo & title screens);
    - Some more noises;
    - A traffic light system to start the race.

  3. #43
    leight.com.au leight's Avatar
    Join Date
    Sep 2002
    Location
    australia
    Posts
    1,437
    I like it - very much

    However these is one thing that bothers me. I think that the end of the road is too high. I suggest moving the background UP by about 2-3 pixels so that the end of the road doesn't appear to run into the mountains, but into the ground of the mountains. Do you know what I'm meaning?

    Anyway, great work!

    Leighton

  4. #44
    Senior Member
    Join Date
    Jul 2003
    Posts
    138
    Well, it looks like I've run out of steam on this one (been distracted by Java and m68K assembly - Sega Genesis games ahoy!). I've decided to release the source code under the GPL licence in its current state. You can find the link to the source code on this page (under the "Grand Prix" heading):

    http://ant.simianzombie.com/item/vie...emcategoryid=2

    The GPL source for the "retro" version of the game is also available, on this page (under the "Retro Racer" heading):

    http://ant.simianzombie.com/item/vie...emcategoryid=2

    As both of these are under the GPL licence, you are free to either modify these games and re-release them, or include bits of them in your own projects. *However*, if you choose to do so, you must also release your source code under the GPL licence. If you don't want to open-source your own games, *do not* use my code. The full text of the licence is included with the source.

    EDIT: Hum, looks like the versions I've got here are older than the latest example I posted. Hopefully I've got the sourcecode for the latest versions at home...
    Last edited by ant512; 12-13-2004 at 07:10 AM.

  5. #45
    Senior Member kendude's Avatar
    Join Date
    Sep 2003
    Location
    Hartford, CT USA
    Posts
    877
    Very cool work, I used a similar approach in my Vertical Advantage game but is was super basic compared to yours, just attaching strips with different heights and rotating them on the clip they were all attached to. I love how you worked the curves. Both the "new" and "retro" versions are kick-arse. Quite smooth. That is also very noble of you to dole out the code. Thanks.

  6. #46
    Senior Member
    Join Date
    Jul 2003
    Posts
    138
    Wehay! I have got the latest versions after all. I nearly lost them about a week ago, when I copied what I thought was a newer version to my hard drive, but with amazing foresight I decided to rename the folder instead of deleting it. Turns out the "newer" version was actually an older version from another computer.

    Anyhoo, the new versions should be up by the end of the day (I'll be able to upload them as soon as my internet connection lasts for more than 30 seconds).

    On another note, I've just come up with the solution for the "immediate-turns" problem. Basically, in this engine, each corner affects each strip of road immediately, so corners do not approach from the distance; as soon as a corner arises in the track, every part of the track starts to move. This continues until the track has moved enough to match the corner. Obviously this is wrong.

    What should happen is that only the first strip of the road should move to match the track layout; the rest of the track should then move to match the strip immediately above it.

    In crazy mixed-up psuedocode:

    Code:
    if topstrip._x != cornerAmount
        move topstrip
        for i = 1 to totalStrips
            strip[i]._x = strip[i - 1]._x * distanceRatio
        next
    end if
    Bit of a mix of languages there, but you get the basic idea. The corner gradually filters down the track. If you only run this procedure every n frames (where n is a function of the tightness of the corner and the speed of the car), the corners will appear properly.

    This approach will allow corners to gradually appear from the horizon down to the player's car, which is what happens in World Grand Prix, Super Hang On, Lotus Turbo Challenge, et al. If anyone feels like implementing this, they're welcome to do so.
    Last edited by ant512; 12-13-2004 at 02:25 PM.

  7. #47
    better than chuck norris
    Join Date
    Jun 2004
    Location
    West Coast of Michigan
    Posts
    668
    ant, your game is so sweet but the font in the speed and time hud doesn't fit the game. download a pixel font and put it there. also, if there are any tutorials on pole position, or if there aren't it would be cool for people like me to see how it is done because it is all greek to me.

  8. #48
    Senior Member
    Join Date
    Jul 2003
    Posts
    138
    Originally posted by Santuria
    ant, your game is so sweet but the font in the speed and time hud doesn't fit the game. download a pixel font and put it there.
    You're right about that. I was going to use an LCD font, but that didn't look quite like I wanted it to. Second idea was a pixel font (the Amiga system font, "Topaz", to be exact), but that didn't look right, either. The current font still isn't right, but it does the job.

    Originally posted by Santuria
    also, if there are any tutorials on pole position, or if there aren't it would be cool for people like me to see how it is done because it is all greek to me.
    I've never seen a tutorial on how the engine works; I just knew that it was a raster effect (ie. it's done on a horizontal line-by-line basis). From there, I guessed the rest. I'd like to write a tutorial, but other projects (m68K asm!) would get in the way.

    On another note, the latest SWF files and sourcecode are now available at the addresses posted previously. The obvious differences are:

    - Intro sequence on the Retro version;
    - Higher framerate on the "new" version (achieved by substituting the vector road graphic for a bitmap).

    There may be other, less blatant changes, but I can't remember what they might be.

  9. #49
    Junior Member
    Join Date
    Jun 2009
    Posts
    3
    I know its old thread but I have to say ant512 work is great, reading his explanations and how he tackled this is great help, also I would like to ask if anyone got the files he kindly shared under GPL, his site seems under construction and Im attempting my luck at a game like this but I would like to check how his permors and all that. Thanks a lot beforehand =)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center