CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: JWinslow23 on July 16, 2015, 06:41:07 PM

Title: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 16, 2015, 06:41:07 PM
Introducing, a first look at what I want to make into a full game: Bejeweled 84+!

Click on the image to jump to the latest version!

(https://img.ourl.ca/Bejeweled84-1.gif) (http://www.cemetech.net/programs/index.php?mode=file&id=1332)

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. (http://tibasicdev.wikidot.com/textsprites)

Download attached. Tell me what you think!

EDIT: Source code for the curious (processed with TokenIDE):
ClrDraw
AxesOff
ZStandard
104→Xmax
⁻72→Ymin
ZInteger
For(A,0,74
If A<11
Text(57,A+15,sub("?Y°﹢.﹢°Y?  ",A+1,1
If A<21
Text(52,A+10,sub("?Y'([i]ÎQJ'['JQÎ[i]('Y?  ",A+1,1
If A<25
Text(47,A+8,sub("﹢[s]!!]:XX.χ[i][i][i]χ.XX:]!![s]﹢  ",A+1,1
If A<28
Text(42,A+8,sub("  .Jẋûí[e]|u([s]:[s](|u[e]í[e]íJ.   ??  ",A+1,1
If A<41
Then
Text(37,A,sub("''?    Y'°°Y]|uQYYY? Y'°°°^Y'°°'Y1|uQYYY?  ",A+1,1
Text(32,A,sub(" plotsquare[[2JQ!Jplotsquare[e]plotsquareJ[e]plotsquareplotsquare[e]plotsquareJ plotsquare['??YÎJplotsquare[e]plotsquareplotsquare [e]plotsquareplotsquareûplotsquare2  ",A+1,1
Text(27,A,sub("JJJJJJJ.              ....          plotsquareí﹢  ",A+1,1
End
Text(5,A+11,sub("[[JJ[i]Q' 'QplotsquareJJJJ JJJplotsquareQ' 'QplotsquareJJJJ  YQplotsquare('(plotsquareQY  'QplotsquareJJJJ 'QplotsquareJJJ 'QplotsquareJJJJ [[JJplotsquareQ'  ",A+1,1
Text(0,A+11,sub("[[]]X[( |u[Î]]]?     [[ |u[Î]]]? [[.     .[[ |u[Î]]]? [[     |u[Î]]]? [[??Y[|u  ",A+1,1
End
{11,21,36,56,71,77
For(A,1,6
Line(Ans(A),0,Ans(A)+4,0
End
{31,42,51,62
For(A,1,4
Line(Ans(A),0,Ans(A)+1,0
End
⁻14
Line(2,Ans,36,Ans
Line(⁻Ans,2Ans,24,2Ans
{2,⁻Ans,26
For(A,1,3
Line(Ans(A),⁻22,Ans(A)+10,⁻22
End
26
Line(12,⁻24,12,⁻Ans
Line(Ans,⁻24,Ans,⁻Ans
⁻16
Line(0,Ans,0,⁻20
Line(38,Ans,38,⁻20
Line(⁻Ans,⁻12,19,⁻13
13
Line(22,⁻12,19,⁻Ans
Line(40,⁻Ans,40,⁻61
{1,15,37,15,1,21,37,21,Ans,23,25,23,Ans,27,25,27,15,Ans,23,Ans
For(A,1,10
Pt-On(Ans(2A-1),⁻Ans(2A
End
⁻12
Line(41,Ans,92,Ans
Line(41,Ymin,92,Ymin
Line(42,Ans,42,Ymin
Line(92,Ans,92,Ymin
DelVar [A]{8,8→dim([A]
For(A,1,8
For(B,1,8
randInt(1,7→[A](A,B
StorePic 1
For(C,0,7
Text(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,1
End
RecallPic 1
End
End
Pause
Title: Re: Bejeweled 84+ progress thread
Post by: 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?
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 16, 2015, 07:44:11 PM
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.
Title: Re: Bejeweled 84+ progress thread
Post by: alexgt on July 16, 2015, 07:51:50 PM
That is cool I will have to look into that O.O
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 16, 2015, 10:53:53 PM
Nice looking, there will now be Bejeweled for everyone. Except for HP Prime users.  9_9

/me runs
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 16, 2015, 10:57:28 PM
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.  9_9

/me runs
Make an emulator for the monochrome calcs like the nSpire :P
/me turns out to be running to his calculator to program such
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 16, 2015, 11:29:17 PM
This looks amazing. O.O if only text sprites were faster. I wonder if they work on the CE?
Title: Re: Bejeweled 84+ progress thread
Post by: 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 O.O
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 17, 2015, 12:11:25 AM
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 O.O

We first have to figure out how to control a robot using a prime, this comes later :P
Title: Re: Bejeweled 84+ progress thread
Post by: alexgt on July 17, 2015, 12:14:43 AM
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?
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 12:19:46 AM
Quote from: DJ Omnimaga on July 16, 2015, 11:29:17 PM
This looks amazing. O.O 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 :P

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. :P

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 :P

(https://img.ourl.ca/Bejeweled84-2.gif)

Source code for the curious:

ClrDraw
AxesOff
ZStandard
104→Xmax
⁻72→Ymin
ZInteger
For(A,0,74
If A<11
Text(57,A+15,sub("?Y°﹢.﹢°Y?  ",A+1,1
If A<21
Text(52,A+10,sub("?Y'([i]ÎQJ'['JQÎ[i]('Y?  ",A+1,1
If A<25
Text(47,A+8,sub("﹢[s]!!]:XX.χ[i][i][i]χ.XX:]!![s]﹢  ",A+1,1
If A<28
Text(42,A+8,sub("  .Jẋûí[e]|u([s]:[s](|u[e]í[e]íJ.   ??  ",A+1,1
If A<41
Then
Text(37,A,sub("''?    Y'°°Y]|uQYYY? Y'°°°^Y'°°'Y1|uQYYY?  ",A+1,1
Text(32,A,sub(" plotsquare[[2JQ!Jplotsquare[e]plotsquareJ[e]plotsquareplotsquare[e]plotsquareJ plotsquare['??YÎJplotsquare[e]plotsquareplotsquare [e]plotsquareplotsquareûplotsquare2  ",A+1,1
Text(27,A,sub("JJJJJJJ.              ....          plotsquareí﹢  ",A+1,1
End
Text(5,A+11,sub("[[JJ[i]Q' 'QplotsquareJJJJ JJJplotsquareQ' 'QplotsquareJJJJ  YQplotsquare('(plotsquareQY  'QplotsquareJJJJ 'QplotsquareJJJ 'QplotsquareJJJJ [[JJplotsquareQ'  ",A+1,1
Text(0,A+11,sub("[[]]X[( |u[Î]]]?     [[ |u[Î]]]? [[.     .[[ |u[Î]]]? [[     |u[Î]]]? [[??Y[|u  ",A+1,1
End
{11,21,36,56,71,77
For(A,1,6
Line(Ans(A),0,Ans(A)+4,0
End
{31,42,51,62
For(A,1,4
Line(Ans(A),0,Ans(A)+1,0
End
⁻14
Line(2,Ans,36,Ans
Line(⁻Ans,2Ans,24,2Ans
{2,⁻Ans,26
For(A,1,3
Line(Ans(A),⁻22,Ans(A)+10,⁻22
End
26
Line(12,⁻24,12,⁻Ans
Line(Ans,⁻24,Ans,⁻Ans
⁻16
Line(0,Ans,0,⁻20
Line(38,Ans,38,⁻20
Line(⁻Ans,⁻12,19,⁻13
13
Line(22,⁻12,19,⁻Ans
Line(40,⁻Ans,40,⁻61
{1,15,37,15,1,21,37,21,Ans,23,25,23,Ans,27,25,27,15,Ans,23,Ans
For(A,1,10
Pt-On(Ans(2A-1),⁻Ans(2A
End
⁻12
Line(41,Ans,92,Ans
Line(41,Ymin,92,Ymin
Line(42,Ans,42,Ymin
Line(92,Ans,92,Ymin
DelVar [A]{8,8→dim([A]
For(A,1,8
For(B,1,8
randInt(1,7→[A](A,B
End
End
Repeat [A]=[B]
[A]→[B]
For(X,0,1
For(A,1,8
Matr►list([A],A,L₁
not(DeltaList(DeltaList(L₁³→L₁
For(B,1,6max(Ans
If L₁(B
Then

Repeat Ans≠[A](B+1,A
randInt(1,7→[A](B,A
End

End

End
End
[A]ᵀ→[A]
End
End
"[[i][[[(ẋXẋ(+([(+(X]X(°û[Q°J|u[|uJ(X[i][(→Str1
For(A,1,8
For(B,1,8
For(C,0,7
Text(7+6A,38+6B+C,sub(sub(Str1,5[A](A,B)-4,5)+"   ",C+1,1
End
Line(92,⁻12,92,Ymin
End
End

DelVar SDelVar T1→Z
1→θ
Repeat K=45
Line(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→K
If K
Then
Line(38+6Z,⁻7-6θ,42+6Z,⁻7-6θ,0
Line(38+6Z,⁻13-6θ,42+6Z,⁻13-6θ,0
Line(37+6Z,⁻8-6θ,37+6Z,⁻12-6θ,0
Line(43+6Z,⁻8-6θ,43+6Z,⁻12-6θ,0
End
If K=21
Then

If S and T and (Z=S or θ=T) and 2>abs(Z-S)+abs(θ-T
Then
Pt-Off(37+6S,⁻7-6T
Pt-Off(43+6S,⁻7-6T
Pt-Off(37+6S,⁻13-6T
Pt-Off(43+6S,⁻13-6T
[A](T,S→A
[A](θ,Z→[A](T,S
A→[A](θ,Z
"     
Text(7+6θ,38+6Z,Ans
Text(7+6T,38+6S,Ans
StorePic 1
For(C,0,7
Text(7+6θ,38+6Z+C,sub(sub(Str1,5[A](θ,Z)-4,5)+"   ",C+1,1
End
RecallPic 1
StorePic 1
For(C,0,7
Text(7+6T,38+6S+C,sub(sub(Str1,5[A](T,S)-4,5)+"   ",C+1,1
End
RecallPic 1
0→S
0→T

Else
If S and T
Then
Pt-Off(37+6S,⁻7-6T
Pt-Off(43+6S,⁻7-6T
Pt-Off(37+6S,⁻13-6T
Pt-Off(43+6S,⁻13-6T
End
Z→S
θ→T
Pt-On(37+6S,⁻7-6T
Pt-On(43+6S,⁻7-6T
Pt-On(37+6S,⁻13-6T
Pt-On(43+6S,⁻13-6T
End

End
Z+(K=26 and Z<8)-(K=24 and Z>1→Z
θ+(K=34 and θ<8)-(K=25 and θ>1→θ

End


Download attached. Tell me what you think!
Title: Re: Bejeweled 84+ progress thread
Post by: alexgt on July 17, 2015, 12:40:05 AM
Awesome! I want to try this out sometime when I have time :)
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 12:41:30 AM
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 ;)
Title: Re: Bejeweled 84+ progress thread
Post by: alexgt on July 17, 2015, 12:45:25 AM
Yeah, that will probably be implemented before I have time (if everything goes smoothly :P)
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 17, 2015, 02:58:11 AM
I'll try the latest version of your game soon :walrii:

EDIT: So I ended up not trying it much. I instead wanted to see how it would look like on the CE and unfortunately it seems that Text( has a gap at the top and bottom of the characters, not just the top, so there would be a space between characters:

(http://img.codewalr.us/jelebewed.png)

I multiplied text spaces a bit. And since the chars are a little different, the game might as well be themed as an horror version of Bejeweled and be renamed to Jelebewed. :P
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 03:42:12 AM
Quote from: DJ Omnimaga on July 17, 2015, 02:58:11 AM
I'll try the latest version of your game soon :walrii:

EDIT: So I ended up not trying it much. I instead wanted to see how it would look like on the CE and unfortunately it seems that Text( has a gap at the top and bottom of the characters, not just the top, so there would be a space between characters:

(http://img.codewalr.us/jelebewed.png)

I multiplied text spaces a bit. And since the chars are a little different, the game might as well be themed as an horror version of Bejeweled and be renamed to Jelebewed. :P
Huh. Interesting. I can actually make out each part of the graphics :P And yeah, I suspected the font would be different. Someone really needs to see how this kind of stuff would work on the CSE or CE, because that's something I wanna see (and, if I figure it out, maybe actually program on it :P ).
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 17, 2015, 03:46:18 AM
On the CE you could always draw twice as many characters and jump by 1 pixel instead of 2 for better quality, but speed would take a massive hit. I even think that the best would be to jump by 3 pixels intervals at the cost of quality for better speed. Perhaps that large fonts should be used.
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 17, 2015, 04:18:30 AM
Whoah, I'm suprised that workedout so well.O.O I gues you wouldnt have fancy text, but you could stilly play a game of bejeweled that looks fairly cool.
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 07:53:31 PM
Newer code STILL! After 3 days of work, it is now possible to actually match gems, and play like a regular Bejeweled game! Levels and points will come later ;)

(https://img.ourl.ca/Bejeweled84-3.gif)

Source code for the curious (I myself think it's messy, but it works! and well at that!):
G-T
Full
ClrDraw
AxesOff
ZStandard
104→Xmax
⁻72→Ymin
ZInteger
For(A,0,74
If A<11
Text(57,A+15,sub("?Y°﹢.﹢°Y?  ",A+1,1
If A<21
Text(52,A+10,sub("?Y'([i]ÎQJ'['JQÎ[i]('Y?  ",A+1,1
If A<25
Text(47,A+8,sub("﹢[s]!!]:XX.χ[i][i][i]χ.XX:]!![s]﹢  ",A+1,1
If A<28
Text(42,A+8,sub("  .Jẋûí[e]|u([s]:[s](|u[e]í[e]íJ.   ??  ",A+1,1
If A<41
Then
Text(37,A,sub("''?    Y'°°Y]|uQYYY? Y'°°°^Y'°°'Y1|uQYYY?  ",A+1,1
Text(32,A,sub(" plotsquare[[2JQ!Jplotsquare[e]plotsquareJ[e]plotsquareplotsquare[e]plotsquareJ plotsquare['??YÎJplotsquare[e]plotsquareplotsquare [e]plotsquareplotsquareûplotsquare2  ",A+1,1
Text(27,A,sub("JJJJJJJ.              ....          plotsquareí﹢  ",A+1,1
End
Text(5,A+11,sub("[[JJ[i]Q' 'QplotsquareJJJJ JJJplotsquareQ' 'QplotsquareJJJJ  YQplotsquare('(plotsquareQY  'QplotsquareJJJJ 'QplotsquareJJJ 'QplotsquareJJJJ [[JJplotsquareQ'  ",A+1,1
Text(0,A+11,sub("[[]]X[( |u[Î]]]?     [[ |u[Î]]]? [[.     .[[ |u[Î]]]? [[     |u[Î]]]? [[??Y[|u  ",A+1,1
End
{11,21,36,56,71,77
For(A,1,6
Line(Ans(A),0,Ans(A)+4,0
End
{31,42,51,62
For(A,1,4
Line(Ans(A),0,Ans(A)+1,0
End
14
Line(2,⁻Ans,36,⁻Ans
Line(Ans,⁻30,24,⁻30
{2,Ans,26
For(A,1,3
Line(Ans(A),⁻22,Ans(A)+10,⁻22
End
12
Line(Ans,⁻2Ans,Ans,⁻28
Line(26,⁻2Ans,26,⁻28
⁻16
Line(0,Ans,0,⁻20
Line(38,Ans,38,⁻20
Line(⁻Ans,⁻12,19,⁻13
13
Line(22,⁻12,19,⁻Ans
Line(40,⁻Ans,40,⁻61
{1,15,37,15,1,21,37,21,Ans,23,25,23,Ans,29,25,29,15,Ans,23,Ans
For(A,1,10
Pt-On(Ans(2A-1),⁻Ans(2A
End
⁻12
Line(41,Ans,92,Ans
Line(41,Ymin,92,Ymin
Line(42,Ans,42,Ymin
Line(92,Ans,92,Ymin
StorePic 2
Text(25,49,"Generating
Text(31,44,"board...please
Text(37,48,"be patient...
DelVar [A]{8,8→dim([A]
For(A,1,8
For(B,1,8
randInt(1,7→[A](A,B
End
End
Repeat [A]=[B]
[A]→[B]
For(X,0,1
For(A,1,8
Matr►list([A],A,L₁
not(DeltaList(DeltaList(L₁³→L₁
For(B,1,6max(Ans
If L₁(B
Then
Repeat Ans≠[A](B+1,A
randInt(1,7→[A](B,A
End
End
End
End
[A]ᵀ→[A]
End
End
"[[i][[[(ẋXẋ(+([(+(X]X(°û[Q°J|u[|uJ(X[i][(→Str1
For(A,1,8
For(B,1,8
For(C,0,7
Text(7+6A,38+6B+C,sub(sub(Str1,5[A](A,B)-4,5)+"   ",C+1,1
End
Line(92,⁻12,92,Ymin
End
End
DelVar SDelVar T1→Z
1→θ
Repeat K=45
Line(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→K
If K
Then
Line(38+6Z,⁻7-6θ,42+6Z,⁻7-6θ,0
Line(38+6Z,⁻13-6θ,42+6Z,⁻13-6θ,0
Line(37+6Z,⁻8-6θ,37+6Z,⁻12-6θ,0
Line(43+6Z,⁻8-6θ,43+6Z,⁻12-6θ,0
End
If K=21
Then
If S and T and (Z=S or θ=T) and 2>abs(Z-S)+abs(θ-T
Then
Pt-Off(37+6S,⁻7-6T
Pt-Off(43+6S,⁻7-6T
Pt-Off(37+6S,⁻13-6T
Pt-Off(43+6S,⁻13-6T
[A](T,S→A
[A](θ,Z→[A](T,S
DelVar FDelVar NA→[A](θ,Z
Repeat not(M
DelVar M[A]→[B]
For(X,0,1
For(A,1,8
Matr►list([A],A,L₁
not(DeltaList(DeltaList(L₁³→L₁
For(B,1,6max(L₁
If L₁(B
Then
1→M
1→N
For(C,0,2
{B+C,A
If X
{A,B+C
Text(7+6Ans(1),38+6Ans(2),"     
0→[B](Ans(1),Ans(2
End
End
End
End
[A]ᵀ→[A]
End
If M
Then
[B]→[A]
If not(F
Then
For(X,0,1
{T,S
If X
{θ,Z
Text(7+6Ans(1),38+6Ans(2),"     
StorePic 1
For(C,0,7
If [A](Ans(1),Ans(2
Text(7+6Ans(1),38+6Ans(2)+C,sub(sub(Str1,5[A](Ans(1),Ans(2))-4,5)+"   ",C+1,1
End
RecallPic 1
End
1→F
End
For(A,1,8
Matr►list([A],A,L₁
DelVar O1→D
Repeat 8=sum(L₁=L₂
L₁→L₂
9→B
Repeat B<3 or not(L₁(B
B-1→B
End
If not(L₁(B
Then
max(B,D→D
For(C,B,2,⁻1
L₁(C-1→L₁(C
End
0→L₁(1
End
End
For(B,1,D
If not(L₁(B
Then
1→O
randInt(1,7→L₁(B
End
End
If O
Then
List►matr(L₁,[B]
rowSwap(augment([A],[B])ᵀ,A,9)ᵀ→[A]
{8,8→dim([A]
For(B,D,1,⁻1
Text(7+6B,38+6A,"     
StorePic 1
For(C,0,7
Text(7+6B,38+6A+C,sub(sub(Str1,5[A](B,A)-4,5)+"   ",C+1,1
End
RecallPic 1
End
End
End
Else
If not(N
Then
[A](T,S→A
[A](θ,Z→[A](T,S
A→[A](θ,Z
End
End
End
DelVar SDelVar T
Else
If S and T
Then
Pt-Off(37+6S,⁻7-6T
Pt-Off(43+6S,⁻7-6T
Pt-Off(37+6S,⁻13-6T
Pt-Off(43+6S,⁻13-6T
End
Z→S
θ→T
Pt-On(37+6S,⁻7-6T
Pt-On(43+6S,⁻7-6T
Pt-On(37+6S,⁻13-6T
Pt-On(43+6S,⁻13-6T
End
End
Z+(K=26 and Z<8)-(K=24 and Z>1→Z
θ+(K=34 and θ<8)-(K=25 and θ>1→θ
End


Download attached. Tell me what you think! Also, test this to your heart's content, as this now has the main game mechanics!
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 17, 2015, 08:03:28 PM
Woo for progress! :D will there be a CE version coming?
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 08:05:37 PM
Quote from: Unicorn on July 17, 2015, 08:03:28 PM
Woo for progress! :D will there be a CE version coming?
I 1. have no CE and probably won't for a while, and 2. have no idea how to do those textsprite graphics with its different font :P . Sorry.
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 17, 2015, 09:21:14 PM
But that thing dj did... You could test it out using a CSE emu, and have someone test it on calc for you.
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 09:50:50 PM
Quote from: Unicorn on July 17, 2015, 09:21:14 PM
But that thing dj did... You could test it out using a CSE emu, and have someone test it on calc for you.
I have a CSE, just not a CE. And even his thingy didn't look right. Besides, some gems looked too similar on the CSE for some reason (almost leading me to believe there were matches right away on that board). Maybe sometime later, but it won't be soon. And even if I don't, you still have Bejeweled CSE (i.e. the reason I'm making Bejeweled 84+ :P )
Title: Re: Bejeweled 84+ progress thread
Post by: CKH4 on July 17, 2015, 09:58:12 PM
If you're OK with it I might try to convert the tile drawing to xlib. The speed would be much better (I think) but it would probably be larger. The new version looks really nice though, I can't wait to play it.
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 10:05:36 PM
Quote from: CKH4 on July 17, 2015, 09:58:12 PM
If you're OK with it I might try to convert the tile drawing to xlib. The speed would be much better (I think) but it would probably be larger. The new version looks really nice though, I can't wait to play it.
Do whatever you like with the code, just don't claim it as entirely yours :P
Title: Re: Bejeweled 84+ progress thread
Post by: CKH4 on July 17, 2015, 10:07:53 PM
Oh yeah, I'd never do that. Preferably I'd send you the code and you could do what you like with it. Anyways good luck.
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 10:09:37 PM
Quote from: CKH4 on July 17, 2015, 10:07:53 PM
Oh yeah, I'd never do that. Preferably I'd send you the code and you could do what you like with it. Anyways good luck.
You too, if I understood you correctly.

Now to work on scoring (and a side project I'm doing that ISN'T a game, called "Glitch Busters". More on that later.)
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 17, 2015, 10:13:22 PM
Quote from: JWinslow23 on July 17, 2015, 08:05:37 PM
Quote from: Unicorn on July 17, 2015, 08:03:28 PM
Woo for progress! :D will there be a CE version coming?
I 1. have no CE and probably won't for a while, and 2. have no idea how to do those textsprite graphics with its different font :P . Sorry.
Pure BASIC programs on the CSE are entirely compatible with the CE, they're just faster. If you have a CSE then you can easily make a CE version if you want to.

ALso I downloaded the new version :)
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 17, 2015, 10:17:13 PM
Quote from: DJ Omnimaga on July 17, 2015, 10:13:22 PM
Quote from: JWinslow23 on July 17, 2015, 08:05:37 PM
Quote from: Unicorn on July 17, 2015, 08:03:28 PM
Woo for progress! :D will there be a CE version coming?
I 1. have no CE and probably won't for a while, and 2. have no idea how to do those textsprite graphics with its different font :P . Sorry.
Pure BASIC programs on the CSE are entirely compatible with the CE, they're just faster. If you have a CSE then you can easily make a CE version if you want to.

ALso I downloaded the new version :)
Well, there's still the problem of the different font and coordinates :P

And glad you did. Soon I'll add levels and points! (you'll notice that I made the second box in the score section bigger, because I have reservations about making this number 3pxl high)
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 17, 2015, 10:53:34 PM
Yeah I wish that sending 84+ programs to a color calc automatically changed the coordinates like on the Casio PRIZM. It would not have to be entirely similar, though. Maybe I could attempt porting it or something at one point?
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 17, 2015, 11:09:31 PM
Quote from: DJ Omnimaga on July 17, 2015, 10:53:34 PM
Yeah I wish that sending 84+ programs to a color calc automatically changed the coordinates like on the Casio PRIZM. It would not have to be entirely similar, though. Maybe I could attempt porting it or something at one point?
That could be cool. We could have a contest between bejewelds. :P
Title: Re: Bejeweled 84+ progress thread
Post by: alexgt on July 17, 2015, 11:36:50 PM
Quote from: JWinslow23 on July 17, 2015, 10:09:37 PM
Quote from: CKH4 on July 17, 2015, 10:07:53 PM
Oh yeah, I'd never do that. Preferably I'd send you the code and you could do what you like with it. Anyways good luck.
You too, if I understood you correctly.

Now to work on scoring (and a side project I'm doing that ISN'T a game, called "Glitch Busters". More on that later.)
Glitch Busters?!
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 18, 2015, 01:28:10 AM
Quote from: DJ Omnimaga on July 17, 2015, 10:53:34 PM
Yeah I wish that sending 84+ programs to a color calc automatically changed the coordinates like on the Casio PRIZM. It would not have to be entirely similar, though. Maybe I could attempt porting it or something at one point?
You can! Go right ahead!
Quote from: Unicorn on July 17, 2015, 11:09:31 PM
That could be cool. We could have a contest between bejewelds. :P
Haha yeah. For graphics and speed in the BASIC Bejeweleds, Unknownloner's beats mine. But for the pureness of the BASICs, mine wins so far :P

Quote from: alexgt on July 17, 2015, 11:36:50 PM
Quote from: JWinslow23 on July 17, 2015, 10:09:37 PM
Quote from: CKH4 on July 17, 2015, 10:07:53 PM
Oh yeah, I'd never do that. Preferably I'd send you the code and you could do what you like with it. Anyways good luck.
You too, if I understood you correctly.

Now to work on scoring (and a side project I'm doing that ISN'T a game, called "Glitch Busters". More on that later.)
Glitch Busters?!
Stay tuned ;)
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 18, 2015, 02:29:59 AM
Yeah I thought it was cool that you managed to get such speed in pure BASIC. I am curious if a similar game could be made using dual-layer or even triple-layer ASCII sprites? Because it would be even faster.
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 18, 2015, 02:30:43 AM
Quote from: DJ Omnimaga on July 18, 2015, 02:29:59 AM
Yeah I thought it was cool that you managed to get such speed in pure BASIC. I am curious if a similar game could be made using dual-layer or even triple-layer ASCII sprites? Because it would be even faster.
Mayhaps those sprites could be designed? I'd love to see that
Title: Re: Bejeweled 84+ progress thread
Post by: unknownloner on July 18, 2015, 02:33:38 AM
BTW I will be porting the Bejeweled CSE to CE in pure BASIC, I just need to test out a larger tile size because they're too small right now.

On the topic of this version, the title screen animation actually looks really cool! I think it might get annoying waiting for it every time though. You planning to add a setting to disable it?
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 18, 2015, 02:36:48 AM
Quote from: unknownloner on July 18, 2015, 02:33:38 AM
BTW I will be porting the Bejeweled CSE to CE in pure BASIC, I just need to test out a larger tile size because they're too small right now.

On the topic of this version, the title screen animation actually looks really cool! I think it might get annoying waiting for it every time though. You planning to add a setting to disable it?
It's not an animation. It is the actual process of drawing it. If you don't do that, then there will be no Bejeweled logo, and no Popcap logo and jewel. If I get rid of that method of drawing, I can even kiss the GEMS goodbye :P

Google "ti basic text sprites".
Title: Re: Bejeweled 84+ progress thread
Post by: unknownloner on July 18, 2015, 02:37:12 AM
I know it's the actual process of drawing it. It's still an animation ;). Just like the "falling animation" in my BASIC version is just the process of redrawing tiles when they move.
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 18, 2015, 02:39:38 AM
Quote from: unknownloner on July 18, 2015, 02:37:12 AM
I know it's the actual process of drawing it. It's still an animation ;)
Well, it's an animation, but it's required to draw it in the first place. If I want to do it in the "purest of BASIC" (which I do), I have to do that. I find it annoying, too, though, I agree with you.
Title: Re: Bejeweled 84+ progress thread
Post by: unknownloner on July 18, 2015, 02:40:12 AM
My point was that the animation you're forced to use looks really cool :P
Though technically you don't _have_ to do it for the logo, we do have pic vars in pure BASIC.
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 18, 2015, 02:43:30 AM
Quote from: JWinslow23 on July 18, 2015, 02:30:43 AM
Quote from: DJ Omnimaga on July 18, 2015, 02:29:59 AM
Yeah I thought it was cool that you managed to get such speed in pure BASIC. I am curious if a similar game could be made using dual-layer or even triple-layer ASCII sprites? Because it would be even faster.
Mayhaps those sprites could be designed? I'd love to see that
There is a tool on Omnimaga called Tile Finder, by Builderboy, that lets you find character combinations. You can choose if you want the two ASCII chars aligned or the second one offset by 1 pixel to the right. To find combinations, you draw a sprite yourself, then it will find the closest possible matches. But you need Java to run it:

http://www.omnimaga.org/files/Our-TI-PC-Products-Music-and-Calculator-Videos/Our-TI-programs-and-utilities/TileFinder.zip

(http://img.ourl.ca/duallayer.gif)
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 18, 2015, 02:48:11 AM
Quote from: unknownloner on July 18, 2015, 02:40:12 AM
My point was that the animation you're forced to use looks really cool :P
Though technically you don't _have_ to do it for the logo, we do have pic vars in pure BASIC.
I want to not have to use Pic variables. They could easily get overwritten by other programs. Plus, I'm already using Pic variables to help with textsprites.
Quote from: DJ Omnimaga on July 18, 2015, 02:43:30 AM
Quote from: JWinslow23 on July 18, 2015, 02:30:43 AM
Quote from: DJ Omnimaga on July 18, 2015, 02:29:59 AM
Yeah I thought it was cool that you managed to get such speed in pure BASIC. I am curious if a similar game could be made using dual-layer or even triple-layer ASCII sprites? Because it would be even faster.
Mayhaps those sprites could be designed? I'd love to see that
There is a tool on Omnimaga called Tile Finder, by Builderboy, that lets you find character combinations. You can choose if you want the two ASCII chars aligned or the second one offset by 1 pixel to the right. To find combinations, you draw a sprite yourself, then it will find the closest possible matches. But you need Java to run it:

http://www.omnimaga.org/files/Our-TI-PC-Products-Music-and-Calculator-Videos/Our-TI-programs-and-utilities/TileFinder.zip

(http://img.ourl.ca/duallayer.gif)
Alright. I'll be sure to use it. :)
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 18, 2015, 03:06:17 AM
If you don't want to use any picture variable, then forget about dual-layer ASCII then, because it requires the use of a picture during rendering (to recall the first layer on top of the second). Unless you mean you don't want to use pre-rendered pictures? I think temporary pictures are fine since they can help speeding things up a lot by redrawing graphics that you rendered faster when they get erased.

Anyway good luck with whatever you decide :)
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 18, 2015, 03:28:06 AM
Quote from: DJ Omnimaga on July 18, 2015, 03:06:17 AM
If you don't want to use any picture variable, then forget about dual-layer ASCII then, because it requires the use of a picture during rendering (to recall the first layer on top of the second). Unless you mean you don't want to use pre-rendered pictures? I think temporary pictures are fine since they can help speeding things up a lot by redrawing graphics that you rendered faster when they get erased.

Anyway good luck with whatever you decide :)
I already have temporary pictures. They are required to have any feasible speed with textsprites without redrawing EVERYTHING to the right. I just don't want pre rendered ones is all. I'm fine with dual-layer ASCII.
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 18, 2015, 04:03:53 AM
I get what you mean with the pre rendered  pic vars. Things could get messy :}
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 18, 2015, 04:34:46 AM
Quote from: JWinslow23 on July 18, 2015, 03:28:06 AM
Quote from: DJ Omnimaga on July 18, 2015, 03:06:17 AM
If you don't want to use any picture variable, then forget about dual-layer ASCII then, because it requires the use of a picture during rendering (to recall the first layer on top of the second). Unless you mean you don't want to use pre-rendered pictures? I think temporary pictures are fine since they can help speeding things up a lot by redrawing graphics that you rendered faster when they get erased.

Anyway good luck with whatever you decide :)
I already have temporary pictures. They are required to have any feasible speed with textsprites without redrawing EVERYTHING to the right. I just don't want pre rendered ones is all. I'm fine with dual-layer ASCII.
Ah that's good then. Temporary pictures are truly handy.
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 20, 2015, 12:53:41 AM
Bump.

This is almost a full game now! I just need to optimize some stuff (maybe) and add game saving. :)

Any testers of this new game are welcome. I tried a bold font on the Game Over (or, more correctly, "NO MORE MOVES") screen (but it's not in the screenie), hope it looks cool.

(http://img.ourl.ca/Bejeweled84-4.gif)

Source code for the curious absolutely insane:
G-T
Full
ClrDraw
AxesOff
ZStandard
104→Xmax
⁻72→Ymin
ZInteger
For(A,0,74
If A<11
Text(51,A+15,sub("?Y°﹢.﹢°Y?  ",A+1,1
If A<21
Text(46,A+10,sub("?Y'([i]ÎQJ'['JQÎ[i]('Y?  ",A+1,1
If A<25
Text(41,A+8,sub("﹢[s]!!]:XX.χ[i][i][i]χ.XX:]!![s]﹢  ",A+1,1
If A<22
Text(36,A+8,sub("  .Jí[e]í[e]|u([s]:[s](|u[e]í[e]íJ. ",A+1,1
Text(5,A+11,sub("[[JJ[i]Q' 'QplotsquareJJJJ JJJplotsquareQ' 'QplotsquareJJJJ  YQplotsquare('(plotsquareQY  'QplotsquareJJJJ 'QplotsquareJJJ 'QplotsquareJJJJ [[JJplotsquareQ'  ",A+1,1
Text(0,A+11,sub("[[]]X[( |u[Î]]]?     [[ |u[Î]]]? [[.     .[[ |u[Î]]]? [[     |u[Î]]]? [[??Y[|u  ",A+1,1
End
{11,21,36,56,71,77
For(A,1,6
Line(Ans(A),0,Ans(A)+4,0
End
{31,42,51,62
For(A,1,4
Line(Ans(A),0,Ans(A)+1,0
End
14
Line(2,⁻Ans,36,⁻Ans
Line(Ans,⁻30,24,⁻30
{2,Ans,26
For(A,1,3
Line(Ans(A),⁻22,Ans(A)+10,⁻22
End
12
Line(Ans,⁻2Ans,Ans,⁻28
Line(26,⁻2Ans,26,⁻28
⁻16
Line(0,Ans,0,⁻20
Line(38,Ans,38,⁻20
Line(⁻Ans,⁻12,19,⁻13
13
Line(22,⁻12,19,⁻Ans
Line(40,⁻Ans,40,⁻61
{1,15,1,21,37,21,Ans,23,Ans,29,25,29,15,Ans,23,Ans
For(A,1,8
Pt-On(Ans(2A-1),⁻Ans(2A
End
⁻12
Line(41,Ans,92,Ans
Line(41,Ymin,92,Ymin
Line(42,Ans,42,Ymin
Line(92,Ans,92,Ymin
"[[i][[[(ẋXẋ(+([(+(X]X(°û[Q°J|u[|uJ(X[i][(→Str1
DelVar PDelVar V30→E
StorePic 2
Lbl A
DelVar FRecallPic 2
Text(15,2,P
Pt-On(37,⁻15
Text(23,14,V
Pt-On(25,⁻23
Text(25,49,"Generating
Text(31,44,"board...please
Text(37,48,"be patient...
DelVar [A]{8,8→dim([A]
For(A,1,8
For(B,1,8
randInt(1,7→[A](A,B
End
End
Repeat [A]=[B]
[A]→[B]
For(X,0,1
For(A,1,8
Matr►list([A],A,L₁
not(DeltaList(DeltaList(L₁³→L₁
For(B,1,6max(Ans
If L₁(B
Then
Repeat Ans≠[A](B+1,A
randInt(1,7→[A](B,A
End
End
End
End
[A]ᵀ→[A]
End
End
For(A,1,8
For(B,1,8
For(C,0,7
Text(7+6A,38+6B+C,sub(sub(Str1,5[A](A,B)-4,5)+"   ",C+1,1
End
Line(92,⁻12,92,Ymin
End
End
DelVar SDelVar T1→Z
Ans→θ
DelVar L₁→W
Repeat K=45 or F≥E or L=15 and F<E
Line(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→K
If Ans
Then
Line(38+6Z,⁻7-6θ,42+6Z,⁻7-6θ,0
Line(38+6Z,⁻13-6θ,42+6Z,⁻13-6θ,0
Line(37+6Z,⁻8-6θ,37+6Z,⁻12-6θ,0
Line(43+6Z,⁻8-6θ,43+6Z,⁻12-6θ,0
End
If Ans=21
Then
If S and T and (Z=S or θ=T) and 2>abs(Z-S)+abs(θ-T
Then
Pt-Off(37+6S,⁻7-6T
Pt-Off(43+6S,⁻7-6T
Pt-Off(37+6S,⁻13-6T
Pt-Off(43+6S,⁻13-6T
[A](T,S→A
[A](θ,Z→[A](T,S
DelVar GDelVar NA→[A](θ,Z
Repeat not(M
DelVar M[A]→[B]
For(X,0,1
For(A,1,8
Matr►list([A],A,L₁
not(DeltaList(DeltaList(L₁³→L₁
For(B,1,6max(L₁
If L₁(B
Then
P+(3^M+2N+2→P
Text(15,2,P
Pt-On(37,⁻15
F+(3^M+2N+2→F
Line(41,⁻62,41,⁻62+min(49,49F/E
N+not(M→N
M+1→M
For(C,0,2
{B+C,A
If X
{A,B+C
Text(7+6Ans(1),38+6Ans(2),"     
0→[B](Ans(1),Ans(2
End
End
End
End
[A]ᵀ→[A]
End
If M
Then
1→W
[B]→[A]
If not(G
Then
For(X,0,1
{T,S
If X
{θ,Z
Text(7+6Ans(1),38+6Ans(2),"     
StorePic 1
For(C,0,7
If [A](Ans(1),Ans(2
Text(7+6Ans(1),38+6Ans(2)+C,sub(sub(Str1,5[A](Ans(1),Ans(2))-4,5)+"   ",C+1,1
End
RecallPic 1
End
1→G
End
For(A,1,8
Matr►list([A],A,L₁
DelVar O1→D
Repeat 8=sum(L₁=L₂
L₁→L₂
9→B
Repeat B<3 or not(L₁(B
B-1→B
End
If not(L₁(B
Then
max(B,D→D
For(C,B,2,⁻1
L₁(C-1→L₁(C
End
0→L₁(1
End
End
For(B,1,D
If not(L₁(B
Then
1→O
randInt(1,7→L₁(B
End
End
If O
Then
List►matr(L₁,[B]
rowSwap(augment([A],[B])ᵀ,A,9)ᵀ→[A]
{8,8→dim([A]
For(B,D,1,⁻1
Text(7+6B,38+6A,"     
StorePic 1
For(C,0,7
Text(7+6B,38+6A+C,sub(sub(Str1,5[A](B,A)-4,5)+"   ",C+1,1
End
RecallPic 1
End
End
End
Else
If not(N
Then
[A](T,S→A
[A](θ,Z→[A](T,S
A→[A](θ,Z
End
End
End
DelVar SDelVar T
Else
If S and T
Then
Pt-Off(37+6S,⁻7-6T
Pt-Off(43+6S,⁻7-6T
Pt-Off(37+6S,⁻13-6T
Pt-Off(43+6S,⁻13-6T
End
Z→S
θ→T
Pt-On(37+6S,⁻7-6T
Pt-On(43+6S,⁻7-6T
Pt-On(37+6S,⁻13-6T
Pt-On(43+6S,⁻13-6T
End
End
Z+(K=26 and Z<8)-(K=24 and Z>1→Z
θ+(K=34 and θ<8)-(K=25 and θ>1→θ
If W and F<E
DelVar I1→L
If L and L<16
Then
Matr►list([A],1,L₂
For(A,2,8
L₂→L₁
Matr►list([A],A,L₂
.1(10^L₁+10^L₂)(L₁≠L₂
{0,0,sum(Ans,1,3),sum(Ans,2,4),sum(Ans,3,5),sum(Ans,4,6),sum(Ans,5,7),sum(Ans,6,8
If .3≤max(max(fPart(Ans10^⁻L₁),fPart(Ans10^⁻L₂))) or max(.3010299957=abs(DeltaList(log(abs(DeltaList(DeltaList(10^L₁
Then
16→L
8→A
Else
L+1→L
End
End
If L=16 and I or L≠16
[A]ᵀ→[A]
L≠16→I
End
not(L→W
If L=15 and F<E
Then
ClrDraw
RecallPic 2
Text(15,2,P
Pt-On(37,⁻15
Text(23,14,V
Pt-On(25,⁻23
For(X,0,1
Text(⁻1,21,X+47,"NO MORE
Text(⁻1,29,X+53,"MOVES
If not(X
StorePic 1
End
RecallPic 1
Text(37,49,"Press ENTER
Pause
DelVar PDelVar V30→E
End
End
ClrDraw
V+(F≥E→V
E+15(F≥E→E
If K≠45
Goto A


Download here (http://www.cemetech.net/programs/index.php?mode=file&id=1332). Tell me what you think, and please notify me of any bugs, glitches, or feature suggestions!
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 20, 2015, 01:56:08 AM
Awesome! But you screenshot is messed up x.x
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 20, 2015, 02:00:09 AM
Quote from: Unicorn on July 20, 2015, 01:56:08 AM
Awesome! But you screenshot is messed up x.x
How? Is it just because it's from img.ourl.ca ?
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 20, 2015, 02:53:34 AM
Hmm it works for me on my kindle. Must have been the iphone I was using. Anyways, it looks very very nice, and pretty fast! :)
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 20, 2015, 02:54:11 AM
Quote from: Unicorn on July 20, 2015, 02:53:34 AM
Hmm it works for me on my kindle. Must have been the iphone I was using. Anyways, it looks very very nice, and pretty fast! :)
Thanks. :)
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 20, 2015, 05:40:03 AM
It works fine for me, and I can't wait to try the game. I downloaded it but I won't be able to play now since I'm going to bed soon.
Title: Re: Bejeweled 84+ progress thread
Post by: alexgt on July 20, 2015, 02:05:23 PM
This si amazing that it is in basic O.O, It is lighting for ti basic O.O great job O.O
Title: Re: Bejeweled 84+ progress thread
Post by: Duke "Tape" Eiyeron on July 20, 2015, 03:42:47 PM
It's pretty good for TI-Basic, I have to agree! Nice work!
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 20, 2015, 07:11:24 PM
Quote from: alexgt on July 20, 2015, 02:05:23 PM
This si amazing that it is in basic O.O, It is lighting for ti basic O.O great job O.O
Well, I wouldn't say "lightning" :P But thank you so much!
Quote from: Duke "Tape" Eiyeron on July 20, 2015, 03:42:47 PM
It's pretty good for TI-Basic, I have to agree! Nice work!
Heh, thanks again. :)
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 20, 2015, 11:32:59 PM
Bump.

This should be the finished product right here! I implemented saving games, as well as restarting your current level and restarting your entire game. There's also a logo for DoorsCS7!

(https://img.ourl.ca/Bejeweled84-5.gif)

Source code for the curious masochist:
:"Bejeweled 84+
:"000007E01DB82A5477EE742EE3C797E977EE3BDC1BD80DB005A0024001800000
G-T
Full
ClrDraw
AxesOff
ZStandard
104→Xmax
⁻72→Ymin
ZInteger
For(A,0,74
If A<11
Text(51,A+15,sub("?Y°﹢.﹢°Y?  ",A+1,1
If A<21
Text(46,A+10,sub("?Y'([i]ÎQJ'['JQÎ[i]('Y?  ",A+1,1
If A<25
Text(41,A+8,sub("﹢[s]!!]:XX.χ[i][i][i]χ.XX:]!![s]﹢  ",A+1,1
If A<22
Text(36,A+8,sub("  .Jí[e]í[e]|u([s]:[s](|u[e]í[e]íJ. ",A+1,1
Text(5,A+11,sub("[[JJ[i]Q' 'QplotsquareJJJJ JJJplotsquareQ' 'QplotsquareJJJJ  YQplotsquare('(plotsquareQY  'QplotsquareJJJJ 'QplotsquareJJJ 'QplotsquareJJJJ [[JJplotsquareQ'  ",A+1,1
Text(0,A+11,sub("[[]]X[( |u[Î]]]?     [[ |u[Î]]]? [[.     .[[ |u[Î]]]? [[     |u[Î]]]? [[??Y[|u  ",A+1,1
End
{11,21,36,56,71,77
For(A,1,6
Line(Ans(A),0,Ans(A)+4,0
End
{31,42,51,62
For(A,1,4
Line(Ans(A),0,Ans(A)+1,0
End
14
Line(2,⁻Ans,36,⁻Ans
Line(Ans,⁻30,24,⁻30
{2,Ans,26
For(A,1,3
Line(Ans(A),⁻22,Ans(A)+10,⁻22
End
12
Line(Ans,⁻2Ans,Ans,⁻28
Line(26,⁻2Ans,26,⁻28
⁻16
Line(0,Ans,0,⁻20
Line(38,Ans,38,⁻20
Line(⁻Ans,⁻12,19,⁻13
13
Line(22,⁻12,19,⁻Ans
Line(40,⁻Ans,40,⁻61
{1,15,1,21,37,21,Ans,23,Ans,29,25,29,15,Ans,23,Ans
For(A,1,8
Pt-On(Ans(2A-1),⁻Ans(2A
End
⁻12
Line(41,Ans,92,Ans
Line(41,Ymin,92,Ymin
Line(42,Ans,42,Ymin
Line(92,Ans,92,Ymin
"[[i][[[(ẋXẋ(+([(+(X]X(°û[Q°J|u[|uJ(X[i][(→Str1
SetUpEditor BJWL
If 4=dim(ʟBJWL
Then
ʟBJWL(1→V
ʟBJWL(2→P
ʟBJWL(3→F
ʟBJWL(4→E
Else
DelVar FDelVar PDelVar V30→E
4→dim(ʟBJWL
E→ʟBJWL(4
End
7^cumSum(binomcdf(7,0→L₃
StorePic 2
Lbl A
RecallPic 2
Text(15,2,P+F
Pt-On(37,⁻15
Text(23,14,V
Pt-On(25,⁻23
Line(41,⁻62,41,⁻62+min(49,49F/E
Text(25,49,"Generating
Text(31,44,"board...please
Text(37,48,"be patient...
DelVar [A]{8,8→dim([A]
List►matr(10^(1+iPart(7fPart(randL₃))),10^(1+iPart(7fPart(randL₃))),10^(1+iPart(7fPart(randL₃))),10^(1+iPart(7fPart(randL₃))),10^(1+iPart(7fPart(randL₃))),10^(1+iPart(7fPart(randL₃))),10^(1+iPart(7fPart(randL₃))),10^(1+iPart(7fPart(randL₃))),[A]
Repeat [A]=[B]
[A]→[B]
For(X,0,1
For(A,1,8
Matr►list([A],A,L₁
not(DeltaList(DeltaList(L₁→L₁
For(B,1,6max(Ans
If L₁(B
Then
Repeat Ans≠[A](B+1,A
10^randInt(1,7→[A](B,A
End
End
End
End
[A]ᵀ→[A]
End
End
For(A,1,8
For(B,1,8
For(C,0,7
Text(7+6A,38+6B+C,sub(sub(Str1,5log([A](A,B))-4,5)+"   ",C+1,1
End
Line(92,⁻12,92,Ymin
End
End
DelVar LDelVar SDelVar T1→Z
1→θ
1→W
Repeat F≥E or L=15 and F<E or sum(K={22,23,45
Line(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→K
If Ans
Then
Line(38+6Z,⁻7-6θ,42+6Z,⁻7-6θ,0
Line(38+6Z,⁻13-6θ,42+6Z,⁻13-6θ,0
Line(37+6Z,⁻8-6θ,37+6Z,⁻12-6θ,0
Line(43+6Z,⁻8-6θ,43+6Z,⁻12-6θ,0
End
If Ans=23
DelVar FDelVar PDelVar V30→E
If K=22
DelVar F
If K=21
Then
If S and T and (Z=S or θ=T) and 2>abs(Z-S)+abs(θ-T
Then
Pt-Off(37+6S,⁻7-6T
Pt-Off(43+6S,⁻7-6T
Pt-Off(37+6S,⁻13-6T
Pt-Off(43+6S,⁻13-6T
[A](T,S→A
[A](θ,Z→[A](T,S
DelVar GDelVar NA→[A](θ,Z
Repeat not(M
DelVar M[A]→[B]
For(X,0,1
For(A,1,8
Matr►list([A],A,L₁
not(DeltaList(DeltaList(L₁→L₁
For(B,1,6max(Ans
If L₁(B
Then
3^M+2N+2+F→F
Line(41,⁻62,41,⁻62+min(49,49Ans/E
If P+Ans≥ᴇ9
ᴇ9-1-P→F
Text(15,2,P+Ans
Pt-On(37,⁻15
N+not(M→N
M+1→M
For(C,0,2
{B+C,A
If X
{A,B+C
Text(7+6Ans(1),38+6Ans(2),"     
0→[B](Ans(1),Ans(2
End
End
End
End
[A]ᵀ→[A]
End
If M
Then
1→W
[B]→[A]
If not(G
Then
For(X,0,1
{T,S
If X
{θ,Z
Text(7+6Ans(1),38+6Ans(2),"     
StorePic 1
For(C,0,7
If [A](Ans(1),Ans(2
Text(7+6Ans(1),38+6Ans(2)+C,sub(sub(Str1,5log([A](Ans(1),Ans(2)))-4,5)+"   ",C+1,1
End
RecallPic 1
End
1→G
End
For(A,1,8
Matr►list([A],A,L₁
If not(min(L₁
Then
DelVar DDelVar L₂8→dim(L₂
8→C
For(B,1,8
L₁(9-B
If Ans
Then
Ans→L₂(C
C-1→C
End
If not(L₁(B
B→D
End
List►matr(L₂+10^(1+iPart(7fPart(randL₃)))not(L₂),[B]
rowSwap(augment([A],[B])ᵀ,A,9)ᵀ→[A]
{8,8→dim([A]
For(B,D,1,⁻1
Text(7+6B,38+6A,"     
StorePic 1
For(C,0,7
Text(7+6B,38+6A+C,sub(sub(Str1,5log([A](B,A))-4,5)+"   ",C+1,1
End
RecallPic 1
End
End
End
Else
If not(N
Then
[A](T,S→A
[A](θ,Z→[A](T,S
A→[A](θ,Z
End
End
End
DelVar SDelVar T
Else
If S and T
Then
Pt-Off(37+6S,⁻7-6T
Pt-Off(43+6S,⁻7-6T
Pt-Off(37+6S,⁻13-6T
Pt-Off(43+6S,⁻13-6T
End
Z→S
θ→T
Pt-On(37+6S,⁻7-6Ans
Pt-On(43+6S,⁻7-6Ans
Pt-On(37+6S,⁻13-6Ans
Pt-On(43+6S,⁻13-6Ans
End
End
Z+(K=26 and Z<8)-(K=24 and Z>1→Z
θ+(K=34 and θ<8)-(K=25 and θ>1→θ
If W and F<E
DelVar I1→L
If L and L<16
Then
Matr►list([A],1,L₂
For(A,2,8
L₂→L₁
Matr►list([A],A,L₂
.1(L₁+L₂)(L₁≠L₂
{0,0,sum(Ans,1,3),sum(Ans,2,4),sum(Ans,3,5),sum(Ans,4,6),sum(Ans,5,7),sum(Ans,6,8
If .3≤max(max(fPart(Ans/L₁),fPart(Ans/L₂))) or max(.3010299957=abs(DeltaList(log(abs(DeltaList(DeltaList(L₁
Then
15→L
8→A
End
L+1→L
End
If L=16 and I or L≠16
[A]ᵀ→[A]
L≠16→I
End
not(L→W
If L=15 and F<E
Then
ClrDraw
RecallPic 2
Text(15,2,P+F
Pt-On(37,⁻15
Text(23,14,V
Pt-On(25,⁻23
For(X,0,1
Text(⁻1,21,X+47,"NO MORE
Text(⁻1,29,X+53,"MOVES
If not(X
StorePic 1
End
RecallPic 1
Text(37,49,"Press ENTER
Pause 
DelVar FDelVar PDelVar V30→E
End
End
ClrDraw
If F≥E
Then
min(999,V+1→V
min(15015,E+15→E
P+F→P
DelVar F
End
If K=22
DelVar F
If K≠45
Goto A
{V,P,F,E→ʟBJWL
ClrHome
Disp "Bejeweled 84+","","Game saved.


Download link here (http://www.cemetech.net/programs/index.php?mode=file&id=1332). Tell me what you think!
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 21, 2015, 12:02:14 AM
Awesome! But that darned https :( My kindle can't handle.
Title: Re: Bejeweled 84+ progress thread
Post by: JWinslow23 on July 21, 2015, 12:08:16 AM
Quote from: Unicorn on July 21, 2015, 12:02:14 AM
Awesome! But that darned https :( My kindle can't handle.
Again, sorry. :(
Title: Re: Bejeweled 84+ progress thread
Post by: Unicorn on July 21, 2015, 01:11:12 AM
Quote from: JWinslow23 on July 21, 2015, 12:08:16 AM
Quote from: Unicorn on July 21, 2015, 12:02:14 AM
Awesome! But that darned https :( My kindle can't handle.
Again, sorry. :(
Not your fault, Its just an inconvenience.
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 21, 2015, 06:08:35 AM
Would it be faster to separate the Bejeweled text code that is past the crystal into its own For loop, so that that part displays faster? I remember that For loops with a bunch of If instructions tend to be slower even when the condition is false.
Title: Re: Bejeweled 84+ progress thread
Post by: alexgt on July 22, 2015, 03:28:31 PM
I remember Jarvis Basic had a BIG for loop and a million if statements and it took an eternety to process O.O
Title: Re: Bejeweled 84+ progress thread
Post by: Dream of Omnimaga on July 30, 2015, 04:35:35 PM
Yeah I had this problem with a tilemapper that used string-based map data and graphical sprites. The more different possible tiles I added, the slower the loop got.
Title: Re: Bejeweled 84+ progress thread
Post by: Snektron on July 30, 2015, 04:42:53 PM
And ti basic's default speed doesn't help <_<
You should ideally make some kind of switch equivalent, where its a multiplication instead of millions of checks.