top of page
Writer's pictureBruce

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

Updated: Oct 30, 2021

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, but before we do that we're going to edit our screen...don't worry, it will all make sense soon.


So far our screen is entirely walled-in - there is no exit or entrance to another screen...so lets make one, remove two blocks from the right hand wall, just above the floor:


Then press X, this will create a new blank screen, make sure the floor of the screen is two blocks high, design your screen with walls and ceilings, but this time leave two blocks open in the bottom LEFT corner, and continue designing your screen, something like this...



Note that our first screen is Screen 0 and our second screen is screen 1.


Now, we need to tell MPAGD how our screens are connected, to do that we use the Map editor. From the Editor menu, select Map


Recent Posts

See All

Comments


Want to support my work?....Buy my games!

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 including 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 ...or better still - buy or download my games :)

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

bottom of page