Author Topic: Zeldaking's axe questions  (Read 10699 times)

0 Members and 1 Guest are viewing this topic.

Offline zeldaking

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 197
  • Rating: +15/-0
    • View Profile
Zeldaking's axe questions
« on: August 02, 2011, 01:49:43 pm »
How do you use smaller than 8x8 sprites. Ex: 8x8 sprite=16 hex digits what would say 2x2 or 4x4, 3x3 or how would you figure it out. Also the point-on( command takes 8 bytes how do you raise or lower it? ???
« Last Edit: August 02, 2011, 02:31:55 pm by calcdude84se »

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Zeldking's axe questions
« Reply #1 on: August 02, 2011, 01:50:19 pm »
You can't. If you want to make smaller sprites just leave the other pixels blank and use the same byte-sized sprite.
In-progress: Graviter (...)

Offline zeldaking

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 197
  • Rating: +15/-0
    • View Profile
Re: Zeldking's axe questions
« Reply #2 on: August 02, 2011, 01:52:55 pm »
So how would you erase that 8x8 sprite without erasing background?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Zeldking's axe questions
« Reply #3 on: August 02, 2011, 02:03:10 pm »
If you used Pt-Change( to draw the sprite, you can just use it again to erase. Otherwise, you can use a combination of Pt-On( and Pt-Change( to erase specific pixels. For example, say you want to erase the black pixels taken up by this sprite:

████████
██    ██
█ █  █ █
█  ██  █
█  ██  █
█ █  █ █
██    ██
████████


Just Pt-On( that, then Pt-Change( it at the same coordinates.
« Last Edit: August 02, 2011, 02:03:25 pm by Deep Thought »




Offline zeldaking

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 197
  • Rating: +15/-0
    • View Profile
Re: Zeldking's axe questions
« Reply #4 on: August 02, 2011, 02:14:48 pm »
So like this?
Code: [Select]
.HELP
[FFFFC3C3C3C3FFFF->Pic1
10->x
10->y
Clrdraw
RectI(0,0,95,64
Pt-Change(x,y,Pic1
DispGraph
Repeat getkey(15)
If getkey(2)
Pt-Change(x,y,Pic1
x-1->x
Pt-Change(x,y,Pic1
End
If getkey(3)
Pt-Change(x,y,Pic1
x+1->x
Pt-Change(x,y,Pic1
End
End
Is that right?


« Last Edit: August 02, 2011, 02:15:55 pm by zeldaking »

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Zeldking's axe questions
« Reply #5 on: August 02, 2011, 02:23:50 pm »
If you wanted a sprite of smaller dimensions, just use the top left corner of the 8x8, and use Pt-On, the white is transparent.

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline zeldaking

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 197
  • Rating: +15/-0
    • View Profile
Re: Zeldking's axe questions
« Reply #6 on: August 02, 2011, 02:24:37 pm »
What about the erasing of it though?

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Zeldking's axe questions
« Reply #7 on: August 02, 2011, 02:30:58 pm »
pt-change(same x, same y, same sprite)
^should work

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline zeldaking

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 197
  • Rating: +15/-0
    • View Profile
Re: Zeldaking's axe questions
« Reply #8 on: August 02, 2011, 02:35:35 pm »
Yes, that works, sweet I can make some things I haven't been able to.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Zeldaking's axe questions
« Reply #9 on: August 02, 2011, 02:40:18 pm »
For sprites smaller than 8 pixel of height (but a width of 8 ), can't someone display for example a 8x4 sprite by simply copying the necessary sprite data into L6 with the copy command? THe only limitation I recall was that the sprite had to be aligned horizontally.
« Last Edit: August 02, 2011, 02:40:27 pm by DJ_O »
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline zeldaking

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 197
  • Rating: +15/-0
    • View Profile
Re: Zeldaking's axe questions
« Reply #10 on: August 02, 2011, 02:45:11 pm »
True but the Point-Change( worked for what I need.