You can help CodeWalrus stay online by donating here.

Started by JWinslow23, July 16, 2015, 06:41:07 PM

0 Members and 1 Guest are viewing this topic.

#### JWinslow23

Introducing, a first look at what I want to make into a full game: Bejeweled 84+!

As of now, it just loads the graphics, creates a random board with no match checking (yet), and displays that board.

If anyone's wondering how I did all that, one word: textsprites.

EDIT: Source code for the curious (processed with TokenIDE):
`ClrDrawAxesOffZStandard104→Xmax⁻72→YminZIntegerFor(A,0,74If A<11Text(57,A+15,sub("?Y°﹢.﹢°Y?  ",A+1,1If A<21Text(52,A+10,sub("?Y'([i]ÎQJ'['JQÎ[i]('Y?  ",A+1,1If A<25Text(47,A+8,sub("﹢[s]!!]:XX.χ[i][i][i]χ.XX:]!![s]﹢  ",A+1,1If A<28Text(42,A+8,sub("  .Jẋûí[e]|u([s]:[s](|u[e]í[e]íJ.   ??  ",A+1,1If A<41ThenText(37,A,sub("''?    Y'°°Y]|uQYYY? Y'°°°^Y'°°'Y1|uQYYY?  ",A+1,1Text(32,A,sub(" plotsquare[[2JQ!Jplotsquare[e]plotsquareJ[e]plotsquareplotsquare[e]plotsquareJ plotsquare['??YÎJplotsquare[e]plotsquareplotsquare [e]plotsquareplotsquareûplotsquare2  ",A+1,1Text(27,A,sub("JJJJJJJ.              ....          plotsquareí﹢  ",A+1,1EndText(5,A+11,sub("[[JJ[i]Q' 'QplotsquareJJJJ JJJplotsquareQ' 'QplotsquareJJJJ  YQplotsquare('(plotsquareQY  'QplotsquareJJJJ 'QplotsquareJJJ 'QplotsquareJJJJ [[JJplotsquareQ'  ",A+1,1Text(0,A+11,sub("[[]]X[( |u[Î]]]?     [[ |u[Î]]]? [[.     .[[ |u[Î]]]? [[     |u[Î]]]? [[??Y[|u  ",A+1,1End{11,21,36,56,71,77For(A,1,6Line(Ans(A),0,Ans(A)+4,0End{31,42,51,62For(A,1,4Line(Ans(A),0,Ans(A)+1,0End⁻14Line(2,Ans,36,AnsLine(⁻Ans,2Ans,24,2Ans{2,⁻Ans,26For(A,1,3Line(Ans(A),⁻22,Ans(A)+10,⁻22End26Line(12,⁻24,12,⁻AnsLine(Ans,⁻24,Ans,⁻Ans⁻16Line(0,Ans,0,⁻20Line(38,Ans,38,⁻20Line(⁻Ans,⁻12,19,⁻1313Line(22,⁻12,19,⁻AnsLine(40,⁻Ans,40,⁻61{1,15,37,15,1,21,37,21,Ans,23,25,23,Ans,27,25,27,15,Ans,23,AnsFor(A,1,10Pt-On(Ans(2A-1),⁻Ans(2AEnd⁻12Line(41,Ans,92,AnsLine(41,Ymin,92,YminLine(42,Ans,42,YminLine(92,Ans,92,YminDelVar [A]{8,8→dim([A]For(A,1,8For(B,1,8randInt(1,7→[A](A,BStorePic 1For(C,0,7Text(7+6A,38+6B+C,sub(sub("[[i][[[(ẋXẋ(+([(+(X]X(°û[Q°J|u[|uJ(X[i][(",5[A](A,B)-4,5)+"   ",C+1,1EndRecallPic 1EndEndPause `
• Calculators owned: TI-83+, TI-84+ CE

#### alexgt

Awesome! Is it written in basic, the source looks like Axe but I haven't coded on my 84+ for a long time ?! Because the board drawing is a little slow or is that an animation?
• Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

#### JWinslow23

Quote from: alexgt on July 16, 2015, 07:42:01 PM
Awesome! Is it written in basic, the source looks like Axe but I haven't coded on my 84+ for a long time ?! Because the board drawing is a little slow or is that an animation?
Lol XD No, it is not Axe. This is entirely in pure TI-BASIC. All of the drawing (aside from lines and points to make the score box and board border) is actually made from textsprites. The link I gave in the post should explain them to you, and how you can make some yourself.
• Calculators owned: TI-83+, TI-84+ CE

#### alexgt

That is cool I will have to look into that
• Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

#### Unicorn

Nice looking, there will now be Bejeweled for everyone. Except for HP Prime users.

* Unicorn runs
• Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
• Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???

#### JWinslow23

Quote from: Unicorn on July 16, 2015, 10:53:53 PM
Nice looking, there will now be Bejeweled for everyone. Except for HP Prime users.

* Unicorn runs
Make an emulator for the monochrome calcs like the nSpire
* Unicorn turns out to be running to his calculator to program such
• Calculators owned: TI-83+, TI-84+ CE

#### Dream of Omnimaga

This looks amazing. if only text sprites were faster. I wonder if they work on the CE?
• Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
• Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

#### alexgt

A z80 emu is out of my field at the moment but that would be amazing
• Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

#### Unicorn

Quote from: alexgt on July 17, 2015, 12:10:24 AM
A z80 emu is out of my field at the moment but that would be amazing

We first have to figure out how to control a robot using a prime, this comes later
• Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
• Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???

#### alexgt

Before that I need to learn java so I can program the robot we will make in school, but we are getting off topic already

back on topic why didn't you use Pix-on()? is it faster with the text sprites?
• Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

#### JWinslow23

#10
Quote from: DJ Omnimaga on July 16, 2015, 11:29:17 PM
This looks amazing. if only text sprites were faster. I wonder if they work on the CE?
Thanks. And I agree with you, I was a bit annoyed at the long time it took. The one faster option that doesn't take TOO much memory is Pics, which we ALL know is never gonna happen

And I imagine you can do something similar on the CE, but if the fonts are different, then modifications and new reference tables have to be made.

Quote from: alexgt on July 17, 2015, 12:14:43 AM
back on topic why didn't you use Pix-on()? is it faster with the text sprites?
It would take me over 9000 drawing commands to actually draw the things without text sprites. Text sprites are not only cool, but they also take not a whole lot of memory (but it still takes up a fair amount), and are decently fast if you know how to use them

Also, new code and binary! You can now switch gems! Match checking will come later.

Press 2nd on a square, and the corners of the selection box will turn black. Press 2nd on that same square to deselect, and an adjacent square to switch them. If you press 2nd on any other square, it deselects the selected square and selects the new one. So, basically like the CSE version

Source code for the curious:

`ClrDrawAxesOffZStandard104→Xmax⁻72→YminZIntegerFor(A,0,74If A<11Text(57,A+15,sub("?Y°﹢.﹢°Y?  ",A+1,1If A<21Text(52,A+10,sub("?Y'([i]ÎQJ'['JQÎ[i]('Y?  ",A+1,1If A<25Text(47,A+8,sub("﹢[s]!!]:XX.χ[i][i][i]χ.XX:]!![s]﹢  ",A+1,1If A<28Text(42,A+8,sub("  .Jẋûí[e]|u([s]:[s](|u[e]í[e]íJ.   ??  ",A+1,1If A<41ThenText(37,A,sub("''?    Y'°°Y]|uQYYY? Y'°°°^Y'°°'Y1|uQYYY?  ",A+1,1Text(32,A,sub(" plotsquare[[2JQ!Jplotsquare[e]plotsquareJ[e]plotsquareplotsquare[e]plotsquareJ plotsquare['??YÎJplotsquare[e]plotsquareplotsquare [e]plotsquareplotsquareûplotsquare2  ",A+1,1Text(27,A,sub("JJJJJJJ.              ....          plotsquareí﹢  ",A+1,1EndText(5,A+11,sub("[[JJ[i]Q' 'QplotsquareJJJJ JJJplotsquareQ' 'QplotsquareJJJJ  YQplotsquare('(plotsquareQY  'QplotsquareJJJJ 'QplotsquareJJJ 'QplotsquareJJJJ [[JJplotsquareQ'  ",A+1,1Text(0,A+11,sub("[[]]X[( |u[Î]]]?     [[ |u[Î]]]? [[.     .[[ |u[Î]]]? [[     |u[Î]]]? [[??Y[|u  ",A+1,1End{11,21,36,56,71,77For(A,1,6Line(Ans(A),0,Ans(A)+4,0End{31,42,51,62For(A,1,4Line(Ans(A),0,Ans(A)+1,0End⁻14Line(2,Ans,36,AnsLine(⁻Ans,2Ans,24,2Ans{2,⁻Ans,26For(A,1,3Line(Ans(A),⁻22,Ans(A)+10,⁻22End26Line(12,⁻24,12,⁻AnsLine(Ans,⁻24,Ans,⁻Ans⁻16Line(0,Ans,0,⁻20Line(38,Ans,38,⁻20Line(⁻Ans,⁻12,19,⁻1313Line(22,⁻12,19,⁻AnsLine(40,⁻Ans,40,⁻61{1,15,37,15,1,21,37,21,Ans,23,25,23,Ans,27,25,27,15,Ans,23,AnsFor(A,1,10Pt-On(Ans(2A-1),⁻Ans(2AEnd⁻12Line(41,Ans,92,AnsLine(41,Ymin,92,YminLine(42,Ans,42,YminLine(92,Ans,92,YminDelVar [A]{8,8→dim([A]For(A,1,8For(B,1,8randInt(1,7→[A](A,BEndEndRepeat [A]=[B][A]→[B]For(X,0,1For(A,1,8Matr►list([A],A,L₁not(DeltaList(DeltaList(L₁³→L₁For(B,1,6max(AnsIf L₁(BThenRepeat Ans≠[A](B+1,ArandInt(1,7→[A](B,AEndEndEndEnd[A]ᵀ→[A]EndEnd"[[i][[[(ẋXẋ(+([(+(X]X(°û[Q°J|u[|uJ(X[i][(→Str1For(A,1,8For(B,1,8For(C,0,7Text(7+6A,38+6B+C,sub(sub(Str1,5[A](A,B)-4,5)+"   ",C+1,1EndLine(92,⁻12,92,YminEndEndDelVar SDelVar T1→Z1→θRepeat K=45Line(38+6Z,⁻7-6θ,42+6Z,⁻7-6θLine(38+6Z,⁻13-6θ,42+6Z,⁻13-6θLine(37+6Z,⁻8-6θ,37+6Z,⁻12-6θLine(43+6Z,⁻8-6θ,43+6Z,⁻12-6θgetKey→KIf KThenLine(38+6Z,⁻7-6θ,42+6Z,⁻7-6θ,0Line(38+6Z,⁻13-6θ,42+6Z,⁻13-6θ,0Line(37+6Z,⁻8-6θ,37+6Z,⁻12-6θ,0Line(43+6Z,⁻8-6θ,43+6Z,⁻12-6θ,0EndIf K=21ThenIf S and T and (Z=S or θ=T) and 2>abs(Z-S)+abs(θ-TThenPt-Off(37+6S,⁻7-6TPt-Off(43+6S,⁻7-6TPt-Off(37+6S,⁻13-6TPt-Off(43+6S,⁻13-6T[A](T,S→A[A](θ,Z→[A](T,SA→[A](θ,Z"     Text(7+6θ,38+6Z,AnsText(7+6T,38+6S,AnsStorePic 1For(C,0,7Text(7+6θ,38+6Z+C,sub(sub(Str1,5[A](θ,Z)-4,5)+"   ",C+1,1EndRecallPic 1StorePic 1For(C,0,7Text(7+6T,38+6S+C,sub(sub(Str1,5[A](T,S)-4,5)+"   ",C+1,1EndRecallPic 10→S0→TElseIf S and TThenPt-Off(37+6S,⁻7-6TPt-Off(43+6S,⁻7-6TPt-Off(37+6S,⁻13-6TPt-Off(43+6S,⁻13-6TEndZ→Sθ→TPt-On(37+6S,⁻7-6TPt-On(43+6S,⁻7-6TPt-On(37+6S,⁻13-6TPt-On(43+6S,⁻13-6TEndEndZ+(K=26 and Z<8)-(K=24 and Z>1→Zθ+(K=34 and θ<8)-(K=25 and θ>1→θEnd`

• Calculators owned: TI-83+, TI-84+ CE

#### alexgt

Awesome! I want to try this out sometime when I have time
• Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

#### JWinslow23

Quote from: alexgt on July 17, 2015, 12:40:05 AM
Awesome! I want to try this out sometime when I have time
You'll have more of a fun time when I add match checking and removal, though
• Calculators owned: TI-83+, TI-84+ CE

#### alexgt

Yeah, that will probably be implemented before I have time (if everything goes smoothly )
• Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

#14