Johnny Neo – Randomised Elements – SHOKIZM

Hi Game Fans,

Just a quick post about adding randomised elements to Johnny Neo!

I was trying to think of a way to introduce some more variety to the game without getting away from my pre-planned level plan. After all, although I’m planning a few route options, the basic storyline is going to be linear – and that means I need tight control over the level-layouts – in order to ensure I can trigger specific events and texts just where I want them.

One of the easiest solutions I’ve come up with is simply having multiple-choices for the non-active atmosphere items, such dead computers, broken-junk or pipes. It took me quite a while to draw the graphics but deploying them in-game was super easy – and that got me thinking about just how powerful GMS is. With a single line of code I can randomly select any sprite¬† in order to give these objects varied sprites.

GMScode-1

And that’s it – now whenever that item gets created it will select from one of those 9¬† sprites.

To explain how that works couldn’t be simpler…

So to start we’re operating inside an object – the object is called: ob_broken_computers¬† – not that hard see…

sprite_index = the picture you’re currently using for the object (box, player, baddie, etc.).

then we ” choose ” using the supremely difficult to guess: choose function…

from the selection of sprites called such exciting names as: sp_arcade_broken1, sp_arcade_broken2 and sp_arcade_broken3, etc…

…and that results in this beauty… just 2 objects (excluding player), a box (ob_small_box) and a broken computer (ob_broken_computers – from earlier) and 11 different sprites (again excluding player) on screen!

GMScode-2

Pretty bloody easy to get such good looks. And that’s the beauty of Game Maker – it’s not just easy to use – its also surprisingly powerful!

And just for your viewing pleasure here are all 9 potential broken computers!

GMScode-3I have of course found some other interesting ways to change things up a bit such as baddies which choose their own paths and various objects or traps in rooms being randomised too – and again – it’s nearly as easy to randomise those elements too – well, maybe not that easy, but nowhere near as hard as you’d think as an outsider!

Anyways – that’s all for today I guess – I just wanted to show you some nice graphics and a little about how easy to use GMS is. I hope I’ve inspired you to have a go yourself!

Peace game fans!

 

 

 

Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *