Shop OBEX P1 Docs P2 Docs Learn Events
Baddie Logic & Level Creation — Parallax Forums

Baddie Logic & Level Creation

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2007-05-29 12:20 in Propeller 1
I feel I'm confident enough in spin now to give a little game creation a shot. Being armed with a copy of Andre's book, Eric's sound software and some of the great examples, I should be able to pull something together. I'm thinking of a Loderunner clone, and to keep things realistic, I'm going shoot for a single level.

A couple issues that I'm trying to get my mind around. First of which is baddie logic. In the case of Loderunner, you have
three or four bad guys which run after you with varying levels of intelligence. I've got to take in account speed as well
as map access. Perhaps this would become a larger chunk of the code?

Also Jim, would you mind sharing a little about how you created the level bins files for ManicMiner?


Don't expect much quickly, being my first game, this may take me a while. [noparse]:)[/noparse]

Oldbitcollector

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!

Comments

  • BaggersBaggers Posts: 3,019
    edited 2007-05-29 08:58
    Hi Oldbit,
    the levels for Manic miner were exactly how they are in Manic miner on the spectrum, I did it this way so I didn't have to re-create them, just save binary files from a spectrum emulator.
    and it also gave me baddy coordinates and graphics etc.
    So all I had to do was figure out what the data was ( luckily it's on the net ) and then recode my game to use their data.

    but since you have Andre's book you should also have Mappy, and could make your maps using that.

    I haven't looked at mappy in a good few, as I normally write my own map utils to read bmp files and create binaries for me depending on what platform I'm doing the game on.
    if you want, I could give you a hand doing LodeRunner, to help you along.
    will you be using the spectrum tv driver or Dodgy Kong's one? or making one yourself? as you'll need to know what one your using so you can make the characters and map for it.

    Baggers.
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-29 11:19
    Hi Oldbitcollector.

    I've just taken a look at Lode Runner in MAME. It looks like the baddies follow a policy of always heading towards you when they can. But they rarely backtrack.

    So considering each tile to be the same size as the baddies. Whenever a baddiy is centered over a tile on the map, there are 3 possible directions to go without back tracking. But most of the time it'll be less than 3 because of what the tiles in that direction happen to be. Choose whichever of the 1,2 or 3 takes the baddie closer to the player. If two directions both go towards the player, pick randomly.

    Then, very rarely and randomly, make the logic force a backtrack. This should create the behaviour where it seems that the baddies outflank you.

    One tip I have from doing Donkey Kong is to run the game in MAME and press shift F12 to record a few seconds of play. I'll be stored in the /SNAP directory under MAME as the most recent .mng file. Load it up in whatever application you have or can find (I used Animation Shop) and then you can watch and study the movement of things frame by frame, and take your time working out how they work.
  • BaggersBaggers Posts: 3,019
    edited 2007-05-29 12:18
    Just had a look on mame too, you'd be better off using CardboardGuru's driver since it has 4 colours per character and seperate paletted sprites, unless you wanted to convert the speccy conversion that is. [noparse]:)[/noparse]
    You would only need 4 sprites too, so that would reduce cog count significantly. and use the background map for the eggs. since they stay on block boundaries.
  • BaggersBaggers Posts: 3,019
    edited 2007-05-29 12:20
    I'd also store the maps compressed, like CG's DK, clear it to begin with then level data would be

    byte startx,starty,type,count

    eg
    ···· ·byte 0,4,floortype,8······ '·meaning at X position 0 and Y position 4 start drawing Floor tiles to the tilemap for 8 blocks·right
    ····· byte 3,4,ladder,3·········· ' meaning at X position 3 and Y position 4 start drawing Ladder tiles to the tilemap for 3 blocks down


    edit: tidied up and added explanation of data

    Post Edited (Baggers) : 5/29/2007 12:49:04 PM GMT
Sign In or Register to comment.