Join us on Discord!
You can help CodeWalrus stay online by donating here.

Protege: Hybrid-Basic RPG for TI-84+: Need help getting xLIB Sprites to Work

Started by SiphonicSugar, February 03, 2016, 12:17:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SiphonicSugar

 Whelp, I've said that I'm making my RPG for quite some time now, but sadly, I haven't made much progress...

But I do have a pretty good reason for that.  I've redone the main engine 4 times already and I am working on the 5th.  This time, however I decided to switch from TI-Basic to hybrid-basic, so sorry for anyone who doesn't use DoorsCS7 because I am using xLIB for tile mapping and scrolling...

But I've posted the VERY tiny amount of code that I've had for my engine below.
(I've decided to use 8x8 tiles and have 11 across and 7 up and down.)
PROGRAM:PME
real(0,1)
5->A:5->B
While 1          //This is just temporary... I think hopefully
real(2,0,B,A,12,8,0,11,0,7,8,0,1,1)
real(1,29,31,1,1,7,0,0,0,0,1)          //I think that SHOULD place the character in the middle of the screen...
getKey->K
If K=24:B-1->B          //
If K=25:A-1->A          // First off I need help revising this because I'm to lazy to figure out how...
If K=26:B+1->B        //
If K=34:A+1->A        //
End


xLIB Reference for displaying a sprite... (Thanks to TI-Basic Developer)
real(1,[X position],[Y position],[sprite width *],[sprite height],[sprite pic],[X offset *],[Y offset],[drawing logic],[horizontal flip],[update LCD]




Alsoe, can someone explain to me the drawing logic?

I have Pic7 (character sprite) and Pic8 (tilemap pictures)...

I'm not really sure what happened with me moving around in the GIF, the movement is fine, it's just the character that's supposed to be a face, but right now it it just a line...
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Dream of Omnimaga

I renamed your topic so that people know it's also an help topic. I can't help myself though because I haven't used Axe in ages.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

SiphonicSugar

  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Dream of Omnimaga

Oh right, my bad. I confuse BASIC and Axe sometimes when sprites are involved because almost nobody use monochrome BASIC anymore. >.<
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

SiphonicSugar

  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Dream of Omnimaga

I wonder if @tr1p1ea might remember much about xLIB sprites? He made xLIB :P

I could check the readme to remember what each argument do but I don't have that much time lately so it might take a while.  Have you checked the two tutorials available via http://tibasicdev.wikidot.com/xlib in the meantime, in case they provide examples that might be useful to you to fix it?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

tr1p1ea

Drawing logic is either LD(direct load) or one of the bitwise AND,OR,XOR.

LD = Write entire sprite to buffer, including background (will show up as a square)
AND = bitwise AND the sprite with the buffer (can be used for sprite masks)
OR = bitwise OR the sprite with the buffer (likely the most common option)
XOR = bitwise XOR the sprite with the buffer (probably as common as OR, can be used to erase previous sprites as well)

Normally people would use OR/XOR when drawing sprites.

SiphonicSugar

Meh... I did, but I will make sure that I am not missing anything...
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Powered by EzPortal