• Bruce

Let's create an MPAGD game - Part 12 - Adding Ladders

So far, in our game, its pretty much a standard platform affair, with controls for left, right and jump. But what if we wanted to add ladders for Stinky Dog to climb up and down?


First, we're going to need to add some Ladder Blocks, so open up the Block editor, we're going to need to create two blocks, one for the left side and one for the right side. We need to create two because our sprites are 16 pixels wide, but blocks are only 8 pixels. You can try doing it with a single block but its a bit ropey from a playability perspective.


I always try and keep my ladders as simple as possible, this is because of the way that MPAGD displays a sprite when it is over a non Empty block.


Something like this will do:






Remember to click the Block type box to cycle through to the correct type.


Once you've create your ladder blocks we can add a ladder to our screen, open up the Screens editor , select the blocks in turn and draw a ladder on your screen:



Now that we have a ladder, it would probably be a good idea for us to have a version of the Stinky Dog sprite that we will display when he is going up or down the ladder. Open up the Sprite Editor and create a new sprite.


(it's supposed to be Stinky Dog from behind....if you haven't guessed )


Now we're going check we have set the Keyboard Controls for Up and Down, from the Editor menu select Keyboard controls, and as we did before, choose the keys that you want to control Stinky Dogs up and Down movement.



QAOP....just how it should be :)


Next, were going to need to add the code for up and down ladders movement. But rather than use the script generator (since that might overwrite our code to date) we're going to write it ourselves.


This is it boys....we're going in...


NEXT: Part 13: Editing the Player Script

111 views0 comments

aboutME

Hello, I'm Bruce and I write games for old 8bit computers using Jonathan Cauldwell's excellent Multi-Platform Arcade Games Designer (MPAGD)

I've written a few successful* games for the Sinclair ZX Spectrum and MSX platforms that have been (largely) well received with my most recent game - Twenty Four Hour Parsley People scoring a 10 out of 10 on Planeta Sinclair.

In my blog I am sharing lots of the code that I wrote for my games, in a way that you can use in your own games.   I've commented it so that you'll learn some of the techniques I use to create interesting new mechanics and help your games stand out from the pack.

MPAGD includes lots of standard scripts, they're great to get you started, but if you're new (or just rusty) when it comes to writing code, hopefully my tutorials will help you get started and  turn your imagination into awesome 8 bit games!

All my code is free to use and do with as you please, but if you find them useful please feel free to buy me a coffee :)

*successful is a very relative term in 8bit computer games

Subscribe Form

  • Twitter

©2020 by Minilop Retroware