Hey all!
I am currently working on a project that implements the basic frameworks and most of the functionality for a genre of game with the goal of making it easily extensible to specific examples of that genre. Here is the dream pipeline as I've been visualizing it:
1. Somebody writes a setup(), checkMoveLegal(), etc function for the game in a new C file
2. This is compiled to an appvar to be loaded on the calculator and archived
3. My program, when run, will detect all such appvars and present them as examples to the user
4. The program moves the selected appvar into RAM and loads function pointers from it to define setup() etc
5. The program runs the game
6. The game appvar is returned to archive
Is this practical, and if so, how can I achieve step 2? I know I can put certain information in the header of an appvar, but I don't know how to force the toolchain to compile a program as a library like this, even though I'm sure something similar must exist in order for the standard libraries to work the way they do (even if they were written in assembly!). Or am I doing this backwards and I should instead write my project to be a library that each game loads and a launcher that presents the menu for the games?
Thank you!
I am currently working on a project that implements the basic frameworks and most of the functionality for a genre of game with the goal of making it easily extensible to specific examples of that genre. Here is the dream pipeline as I've been visualizing it:
1. Somebody writes a setup(), checkMoveLegal(), etc function for the game in a new C file
2. This is compiled to an appvar to be loaded on the calculator and archived
3. My program, when run, will detect all such appvars and present them as examples to the user
4. The program moves the selected appvar into RAM and loads function pointers from it to define setup() etc
5. The program runs the game
6. The game appvar is returned to archive
Is this practical, and if so, how can I achieve step 2? I know I can put certain information in the header of an appvar, but I don't know how to force the toolchain to compile a program as a library like this, even though I'm sure something similar must exist in order for the standard libraries to work the way they do (even if they were written in assembly!). Or am I doing this backwards and I should instead write my project to be a library that each game loads and a launcher that presents the menu for the games?
Thank you!