CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: iconmaster on January 21, 2015, 11:03:16 PM

Title: [HP Prime] Starvault - Unfinished but here for posterity.
Post by: iconmaster on January 21, 2015, 11:03:16 PM
After Tetris, I want on to start another game. It was called Starvault, and it was going to be a short sci-fi roguelike sort of game.

I had the bright idea to separate the game into multiple HPPRGM files for my programing convenience. Well, as it turns out, this is a very bad idea. I eventually made a cyclic dependency in the code. As it turns out, if one of the dependants has a syntax error, none of the other dependants will ever compile again. As a result, this code can never run again, as one can never fix the bug that causes every check to fail. This proved to be the end of Starvault development.

I decided Source would be a better use of my time.

Anyways, the program does some cool graphical effects, so I suggest you check out the source code to see it. Maybe you can learn something from it?? I've attached the source code and assets.


I really wish I had made screenshots when it was working. Oh well.
Title: Re: [HP Prime] Starvault - Unfinished but here for posterity.
Post by: Dream of Omnimaga on January 22, 2015, 03:55:26 AM
Hmm strange that the game would stop compiling again once a sub-program gets an error. I'll think twice next time about using sub-programs then. D: Do you think there would be a way to make that game compilable again in the future, such as merging every sub-program into one file or copying the code into brand new ones?

THis also sounds like it is a bug that should be reported to Tim Wessman.

EDIT: Are you sure that the HP Prime supports the SV_DRAWGAME.DRAWBACK()? Most syntax errors seems to be at lines like this.
Title: Re: [HP Prime] Starvault - Unfinished but here for posterity.
Post by: iconmaster on January 22, 2015, 02:04:32 PM
I got it working again by merging everything into one file. So, feel free to check out the attached file, and also these screenshots:

(http://i.imgur.com/9LbXiam.png)(http://i.imgur.com/l1ybgTS.png)(http://i.imgur.com/Afl5buz.png)
Title: Re: [HP Prime] Starvault - Unfinished but here for posterity.
Post by: Dream of Omnimaga on January 22, 2015, 02:11:21 PM
Awesome to hear. :D By the way, just a question: Since the HP Prime has issues keeping highscores and saves if you accidentally recompile your program, could using the program launcher trick (having a very small program launch the bigger program as sub-program) result into the compiling issues you got with this game?


This looks quite nice by the way. I'll need to give this a try soon :)
Title: Re: [HP Prime] Starvault - Unfinished but here for posterity.
Post by: iconmaster on January 22, 2015, 02:21:34 PM
Quote from: DJ Omnimaga on January 22, 2015, 02:11:21 PM
Awesome to hear. :D By the way, just a question: Since the HP Prime has issues keeping highscores and saves if you accidentally recompile your program, could using the program launcher trick (having a very small program launch the bigger program as sub-program) result into the compiling issues you got with this game?

This looks quite nice by the way. I'll need to give this a try soon :)

I don't think SV_DATA caused the error, as I still use the SV_DATA trick in the merged version.

And thanks a bunch!
Title: Re: [HP Prime] Starvault - Unfinished but here for posterity.
Post by: Dream of Omnimaga on January 22, 2015, 05:45:56 PM
Ok good to hear ^^