I find the Neo Geo Pocket Color interesting because it was SNK's courageous attempt at dethroning the portable king Gameboy. While I like Gameboy's simplicity very much, the NGPC feels more advanced and cool. Also, it has the best directional pad on a portable system in my opinion. It's a miniature joystick which offers great precision. Despite having great potential, the NGPC was unable to defeat the Gameboy.
I thought it would be pretty cool to make a Neo Geo-themed game. Given my interest in collecting AES (home) cartridges, I chose that as the theme. You are a collector trying to get a full set of AES cartridges. The in-game prices should be reasonably close to actual game cartridge values, although they may be somewhat outdated depending on when you play this game!
Neo Geo collections can be expensive, so you will have to use a variety of ways to get money for your games! Gambling at the casino, robbing convenience stores, fishing at the flea market, working at a burger joint, or trading with a fellow collector, are all fair game!
You can only hold ONE of each game, so trade wisely! Now you too can experience the life of a Neo Geo collector, but without sacrificing your soul, disposable income, and sanity!
- the NGCollector rom. Should play in most Neo Geo Pocket Color (NGPC) emulators
- the NGCollector source code. Use it with the dev kit
- the NGPC dev kit. Unzip it to C:\. It comes with an emulator, and the source code for NGCollector (and another example)
The dev kit zip file is password protected, and the password is "ngpc". I have scanned the package with VirusTotal, and 1 out of the forty-something virus engines reported a most likely false positive. I still used it, although in an isolated virtual machine in VMWare Player. Use at own risk.
Leave at least one blank line at the end of each of your source files.
The dev kit doesn't work in Windows 7, but it does work in Windows XP. You can download VMWare Player, create a Windows XP virtual machine, and develop in it :)
- a good Neo Geo Pocket Color emulator. I used it as a run-time environment to try out my NGPC homebrew code
You can access your collection almost at any time. Games you own are marked in green, and you can change pages.
Here is the game running on real hardware!
|flea market||Here you will find a bunch of games for sale. You can quickly add them to your collection, provided you have the cash.|
|fellow collector||When visiting this collector, he may offer trades, so keep an eye out!|
|casino||If you're feeling lucky, then start gambling to raise money for the next "must have" game!|
|convenience store||Embrace your dark side and attempt to rob the convenience store for some easy money. Hopefully the police won't catch you. But be careful... they learn!|
|Burly Burger||If you'd rather earn honestly, then start flipping! You can work here as much as you wish, but the pay isn't great.|
The program entry point is in ngcollector.c
. This file takes care of loading the graphics into memory, showing the title screen, and calling the entry point to the game itself.
Note the carthdr.h
file, in which you can set the name of your game, as well as program entry point (not that you'd have a solid reason to change it from "main").
contains the actual tile definitions, somewhat well documented.
has a single entry point, and it shows and handles user input on the game list screen.
contains the collection definition, including game values, and which games the user possesses
has the code which builds the backdrops and scenery for each level
contains the logic for the message area at the bottom
provides the brains for generating events, such as item trades, flea market finds, etc.
The main game code is found in gameplay.c
. After initializing player location, palettes, etc., it enters the main game loop, which does the following:
- Reads user input
- Animates player
- Changes levels (screens)
- Handles events for buttons A and B
- Shows the game list screen
Each time the player approaches the end of the screen, the level is changed, assuming that there is another level towards the direction of the player. The following happen:
- Player sprite is moved
- Screen is cleared
- Level is loaded graphically
- Random event generation is attempted (finding a game, being caught by Neo Thieves)
- Event generation is attempted
Events make the game more diverse, and are of two types: random, and screen-based. Random events can occur on level transition, regardless of level. Screen-based events, or just "events", occur with respect to the current level, and certain other conditions.
Event generation and rendering are separate because the game is designed to NOT re-generate events when the user returns from the game list screen. Essentially, you enter a screen, get an event, and then if you check your game list and return, then the even should be the same one as before.
Here's an example of an event generation on the casino screen:
- Does player have enough money for at least the cheapest gamble amount?
If so, then create a "casino gamble" event
Otherwise, create a "casino broke" event
Rendering is done after generation, and after the player closes the game list screen.
Here's an example of an event handling for button A:
- Is the last created event a "casino gamble" event?
If so, then take away the respective amount from the player, call the appropriate function in events.c
to generate a winning amount, and then either display winning amount and add the winnings to the player's money, OR display "You lost".
In the case of the casino, the generation of a new event is then attempted immediately, so that the player can gamble again.
Random events are special in which they have a small chance of happening on almost all screens. Their generation and rendering happen together and only ONCE, after which the random event is no longer present. This is because random events should not be shown more than once, as to not give the impression that it happened multiple times on the same screen when the player opens and closes the game list screen.
That's about it. Contact me if you have questions, or suggestions!