Author Topic: Px1-test in Axe usage help  (Read 3198 times)

0 Members and 1 Guest are viewing this topic.

Offline Piguy-3.14

  • LV3 Member (Next: 100)
  • ***
  • Posts: 41
  • Rating: +1/-0
    • View Profile
Px1-test in Axe usage help
« on: July 09, 2013, 06:09:43 pm »
I am working on a particle simulator game in axe and am having trouble using px1-test( in multiple situations, here is the list of problems and codes:

1. I am trying to use Px1-test(X,Y to test collision for gravity. The game uses px1-on(X,Y to draw elenents(they are all one pixel wide) and am trying to make it so that when the user presses [2nd] it places a sand particle at the X Y coordinates and immediately the sand particle begins to fall until it hits another black pixel. I would think that doing :If getkey(54) and px1-test(X,Y)~doesn't equal symbol~1  :X+1->X :Pt-on(X,Y) would work but it does not, can anyone help me with this, I see moo reason why this doesn't work, all it does when you press 2nd is nothing... This is my main problem, the others are not as important.

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: Px1-test in Axe usage help
« Reply #1 on: July 09, 2013, 06:44:33 pm »
Just wondering how your engine is set up?

How do you keep track of the individual 'particles'? Are you just drawing directly to the screen or are you storing in a list/array as well? As in when you press 2nd you would create a new entry in this array and then you can iterate through this list to draw?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline All_¥our_Bass

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 17
  • Rating: +1/-0
  • Spins Leeks
    • View Profile
Re: Px1-test in Axe usage help
« Reply #2 on: July 09, 2013, 10:18:36 pm »
You might want to use vars other than X and Y for coords, the OS uses X and Y for some graphing stuff and some drawing commands modify them, this causes problems that don't exist when you use any vars other than X/Y.
« Last Edit: July 09, 2013, 10:20:25 pm by All_¥our_Bass »
SOPA = Sons Of the Patriots Act

Stop SOPA

Offline Hooloovoo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +22/-0
    • View Profile
Re: Px1-test in Axe usage help
« Reply #3 on: July 09, 2013, 10:23:55 pm »
You might want to use vars other than X and Y for coords, the OS uses X and Y for some graphing stuff and some drawing commands modify them, this causes problems that don't exist when you use any vars other than X/Y.
This does not apply here, because Axe does not use the OS's variables unless specifically told to. Axe compiles directly to assembly, so the variables are 16 bits of ram.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale." -tr1p1ea
Spoiler For some of the calcs I own:



(actually I have quite a few more than this, but I don't feel like making bars for them all.)

Offline All_¥our_Bass

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 17
  • Rating: +1/-0
  • Spins Leeks
    • View Profile
Re: Px1-test in Axe usage help
« Reply #4 on: July 09, 2013, 10:25:18 pm »
Just noticed this wasn't for basic. Oops, sorry.
SOPA = Sons Of the Patriots Act

Stop SOPA

Offline Hooloovoo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +22/-0
    • View Profile
Re: Px1-test in Axe usage help
« Reply #5 on: July 09, 2013, 10:44:23 pm »
First off, ~doesn't equal symbol~ can be replaced by !=, which is much easier to type. Secondly, the commands use a lowercase 'l' not the number '1'. about the code, you seem to use pxl-Test( and then Pt-On(. Pt-On( is for drawing sprites, which I doubt that you are trying to do at the moment. You should probably use Pxl-On( instead.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale." -tr1p1ea
Spoiler For some of the calcs I own:



(actually I have quite a few more than this, but I don't feel like making bars for them all.)

Offline XiiDraco

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 513
  • Rating: +32/-5
  • Forget the numbers, just call me, Recreation.
    • View Profile
    • Black-Lark Games
Re: Px1-test in Axe usage help
« Reply #6 on: July 09, 2013, 11:38:16 pm »
First off, ~doesn't equal symbol~ can be replaced by !=, which is much easier to type. Secondly, the commands use a lowercase 'l' not the number '1'. about the code, you seem to use pxl-Test( and then Pt-On(. Pt-On( is for drawing sprites, which I doubt that you are trying to do at the moment. You should probably use Pxl-On( instead.

All of which I was just about to say.

Piguy-3.14, do you think I could see your source (up to you)? I have done a lot of this type of stuff, and could probably help...