Make your own free website on


Rainbow Island Remake

Java Applet

Predictive collision detection

3D Software Engine

Sprite animation library

Fixed math, no float used

  • Once loaded, click to activate

  • Arrow keys to move, jump

* If blank, install Java

Implementation Details

Costume Renderer

Rainbow Island is one of my favorite games in terms of cuteness. I ripped the graphics from the NES version and created an optimized 3D software engine thanks to the fixed view.

Collision detection is predictive, with moving AABB AABB separating axis test. That is why the main character (Bobby) can have very fast velocity. The main challenge I encountered was achieving pixel accurate prediction working with fixed math. As a bonus for having been forced to implement exact collision detection, Bobby (with exact 16x16 bounding box like all other tiles) can squeeze through narrow passages ( also exactly 16x16 ).

The physics is simple as the eventual goal is to run it on even slow phones after I port to MIDP1. Along with the 3D engine, many divides are replaced with shifts to 'fake it'. This did create inaccurate movement as I right shifted negative integers. I.e., 0xFFFFFFFF >> 1 == 0xFFFFFFFF == -1. The work around is to do:

IF ( number < 0 ) RETURN -((-number)>>1)

Though this many operations is probably not faster than the divide.

Overall, this is an ongoing project and my current favorite. The sprite animation is done and will be adding fire power and enemies next.



Thank you!

Jeremy Huang