How can I make sprite move like I want it? For example from the upper left corner to the bottom right?
In a config file I read:
/* Like in other G-Force configs, X and Y span the G-Force window, with (+/-1, +/-1) at each corner. The X and Y parameters below specify the center point of the image rectangle. For example, (0,0) centers the sprite in the G-Force window and (1,-1) puts the image in the right-bottom corner of the window. G-Force provides access to two variables called XPOS and YPOS that already mimic something like a rubber ball bouncing around in the window frame, bouncing off the window walls. This allows you to easily make the sprite float and bounce around the window. If you have special plans for your image's path, simply just don't use XPOS ot YPOS. */
X="XPOS"
Y="YPOS"
So making it move is possible and they do move on my screen but following the XPOS YPOS stuff. How can I tell it how to move?
How can I make it move in a more complex pattern? I.e. a pattern that you can't describe as a single mathematical function?
For example: make a full circle first, then move to upper right corner, then go to lower right, lower left, upper left, upper right, etc.
Thanks in advance!
PS: t = time right ?
PS2: If I'm asking stupid questions that I should have found myself, then sorry for that. I'm usually not the person who goes begging on forums for ppl to help him, but I'm having a really hard time finding good documentation on this superb program I read all the files and stuff and I'm kinda starting to grasp the concept now, but some things are not so obvious at times. So your help is greatly appreciated !!
Hmm turned out you CAN make circles and stuff. In fact I was able to make my sprite move in a Lissajous curve. But my math skills have greatly deteriorated of the last years and I only succeded in this feat by copy pasting and guessing
So another question to you smart ppl here: what coördinate system does g-force use? I thought it used a cartesian coordinate system with (0,0) in the center, (-1,-1) in the lower left corner and (1,1) in the upper right corner. So how can it make full circles and stuff? I guess "t" has something to do with this, so what is the meaning of "t"? Are there other variables like "t"?
look at spinners.txt in the waveshapes folder... lotsa info in there.
i managed to hack out stuff going in circles a while back using the info in there... unfortunately, i don't remember how i did it... (didn't comment my code! next time...)
You are correct about the coordinates. T is time in seconds since G-Force started. You almost have to use some function like sin or cos to get it between -1 and 1. Andy did add system time (time of day) for waves but I'm not sure if it's available anywhere else.
You can make you own variables A0, A1 etc that are calculated at the start and B0, B1 etc that are calculated each display frame. If you're making a wave or particle you can use mag(s) or fft(s) for sound amplitude and frequency amount but I don't think they apply to sprites.
If you know or can find the math you can make complex movement for the sprites but I don't know how except thru trial and error.