Welcome to the home page of Daniel Hartmeier
Project: 'Rick Rangerous'
Introduction
I started this project as an introduction into the basic functions of the NetYaroze.
Since I wanted to begin with the 2D functions, I chose to write a 2D platform
jump-and-run game. It is not a new concept in any aspect, I just tried to implement
some of the elements that I know from other games I played. All of the code was
written during a three week holiday in winter 1998.
The game doesn't feature any spectacular graphics or sounds, and the gameplay is far
from complete. I tried to build a few levels that demonstrate all the technical
elements. But I learned that level design itself is an art like creating graphics
and sounds, which I lack special talent for.
It was not my intention to win a contest with an original new concept or a
complete implementation of an existing one with nearly professional artwork.
What I tried was to apply the same design methods I use when writing
business applications, and create a class hierarchy that is easy to understand,
expand and maintain. So I encourage you to download the executable and see
what it does, but what actually interests me most is your comments on the source
code.
Screenshots
Here are some screenshots of the game:
|
|
Title screen
| Scene from a level
|
|
|
Scene from another level
| Exit visible
|
Download
There are two different versions of the executable available for download:
one for NetYaroze (for Metrowerk's PSComUtil, SIOCONS is not yet supported)
and one for ActionReplay.
Download the archive and unpack it to an empty directory. You will need an
unzipper that can handle long file names. Available for instance from
WinZip.com. The executable
archives contain all files needed to run the game, including a batch file
for downloading the files to the PlayStation.
Note that the game runs only in PAL with 320x256 screen resolution.
*) You will need to copy the file LIBPS.EXE from your NetYaroze boot disc to
the unpacked directory, as this file is needed during run-time. It will be
downloaded by the batch file.
Please let me know if you should have problems downloading or extracting the
archive files.
Gameplay
The game starts with a title screen and a menu, from which you can choose
to start the game, see the credits or quit the program.
At the beginning of each level, the hero is dropped to the start position. Your goal
is to find and enter the exit (a flashing blue cloud). You can control the hero
using the directional buttons, jump with the X-button and shoot with the S-button.
If you fall off the bottom or touch an enemy or a lethal object, you die and are
transported back to the start position.
Levels
The definition of a level is stored in a binary data file. The game uses two
such files as consecutive levels. There are six small levels included in the
executable archives. You can change the download batches to use different
levels. Using the map editor archive, you can even create your own levels. The
tools aren't very sophisticated, though. I mainly included them (especially the
source code of the converter) as documentation.
Source code
The whole program is written in C++ because one of my main goals was to find
a suitable object-oriented class design. The source code archive contains a
CodeWarrior project file, which should allow you to compile the program
yourself. If you have never used C++ with CodeWarrior before, you might need
to change some of the compiler files and settings. Since no proprietary CodeWarrior
functions are used, the program could also be translated using the GNU compiler.
See the newsgroups and other member's homepages for further information regarding
the setup.
The source code consists of the following modules:
Main
Initializes the environment and processes all events in the main loop. Creates
a handler instance and calls the handler to process events and draw the screen.
Handler
Manages the mode of the program (title, levels, credits), the text window,
the hero and the levels.
Level
Controls the two background layers and all objects (enemies, bullets, lights)
in one level.
Layer
Contains the tiles, responsible for scrolling and collision detection. There
are two layers in a level. The objects interact only with the foreground
layer (floor, walls). The background layer is scrolled slower than the
foreground to create the impression of depth.
Sprite
Contains the low-level sprite structure. A sprite is responsible for its
own movement, draws itself and handles collisions with other sprites. There
are several classes derived from the sprite: the tile, the hero and the
enemy.
Tile
A tile is a fixed-size sprite used as background by the layer. Some tiles
are solid (the objects can't walk through them), and some are deadly.
Hero
The hero is controlled by the player using the pad. He can run, jump, fire
bullets, die, etc.
Enemy
Enemies are sprites which have the ability to act by themselves. They know
the position of the hero and can move according to different patterns. Some
of them can even shoot their own bullets.
Light
Lights can either be static objects in a level (flickering torches
in a background layer) or moving together with another object (when the
hero carries a torch). A light illuminates all objects according to their
distance to the light source. Some lights (like torches) may flicker or
change their color.
Weather
There are different types of weather which a level can use. A simple sunshine
with a blue sky, a dark underground environment or a storm with raindrops
controlled by changing wind.
Font
A semi-transparent message window can be used to display text on multiple
lines. A fixed-pitch bitmap font is used to create a sprite for each character.
Sound
This class provides functions to play sounds. There are sounds played when the
hero jumps, fires his gun, or when a bullet hits a target.
Legal issues
All graphics in this game are taken from the archive SpriteLib copyrighted
by Ari Feldman. The title image is composed by a friend of mine, and I have
his permission to distribute it. All sounds are taken from various archives
on the internet (which means someone else might have the copyrights).
The source code was written by me alone. You may freely distribute both
executable and source code. Feel free to use any of my code for your own
non-commercial purposes. Sony is hereby granted the right to do with it
whatever they like.
Copyright © 1999 by Daniel Hartmeier. All rights reserved.