This page is a development diary for OSPG cartridge. The
diary runs in reverse order (i.e. latest entry first) and contains links to the
source zip archives. OSPG is an 'out of hours' project for me and some days I
don't get time to write any code so don't expect an update every day.
Please mail any suggestions to the OSPG forums at http://pokemon.sourceforge.net
so that every one share the knowledge, especially those following this project
to learn more about Game Boy programming.
After a lot of reading and fiddling I finally figured out how to create a
SGB graphics border using the files created by GIF2SOPT. As you can see from
the image below my test border isn't very exciting but all the code is in
place to display something better when someone draws it. I've also started
on an 8x16 font for messages as well as some international support.
The next big programming task is the code and data for representing objects.
I've made a start defining some MACROs for this in the current code but its
early days.
The latest ROM now redraws the meta-map as the player moves around the
screen. I have added basic collision detection so you can't walk into
buildings and other solid objects. The drawing algorithm has been changed to
use off screen memory so that the next frame can be drawn while the hardware
is refreshing the current one.
I have split the code into two projects, one for the OSPG game itself and
another that builds a library of reusable functions. Hopefully I've put in
enough comments to will allow you to understand how it works.
The next job is handling objects and mapping them to sprites on the screen.
The code to move them during scrolling is already in the code but is
currently inactive.
This archive contains all of the code to date. It is written in RGBDS
assembler and uses GBTD and GBMB for graphics.
The game engine will be based around interpreting a data structure (an
'Area') which has an associated map (of meta-tiles) and is rendered using a
'TileSet'. Eventually the Area will contain a description of other features
of the area like connections to other Areas (e.g. via doors or by going 'off
screen', objects that can be picked up and other actors (e.g. trainers).
To make designing maps easier Sean created a 16x16 tile set representing
parts of buildings, trees and other background details. At run time the game
uses a different set of 8x8 tiles to draw the actual screen so that we can
use more colors. A meta-tile to physical tile mapping table is embedded in
the ROM and MUST be kept in sync with any tile set changes.
I have started to write the player movement code by it is not working yet so
at present the screen image is static. At this stage my priority is getting
the right functionality into the engine so that other team members can start
designing levels. I have made little attempt to optimize the code (although
it looks not too bad at the moment).