Hi guys !

I'm trying to remake on the Prime an old 8 bits game called Trailblazer.

D-Pad for controls (left, right, accelerate, slow down),
[Enter] to jump,
[Esc] to quit.



Blue Circle : reverse Right/Left control.
Yellow Arrow : accelerate.
Green arrow : slow down.
White ...thing : free jump.
Green and brown plain tiles cancel reversed controls.

When falling into a hole, you get stopped for 2 sec then restart.

https://www.omnimaga.org/hp-prime-projects/(wip)-trailblazer-prime/


UPDATES:
=====
0.0.9 beta by Komame (2026-06-05)

changelog :

 Added lateral perspective shifting based on the ball position. The ball is now drawn at a fixed screen position while the track shifts accordingly
 Major rendering optimization: the track renderer now uses cached data for the 60 visible render strips
 Added emboss/front-edge rendering. Embosses are cached per track and drawn in screen space from a prerendered GROB instead of being baked directly into the track texture.
 Added cached lookup data for lane X positions, ray-to-strip mapping, emboss ray mapping, render-strip coordinates, texture offsets, perspective shift coefficients, shadow colors, and frequently used ray constants.
 Optimized tile detection by caching rayTable(89) and the ball lane width, avoiding repeated calculations during gameplay.
 Improved left/right movement handling by using a single movement vector, including reversed controls support.
 Improved dashboard timing display. The timer is now shown in seconds and keeps displaying the final time after finishing a track.
 Reduced dashboard redraw area to avoid repainting the whole lower screen every frame.
 When enabled, FPS is displayed with an "FPS:" label and calculated more accurately.
 Adjusted the finish HUD layout and removed the top-screen time display, since the dashboard now handles the final time.
 Updated ball and shadow rendering, including precomputed shadow colors during jumps.
 Improved falling rendering
 Extended cleanup on exit to include the new rendering, emboss, shift, and shadow caches.
 Replaced the custom te_matHeight() helper with built-in rowDim() calls in the track editor.
 Removed the old embedded emboss icon and replaced it with prerendered emboss graphics generated from the tile texture.

=====
0.0.8 by Komame (2026-05-22)

changelog :

 Fixed a Virtual Calculator-specific jumping bug where the ball could remain stuck in the jumping state, preventing proper track tile detection after a jump attempt.
 Added automatic angle unit handling, removing the need to manually switch the calculator to degrees before launch.
 Added the ability to load tracks into the track editor, with the currently selected track loaded automatically for direct editing.
 Improved tile and cursor rendering in the track editor, including fixes for the bottom cursor border being clipped on the last row and tiles being shifted down by 1 pixel.
 Improved track save slot selection — slot names are now displayed, and empty slots are clearly indicated.
 Saved tracks are now automatically set as the active track.
 Added validation for the minimum track length.
 Replaced rectangle drawing operations based on FILLPOLY_P with RECT_P, improving rendering performance.
 Precomputed data required for perspective projection, textures, animations, and visual effects, reducing the number of calculations repeated during gameplay.
 Improved the appearance and behavior of the distant track fade-out effect.
 Improved in-game exit handling via [Esc] — the game now returns to the menu instead of terminating the program immediately.
 Improved input stability and predictability by reading the key state once per frame.
 Improved management of memory and temporary game data.
 Reduced the number of global variables by replacing them with local variables where possible.
 Added cleanup of global variables and used GROB objects when exiting the program. The program also performs cleanup after being interrupted with the [On] key.

=====
0.0.7.1 by Lady Eklipse (2020-12-30)

I have fixed the program by changing line 339:
from          (rayTable(R) + camPosition) / textureOffsetCoef,
to         (rayTable(R) + camPosition) / textureOffsetCoef+1,

This now works on HP Prime G2, the textures are now visible again. I did not fix any of the other bugs yet.

=====
v0.0.7 by MacBernick (2014-01-30)

changelog :

 Game Menu
 Track selection
 Track editor (no loading)
 Lot of minor adjustments
 More bugs !

=====
v0.0.6 by MacBernick (2014-01-11)

changelog :

 Better textures,
 New attempt at embossing tiles, still need more work,
 Welcome screen,
 Starting lights,
 Finish line,
 You can only jump 5 times per run.

=====
v0.0.5 by MacBernick (Dec 2013)

changelog :

 Better graphics (run at about 25 FPS).
 Jump is back (broken on simulator).
 All types of tiles work now (including holes).
 Some kind of dashboard placeholder displaying current speed for now.
 New test track. Goodbye Hello World, hello Goodbye World ! 
 Falling animation is sometimes weird and need some more work.

=====
v0.0.4 by MacBernick (Dec 2013)

changelog :

 Far distance fade out nicely with background.
 Angle mode is now set to degrees at start and back to whatever it was when exiting.
 New PNG texture set
 One big textures for the whole track.
 Some tiles are functionals.

=====
v0.0.2 by MacBernick (Dec 2013)

changelog :

Decreased graphic quality to boost framerate (thanks to DJ Omnimaga).
Added a ball and some controls. Left and Right on D-Pad to move the ball, Up and Down to accelerate / slow down.
Added a framerate counter, disable it by setting showFPS (the very first EXPORTed variable in source code) to 0.
Cleaned up the code a bit to remove useless things, and added some comments.
The W now looks more like a W ^^
I still forgot to set those #*$! angles to degrees, please be sure to be in degree mode and not radians !
