• Axe Q&A 5 5
Currently:  

Author Topic: Axe Q&A  (Read 588263 times)

0 Members and 3 Guests are viewing this topic.

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Axe Q&A
« Reply #1305 on: January 09, 2012, 10:35:54 pm »
Buff(768)->GDB1, or something like that.
In-progress: Graviter (...)

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: Axe Q&A
« Reply #1306 on: January 09, 2012, 10:37:47 pm »
Anything that ends in →GDB1 defines GDB1 (a pointer).




Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Axe Q&A
« Reply #1307 on: January 09, 2012, 10:38:08 pm »

Buff(768)->GDB1, or something like that.
Anything that ends in →GDB1 defines GDB1 (a pointer).
ah, ok.
thanks. :D
« Last Edit: January 09, 2012, 10:38:49 pm by parser padwan »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #1308 on: January 09, 2012, 10:49:16 pm »
Just make sure that you define GDB1 with having enough memory, because if you do something like [0000]->GDB1 and then try to copy 768 bytes into GDB1, you will end up overwriting a whole bunch of data, since GDB1 is not being resized

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Axe Q&A
« Reply #1309 on: January 12, 2012, 10:16:01 pm »
which is faster?

this:
Code: [Select]
:Rect(0,0,96,64)
:RectI(1,1,94,62)

or this:
Code: [Select]
:Rect(0,0,94,62
:For(J,1,94
:For(K,1,62
:Pxl-Off(J,K
:End
:End

^^^note that I'm trying to get a border around the screen. I'm not worried about size, just speed.

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Axe Q&A
« Reply #1310 on: January 12, 2012, 10:45:47 pm »
I would use
Code: [Select]
RectI(0,,+96,-32)
RectI(1,,+93,-32)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #1311 on: January 12, 2012, 10:50:21 pm »
which is faster?

this:
Code: [Select]
:Rect(0,0,96,64)
:RectI(1,1,94,62)

or this:
Code: [Select]
:Rect(0,0,94,62
:For(J,1,94
:For(K,1,62
:Pxl-Off(J,K
:End
:End

^^^note that I'm trying to get a border around the screen. I'm not worried about size, just speed.

The first would be much faster.  Also, chattahippie that code you posted doesn't do the same thing.  Yours creates an empty rectangle with inverted borders.  Parser's code creates a white rectangle with filled borders.

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Axe Q&A
« Reply #1312 on: January 12, 2012, 10:53:26 pm »
The first would be much faster.  Also, chattahippie that code you posted doesn't do the same thing.  Yours creates an empty rectangle with inverted borders.  Parser's code creates a white rectangle with filled borders.
True, I was assuming parser was starting from a blank screen

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1313 on: January 12, 2012, 11:47:43 pm »
You started out pretty good with 68,006 cycles

Rect(0,0,96,64)
RectI(1,1,94,62)


Then you went way in the wrong direction with 2,614,503 cycles D:

Rect(0,0,96,64)
For(J,1,94)
For(K,1,62)
Pxl-Off(J,K)
End
End


And here's my Runer-optimized™ speed/size blend, coming in at 16,303 cycles; that's faster than ClrDraw! :evillaugh:

ᴇ80FF→{L₆+11}ʳ
Copy(L₆+11,-1,11)ʳ
Copy(,L₆+756,12)
ᴇ0100→{L₆+22}ʳ
Copy(L₆+22,-1,9)ʳ
Copy(-1,+12,61*12)
« Last Edit: January 12, 2012, 11:48:08 pm by Runer112 »

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Axe Q&A
« Reply #1314 on: January 13, 2012, 04:47:09 pm »
Super fast and completely obfuscated. Classic Runer-optimizedTM unreadable axe code.
« Last Edit: January 13, 2012, 04:48:04 pm by C0deH4cker »

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Axe Q&A
« Reply #1315 on: January 13, 2012, 04:54:44 pm »
Wow thanks guys O.O

also, I like the Runer-optimizedTM unreadable code. :D

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Axe Q&A
« Reply #1316 on: January 13, 2012, 06:54:46 pm »
Runer, quick, I need a white rectangle with a 2px black border!
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1317 on: January 13, 2012, 06:56:26 pm »
ᴇC0FF→{L₆+23}ʳ
Copy(L₆+23,-1,23)ʳ
Copy(,L₆+744,24)
ᴇ0300→{L₆+34}ʳ
Copy(L₆+34,-1,9)ʳ
Copy(-1,+12,59*12)
« Last Edit: January 13, 2012, 06:57:27 pm by Runer112 »

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Axe Q&A
« Reply #1318 on: January 13, 2012, 06:58:31 pm »
Runer! Quick! How does that even work?
In-progress: Graviter (...)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1319 on: January 13, 2012, 07:08:46 pm »
.Draw a byte of top border (88-95,1)
.Draw a byte of left border (0-7,2)
ᴇC0FF→{L₆+23}ʳ

.Copy byte (88-95,1) of top border to draw rest of top border (0-87,1) and (0-95,0)
Copy(L₆+23,-1,23)ʳ

.Copy byte (0-7,0) of top border to draw bottom border (0-95,62) and (0-95,63)
Copy(,L₆+744,24)

.Draw byte of right border (94-95,2)
.Draw byte of middle (80-93,2)
ᴇ0300→{L₆+34}ʳ

.Copy byte (80-87,2) of middle to rest of third row middle (8-79,2)
Copy(L₆+34,-1,9)ʳ

.Copy third row (0-95,2) to fourth through sixty-second rows (0-95,3-61)
Copy(-1,+12,59*12)
« Last Edit: January 13, 2012, 07:12:19 pm by Runer112 »