Skip to content

3D racing game experiment using fixed point math. For casio ClassPad ii fx-cp400

License

Notifications You must be signed in to change notification settings

ClasspadDev/CP-3D-CarGoWroom

Repository files navigation

3D Renderer using fixed point math. For casio ClassPad ii fx-cp400

demo.mp4

Note

The code was originally done by Henri and given away to the community legacy.png New maintainer are welcome !

Install

Get it with HollyHock2

Go to the releases and get the latest build

Features

  • .obj models (converted to binary format)
  • Textures
  • Lighting
  • 6 different render modes

Controls

8 4 2 6 9 3 = Camera rotation
D-PAD       = Movement
+ -         = FOV +/-
0           = Render Mode Cycle
Clear       = Exit

Modding

Custom car

You'll need to create simple 3D models in the Wavefront OBJ format with PNG textures and then converted to binary by editing and running the script

python python/ObjTexConverter.py

Warning

Running this may overwrite the pkObj and texture files

You can take a look at "3D_models" folder to get a better understanding at the example cars

Custom map

To create your own maps, go to python/MapCreator.py and edit the myMap = value

  • x are walls / triangles you can't get pass
  • s are the small ground elements you can pick up
  • . are just empty spaces you can run on
  • 0 is your starting point

then run

python python/MapCreator.py

Warning

Running this will overwrite both the big_map.map and little_map.map files on the "python" folder. You only need to copy the big_map.map on your calculator (big = big endian)

Compile it yourself

Open in GitHub Codespaces

The codespace got everything included, with the complete SH4 gcc toolchain, Clang linter and even python for map converting leaving you only the best part : Waiting for the compiler to be done

For your calculator

Run makefile:

make

Copy everything to the root of calculator:

App_3D_CarGoWroom.bin
big_endian_my_car.pkObj    (from folder ./3D_Converted_Models)
big_endian_my_car.texture  (from folder ./3D_Converted_Models)
big_endian_test2.pkObj    (from folder ./3D_Converted_Models)
big_map.map                (from folder ./python)

On your PC

You'll need SDL2 graphics library

make PC

Controls are :

W S A D R F = Camera rotation
Arrow Keys  = Movement
1 2         = FOV +/-
E           = Render Mode Cycle
Esc         = Exit

Credits