Sunday, August 31, 2014

On today's Menu ...

It's all been about a menu this month, not so much food or a selection of, but the workings on the Bugsy Reloaded Title Screen where everything sits and more. Plus, another addition to the GameMaker book family. With September knocking on the door, autumn is certainly approaching promptly by the sight of leaves falling from the trees. Well, you have to expect some weather or seasonal comment, after all, Bugsy Reloaded does have four seasons !

Bugsy Reloaded ::
When I was designing the menu system for Dead Pixel Invaders, it was pretty good and worked on the PC, but not fully correct on Ouya ( still unreleased ). I had kind of abandoned the idea, until just recently where I found a tutorial on YouTube by RexFurry with a different approach.
My method relied on collision detection between two objects, which didn't work well on Ouya. However, the method shown in tutorial relies more on variables. I am quite please with the results and may well use this on future projects.
The above screenshot shows the button layout, the movement between each one is controlled by the 'Cursor Keys' and 'Z' to action the button, e.g. Start - Begin Game or Music - Toggles Music on and off. The Reset button will reset the High Score and Last Level Played display. Rather than having a 'Level Select' screen, I may just put a 'Slot' option where you can resume from a 'Save Game' object. This is yet to be implemented and I did want this game to be like the old school games with a collection of levels that would take too long to master.

There is now and active 'extra life' awarded at every 5,000 points and collectable life objects in later levels. Quite bizarrely, this routine didn't work at first. Here's what the routine first looked like :

if score >= 5000 { lives += 1 }

However, when it was placed into a check routine, the lives kept rolling for infinity. So, I asked a programming friend at work, Patrick Roche. He kindly mentioned that if the score of 5000 was set as a constant ( alias ), the routine would perform correctly. It's funny really, I use constant's all the time, but would never of thought of using this method for the extra lives routine. So, where the game sets up all the global variables when first run, I added the following two lines of code :

globalvar extralife ( sets up global variable )
global.extralife = 5000 ( set extralife to equal 5000 )

Once the variables were setup, I could then change the code to the following :

if score >= extralife { lives += 1 extralife += 5000 }

With everything in place, I was pleased that this important, but simple change made the routine work properly. Sometimes, I leave a broken routine until another time. Returning to it the next day or later with a fresh pair of eyes can usually give a solution to the problem.

A sound effect has been added for this, which is simply my voice saying 'Extra Life'. I have a few other sound effects to add in other parts of the game, which will be done soon.
The video above demonstrates the workings of the menu, however, the 'reset' and 'quit' game functions have yet to be fully implemented. I am quite pleased with the 'Extra Life' sound, it was sampled from my Nexus 4 smart phone and edited in Audacity.

GameMaker:Studio of Dummies ::
When I first heard about Dummies book for GameMaker:Studio, I found it hard to believe, but it was true and here it is ...
Even though the book does follow content and tutorials already available through GameMaker:Studio, it is explained in an understanding manner. Perfect for a beginner !

From the beginning you are introduced to using 'Drag n' Drop' code in creating a game, straight through to the use of 'GML' ( Game Maker Language ) form of coding. GML is more flexible and easier for when you want to copy and paste code.

In addition the book teaches you how to use physics, virtual keys, analog sticks and swipes as used in touch screen apps for games on mobile devices, particles and more ! I don't think it would take too long to understand GameMaker:Studio from reading this book. The content is varied enough to cover most aspects of game design and even though you might not be a beginner, you will find something interesting all the same.

( the above was used from my review of this book via Amazon )

Game Played in August ::

Swing Copters ( Android ) ::
With all the opportunities this month, I only ended up play one game for more than a few minutes. It's another game by Dong Nguyen, which uses single touch controls and as Flappy Bird, it carries addictive and frustrating game play. Guide the character with a copter helmet up through the girder levels with hitting them, the swinging hammers or the sides of the play area.
The highest score I have for this at the moment, is three points. Obviously, others will have scored higher. But if the tapping motion isn't done in a certain manner, then not even I have the chance, or do I ?

During September, I will hopefully finish off the Title Screen Menu on Bugsy Reloaded and other bits. I may well do a bit more work on Barriers, but at the moment I feel I want to finish off Bugsy. With any luck the Android version will be ready for testing. By the end of 2014, I should have a lot to show for myself, even though the pace has been slower.