A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: GTA minimap code

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    107
    Hi im making a gta 2 game based on mbenny's source code
    the problem is im not sure how to make the map.
    i had posted this question somewhere on this board but i felt this question was worth a separate post.
    here's what ive done till now

    the code im using is commented for the time being
    If anyone could take a look at the source nd help me out i'd appreciate it.

    http://202.88.143.206:8080/games/car.fla


    Rahul

  2. #2
    Monkey Jam
    Join Date
    Jun 2001
    Location
    Location : Location
    Posts
    162

    Arrays...

    ..can't open your file - I guess it's MX?

    This isn't a precise answer, it's just theory - hope it helps.....

    Anyway - I assume you've built your gameworld map using arrays? :

    map = [[1, 1, 1, 1, 1, 1],
    [1, 0, 0, 0, 0, 1],
    [1, 0, 0, 0, 0, 1],
    [1, 0, 0, 0, 0, 1],
    [1, 0, 0, 0, 0, 1],
    [1, 1, 1, 1, 1, 1]];

    You use this array to decide what is drawn on screen at any one time, e.g.:

    localMap = [[1, 1, 1],
    [1, 0, 0],
    [1, 0, 0]];

    ..so simply, 1's represent a wall, 0's represent road. This localMap array tracks what main gameworld tile graphic is to be drawn.

    Your minimap would work exactly the same as your localMap, but the array size would be larger( maybe the whole gameworld map array ). This mini-map array would just have a different drawing function to that of the main gameworld tile graphics.

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    107
    Ok i solved the MInimap problem by meself
    It was so Simple

    here's the url neways for someone who may wanna do this

    http://202.88.143.206:8080/games/car.fla

    Rahul

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    NJ
    Posts
    440
    I like your game a lot, specially the map... But I'm not a big fan of the collision detection, why does your car go in reverse when you hit something? Its a little odd. I would just make it bump back a little; not go in reverse for a couple seconds.

  5. #5
    Lunatic Baukereg's Avatar
    Join Date
    Nov 2000
    Location
    Lowlands
    Posts
    853
    Seems there is something wrong with the script of the car. Sometimes my car drives backwards when I want it to drive foreward. ????

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    107
    hi,
    thats not my code
    i got the source from mbenny and modified it
    IM tryin to solve the problems.
    Rahul

  7. #7
    Senior Member
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    470
    i could not download the file 404 error

  8. #8
    Senior Member mbenney's Avatar
    Join Date
    Mar 2001
    Posts
    2,744
    hello, glad someones making use of my files
    the detection isnt great, its an early F5 experiment, using four collision points, the front two bumping the car backwards and the front two bumping forward. its pretty poo really!

    maybe one day ill do a revised version....



  9. #9
    Senior Member
    Join Date
    Jul 2001
    Posts
    172
    Nice Job Benny U Should Finish The GTA Game.

  10. #10
    Member
    Join Date
    May 2000
    Posts
    43
    hi rahul696


    I can't get ur FLA. it s broken link. could u pls fix it?

    thanks

    or pls send me

    ozgur@dreamsandbytes.com

  11. #11
    Senior Member random10122's Avatar
    Join Date
    Mar 2002
    Location
    Sheffield, UK
    Posts
    1,747
    This is how far i got on the whole 'GTA Thing' ... Lots of people have tried it. My problem was speed in the end, flash just isnt made for it,

    http://www.moor47.fsnet.co.uk/gta

    I made peds aswell, but they slowed it down more and had a habbit of walking across the road

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