I wrote Biker Babe one weekend as a testament to senseless violence in video games. A friend helped by composing the complementary music and by drawing some of the graphics. The overall tone and artistic impression came out exactly as I wanted. Ironically, I now believe video game violence needs to be monitored to prevent the desensitization to humanity.
Biker Babe is a platform shooter with several levels. It is designed to be simple but absurd. To win, all you need to do is move Biker Babe to the far right end of each level while avoiding perverts, aliens, werewolves, and the typical male narcissist. The game is over when Biker Babe dies. That happens when she falls to an off screen location or gets way to close to an enemy.
A woman with a shotgun visually represents the playable character (Biker Babe). She has the ability to move left, right, jump or shoot and is affected by simulated gravity. Jumping is executed with a single button push. However, shooting requires two; the first cocks the gun and the second shoots. Animation is limited to a three-frame cycle for walking both right and left. Jumping requires one frame. Cocking the shotgun requires three-frames and halts player movement until complete.
There are several types of enemies. Each cycle through three frames of animation when walking and three addition frames are cycled when the enemy is blown apart. The first enemy (a pervert) only moves right and looks like an foul overweight male. In all, there are three left-only moving enemies. One looks innocent; but he is a pervert is disguise. Other enemies looks like a wizard and aliens. Each of the previously mentioned characters cannot junp. So, they drop of the screen when not supported by a platform. The werewolf is the exception. It is a left-only moving character. It is faster than the others and will jump when encountering the edge of a platform. The narcissist is the last character. It is left-only moving and fast. I can't recall if he jumps. Anyhow, all enemies are blown apart if hit by shot. After cycling the death animation, the enemies' image becomes part of the background. An enemy at that state cannot kill the player character.
There are multiple levels. The first looks like a park the second looks medieval. There is one that requires leaping through the trees to complete and another is an alien spaceship. They all look like a poorly drawn coloring book; takes the edge off the violence.
The game utilizes Protracker mods for theme music and background music. A friend composed both of these awesome tracks. Thanks! The game wouldn't be the same without them!
The following is a detailed explanation of the key design choices I made while developing this game. The code snippets are taken from BikerBabe.s.
Games run best without the OS especially when the game reads and writes directly to the hardware devices. So, the OS is halted and a snapshot of the current state is recorded so it can be restored when the game exits. The BackStab library contains a routine to do this. So, let's use it!
SETUP move.w #32,$DFF1
When coding a game, I prefer PAL over NTSC because it gives more clock cycles during the vertical blank period - err... I mean, PAL allows more pretty smooth moving graphics than NTSC.
MOVECOP lea CList1,a1
I cool feature of the Amiga is writing custom code for the Copper chip. My Copper list is used to create the pretty blue shaded background. However, one might use it to trace the raster as it is drawn in real time!
MAIN cmp.b #$45,Key
mn1 sub.w BabeY,d1
mn2 add.w d0,d1
mn5 cmp.w #18,BervA
mn3 sub.w BabeY,d1
mn4 add.w d0,d1
mn6 jmp MA
This looks like a sloppy wrapper routine for the main routine, DOMAIN. This code iterates though all the possible ways which the game may end. End key pressed -Babe fell off screen - Level completed - Or, one of the two enemies got too close.
TOUCH move.w #45,Count
t1 jsr DOMAIN
t2 sub.w #1,Count
You were touched by a pervert and the end animation needs to play before the game over is displayed.
DEAD cmp.w #9,Level
We fell off the screen but if this is the last level and we are at the end, the game is won.
S1ANIM add.w #1,Lev
The SxANIM routines are all in-game animation routines.
MVBACK btst.b #0,$DFF005
mb0 cmp.b #$30,$DFF006
If you swap buffers while the CRT is drawing the screen, a noticable rift will appear in your game screen. So, we wait for the raster to reach the vertical blanking period (The time after the screen is drawn but before the next time it is drawn). Then, we swap buffers. This is an ideal time to begin writing to the alternate buffer because the display hardware isn't controlling the bus.
ADDMAP move.w #1,d1
ap1 move.l a1,a3
ap3 lea 64(a3,d6),a3
ap4 move.l a4,$DFF050
ap5 dbf d1,ap1
The background is rendered using the classic tile technique. That is, tiles are taken from a source bitmap (The GetMap - see background image) and placed in the background during game play. We know what tile goes where because a data array (the LevMap) stores the tile arrangement. The code near BLTxxx annotation sets up the blitter hardware for an asyncronous data movement.
CLEANUP move.l _BitMapN,a5
cu2 move.l _BitMapN,a5
cb2 move.l (a5)+,a0
cb6 move.l _BitMapN,a5
cu8 move.l _BitMapN,a5
All moving characters are blits (as opposed to a sprite). So, we need to restore the background (which we saved previously) before we move the character. Sprites do not require these extra data movements but they have size, number, and color restrictions.
QUIT tst.l _BackBase
q1 tst.l _BckGrnd1
q2 tst.l _BckGrnd2
q3 move.l #0,d0
Oh yeah, before halting the OS, we did request the memory we needed for the game. This prevents writing over data currently used by the OS which would prevent the OS from properly restarting. So, the memory is freed before the program is exits.
CList1 dc.w $102,$0000
This is the copper list. It is a program executable by the copper chip. This is clearly one of the coolest features of the Amiga. This is what makes midscreen resolution/palette changes possible.