Author Topic: TI84+C Buttonz  (Read 12298 times)

0 Members and 1 Guest are viewing this topic.

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
TI84+C Buttonz
« on: July 05, 2013, 02:47:18 am »
Here's a speed test for my game:



You press the F1-F5 keys to match the colored blocks to the arrows. The closer the block is to the center, the more points you get.
It should be out tomorrow, it will probably be a flash app. Check out my blog for the latest info on it.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: TI84+C Buttonz
« Reply #1 on: July 05, 2013, 03:12:43 am »
Awesome !

Pretty amazing speed actually :)
(I wonder how the heck TI made their b&w-looking OS go so slow on scrolling menus then.... ?)
« Last Edit: July 05, 2013, 03:13:32 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: TI84+C Buttonz
« Reply #2 on: July 05, 2013, 03:42:40 am »
Wow, how did you make it run so fast?
I thought scrolling the whole screen (or almost the whole screen) Would be waaaaaay slower due to the slow LCD?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: TI84+C Buttonz
« Reply #3 on: July 05, 2013, 03:44:22 am »
Apparently the lcd driver has some tricks to get around that. Can you hardware vertical scroll?
If you like my work: why not give me an internet?








Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: TI84+C Buttonz
« Reply #4 on: July 05, 2013, 03:55:06 am »
(I wonder how the heck TI made their b&w-looking OS go so slow on scrolling menus then.... ?)
They must have done some stupid thing such as refreshing the whole screen for every written line instead of refreshing it only when all lines are written. edit see answer below for accurate answer instead of a guess of mine.

Anyway, awesome job AssemblyBandit !
« Last Edit: July 05, 2013, 03:56:08 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: TI84+C Buttonz
« Reply #5 on: July 05, 2013, 03:55:11 am »
This is an excellent demonstration of how thoughtful optimization can give superior performance.

(I wonder how the heck TI made their b&w-looking OS go so slow on scrolling menus then.... ?)
Wow, how did you make it run so fast?
I thought scrolling the whole screen (or almost the whole screen) Would be waaaaaay slower due to the slow LCD?
The OS visits every pixel when it scrolls text. He's optimized his program so that it only updates the pixels that actually change each loop iteration. Addendum: I don't mean to overstate the usefulness of this technique. It can only provide an optimization when applied to groups of pixels, not individual pixels. If the squares had sprites instead of solid colors, it would not be able to run so fast.

Can you hardware vertical scroll?
No, there is no support for vertical scrolling. The LCD is actually rotated 90 degrees from its intended orientation, so its vertical scrolling feature actually produces horizontal scrolling. (To reduce confusion, the documentation of WikiTI is written to reflect the LCD's actual orientation; thus, the Wiki and the datasheet differ on the meaning of "horizontal" and "vertical".)
« Last Edit: July 05, 2013, 04:01:55 am by DrDnar »
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: TI84+C Buttonz
« Reply #6 on: July 05, 2013, 04:58:16 am »
Yup... Unfortunately DrDnar is correct. I wish I could tell you that the screen can actually scroll this fast or that there was vertical scrolling, but nope. Just like he says, it just displays a black row at the top of each block and adds a color row to the bottom. You can *not* get this many sprites to move that fast on the TI84+C  :'( Just a little trickery on my part  ;D I originally planned for the whole screen to take advantage of horizontal scrolling to change the colors of the arrows and mess the player up, but erasing and redisplaying the score would be a pain and very slooowww. Instead I'm going to give the player the ability to change the arrow colors him/herself to be able to catch colors in different columns. I already ported it to an app, just need a few more hours to get it ready to be released. Going to take a break and watch Master Chef right now though!

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: TI84+C Buttonz
« Reply #7 on: July 05, 2013, 04:59:52 am »
still cool, I wonder how many work-arounds we'll find for speed optimization :)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: TI84+C Buttonz
« Reply #8 on: July 05, 2013, 05:13:37 am »
Thanks everyone! I'm still surprised at how fast it can go, and that's at full screen resolution, if I used interlacing, it would fly!

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: TI84+C Buttonz
« Reply #9 on: July 05, 2013, 06:13:28 am »
wait, full screen resolution? O.O
And I guess interlacing is that thing we found out that you can set the screen to half res?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: TI84+C Buttonz
« Reply #10 on: July 05, 2013, 07:59:53 am »
Yeah full screen is 320x240, calc84maniac's mode is 160x240. Check out the ILI9335 documentation to see exactly whats going on (just remember it displays vertical but its really horizontal).

Bit 10 in register $01 sets the scan mode.
0=progressive (default) 1=interlace

Edit:
When I say interlace, infer partial imaging as well because its probably (?maybe gaps might be a good thing sometimes?) worthless without it.
« Last Edit: July 05, 2013, 08:13:58 am by AssemblyBandit »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TI84+C Buttonz
« Reply #11 on: July 05, 2013, 09:42:36 am »
That is really awesome and fast. I was impressed by the video and it shows how the calc can pull games that runs at more than 5 FPS.

It also shows that it is possible to overcome limitations by using various programming tricks like what developers had to do on retro consoles back in the days. From the video, I could immediately figure out how that speed was achieved, since the squares were plain color. Just only draw the new line of pixel then erase the one you're scrolling from. I actually used a similar technique for the potential bosses in Zelda, where the initial drawing is slow, but moving left and right is fast:



However, I am limited to only 1 color per row and the boss can't move up and down.


Also, for ASM games like platformers, the calc has built-in horizontal scrolling support, so those games will run fast too (although if you use 320x240 mode, the scrolling will glitch up a little bit like in most NES games on each side of the screen.)

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: TI84+C Buttonz
« Reply #12 on: July 05, 2013, 06:52:01 pm »
but dj, is your example in BASIC?
AWESOME O.O

And yeah, all this hacking seems to me as if it was 'the old days', which were before i was born :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TI84+C Buttonz
« Reply #13 on: July 06, 2013, 02:53:40 am »
Yeah my example is pure BASIC (except the stretched screen part). I just use a bunch of Pt-on/off commands to move the sprite around.

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: TI84+C Buttonz
« Reply #14 on: July 08, 2013, 06:41:21 am »
Buttonz v1.0 is finished!



Please post any bugs or suggestions for it.
« Last Edit: July 08, 2013, 06:47:26 am by AssemblyBandit »