Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Galandros on May 30, 2010, 03:24:51 pm

Title: Pure TI-BASIC grayscale ASCII game
Post by: Galandros on May 30, 2010, 03:24:51 pm
This is an experiment I am doing mostly for my fun. It is intended only for SE calculators because of speed. It has some flicker but for Pure TI-BASIC is actually cool.
This will give use to my recent utility of hidden tokens, too.

The base code of is:
:While 1
:Dispgraph
:Disp
:End
This should enlighten who knows pretty well TI-BASIC. (at least I instantly knew how to make this code work) See the demo code for further understanding of the technique.

I already have a demo and screenie for the more skeptic.
But I need a idea for the game. It has to be with ASCII graphics, simple, a bit slow paced but fun. (if possible addictive too)
EDIT: puzzle or board games genres is the way to go. ;)
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Geekboy1011 on May 30, 2010, 03:35:54 pm
wow thats just awsome and the flicker isnt to bad ive seen much worse on things ive made with c3 X.x
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Galandros on May 30, 2010, 03:39:43 pm
wow thats just awsome and the flicker isnt to bad ive seen much worse on things ive made with c3 X.x
Keep in mind that I pushed the emulator settings so almost any engine looks good. :P
But this is not emulator trickery. On calculator you get a very similar result to the screen shot.
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Geekboy1011 on May 30, 2010, 03:44:39 pm
still its awsome although i wonder how much more it will flicker when you have a decent amount of code in it :/
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Raylin on May 30, 2010, 03:46:46 pm
I agree with geekboy. This isn't exactly practical.
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Galandros on May 30, 2010, 03:49:10 pm
I agree with geekboy. This isn't exactly practical.
I am going to verify that in coding.
If people did not tried lots of TI-BASIC commands like Plots, horizontal/vertical sprites with text, dual layer we wouldn't have the quality in graphics games we have.
It will definitely be a bit slow paced but for puzzles or board games is doable. I believe I can optimize and push speed to be very playable and even faster than some old ASCII games.

still its awsome although i wonder how much more it will flicker when you have a decent amount of code in it :/
That is why it has to be a simple game and slow paced. Still I added movement code without boundaries to check.

I think a puzzle or board game is the way to go. Action, adventure does not fit in this engine.
Someone that played lots of flash games or board game can give me a hint?
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Raylin on May 30, 2010, 03:54:14 pm
Checkers?
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Galandros on May 30, 2010, 03:59:52 pm
Checkers?
Could be. And I could use that for testing how the engine will adapt to the code overhead. The darker tiles of the table will be in gray and in a perfect world I will be able to find tokens combinations for this. *Galandros sees the Weregoose pictures*

Make your bets, will the grayscale vanish with code overhead or not? Or Galandros does not have the skillz? j/k

If someone wants to leave another puzzle or board game suggestion for me to check later, would be nice.
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: TIfanx1999 on May 30, 2010, 04:09:17 pm
Something like Checkers would be a good test. I say go for it!
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Geekboy1011 on May 30, 2010, 04:18:52 pm
checkers sounds great as a test and i think its very doable with boardgames
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Galandros on May 30, 2010, 04:26:55 pm
Thanks, that is a great support. ;D

I have a few ideas to speed up things like caching graphics on Pictures. And I might abuse unrolling code if I need. Hard code some lists in variables, anything that helps speed.
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Raylin on May 30, 2010, 05:31:48 pm
Quote from: Galandros
unrolling code

What is that? Self-modifying code?
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: calc84maniac on May 30, 2010, 09:34:51 pm
Quote from: Galandros
unrolling code

What is that? Self-modifying code?
Nope, it means instead of using a For( loop and such, do each iteration manually.
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: DJ Omnimaga on May 31, 2010, 12:34:06 am
seems nice. I wonder how fast it would be in a game?
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: jsj795 on May 31, 2010, 12:41:32 am
Wasn't this done in Metroid Pure Basic Version in the menu, except it was being off-set 1 pixel diagonal?
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: DJ Omnimaga on May 31, 2010, 12:45:36 am
I thought Metroid Pure had no menu/title screen?
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: jsj795 on May 31, 2010, 01:00:10 am
I mean when in the Metroid Pi (not the pure) the game starts it goes,

2ND-NORMAL
DEL-HARD

and other things

Edit: See here http://www.ticalc.org/archives/files/fileinfo/401/40108.html (http://www.ticalc.org/archives/files/fileinfo/401/40108.html)
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: DJ Omnimaga on May 31, 2010, 01:06:16 am
Oooh ok ^^

Those games are cool, by the way :)

I wish Pi was longer, though :(
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Galandros on May 31, 2010, 03:24:43 am
An example of unrolling:
0
For(I,1,3
Ans or [A](A+I,B
End
// unrolls to
[A](A+1,B) or [A](A+2,B) or [A](A+3,B
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: DJ Omnimaga on May 31, 2010, 12:18:02 pm
AAaah I see.

Sadly TI parser interprets TI-BASIC so slowly that the later code will run faster. In certain game cases it's almost like if you had to sacrify the entire size you would have saved by using a For( loop or two by doing each iteration manually to save an entire frame per second. It can be demonstrated by one of my old shooter included in Omnimaga Pack and an old Netham45 program x.x
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: ztrumpet on May 31, 2010, 02:14:29 pm
I wish I was able to find the correct link (in Weregoose's post), but here's a great link from before the UTI server change: http://www.unitedti.org/forum/index.php?showtopic=8828&view=findpost&p=134331
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: Deep Toaster on May 31, 2010, 02:40:11 pm
The link is here:
http://www.unitedti.org/forum/index.php?showtopic=3586&view=findpost&p=57778
(I think that's what you're talking about.)
Title: Re: Pure TI-BASIC grayscale ASCII game
Post by: DJ Omnimaga on May 31, 2010, 11:21:49 pm
I also remember KermMartian had a 12 level grayscale program for the graph screen, but it only showed dots, if I remember.

If only Omnicalc fonts were installable without Omnicalc and worked on graph screen, too, then we could have some characters that have duplicates with inverted checkered pattern and do grayscale in a way similar to xLIB/Omnicalc/Celtic III. As for now if you're gonna do this with Omnicalc you migth as well just use sprites instead