EDIT:
Problem still isn't solved... four days and still nothing even remotely close to fixing this. I am really starting to get disheartened.
No other fenix games display this behavoir so I know there must be a way to fix it.
Please, won't anyone help me?
I've simplified the code to be as basic as it can. The tearing only occurs when at 90 or 180 degrees.
In addition to the things below, I've gotten rid of the background, implemented a resolution of 100, and tried changing the framerate to 24, 30, and 60.
I've tried using different graphics. I even used the FPGs from games that didn't exhibit the issue like protozoa (which totally rocks Ruckage).
I've also tried altering the "angle" to be double and negative valued (e.g. instead of 180000, 540000 || -180000).
Angle is such an important property for dealing with sprite processes I can't really see working around this by having different facing sprite sets.
I've made it so that only the problem angles are used so it's easy to find the spot at the top of the screen.
Oh! and it only happens on the GP2X, the windows interpreter doesn't show the error at all.
Here's my code...
CODE
PROGRAM Gravity;
Global
CtDir=0;
XRes=10000;
YRes=10000;
//Let's start over
PROCESS Control()
PRIVATE xdim,ydim;
BEGIN
xdim=400;
ydim=400;
CtDir=0;
x=10000;
y=10000;
LOOP
SWITCH (CtDir)
CASE 0:
YRes=(y+=ydim);
FRAME;
END
CASE 1:
XRes=(x-=xdim);
FRAME;
END
CASE 2:
YRes=(y-=ydim);
FRAME;
END
CASE 3:
XRes=(x+=xdim);
FRAME;
END
END
if (x<0):x=32000;END
if (x>32000):x=0;END
if (y<0):y=24000;END
if (y>24000):y=0;END
if (key(_alt)): xdim = 0; ydim=0;END
END
END
PROCESS Crit(graph, angle)
BEGIN
resolution=100;
LOOP
graph=(graph+1)%8;
if (graph==0):graph=1;END
x=XRes;
y=YRes;
FRAME;
//Left on the thumbstick: gravity=left, Gravit butts to the left
if (key(_left)): CtDir = 1; angle = 90000;END
//Down on the thumbstick: gravity=down, Gravit butts to the ground
if (key(_down)): CtDir = 0; angle = 180000;END
//Up on the thumbstick: gravity=up, Gravit butts to the sky
if (key(_up)): CtDir = 2; angle = 180000;END
//Right on the thumbstick: gravity=right, Gravit butts to the right
if (key(_right)): CtDir = 3; angle = 90000;END
if (key(_space)): Chkqt();END
END
END
PROCESS ChkQt()
BEGIN
//Dramatically fade to black
fade_off();
//Kill all the other processes but this one
let_me_alone();
//Erase the screen
clear_screen();
//Delete the text written by the Header() process
delete_text(0);
//Exit this last remaining thread
exit("",0);
END
PRIVATE n;
BEGIN
//Set the screen size and pallette (x(width), y(height), Pallette(8bit, 16bit)
//SET_FPS(24,0);
set_mode (320, 240, 16);
//Load the graphics library for the game
load_fpg ("falling.fpg");
Control();
Crit(001, 180000);
END
Problem still isn't solved... four days and still nothing even remotely close to fixing this. I am really starting to get disheartened.
No other fenix games display this behavoir so I know there must be a way to fix it.
Please, won't anyone help me?
I've simplified the code to be as basic as it can. The tearing only occurs when at 90 or 180 degrees.
In addition to the things below, I've gotten rid of the background, implemented a resolution of 100, and tried changing the framerate to 24, 30, and 60.
I've tried using different graphics. I even used the FPGs from games that didn't exhibit the issue like protozoa (which totally rocks Ruckage).
I've also tried altering the "angle" to be double and negative valued (e.g. instead of 180000, 540000 || -180000).
Angle is such an important property for dealing with sprite processes I can't really see working around this by having different facing sprite sets.
I've made it so that only the problem angles are used so it's easy to find the spot at the top of the screen.
Oh! and it only happens on the GP2X, the windows interpreter doesn't show the error at all.
Here's my code...
CODE
PROGRAM Gravity;
Global
CtDir=0;
XRes=10000;
YRes=10000;
//Let's start over
PROCESS Control()
PRIVATE xdim,ydim;
BEGIN
xdim=400;
ydim=400;
CtDir=0;
x=10000;
y=10000;
LOOP
SWITCH (CtDir)
CASE 0:
YRes=(y+=ydim);
FRAME;
END
CASE 1:
XRes=(x-=xdim);
FRAME;
END
CASE 2:
YRes=(y-=ydim);
FRAME;
END
CASE 3:
XRes=(x+=xdim);
FRAME;
END
END
if (x<0):x=32000;END
if (x>32000):x=0;END
if (y<0):y=24000;END
if (y>24000):y=0;END
if (key(_alt)): xdim = 0; ydim=0;END
END
END
PROCESS Crit(graph, angle)
BEGIN
resolution=100;
LOOP
graph=(graph+1)%8;
if (graph==0):graph=1;END
x=XRes;
y=YRes;
FRAME;
//Left on the thumbstick: gravity=left, Gravit butts to the left
if (key(_left)): CtDir = 1; angle = 90000;END
//Down on the thumbstick: gravity=down, Gravit butts to the ground
if (key(_down)): CtDir = 0; angle = 180000;END
//Up on the thumbstick: gravity=up, Gravit butts to the sky
if (key(_up)): CtDir = 2; angle = 180000;END
//Right on the thumbstick: gravity=right, Gravit butts to the right
if (key(_right)): CtDir = 3; angle = 90000;END
if (key(_space)): Chkqt();END
END
END
PROCESS ChkQt()
BEGIN
//Dramatically fade to black
fade_off();
//Kill all the other processes but this one
let_me_alone();
//Erase the screen
clear_screen();
//Delete the text written by the Header() process
delete_text(0);
//Exit this last remaining thread
exit("",0);
END
PRIVATE n;
BEGIN
//Set the screen size and pallette (x(width), y(height), Pallette(8bit, 16bit)
//SET_FPS(24,0);
set_mode (320, 240, 16);
//Load the graphics library for the game
load_fpg ("falling.fpg");
Control();
Crit(001, 180000);
END