Home Cavernosa
PyGLUT GAME BOY
ADVANCE
Nintendo DS Java
Misc Code Links
My Site
Intro
Cavernosa
PyGLUT
Game Boy Advance
Nintendo DS
Java
Misc Code
Links
 
GBA
Realtime 3D
Conway's Life
 
Email me
mailto
 
Printer
Friendly

 
  

REALTIME 3D ON THE GAME BOY ADVANCE

Contents
X-lite
Viroid
Graphics Programming Black Book by Michael Abrash
What can be Done?
Links

X-lite


Download binary of demo.
X-lite is the beginnings of a 3D BSP engine for the Gameboy Advance. In the background of the image above you see source data in the free 3d modeler Blender, for which I have written an exporter. In the bottom-left corner there is the Win32/DirectX build of the engine runtime which I use for debugging under MSVC and which demonstrates the ease of any future port to a PDA or other platform.
If you'd like to donate some better Blender-format low-poly models for me to use in any future versions of this demo, I'll give you an in-ROM credit and a custom build with just your stuff if you want.

Source code for the runtime is available here.

A demo binary can be downloaded here and run in an emulator or flashed to ROM and run on a real GBA.

Controls are:
Start: Change model.
Select: Change control system (automatic or manual model orbiting).
Joypad: Orbit left-right, approach and retreat from model.
Shoulder buttons: up-down.
B: Go faster.
A: Control modifier that when held down makes pad and shoulder buttons move the rotation centre.
Hold Start, depress B: Change poly mode between points, lines and solid.
Hold Select, depress Shoulder buttons: Toggle red and green lights.
Both Shoulder buttons: Display greeting from me.

Viroid


Download binary of demo.
Viroid is my 3D heightfield fly-over demo for the Gameboy Advance. The binary can be downloaded here and run in an emulator or flashed to ROM and run on a real GBA.
Controls are:
Joypad: left-right, forward-back.
A & B: up and down.
Shoulder buttons: look up-down.
Start: go to default position and orientation.
Select: switch between line drawing and solid triangle modes.

Graphics Programming Black Book by Michael Abrash
Plain text versions of the original DDJ articles on which the middle section of this book is based were one of my primary information sources when first starting out programming 3D graphics. Now this great book is available online [edit, local mirror: Michael Abrash's Graphics Programming Black Book] along with accompanying source code [edit, local mirror: MichaelAbrashBlackBookSource.zip]. It is something of a brick (I have cut the spine of my physical copy in order to be able to carry only the relevant parts with me) so I'll point out the chapters that are worth a GBA 3D programmer printing out.

  • Chapters 35 to 37: Line drawing, starting with Bresenham and ending with Run-Sliced (which needs a divide per line so may not be optimal on the ARM7 which has no hardware divider).
  • Chapters 38 to 41: Polygon rasterization. Covers exact rasterization rules and goes from floating point to pure integer implementations. Uses a division into three procedures: draw_poly, scan_edge, and draw_span, with an edge table filled before spans are drawn. Timings given for a 20mhz 386.
  • Chapter 42: Wu antialiased lines.
  • Chapters 50 to 58: The X-Sharp chapters. Covers 3D Pipeline (Xforms (50), backface removal (51), etc.), fixed point maths (52, 53), lighting (54) colour models for paletted modes (55), and texture mapping (56 to 58).
  • Chapter 65: 3-D clipping.
  • Chapter 61: Interesting perspective on 3D math (dot product, cross product, rotation as projection).
  • Chapters 66, 67: Sorted Spans.
  • Chapters 59, 60, 61: BSP trees.
  • Chapters 64, 66 to 70: Quake 1.
Of course there are plenty of other chapters worth reading, not least for their introductory preambles, so don't let me stop you printing out the lot.

What can be Done?
Below is a listing of games that did 3D on machines that were considerably less powerful than the GBA. I may have gotten carried away in listing them. Their nominal function on this page is to provide inspiration to the amateur programmer working almost exclusively in C by marking the lower bound of what is achievable. With some, I have noted pirate disks that contain them to help you track down a few for a little research. Stunt Car Racer is still terrifically addictive :).
16 bit Games
STUNT CAR RACER Medway Boys disk 43. PP 17.
HARD DRIVIN' Medway Boys disk 50.
DAMOCLES Worth running just for it's in-engine intro which starts outside the solar system and zooms continuously all the way to the tarmac of a spaceport on one planet. Medway Boys disk 73.
THUNDERSTRIKE Heightfield with rotation about y-axis ('up' axis) (coincident for camera and world from memory, so no tilt or twist, just pan). Medway Boys disk 78.
OTHERS Virus (even particles cast shadows!), Conqueror (Automation 273), Zeewolf and Zeewolf 2, Vaxine (Dreamweavers 09), Simulcra (Dreamweavers 09), Voyager, Infestation, Carrier Command (Realtime Games), Battle Command (Realtime Games), Midwinter & Midwinter II (Large fractal map, and loads of vehicles), Whirligig (Cached sprites(?), fast gorgeous space combat), Interphase (Fast filled polys with lighting), Cybercon III (impressive, Good use of ellipses), Killing Cloud (Nice ellipses on craft engines and stuff), Warhead (Med 66), Robocop III (pp 108a 108b), Epic (PP 107a 107b), TFX, F-29 Retaliator, F15 Strike Eagle 2 (PP 89), Total Eclipse (Med 09), Archipelago.
8 bit Games
CHOLO This renders a whole city with building interiors and moving objects in the streets. You can even take over a plane at the airport and go for a joyride past the parabolic antenna which looks out across the sea.
OTHERS Elite, Mercenary, Starion (Space combat, much faster than Elite but no hidden line removal).

Links

The GameBoy Advance Development Ring
[ Join Now | Ring Hub | Random | << Prev | Next >> ]

Copyright Andrew H. Cox. All rights reserved.
[email protected]


Hoogli Gallery: Turn any Web Page Into an Image Gallery With One Click

I now still Java, but on Android. I also do a lot of web stuff as well as 3D Graphics. Come and see my Node.js and libevent based web app, and if you like it, you can even hire me for web projects that need a bit of higher than average performance technology to be built.