* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: This Is The Only Level +CE  (Read 12510 times)

0 Members and 1 Guest are viewing this topic.

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 751
  • Post Rating Ratio: +12/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
This Is The Only Level +CE
« on: September 11, 2016, 10:13:25 pm »
This Is The Only Level now has its own port to the TI-84+CE!



Beat the level. There's only one.

Download here on ticalc.org!

(click to show/hide)
« Last Edit: December 19, 2016, 08:13:22 pm by JWinslow23 »


  • Calculators owned: TI-84+, TI-84+ CSE, TI-84+ CE

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 231
  • Post Rating Ratio: +21/-1
Re: This Is The Only Level +CE
« Reply #1 on: September 11, 2016, 10:33:31 pm »
Just in case :)
Quote from: MateoConLechuga
Nice work! Looking pretty spiffy; I'd be happy to give coding suggestions on how to speed things up.

Quote from: JWinslow23
1. What's "sprite clipping" and should I use it?
2. For some odd reason, the gfx_TransparentSprite() routine leaves the tile sprites normal when drawn slightly off-screen, but the player sprite entirely disappears when he is off-screen even one pixel. Why is that, and how do I fix it?
3. The "random" colors for the background and spikes look like different shades of blue for some reason. Am I doing it wrong, or is there bias in the random numbers?
4. Are there any more conventions and things that can make my programming life easier?
1. Sprite clipping makes sure the sprite is drawn properly if parts of it are drawn offscreen or partially offscreen. Sprite functions have a _NoClip version which are a lot faster if the sprites you intend to use won't be offscreen ever.
2. It's probably because you are sending incorrect types (signed vs unsigned) values to the function as arguments. Take another look; the function works as intended :)
3. You basically have to design the palette yourself and the random colors that should be selected. You can set up the palette with random rgb values by looping and doing something like gfx_palette = rgbTo1555( r, g, b );
4. I don't believe there are any platformer games yet; but anything you learn or discover along the way would be neat :)

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18784
  • Post Rating Ratio: +97/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #2 on: September 12, 2016, 02:52:37 am »
Glad to see a color version @JWinslow23 :D . I am definitively looking forward for it. How fast does it run so far?
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 751
  • Post Rating Ratio: +12/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #3 on: September 12, 2016, 03:38:01 am »
Glad to see a color version @JWinslow23 :D . I am definitively looking forward for it. How fast does it run so far?
Exactly as fast as it does in the screenshot. I'm literally clearing the screen and re-drawing the tilemap every frame, because I can't see any solution so far for erasing the elephant. Without this redrawing, however, it runs at way over playable speed, so if I find some way to only redraw the parts I need, it'll be fine.

By the way, can anyone help me with that? The code is up there. I have ideas, but they have all either not worked or caused flickering.

EDIT: Current code here. Minus a proper "random color" system, all changes are internal, so my job is easier. I did the same thing in the TITOL 84+ program, so I'm thinking it could help here.

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18784
  • Post Rating Ratio: +97/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #4 on: September 12, 2016, 05:38:05 am »
Weird, when I checked the topic earlier at work and just an hour or so ago the screenshot was not animated at all. It is now. Hence why I was asking the speed. As for erasing the elephant, if flickering is the issue, couldn't you use 8-bits mode, draw the map twice on two sides of the screen and flip between each side while erasing the elephant on the invisible side? That's what most people do.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 751
  • Post Rating Ratio: +12/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #5 on: September 12, 2016, 06:24:10 am »
Weird, when I checked the topic earlier at work and just an hour or so ago the screenshot was not animated at all. It is now. Hence why I was asking the speed. As for erasing the elephant, if flickering is the issue, couldn't you use 8-bits mode, draw the map twice on two sides of the screen and flip between each side while erasing the elephant on the invisible side? That's what most people do.
That's what's happening, with a buffer the same size as the full screen. The trouble is erasing the elephant in the first place without redrawing everything. I don't know how to erase him.

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18784
  • Post Rating Ratio: +97/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #6 on: September 12, 2016, 06:31:13 am »
Are you in 8 or 16 bits mode?
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 231
  • Post Rating Ratio: +21/-1
Re: This Is The Only Level +CE
« Reply #7 on: September 12, 2016, 07:25:20 am »
So I'm really sorry, but I got a little carried away with looking at your code... but anyhow, the basic idea is to save the background behind the transparent sprite, and then when you move the sprite, restore what was behind it previously. Rather than using gfx_SwapDraw(), you can use gfx_Blit( gfx_buffer ); in order to copy the back buffer to the screen. Here's the result that I got from it:



Also, I just made the double buffering thing work; didn't change too much else except for moving globals to local functions and such. If you do plan to use globals, try to keep them contained inside of a C structure :)

Edited source code is below.

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 751
  • Post Rating Ratio: +12/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #8 on: September 12, 2016, 08:37:36 am »
Thank you so much, I would never have figured that out myself. :)

Another question: How do I activate using the OS fonts (graphscreen and homescreen) and drawing them onto the screen? I tried gfx_SetMonospaceFont(0), but it's not working.

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 231
  • Post Rating Ratio: +21/-1
Re: This Is The Only Level +CE
« Reply #9 on: September 12, 2016, 08:41:57 am »
Using the following functions:

Code: [Select]
gfx_SetTextFGColor();
gfx_SetTextBGColor();
gfx_SetTextFGColor();
gfx_PrintStringXY();
gfx_SetTextScale();
gfx_PrintString();
gfx_PrintInt();
gfx_PrintUInt();
gfx_SetTextXY();

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 751
  • Post Rating Ratio: +12/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #10 on: September 12, 2016, 08:46:49 am »
Using the following functions:

Code: [Select]
gfx_SetTextFGColor();
gfx_SetTextBGColor();
gfx_SetTextFGColor();
gfx_PrintStringXY();
gfx_SetTextScale();
gfx_PrintString();
gfx_PrintInt();
gfx_PrintUInt();
gfx_SetTextXY();
I think you misunderstand. I was just using PrintStringXY, but it prints the C monospace font. I want the OS homescreen and graphscreen fonts. I'm trying the OS functions, too, but they're not working. Forget my stupidity.

Offline Adriweb

  • Full User
  • Join Date: Jan 2015
  • Location: France & Canada
  • Posts: 423
  • Post Rating Ratio: +7/-1
    • Adriweb
    • @Adriweb
    • Adriweb
    • @UC-UIrbk5SuaUCvnV6SQvt-Q
    • /u/Adriweb
    • Adriweb
    • TI-Planet.org
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #11 on: September 12, 2016, 05:13:03 pm »
4. I don't believe there are any platformer games yet; but anything you learn or discover along the way would be neat :)
Wut

Androides , Crystann , Billybox



All open-source btw.

Android has "gravity", as you can see the character falling, for instance, and not tile-by-tile (contrary to the two others, where everything is by tile)
« Last Edit: September 12, 2016, 05:27:37 pm by Adriweb »
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 751
  • Post Rating Ratio: +12/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #12 on: September 12, 2016, 06:34:52 pm »
I've implemented collision functions that work well enough for me.



Interaction with objects will come next. I suppose I'll work on dying, then pushing the button. And at some point, the guy's got to turn around when he walks left.

Download attached.

Offline kotu

  • -< \'V/,,,
  • Super User
  • Join Date: Aug 2016
  • Location: don't panic
  • Posts: 1160
  • Post Rating Ratio: +7/-11
  • woah
    • dj_kotu
    • @UCAy2ZF4hbc08iStnTn6jgxQ
    • rowanmedhurst
    • @romanov-psyco
    • futurerave.uk
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #13 on: September 12, 2016, 06:39:21 pm »
is he a little elephant?
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 751
  • Post Rating Ratio: +12/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: This Is The Only Level +CE
« Reply #14 on: September 12, 2016, 06:43:42 pm »
is he a little elephant?
Yes, he is. You can play the original I'm basing this off of here.

I'll also try to see if I can get the creator's blessing for doing a full version of my color remake. I probably won't need it, but I'll tell him anyways.

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games