Author Topic: Large masked sprites?  (Read 5599 times)

0 Members and 1 Guest are viewing this topic.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Large masked sprites?
« on: September 16, 2010, 05:29:08 pm »
How do you do it in Axe outside of a million Pt-Mask() commands?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







SirCmpwn

  • Guest
Re: Large masked sprites?
« Reply #1 on: September 16, 2010, 06:47:23 pm »
You could write a custom bitmap routine, I guess.
I'm several versions behind on Axe, I haven't even seen Pt-Mask.  Advance Wars uses its own masked sprite routine.
« Last Edit: September 16, 2010, 06:47:52 pm by SirCmpwn »

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Large masked sprites?
« Reply #2 on: September 16, 2010, 06:48:47 pm »
What was your solution to that, Sir? Could you input arbitrary numbers for the size of said bitmap?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







SirCmpwn

  • Guest
Re: Large masked sprites?
« Reply #3 on: September 16, 2010, 06:59:40 pm »
Well, you can define them at compile time, and you can use SMC to define them at runtime.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Large masked sprites?
« Reply #4 on: September 16, 2010, 07:04:42 pm »
Hmm...

How would one make his own masking routine?
What are the basics of masking?
« Last Edit: September 16, 2010, 07:12:02 pm by Raylin »
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







SirCmpwn

  • Guest
Re: Large masked sprites?
« Reply #5 on: September 16, 2010, 07:13:39 pm »
Well, I made one sprite completely black (sprite A), and the other one was just the white pixels (sprite B), then I used Pt-On first with sprite A, then Pt-Change with sprite B on top.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Large masked sprites?
« Reply #6 on: September 16, 2010, 07:30:54 pm »
PICS OR IT DIDN'T HAPPEN.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







SirCmpwn

  • Guest
Re: Large masked sprites?
« Reply #7 on: September 16, 2010, 07:32:10 pm »
No.  I'm having trouble sending things between my calc and my computer.  Just try it on your own, it will work.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Large masked sprites?
« Reply #8 on: September 16, 2010, 08:03:26 pm »
This is actually how masking is done in xLib too (though most people prefer using AND/OR masking, but AND is not an option in Axe)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline tloz128

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 324
  • Rating: +58/-6
  • I feel asleep.
    • View Profile
Re: Large masked sprites?
« Reply #9 on: September 16, 2010, 08:05:45 pm »
I used XOR to do sprite masking in my axe game. I would draw on one sprite that contained black for everywhere that I wanted to be masked using OR logic (Pt-On), and I would draw a sprite over that with black for all the areas of the masked sprite I wanted white using XOR logic (Pt-Change).
EDIT: oh wait, SirCmpwn already said that
« Last Edit: September 16, 2010, 08:11:36 pm by tloz128 »
Naaa... Na Nah Na Nana Na Nah... Hey Jude!

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Large masked sprites?
« Reply #10 on: September 16, 2010, 08:24:34 pm »
Quigibo? Any ideas? Maybe add in this badass feature (masked bitmaps)?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







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: Large masked sprites?
« Reply #11 on: September 16, 2010, 08:28:23 pm »
I would like this feature. I think it uses TI's routine, though, so I am unsure how it can be modified.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Large masked sprites?
« Reply #12 on: September 16, 2010, 08:47:47 pm »
The Pt-Mask() is a way to automate exactly what SirCmpwn was talking about.  There isn't a way to optimize it further outside of writing an Asm routine.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Large masked sprites?
« Reply #13 on: September 16, 2010, 09:34:25 pm »
Is there ANY WAY to mask huge sprites without the Pt-Mask()?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Large masked sprites?
« Reply #14 on: September 16, 2010, 09:54:10 pm »
You can write a gazillion pxl-change()/pxl-on()/pxl-off() but that's really slow.  Like I said, your only other option is inline assembly or multiple Pt-Mask() routines.
« Last Edit: September 16, 2010, 09:54:54 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!