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 New maintainer are welcome !
Go to the releases and get the latest build
- .obj models (converted to binary format)
- Textures
- Lighting
- 6 different render modes
8 4 2 6 9 3 = Camera rotation
D-PAD = Movement
+ - = FOV +/-
0 = Render Mode Cycle
Clear = Exit
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
To create your own maps, go to python/MapCreator.py
and edit the myMap =
value
x
are walls / triangles you can't get passs
are the small ground elements you can pick up.
are just empty spaces you can run on0
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)
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
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)
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
- Original code and based on CP3D Render by Henri: https://github.com/im-henri/CP_3D_render
- hollyhock2: https://github.com/SnailMath/hollyhock-2
- Libfixmath: https://github.com/PetteriAimonen/libfixmath/tree/master