Chapter 09 - The Map Editor
time to get some graphics happening in my game. First step, is to test
the scrolling capabilities by creating some actual background graphics.
Gunstar will feature 4 distinct levels, each with its own graphic look to represent each part of the game storyline.
If you have read the opening storyline on the home page of this blog, you'll see it's a typical 'Aliens have invaded Earth' scenario with your goal being to go back to the Alien's home-world and defeat them there.
|You must leave Earth to begin your journey to the Alien home-world while
avoiding the Alien craft who have been alerted by your escape. Here you are flying over an Earth city landscape.
|The Aliens have constructed an intricate network of Jump Gates that
allows them to navigate the immense distances in space. You must
navigate these gates to reach the Alien home-world.
have arrived at the Alien home-world and are now flying over Alien
landscape. The Alien force will be alerted to your arrival and will
throw everything they have to stop you.
Alien City Central
Alien's main city and the home of their central command and primary
energy supply. Shoot all the primary targets to destroy the Alien Empire!
this opening level, you must navigate the GunStar to escape the Earth
and enter space. The aliens have been alerted of your escape and will
attempt to destroy you.
The scenery in this level will be depicted as flying over a large Earth city and is inspired by images such as that shown below.
Of course, such resolution and detail is beyond our CoCo3 but using a Graphics Editor to create a variety of graphic tiles and a Map Editor
to position these tiles, I have tried to recreate a 2D overhead city
landscape in the game's 16 color low 128x112 graphics resolution.
The Graphics Editor I use is Brilliance
on my Amiga computer and the Map Editor is a BASIC program I created on
my CoCo3, specifically designed for this game. It uses the 225 vertical resolution extension to standard Super Extended Color Basic with no added machine language subroutines and works a treat!
The Map Editor
The screenshot on the right shows the Map Editor.
On the left side is the palette of 240 tiles. These are 8x8 pixels in
dimension. Currently, I have only created the first 62 tiles destined
for use in Level 1. The remaining blank blue/green spaces are reserved
for the tiles destined for the other levels. But I can use any of these
240 tile spaces in each of the levels.
The right side of this screenshot displays the actual level using a
higher resolution that what the actual game will use. It represents two
game screens worth of tile data and the full width of each. The actual
area viewed during the game is less and is a windowed part of this main
display... as shown in the screenshots below.
This allows the background to not only be
scrolling down the screen but also left and right to expose the
remainder of the background scene. This replicates the CoCo3 GIME
chip's horizontal virtual enable mode but is tailored to the dimensions required in my game and offers the overlay options described in the previous chapter.
There is an option to View the game screen in the 128x112 resolution to help visualize the actual game graphics more accurately.
Lastly, there are options to select the Level and Page you wish to edit and also, to Load and Save the Map Data to the game disk.
Lots of work ahead
I have allocated 4 x MMU memory blockS (8K each) to store all the level Map
Data. This allows each level to be 22 screens in length (total of 88
screens). This may not seem like much for each level but it's a big enough job to create 88
screens of Map Data so I've decided that each of the 22 screens per
level can loop (repeat). The Level will complete when all the targets
have been destroyed or acquired.
The constant bombardment of Alien attack will keep the player busy and they won't have time to take in the scenery below anyway.
I could have easily allocated a second MMU block to expand the total
number of screens to 160 but this makes for a lot of unnecessary work.
As well as all this level design, I also have to get back to creating
the proper game title music. Currently, I have it playing a short
rendition of the Battlestar Galactica theme.
Lots of non-coding work to do but I will continue with more coding and
can return to creating the level graphics and music when I need a break
from coding. I'm keen to test the overlay capabilities of my graphics
engine and will place the score and other in-game screen displays next.
It's starting to take shape!