Author Topic: [Axe] Gravity Walls  (Read 12821 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] Gravity Walls
« Reply #15 on: August 10, 2012, 05:29:52 am »
But what about right and left arrows ? cant use :

0->I
[xxx]->Pic0
[xxx]
.the two sprites are the same!!
While(xxx)
I=I+1%8
Pt-On(0,0,Pic0+I)
End
Two possibilities:
 - use Matrefeytontias' Axiom, with bit operations
 - use the same method, with sprites but adapted, see below

Code: [Select]
[XXXX]->Str0
[XXXX]
[XXXX]
[XXXX]
[XXXX]
[XXXX]
[XXXX]
[XXXX]
.8 frames for the arrow sprite
.the first one is a simple arrow
.the next one is the previous one shifted by one pixel
.the next one is the previous one shifted by one pixel
.etc
While meh
 I++
 Pt-Off(..,..,I^8*8+Str0)
End

Also, I don't know which language Eiyeron used but that is not Axe :P
« Last Edit: August 10, 2012, 05:30:44 am 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 Progammer

  • LV3 Member (Next: 100)
  • ***
  • Posts: 68
  • Rating: +9/-0
    • View Profile
Re: [Axe] Gravity Walls
« Reply #16 on: August 10, 2012, 05:45:01 am »
Is this what you means ?

if I = 0 , Pt-Off(,,Str0)
if I = 1 , Pt-Off(,,Str0+8)
if I = 2 , Pt-Off(,,Str0+16)

you won't use 8 sprites for a single animation ! Must exist a better way ..
Check out my New Axe game : Wormsblock http://www.omnimaga.org/index.php?topic=8393.msg154258#msg154258
Any suggest would be welcome :)

<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/e1c7a850d530fb8e.png" alt="NerdTests.com says I'm a Cool Light-Weight Nerd.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>
Have fun !

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axe] Gravity Walls
« Reply #17 on: August 10, 2012, 05:52:49 am »
My ASM code will be faster than every Axe routine you can do for scrolling sprite, I recommend you to use it instead of doing the same thing in Axe, which will be heavier and slower.

Also : now I have the collisions working ! :thumbsup:



Next, I'll implement the arrows, and it'll be them which change the gravity. I'll also add a door in order to have a fully functional first level :)

EDIT : I joined the Axiom in *.8xv format.
« Last Edit: August 10, 2012, 05:58:23 am by Matrefeytontias »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [Axe] Gravity Walls
« Reply #18 on: August 10, 2012, 05:55:35 am »
Is this what you mean ?

if I = 0 , Pt-Off(,,Str0)
if I = 1 , Pt-Off(,,Str0+8)
if I = 2 , Pt-Off(,,Str0+16)

you won't use 8 sprites for a single animation ! Must exist a better way ..
Yes, that is what I mean, but my code is more efficient than all your Ifs ;)

My ASM code will be faster than every Axe routine you can do for scrolling sprite, I recommend you to use it instead of doing the same thing in Axe, which will be heavier and slower.
Release the 8xv then :P
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 Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axe] Gravity Walls
« Reply #19 on: August 10, 2012, 05:58:42 am »
Yeah, you're right sorry ^^'

Offline Progammer

  • LV3 Member (Next: 100)
  • ***
  • Posts: 68
  • Rating: +9/-0
    • View Profile
Re: [Axe] Gravity Walls
« Reply #20 on: August 10, 2012, 06:45:04 am »
cant manipulate bytezs with axe ? because to scroll , you just have to /2 or *2 and add the "neigbour byte"
Check out my New Axe game : Wormsblock http://www.omnimaga.org/index.php?topic=8393.msg154258#msg154258
Any suggest would be welcome :)

<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/e1c7a850d530fb8e.png" alt="NerdTests.com says I'm a Cool Light-Weight Nerd.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>
Have fun !

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axe] Gravity Walls
« Reply #21 on: August 10, 2012, 06:46:54 am »
Of course you can, but it'll be slow since you can't use bit rotations and shift (what my ASM code does).

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [Axe] Gravity Walls
« Reply #22 on: August 10, 2012, 06:48:35 am »
cant manipulate bytezs with axe ? because to scroll , you just have to /2 or *2 and add the "neigbour byte"
Yes, you can. But the problem is not the possibility but the speed and the difficulty. It is also possible to make a raycaster in TI-Basic or a math program in ASM but it is much more convenient to do a raycaster in ASM and a math program in TI-Basic. And shifting a sprite with ASM will probably be faster and smaller than doing it in Axe.

edit: ninja'd
« Last Edit: August 10, 2012, 06:49:09 am 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 Progammer

  • LV3 Member (Next: 100)
  • ***
  • Posts: 68
  • Rating: +9/-0
    • View Profile
Re: [Axe] Gravity Walls
« Reply #23 on: August 10, 2012, 07:49:10 am »
Yes but I don't know Asm well :p What is shift ?
Check out my New Axe game : Wormsblock http://www.omnimaga.org/index.php?topic=8393.msg154258#msg154258
Any suggest would be welcome :)

<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/e1c7a850d530fb8e.png" alt="NerdTests.com says I'm a Cool Light-Weight Nerd.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>
Have fun !

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axe] Gravity Walls
« Reply #24 on: August 10, 2012, 08:03:15 am »
For left and right scrolling, I use respectively the rlc and rrc commands. They are shifting commands, for example you have 10110101. You apply rlc on it ;the command shifts ("décaler" en Français) the bits once on the left, and previous bit 7 is stored into bit 0. So, if you do :
Code: [Select]
rlc %10110101 ; % says that it's a binary number
you get
01101011

Same for rrc, but for the right.
« Last Edit: August 10, 2012, 08:04:07 am by Matrefeytontias »

Offline Progammer

  • LV3 Member (Next: 100)
  • ***
  • Posts: 68
  • Rating: +9/-0
    • View Profile
Re: [Axe] Gravity Walls
« Reply #25 on: August 10, 2012, 08:13:39 am »
I got it thank you :)
Check out my New Axe game : Wormsblock http://www.omnimaga.org/index.php?topic=8393.msg154258#msg154258
Any suggest would be welcome :)

<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/e1c7a850d530fb8e.png" alt="NerdTests.com says I'm a Cool Light-Weight Nerd.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>
Have fun !

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axe] Gravity Walls
« Reply #26 on: August 10, 2012, 08:17:04 am »
Since this is just one ASM command repeated, it's way faster than Axe code, which use a lot of routines for it :)

Offline V1mes

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +7/-0
  • Ma-Heki!
    • View Profile
Re: [Axe] Gravity Walls
« Reply #27 on: August 10, 2012, 09:36:21 am »
Just out of interest, what kind of routines?
Nom nom nom

Spoiler For Do a barrell roll:

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axe] Gravity Walls
« Reply #28 on: August 10, 2012, 09:44:06 am »
Here is something in Axe which has the same effect as RLC. Here, I want to do RLC on the address $90D3 :
Code: [Select]
{E90D3}e7 or ({E90D3}*2}→{E90D3}I let you imagine what does Axe, when we can do it in ASM with only two commands :
Code: [Select]
ld hl,$90D3
rlc (hl)
« Last Edit: August 10, 2012, 09:44:56 am by Matrefeytontias »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [Axe] Gravity Walls
« Reply #29 on: August 10, 2012, 09:47:38 am »
Here is how to do it in Axe:

Code: [Select]
E90D3
Asm(CB06)
:P
« Last Edit: August 10, 2012, 09:47:42 am 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