Quiest
I like turtles!
How fast is SDL on the gp2x?
I mean, at which fps should a game run for example on my
1.6ghz laptop, to be running at a constant 60fps on the gp2x?
Thanks in advance,
and I hope it hasnt been asked already, as I was to lazy to
search. (I`m finished at work now, just finishing this post,
and I`m off to drive home.)
EDIT:
I got yet another thing to ask and I dont wanna open a new
thread again, so I`m asking here:
Why does this work:
but this doesn`t:
p is a rect, btw (as is p_mod). I`m as confused as ever ^^
The for loop works for p.x but something is not right with p.y.
It totally renders the effect uneffectful
(tho there shouldn`t be any difference to the first version,
or should there?)
And please dont tell me that this`ll be slow on the gp2x.
I know. I`m already trying to make it faster.
EDIT2:
Hmm, bold tags in code tags dont work so please look at the
parts surrounded by the tags.
I mean, at which fps should a game run for example on my
1.6ghz laptop, to be running at a constant 60fps on the gp2x?
Thanks in advance,
and I hope it hasnt been asked already, as I was to lazy to
search. (I`m finished at work now, just finishing this post,
and I`m off to drive home.)
EDIT:
I got yet another thing to ask and I dont wanna open a new
thread again, so I`m asking here:
Why does this work:
Code:
SDL_Surface *water_effect(SDL_Surface *back)
{
[b]for(int y=1; y<y_res-1; y++)[/b]
{
for(p.x=1; p.x<x_res-1; p.x++)
{
p.y=y;
wave[j][p.x][p.y]=((wave[i][p.x-1][p.y]
+wave[i][p.x+1][p.y]
+wave[i][p.x][p.y-1]
+wave[i][p.x][p.y+1])>>1)-wave[j][p.x][p.y];
wave[j][p.x][p.y]-=wave[j][p.x][p.y]>>4;
if(wave[i][p.x][p.y]!=0)
{
p_mod.x=p.x+(wave[j][p.x+1][p.y]+wave[j][p.x-1][p.y])/50;
p_mod.y=p.y+(wave[j][p.x][p.y+1]+wave[j][p.x][p.y-1])/50;
SDL_BlitSurface(back,&p_mod,water,&p);
}
}
}
if(i){i=0;j=1;}else{i=1;j=0;}
return water;
}
but this doesn`t:
Code:
SDL_Surface *water_effect(SDL_Surface *back)
{
[b]for(p.y=1; p.y<y_res-1; p.y++)[/b]
{
for(p.x=1; p.x<x_res-1; p.x++)
{
wave[j][p.x][p.y]=((wave[i][p.x-1][p.y]
+wave[i][p.x+1][p.y]
+wave[i][p.x][p.y-1]
+wave[i][p.x][p.y+1])>>1)-wave[j][p.x][p.y];
wave[j][p.x][p.y]-=wave[j][p.x][p.y]>>4;
if(wave[i][p.x][p.y]!=0)
{
p_mod.x=p.x+(wave[j][p.x+1][p.y]+wave[j][p.x-1][p.y])/50;
p_mod.y=p.y+(wave[j][p.x][p.y+1]+wave[j][p.x][p.y-1])/50;
SDL_BlitSurface(back,&p_mod,water,&p);
}
}
}
if(i){i=0;j=1;}else{i=1;j=0;}
return water;
}
The for loop works for p.x but something is not right with p.y.
It totally renders the effect uneffectful
(tho there shouldn`t be any difference to the first version,
or should there?)
And please dont tell me that this`ll be slow on the gp2x.
I know. I`m already trying to make it faster.
EDIT2:
Hmm, bold tags in code tags dont work so please look at the
parts surrounded by the tags.