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

0 Members and 1 Guest are viewing this topic.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #600 on: August 19, 2011, 12:16:39 pm »
Spoiler For false:
So If I didn't make a mistake here, this should draw (a part of the map) to fill the screen?
Code: [Select]
.0
[hexcode1]->pic0
.1
[hexcode2]

for a,0,11
for b,0,7
pt-on(a*8-8,b*8-8,{Y*Width+B+pointer}+pic0)
end
end
Thanks a lot Final Ti. :)

Nope, better like this ;) (In black, your correct code. In red, your wrong code. In green, corrected code,)

.0
[hexcode1]->Pic0
.1
[hexcode2]

for a,0,11
for b,0,7

For(A,0,11
   For(B,0,7
                 .not really an error but not written with the exact syntax
     pt-on(a*8-8,b*8-8,{Y*Width+X+pointer}+pic0)
     Pt-On(A*8,B*8,{Y*Width+X+Pic0}
      .you put +pointer but the pointer is Pic0 here
      .your X and Y must play with A and B according to the character's placement
   End
End

Maybe I made a mistake, I am not an uber programmer ;D

I also have a question. How do we handle 2 bytes data ??? ?
(Axe 0.5.3 user)
To have 65535 and 65535 at GDB1 and GDB1+1, do I do
Data(65535r,65535r)→GDB1
or Data(65535,65535)r→GDB1
or Data(255r,255r,255r,255r)→GDB1
etc...
and to read, I use {GDB1r} or {GDB1}r ?
« Last Edit: August 19, 2011, 12:29:24 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #601 on: August 19, 2011, 12:26:58 pm »
So If I didn't make a mistake here, this should draw (a part of the map) to fill the screen?
Code: [Select]
.0
[hexcode1]->pic0
.1
[hexcode2]

for a,0,11
for b,0,7
pt-on(a*8-8,b*8-8,{Y*Width+X+pointer}+pic0)
end
end
Thanks a lot Final Ti. :)

Nope, better like this ;) (In black, your correct code. In red, your wrong code. In green, corrected code,)

.0
[hexcode1]->Pic0
.1
[hexcode2]

for a,0,11
for b,0,7

For(A,0,11
   For(B,0,7
                 .not really an error but not written with the exact syntax
     pt-on(a*8-8,b*8-8,{Y*Width+X+pointer}+pic0)
     Pt-On(A*8,B*8,{Y*Width+X+Pic0}   .you put +pointer but the pointer is Pic0 here
   End
End

Thanks for correcting me. But if my map dat is stored in GDB1 then shouldn't I write: pt-on(a*8-8,b*8-8,{Y*Width+X+GDB1}+pic0)
That's the only place I put GDB1, so I think it has to be there or else it can't read it.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Axe Q&A
« Reply #602 on: August 19, 2011, 12:27:12 pm »
      pt-on(a*8-8,b*8-8,{Y*Width+X+pointer}+pic0)
      Pt-On(A*8,B*8,{Y*Width+X+Pic0}   .you put +pointer but the pointer is Pic0 here
Actually, that's not correct either. That would read the data from the tile data, not the map data, which is what pointer represented.
The correct way would actually be:
Code: [Select]
Pt-On(A*8,B*8,{Y*Width+X+pointer} * 8 + Pic0)Because each tile is 8 bytes.

And a tip to Stefan Bauwens: Always close your parenthesis in Axe, because it doesn't result in more optimized code, and can cause compilation problems if you don't.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #603 on: August 19, 2011, 12:31:15 pm »
(°-.-) sorry, I did not read properly. I put in a spoiler so people don't get wrong by reading me.
(lol I got wrong even if I made a game based on tilemapping O.O)
« Last Edit: August 19, 2011, 12:39:40 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #604 on: August 19, 2011, 12:38:14 pm »
Thanks both for the help. I just want to be sure of something so I ask this question:
Code: [Select]
[010101010101]->GDB1So "01" is 8 bytes?


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #605 on: August 19, 2011, 12:38:36 pm »
"01" is 1 byte=8 bits (hope I am not wrong on that one)
Because each tile is 8 bytes.
...is referring to the sprites: [hexcode]→Pic0
« Last Edit: August 19, 2011, 12:46:17 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #606 on: August 19, 2011, 12:45:26 pm »
But GDB1+8 will read only 2 digits?


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #607 on: August 19, 2011, 12:47:10 pm »
No, it is an hex code. [01]=b00000001
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #608 on: August 19, 2011, 12:48:37 pm »
No, it is an hex code. [01]=b00000001
But if "01" is one tile and my map reader has to read each tile seperate, how does he only read that one?


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #609 on: August 19, 2011, 12:50:37 pm »
um.. I am not English so the word digit is a bit lolwut for me.
The map reader, in [01] understand the number 1, and by [FF] understands 255 if that helps.
« Last Edit: August 19, 2011, 12:50:51 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Axe Q&A
« Reply #610 on: August 19, 2011, 12:51:20 pm »
Ok, thanks. :)


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #611 on: August 19, 2011, 12:54:50 pm »
No problem. I help those who need help because I first received help when I needed.
Yay, quoting myself :w00t:
I also have a question. How do we handle 2 bytes data ??? ?
(Axe 0.5.3 user)
To have 65535 and 65535 at GDB1 and GDB1+1, do I do
Data(65535r,65535r)→GDB1
or Data(65535,65535)r→GDB1
or Data(255r,255r,255r,255r)→GDB1
etc...
and to read, I use {GDB1r} or {GDB1}r ?
« Last Edit: August 19, 2011, 12:55:21 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Axe Q&A
« Reply #612 on: August 19, 2011, 01:13:33 pm »
No problem. I help those who need help because I first received help when I needed.
Yay, quoting myself :w00t:
I also have a question. How do we handle 2 bytes data ??? ?
(Axe 0.5.3 user)
To have 65535 and 65535 at GDB1 and GDB1+1, do I do
Data(65535r,65535r)→GDB1
or Data(65535,65535)r→GDB1
or Data(255r,255r,255r,255r)→GDB1
etc...
and to read, I use {GDB1r} or {GDB1}r ?
Data(65535r,65535r)→GDB1
Is the correct way of storing 65535 and 65535 to GDB1 and GDB1+2.

You would access each number like {GDB1}r, {GDB1+2}r, etc., but you must remember that since you're dealing with 2 byte numbers, the addresses are two bytes apart.
Reading {GDB1}r and {GDB1+1}r is incorrect because while you read the first number correctly, you're reading a byte from the first and second number for your {GDB1+1}r statement, resulting in an incorrect number.



Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #613 on: August 20, 2011, 02:26:13 am »
Ok, thanks a lot :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #614 on: August 22, 2011, 06:07:39 pm »
could someone please provide me a code to check if another program is using the same code :P
poorly said :P


Like to make sure, in a 2 player game, that the other person is running the program to.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________