For about a week now, I've been working on a clone of the game JezzBall for HP Prime in Python. The game will feature several modifications compared to the classic version. Currently, it's in a very early pre-alpha stage, and there's still a lot to do (and a lot may still change), but at this point I can say that the ball physics have already been refined.
Collisions are now working both with walls and between balls, taking into account their speed their speed and angle of impact. Area splitting and filling also work.
Collision detection with the splitter hasn’t been implemented yet — for now, balls simply pass through it until it closes off an area.
Although Python on HP Prime is quite fast, handling real-time ball physics with a larger number of objects turned out to be a significant performance challenge. For a moment, I thought creating this port without resorting to low-level programming would be impossible. However, thanks to several key optimizations, I managed to achieve smooth animation with 40 balls on screen, complete with full physics support, running at 28 fps on G1 (and significantly more balls on G2).
Below is an animation showcasing the current state of the implementation. (Note: the animation in this recording may appear choppy compared to how it runs on the actual device.)
Collisions are now working both with walls and between balls, taking into account their speed their speed and angle of impact. Area splitting and filling also work.
Collision detection with the splitter hasn’t been implemented yet — for now, balls simply pass through it until it closes off an area.
Although Python on HP Prime is quite fast, handling real-time ball physics with a larger number of objects turned out to be a significant performance challenge. For a moment, I thought creating this port without resorting to low-level programming would be impossible. However, thanks to several key optimizations, I managed to achieve smooth animation with 40 balls on screen, complete with full physics support, running at 28 fps on G1 (and significantly more balls on G2).
Below is an animation showcasing the current state of the implementation. (Note: the animation in this recording may appear choppy compared to how it runs on the actual device.)
