0 Members and 1 Guest are viewing this topic.
EDIT: I dunno if that's a bug, but for me the entire game has inverted colors (I don't know for the pieces, though. Just everything else is inverted, such as white background and black text)
Quote from: DJ Omnimaga on April 04, 2014, 05:15:25 pmEDIT: I dunno if that's a bug, but for me the entire game has inverted colors (I don't know for the pieces, though. Just everything else is inverted, such as white background and black text)Hahaha, no, you're just playing it with a light color scheme on. Myself, I'm a fan of Dark, so I took the screenshots in that mode.
That and highscores get wiped out if I accidentally open the code, but that's more an HP Prime bug (or annoying feature) than a game issue.
init_highscore()begin local temp="_tetrisHS:={{"Player1" 12345},{"Player2",234}};"; // make sure that you initialize properly; change list to whatever you use CAS(temp); // evaluates string inside temp as if done from CAS command line; creates _tetrisHS variableend;// get the n-th high scoreget_highscore(n)begin local temp="_tetrisHS(" + n ")"; iferr local score=CAS(temp); then init_highscore(); // make sure this runs properly or you end up with an infinite loop get_highscore(n); end; return(score); // return a list consisting of something like {"PlayerName" 1234} end;
Regarding the high score being reset, there is a way to do this but you will have to access the variable indirectly.Code: [Select]init_highscore()begin local temp="_tetrisHS:={{"Player1" 12345},{"Player2",234}};"; // make sure that you initialize properly; change list to whatever you use CAS(temp); // evaluates string inside temp as if done from CAS command line; creates _tetrisHS variableend;// get the n-th high scoreget_highscore(n)begin local temp="_tetrisHS(" + n ")"; iferr local score=CAS(temp); then init_highscore(); // make sure this runs properly or you end up with an infinite loop get_highscore(n); end; return(score); // return a list consisting of something like {"PlayerName" 1234} end;You can create a similar procedure for storing high scores. Indirection will not require you to have the variable initialized within your source code. Thus when you edit the source, the variable _tetrisHS will remain intact.
Question: Would you mind if at one point I modified this game to include more advanced graphics? I like this version in particular so I thought that spicing it up with sprites and such stuff as replacement to plain color squares would be nice.