Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Aspiring on June 18, 2014, 10:47:03 pm

Title: Another 2048
Post by: Aspiring on June 18, 2014, 10:47:03 pm
Here is my own 2048 clone.  currently its graphics are sad and it doesn't detect when you lose.  I only made it because my mom took my computer.  I am rather proud about how small it is.  (only 1500 bytes compiled) here's the code.  Feel free to do whatever you want with it. :)


I will probably not make it any better because I am working on an awesome pong with lots of powerups.  I even will have one powerup be to change your paddles to circular and the ball will bounce off the way you would expect.  (Saw a gif of a pong clone with this in someone's sig.)

Title: Re: Another 2048
Post by: Sorunome on June 19, 2014, 03:37:50 am
Any chance of a screenie?
Title: Re: Another 2048
Post by: TheMachine02 on June 19, 2014, 01:05:48 pm
wish granted :p
(http://i.imgur.com/OuqBufZ.gif)

EDIT : it is pretty good btw, but for an obscure reason, wabbit emulating in ti83+ would crash when I try the game >_>
Title: Re: Another 2048
Post by: Aspiring on June 19, 2014, 01:23:55 pm
EDIT : it is pretty good btw, but for an obscure reason, wabbit emulating in ti83+ would crash when I try the game >_>
Hmm that is weird.... I don't think i am not doing anything that is not ti83+ friendly.  I even don't use the full command.  Could it be how I am getting / creating the highscore appvar?
Here's the appvar code:
Code: [Select]
"appvHS2048"->Str1SAVE
!If GetCalc(Str1SAVE)->H
Return!If GetCalc(Str1SAVE,2)->H:0->{H}^^r
End
Title: Re: Another 2048
Post by: Sorunome on June 19, 2014, 01:43:12 pm
is the appvar in ram or in archive?
Title: Re: Another 2048
Post by: Aspiring on June 19, 2014, 09:30:02 pm
it is in the ram (should i put it in archive?)
Title: Re: Another 2048
Post by: Streetwalrus on June 19, 2014, 10:13:19 pm
It'd be better because ram clears are pretty frequent.
Title: Re: Another 2048
Post by: JWinslow23 on June 19, 2014, 10:19:29 pm
Nice to see another 2048 clone. At least this way, the 2048 craze is living, somehow...

And here is the code you want for creating the appvar (it even stores the pointer in M):
Code: [Select]
UnArchive "appvHS2048"
!If GetCalc("appvHS2048")->M
0->{GetCalc("appvHS2048",2)->M}^^r
End
This code loads the appvar whether or not it is in RAM or archive.
You can adapt this code for different appvar names, different variables to store the pointer to, and different appvar sizes. And I like to store the appvar in Archive when the program ends, just in case the calc crashes and a RAM clear is performed.