Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Piguy-3.14 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.
-
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?
-
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.
-
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.
-
Just noticed this wasn't for basic. Oops, sorry.
-
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.
-
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...