pouët.net

Digger Ball

   ##                                                                    ##            
 #                                                                          #
#                        Digger Ball - (c) Aypok 2007                        #
###                                                                        ###
##############################################################################




On-line documentation
=====================

There will, at some point, be a nice web-based version of this document - 
complete with images. It won't be up by the time of the competition, but it
should exist within a week of its deadline. The online document supercedes
this one.

http://www.aypok.co.uk/digger_ball/



What is it?
===========

"Digger Ball" is a game for the Sega Master System, based on the code for
"Digger Chan" - a game I made for last year's coding competition. Despite this,
most of the code in this game is new - most of the code remaining from "Digger
Chan" is just the structure of the the game and stuff that draws the graphics.
Both games are open source, so check for yourselves. :)

It is basically a "Breakout" clone - but with a "Digger Chan" theme. :)

This game was created by Aypok and PlayGeneration for "SMS Power!"'s 2007
coding competition. As well as the game binaries and this documentation, you
will find the full source code and data-files for assembling this game. The
code is released under the GNU/GPL v2 (see the file titled "licence.txt").

I originally started work on this year's entry last September, but didn't get
much further than a basic engine. I should point out that that was a completely
different game to this. :) With the deadline for the competition getting closer
and closer, I decided to make an entry - but with a different game.

I had an idea for a 'mini-game' to place within "Digger Chan", between certain
levels - and since it used a lot of "Digger Chan"'s code (or so I thought),
it'd be nice and quick to write.

Over a few evenings I hacked together a very rough version of the game and sent
a copy to PlayGeneration. It was crappy, but PlayGeneration saw promise in it
and started coming up with cool ideas for the game. Over the following weeks
we worked together to create what you have before you.

This game has been tested on Meka 0.72 and the latest SVN build, Osmose and
real SMS consoles! It works on them all - with one exception: see 'Why two
ROMs?' for details.

Enjoy - and don't forget to vote!


Aypok...



Why two ROMs?
=============

Because I suck at coding? There's a bug in the code that only appears on real
hardware - emulators don't have a problem with it.

The only difference between them is that 'digger_ball.sms' has explosions when
blocks get destroyed and 'digger_ball-no_explosions.sms' doesn't.

If you want to play the game on real hardware, try the 'no_explosions' version.

To be clear: 'digger_ball.sms' is the entry for the competition - the other ROM
is soley for those who wish to run it on a real SMS.



Story
=====

Digger chan, having made it down to the milk pipes that traverse the globe,
often finds caverns with loose rocks hanging from the ceiling. They are way
too unsafe for "M.O.O. Milk Co."'s other pipe engineers to work in, so you have
to clear them.

The only problem is that there are no ladders long enough. All you have
available to remove these dangers is your trusty spade and a purpose-built
rock-busting ball. Therefore, you have to destroy the precariously dangling
rocks by using your spade to propel the ball into them!

Remember that the engineers are very busy people, so if you fail three time you
will be fired!



Basic info
==========

The object of this game is to destroy all the coloured blocks that appear on
screen by 'batting' your ball into them. It's very simple. :) Just don't let
your ball it the floor!

To bat the ball with your spade, all you need to do is let the ball hit you.
If you connect with the ball dead-on, the ball will be deflected - that is; it
will be bounced back up, but its horizontal direction will remain unchanged. If
you want the horizontal direction to be reversed, you must let the ball hit you
further down. But not too far down, or you'll miss it!

There are three terrains in which you must work; Arctic, City and Desert. They
each have their own distinctive colour-scheme: Arctic has lots of 'cold'
colours - blues, purples, etc. The City terrain has 'bold' colours - red, blue,
green and yellow. The Desert has 'hot' colours - red, orange and yellow.

Each block you destroy will give you one point. Each block of TNT you detonate
will give you ten points, plus the points for all the blocks it destroys in the
explosions. TNT will not detonate any surrounding TNT - there are no chain
reactions.

There are twenty levels in the game.

You get an extra try for every two levels you complete.



Difficulty settings
===================

When you press Start on the title screen, you will be given an options menu.
From here, you can select the difficulty of the game - or view the credits
page.

Easy:
    You move fast and the ball moves at a medium pace.

Medium:
    You move at the same pace as the ball - medium speed.

Hard:
    You travel slowly and the ball moves fast.



Power-ups
=========

There are eight power-ups in the game:

Deadly Ball: (Icon: Asterisk)
    This is both a blessing and a curse. The Deadly Ball is just that -
    deadly! Do not try to bat it with your spade, just keep away from it. The
    ball becomes twice as big and much faster than normal - and it catches
    fire!
    
    Because of its power, it will not bounce off of destroyable blocks - it
    will plough through them, destroying everything in its path, until it hits
    a solid wall.
    
    This ball will bounce off the floor without losing a try! Do not try to
    stop it from hitting the floor. When it hits to floor, that section of the
    floor will catch fire! Fire is hot! Do not touch! The flames do die down
    after a short while, though.
    
    If you have the Deadly Ball power-up, collecting the Dual Ball power-up
    (see below) will have no effect. The reverse is also true.
    
Spade-Thrower: (Icon: Spade)
    This allows you to throw your spade at blocks. Your spade travels in a 
    straight line up and then back down again - it cannot move horizontally.
    When your spade hits a block, it will destroy it and then return back down
    towards you.
    
    Once thrown, you need to pick up the spade. If you don't pick it up, it
    will lie on the floor until you collect it.
    
    Remember that you need your spade to bat the ball! If you aren't holding
    your spade, you cannot bat the ball! Be careful.
    
    Press button two to throw the spade. Simply walk over the spade to pick it
    back up.
    
TNT: (Icon: Sticks of TNT)
    This power-up is simple: all destroyable blocks are turned into TNT! TNT is
    very useful because it destroys all the blocks directly connected to it.
    
Dual Ball: (Icon: Two balls)
    With this, you get given a second ball to bat at the blocks. This is very
    useful, since you can effectively destroy twice as many blocks. Are you
    quick enough to juggle two of these balls at once?
    
    Don't worry if not - you can lose one of them, yet not lose a try. As long
    as you keep one ball going, you'll be fine.
    
    You cannot have the Dual Ball power-up if you have the Deadly Ball;
    collecting it will be ignored. The same goes for collecting the Deadly Ball
    power-up when you have Dual Ball.
    
Mini Chan: (Icon: Stick man)
    Oh no! This isn't very good! You shrink to half the size when you collect
    this power-up. You'll have to a lot more accurate when batting the ball,
    since it'll be much harder to hit when you're this small.
    
Ball Speed-Up: (Icon: Big arrow down)
    This makes the ball travel very fast! Too fast? that's for you to decide.
    It allows you to destroy blocks more quickly, but makes it much more tricky
    to hit!
    
Ball Slow-Down: (Icon: Down arrow with dotted lines)
    This makes the ball much slower than normal. Whilst it may make it much
    easier to bat around, it also means it'll take you longer to destroy all
    the blocks.



How to play
===========

Left:
    Move Digger Chan left.

Right:
    Move Digger Chan right.

Button 1:
    Launch ball (at the start of the level only)

Button 2:
    Throw spade (only when Spade-Thrower power-up is enabled).



Tools used
==========

Ubuntu Linux:       OS of choice. :)
Vim:                For writing the code.
WLA-DX:             Assembler.
BMP2Tile:           For converting the title screen to SMS data.
Tilemap Editor:     For converting the two intro screens to SMS data.
The GIMP:           Editing images.
KolourPaint:        Editing images and prototyping some tiles.
Mekanix:            Emulator used to test and debug this game.
Osmose:             Emulator used to test the music and the game.
MOD2PSG:            Tracker used for creating the music.



Other boring info
=================

The file called "generic_stuff.inc" is pretty much the one used in Maxim's
tutorials on coding for the SMS - I have used it, with changes, in this game.

Some of the graphics, with the exception of the intro screens, the player,
and the font, were written by hand - not drawn in a paint program and
converted... Several of the tiles were prototyped (designed) in KolourPaint
and were then converted by hand to code. The tiles/tile-map for the intro
screens were created with an application I wrote and creatively dubbed
"TilemapEditor". The title screen was converted using Maxim's "BMP2Tile"
application, as was the player's sprite.

All the power-up images were converted from images by hand... Not fun. :)

The code is released under the GNU/GPL v2, which means you can edit, change,
etc, the code for this game and redistribute it - but you MUST in turn make
your code open and free for everyone to use. For more details on the GPL,
please see the file "licence.txt". If you do use the code in some way, I'd
love to hear about it. :)

The code is, for the most part, heavily commented - so it should be easy to
follow and understand. Having said that, my coding style is sometimes viewed
as "odd" - sometimes it is down-right badly done. I don't claim that this
code is perfect, or even great - but it does work. Usually. :)




Cheats
======

While there are no cheats built into this game, you can still cheat if you have
something to alter the contents of RAM whilst the game is running - Meka allows
you to do this. I will list a few useful RAM locations here with what they do,
so you can cheat your way through the game - or just get to see it all without
having to play through it. :)

A full list of RAM locations and what they do can be found at the top of the
main code file.

    $c004 - Player speed. Sane values are 1 and 2.
    $c00e - Number of lives left. Binary coded decimal.
    $c012 - Ball speed. Sane values are 0, 1 and 2.
    $c026 - The current level. Binary coded decimal
    $c027 - Level complete flag. Set to 1 to end the current level.
    $c046 - Set to 255 to make all blocks into TNT.
    $c04b - Set to 1 to become immune to the Deadly Ball.



Known bugs
==========

    - It'll sometimes finish the level even if there is a block or two left.
    - Explosions screw up on real hardware, leaving them on screen.
    - On real hardware (when explosions are enabled), it sometimes doesn't know
      when levels are done.
    - If you have the Dual Balls power-up and then collect Deadly Ball power-up
      it will apparently lock-up the entire system. Probably vice-versa, too.



Credits
=======

Code:
    Aypok

Graphics:
    Aypok
    PlayGeneration

Music:
    Aypok

Good Levels:
    PlayGeneration

Crap Levels:
    Aypok

Ideas & Game Design:
    PlayGeneration



Thanks
======

- PlayGeneration for all his hard work.
- The developers of all the great tools used in the creation of this game.
- Maxim for his great tutorials on coding for the SMS.
- Everyone at SMS Power! and the forums for their help and documentation.
- Sega for creating the SMS.



Contacting the author
=====================

Aypok can be contacted at aypok )AT( aypok )D0t( co }doT{ uk, via his website
at http://www.aypok.co.uk/ or via IRC on the Freenode network (irc.freenode.org).