• Axe Q&A 5 5
Currently:  

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

0 Members and 7 Guests are viewing this topic.

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 #960 on: November 11, 2011, 08:43:08 am »
Okay. I was wondering how I would have to change something in a GDB(that I use as my map) during my program is busy. For example, say I break a block or something, I will wan't to change that number in the GDB to another number so when it loads the screen it's not there anymore. Any ideas?


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

Interview with me

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #961 on: November 11, 2011, 12:03:48 pm »
Do you have a tile that isn't anything (or is, say, floor)?
Say it's zero, and the map is 12*8 (typical 8*8-tile map) and stored row-by-row...
Spoiler For code:
.if you have number for tile instead of X,Y
.say number is N
N/12→Y
N-(Y*12)→X
.X and Y are # tiles counting from zero from the left/top edges respectively
.assuming it's 1 byte/tile
0→{Y*12+X+GDB#}
Ofc variables can be changed so they don't overwrite X and Y :P
« Last Edit: November 11, 2011, 12:08:28 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Axe Q&A
« Reply #962 on: November 11, 2011, 11:26:02 pm »
If you want to change an array's length, then just have a variable such as L be the length, and L1 be the array. then to use the array, just do:

For(A,L1,L1+L)
.Code goes here, where {A} is your array element.
End

To add an element to the end:

L++
byte->{L1+L}

To remove an element from the end:
0->{L1+L}
L--

There are ways to add/remove elements from inside an array with the copy() command, but that's more advanced.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe Q&A
« Reply #963 on: November 12, 2011, 07:41:25 am »
How can I input a string? Sorry, I somehow don't get the input command.... :S

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

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 #964 on: November 12, 2011, 11:20:37 am »
Do you have a tile that isn't anything (or is, say, floor)?
Say it's zero, and the map is 12*8 (typical 8*8-tile map) and stored row-by-row...
Spoiler For code:
.if you have number for tile instead of X,Y
.say number is N
N/12→Y
N-(Y*12)→X
.X and Y are # tiles counting from zero from the left/top edges respectively
.assuming it's 1 byte/tile
0→{Y*12+X+GDB#}
Ofc variables can be changed so they don't overwrite X and Y :P
So it isn't impossible to overwrite a number at a GDB at a certain point, like this:
Code: [Select]
:[01010101010101]->GDB1
:2->{2+GDB1}
That would make that GDB1=01010201010101
Or am I mistaken?


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

Interview with me

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #965 on: November 12, 2011, 11:22:47 am »
That is possible, but that is called 'self-modifying code' or 'writeback'. The thing is, that you cannot use it in an app. The best way is copying the map to L1 or another place in RAM.
I'm not a nerd but I pretend:

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 #966 on: November 12, 2011, 11:24:09 am »
That is possible, but that is called 'self-modifying code' or 'writeback'. The thing is, that you cannot use it in an app. The best way is copying the map to L1 or another place in RAM.
So I copy the code to GDB 2, for example and edit 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 aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #967 on: November 12, 2011, 11:25:32 am »
Nope, you should copy it to some place in RAM that you can edit freely, then delete it afterward (My tip: use an appvar)
I'm not a nerd but I pretend:

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 #968 on: November 12, 2011, 11:36:10 am »
Nope, you should copy it to some place in RAM that you can edit freely, then delete it afterward (My tip: use an appvar)
Okay, thanks guys. I'll look at that. :)


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

Interview with me

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #969 on: November 12, 2011, 05:32:44 pm »
Can someone fix this?

This is for character health stuff
Code: [Select]
For(P,0,C)
If abs({P*2+L1+1}-Y)<7
If abs({P*2+L1}-X)<7
E--
End
End
End
Text(40,1,"HEALTH:")
Rect(66,2,(66+(E/2)),5)
If E<1
2->N
Return
End

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #970 on: November 13, 2011, 11:17:31 am »
Fixed it nvm

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #971 on: November 13, 2011, 01:25:30 pm »
Wait, I saw somewhere that we could quit the program with Returnr but it crashes when I try ???. I thought it might be because of CrabCake, but I don't know. Could it be ?
« Last Edit: November 13, 2011, 01:25:44 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 mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Axe Q&A
« Reply #972 on: November 13, 2011, 01:49:43 pm »
Doesn't crabcake require you to exit in a very specific manner?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #973 on: November 13, 2011, 02:16:09 pm »
Doesn't crabcake require you to exit in a very specific manner?
Yes, you must go to the end of the program where you put AxesOff.
But I made a label at the end with
  Lbl FIN
  AxesOff
  Returnr

And it crashed also .__.
« Last Edit: November 13, 2011, 02:16:19 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 epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #974 on: November 13, 2011, 02:18:28 pm »
What is the maximum program size? I'm at 7000 bytes now.