Alternatively, join us on Discord.

[TI-84+CE] Wal-Rush! CE v2.0

Started by DJ Omnimaga, March 12, 2016, 05:52:03 am

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DJ Omnimaga

March 12, 2016, 05:52:03 am Last Edit: June 08, 2016, 04:42:13 am by DJ Omnimaga
Wal-Rush! CE is a port of JWinslow23's PC game called Wal-Rush!, which he made for CodeWalrus Contest II. He also made an Atari 2600 version and now I have ported the game to the TI-83 Premium CE and TI-84 Plus CE calculators! In this game, you control Walrii, the CodeWalrus mascot, in its winged form, and must fly your way through various obstacles while eating floating fishes. :3=

The game is written in hybrid TI-BASIC with the help of an ASM library called Sprites, by grosged, which can be downloaded at https://tiplanet.org/forum/archives_voir.php?id=539203 . The game originally used CE Textlib, by DrDnar, found at http://www.ticalc.org/archives/files/fileinfo/465/46522.html , and circumvents CE Textlib rectangle command limitations in every way possible, allowing full-screen game play with graphics that are reminiscent of the Atari 2600 days. But the switch to Sprites allowed better graphics and much faster speed. Both versions are included in the ZIP file below. Unlike the original games, this calculator port is in color instead of grayscale and there is an extra obstacle to avoid.

NOTE: This game will NOT run on the TI-84 Plus C Silver Edition!


(Click here for an animated screenshot)



Original post follows: ShowHide
@Dudeman313 's topic earlier gave me the idea to port Wal-Rush to the TI-84 Plus CE using only TI-BASIC and CE Textlib. Unlike @JWinslow23 's original game, I decided to use colors, like in the Walrii flight animation his game was inspired from.

CE Textlib lacks sprites support. However, it allows chaining commands, which allowed me to display multiple rectangles to form large, pixelated graphics and a 8x5 :walrii: sprite (based on JWinslow's 8x8 Atari sprite) using just 1 Asm(prgmTEXTLIB) command:



1→A
0→B
1→E
0→R
0→O
0→P
{1,33,0,1,4,27,18,33,4,1,8,27,14,33,12,1,1,27,18
Asm(prgmTEXTLIB
While B<10
{33,4,1,1,A,14,33,4,A+1,1,6,18,33,4,A+8,1,7,14,33,4,A+14,1,6,18,33,0,19,4,8,18,33,5,19,7,8,14,33,12,19,1,8,18,33,0+B,20,1,2,20,33,0+B,23,1,2,20,33,1+B,21,1,1,20,33,1+B,20,1,1,10,33,1+B,23,1,1,10,33,1+B,24,1,1,20,33,2+B,19,2,8,23,33,2+B,20,2,1,20,33,2+B,22,2,1,20,33,4+B,19,1,1,23,33,4+B,21,1,2,23,33,4+B,24,1,2,23,33,R,O,2,2,11,33,R,O-2,2,2,14+4(R<4
Asm(prgmTEXTLIB
A+1→A
If A>13:1→A
getKey→Z
If Z=21:⁻3→E
E+1→E
If E>2:2→E
B+E→B
If B<0:0→B
O+2→O
If O>25:Then
1→O
P+1→P
randInt(0,9→R
End
End
For(Z,10,24
{33,0,1,4,27,Z,33,4,1,8,27,Z,33,12,1,1,27,Z,11
Asm(prgmTEXTLIB
End
ClrHome
Disp "Score:
Output(1,8,P


Because I tried to keep speed to maximum and am circumventing some CE Textlib limitations to draw stuff outside its 26x10 boundaries, I cannot guarantee 100% that this game will be stable, so I suggest that you back up first before trying or use an emulator. Also, various display glitches will occur.

It isn't complete yet, so obstacles don't work yet and I'm unsure if I will add the calculator power-up, but I was bored and I thought it would be funny to see how far CE Textlib limits could be pushed by abusing its rectangle display feature.


You need Sprites by grosged from https://tiplanet.org/forum/archives_voir.php?id=539203 to play this game.  The game download is attached to this post below.

http://www.ticalc.org/archives/files/fileinfo/466/46696.html

aeTIos

That looks very Atari2600 - like. Love it ;D
ceci n'est pas une signature

DJ Omnimaga

Thanks. I am surprised at the speed so far. Hospefully I can make it faster even after adding collision with objects.

Jkolade936

Does this qualify as a signature? 
The answer is "Sure."


DJ Omnimaga

By the way, the following screenshot shows why a CSE is not recommended for this game:



I just remembered that there was a CSE version of Textlib, so I was curious about how much slower the game ran, and it was abysmal O.O

Here's the CE screenshot from my earlier post as a comparison:



Most CE BASIC games run 21% faster, but when they involve redrawing the entire screen with ASM libs, the increase is much higher (sometimes 1000% faster)

Jkolade936

Quote from: DJ Omnimaga on March 12, 2016, 05:52:03 am
@Dudeman313 's topic earlier gave me the idea to port Wal-Rush to the TI-84 Plus CE using only TI-BASIC and CE Textlib. Unlike @JWinslow23 's original game, I decided to use colors, like in the Walrii flight animation his game was inspired from.

CE Textlib lacks sprites support. However, it allows chaining commands, which allowed me to display multiple rectangles to form large, pixelated graphics and a 8x5 :walrii: sprite (based on JWinslow's 8x8 Atari sprite) using just 1 Asm(prgmTEXTLIB) command:



1→A
0→B
1→E
0→R
0→O
0→P
{1,33,0,1,4,27,18,33,4,1,8,27,14,33,12,1,1,27,18
Asm(prgmTEXTLIB
While B<10
{33,4,1,1,A,14,33,4,A+1,1,6,18,33,4,A+8,1,7,14,33,4,A+14,1,6,18,33,0,19,4,8,18,33,5,19,7,8,14,33,12,19,1,8,18,33,0+B,20,1,2,20,33,0+B,23,1,2,20,33,1+B,21,1,1,20,33,1+B,20,1,1,10,33,1+B,23,1,1,10,33,1+B,24,1,1,20,33,2+B,19,2,8,23,33,2+B,20,2,1,20,33,2+B,22,2,1,20,33,4+B,19,1,1,23,33,4+B,21,1,2,23,33,4+B,24,1,2,23,33,R,O,2,2,11,33,R,O-2,2,2,14+4(R<4
Asm(prgmTEXTLIB
A+1→A
If A>13:1→A
getKey→Z
If Z=21:⁻3→E
E+1→E
If E>2:2→E
B+E→B
If B<0:0→B
O+2→O
If O>25:Then
1→O
P+1→P
randInt(0,9→R
End
End
For(Z,10,24
{33,0,1,4,27,Z,33,4,1,8,27,Z,33,12,1,1,27,Z,11
Asm(prgmTEXTLIB
End
ClrHome
Disp "Score:
Output(1,8,P


Because I tried to keep speed to maximum and am circumventing some CE Textlib limitations to draw stuff outside its 26x10 boundaries, I cannot guarantee 100% that this game will be stable, so I suggest that you back up first before trying or use an emulator. Also, various display glitches will occur. 

When you said "various display glitches" you weren't kidding, but the speed makes up for it. O.O

Otherwise, it's pretty entertaining. :P
Does this qualify as a signature? 
The answer is "Sure."


DJ Omnimaga

Yeah, the glitches are because I went the Atari 2600 route of not bothering to fix some of the less noticeable/annoying ones just to keep the speed up and the game full-screen. You also have to keep in mind that Textlib was not intended to be used outside the boundaries of the Output() command. Hence my comment about backing up first, because I don't know if it can cause crashes. It seems like it doesn't, but an expert would need to examine the debugger of an emulator while the game is running to see if any important RAM areas are being erased by my "misuse" of CE Textlib rectangle command.

But there's one glitch that annoys me: It's the one causing a weird rectangle to appear in the middle.

Jkolade936

Where in the middle? Do you mean in the background, where one of the rectangles scrolls instead of staying still?
Does this qualify as a signature? 
The answer is "Sure."


DJ Omnimaga

This is what I mean:



That reminds me, I should poke @tr1p1ea about adding the ability to chain rectangle commands in xLIBC (eg real(7,9,X,Y,W,H,C,X,Y,W,H,C,X,Y,W,H,C,X,Y,W,H,C,X,Y,W,H,C,X,Y,W,H,C,X,Y,W,H,C,X,Y,W,H,C,X,Y,W,H,C) (this would draw multiple rectangles in just 1 real command, like how we can draw multiple sprites from one command). THis could be handy for drawing window boxes and doing art that doesn't take much space

Jkolade936

That's what I thought.
I ran the same code you used for that background without the rest of the game, and it was stable.

Also, I think that'd be a useful feature.
Does this qualify as a signature? 
The answer is "Sure."


DJ Omnimaga

What I noticed is that the glitch happens when the red blocks reach the right of the screen.

Jkolade936

I saw that too. Also, sometimes, the back of the :walrii: leaves a grey line in that same area.
Does this qualify as a signature? 
The answer is "Sure."


DJ Omnimaga

Yeah, that's due to how scrolling works. I might change the scrolling anyway. My goal is to keep screen updates to a minimum each frame.

Jkolade936

Okay.

I might end up making a Textlib version of
my text RPG.
Does this qualify as a signature? 
The answer is "Sure."


DJ Omnimaga


Powered by EzPortal