CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: Jean-Baptiste Boric on February 03, 2019, 12:47:10 PM

Title: Python games on the NumWorks calculator
Post by: Jean-Baptiste Boric on February 03, 2019, 12:47:10 PM
I've unearthed one of my old pull requests and now we can (finally!) have proper Python games on the NumWorks calculator. The missing bits were keypad readout and some basic graphics primitives (zardam's time module was already merged some time ago). I've scrambled together a Pong game to showcase this:

(https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&image_id=10222)

Drawing performance is honestly quite terrible because the framebuffer isn't memory-mapped, but it's enough for a smooth Pong and probably other basic games in real time. Redrawing the full screen on each frame would require drawing the entire screen in one go pixel after pixel (like the third-party firmware GESTE did), not unlike racing the beam on the Atari 2600, but doing that from within MicroPython would be challenging.

Sources:
Title: Re: Python games on the NumWorks calculator
Post by: gameblabla on March 14, 2019, 11:25:07 AM
When we will get native dev on it ? D:
Not that it will matter though, i'm done with school.
Title: Re: Python games on the NumWorks calculator
Post by: Jean-Baptiste Boric on March 14, 2019, 05:00:46 PM
Quote from: gameblabla on March 14, 2019, 11:25:07 AM
When we will get native dev on it ? D:

Given that the datasheets and firmware source code are freely available, I'd say from day one. I mean, you can even program video games for the NumWorks in Ada for crying out loud! (https://tiplanet.org/forum/viewtopic.php?t=21794&p=234603 (https://tiplanet.org/forum/viewtopic.php?t=21794&p=234603)) :P
Title: Re: Python games on the NumWorks calculator
Post by: gameblabla on March 14, 2019, 05:20:00 PM
Quote from: Jean-Baptiste Boric on March 14, 2019, 05:00:46 PM
Quote from: gameblabla on March 14, 2019, 11:25:07 AM
When we will get native dev on it ? D:

Given that the datasheets and firmware source code are freely available, I'd say from day one. I mean, you can even program video games for the NumWorks in Ada for crying out loud! (https://tiplanet.org/forum/viewtopic.php?t=21794&p=234603 (https://tiplanet.org/forum/viewtopic.php?t=21794&p=234603)) :P
Never thought i would see some real use of Ada on a calculator...  ;D But i thought that the games on it were basically firmware on their own right ? (i think it was due to the small internal space)
So yeah, i still prefer the TI Nspire CX, as flawed as it is.
Title: Re: Python games on the NumWorks calculator
Post by: Dream of Omnimaga on March 14, 2019, 05:42:19 PM
I haven't read much about the NumWorks, because it came out after I stopped following calculator stuff, but I'm glad that it's possible to make some games on it :)
Title: Re: Python games on the NumWorks calculator
Post by: Jean-Baptiste Boric on March 14, 2019, 08:42:55 PM
I'm aware of two native games on the NumWorks: my own Tic-Tac-Toe app (https://github.com/boricj/numworks-tic-tac-toe) that's actually an m,n,k-game with IA and zardam's NES emulator (https://zardam.github.io/post/nofrendo/).

There are only a couple of third-party apps on NumWorks. There are a couple of reasons for that:
Basically it's a pain in the butt to maintain and making third-party apps available to non-technical end-users requires a lot of effort. zardam's NES emulator has a fairly nice dedicated flashing webapp (https://zardam.github.io/webnofrendo/), but it's nevertheless a kludge that doesn't scale.

That being said, the NumWorks platform itself is extremely programmer-friendly due to source code availability and unlocked hardware, but the original firmware is a bit too good at its math job. I'm actually thinking about writing my own firmware/shell with drastically different design choices to solve this issue, where adding native apps would be as easy as copying an ELF program with a file manager...
Title: Re: Python games on the NumWorks calculator
Post by: Lionel Debroux on March 15, 2019, 09:35:05 AM
Yeah, a filesystem would be a must.
ELF, not so much, however. It's inefficient for embedded platforms, that's why Ndless-based programs have never switched to it after the initial phase of a custom, lightweight program format which required manual relocation.