You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0
b/[Completed] Walrii Games (TI/HP/PC/2600) publicado por u/Dream of Omnimaga March 12, 2016, 05:52:03 AM
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)

[spoiler="Click for older screenshots"]
(Click here for an older animated screenshot)[/spoiler]

[spoiler=Original post follows]@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.[/spoiler]

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
Last Edit: June 08, 2016, 04:42:13 AM by DJ Omnimaga
Inicia sesión o crea una cuenta para dejar un comentario
u/aetios March 12, 2016, 03:32:54 PM
That looks very Atari2600 - like. Love it ;D
u/Dream of Omnimaga March 12, 2016, 06:26:51 PM
Thanks. I am surprised at the speed so far. Hospefully I can make it faster even after adding collision with objects.
u/Dudeman313 March 12, 2016, 10:12:34 PM
Cool! Just seeing this now.  O.O
u/Dream of Omnimaga March 12, 2016, 10:58:53 PM
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)
u/Dudeman313 March 13, 2016, 02:33:45 PM
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
u/Dream of Omnimaga March 14, 2016, 03:45:04 AM
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.
u/Dudeman313 March 14, 2016, 04:10:37 AM
Where in the middle? Do you mean in the background, where one of the rectangles scrolls instead of staying still?
u/Dream of Omnimaga March 14, 2016, 05:55:25 AM
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
u/Dudeman313 March 14, 2016, 05:59:55 AM
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.
u/Dream of Omnimaga March 14, 2016, 06:06:24 AM
What I noticed is that the glitch happens when the red blocks reach the right of the screen.
u/Dudeman313 March 14, 2016, 01:41:42 PM
I saw that too. Also, sometimes, the back of the :walrii: leaves a grey line in that same area.
u/Dream of Omnimaga March 14, 2016, 03:55:52 PM
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.
u/Dudeman313 March 14, 2016, 07:53:36 PM
Okay.

I might end up making a Textlib version of
my text RPG.
u/Dream of Omnimaga March 15, 2016, 03:05:40 AM
Good luck!
Start a Discussion

b/[Completed] Walrii Games (TI/HP/PC/2600)

Smaller or early stage games featuring the site's walrus mascot are featured here.

15
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal