Some newb questions

Started by BlackCurtain, October 22, 2010, 02:25:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DCelso

Monstruos Diabólicos

"A PAck of classic GAMEs For BennuGD" en desarrollo
http://code.google.com/p/apagame4be/

BlackCurtain

Oh man, yet another problem, sorry for my noobishness but when my player's x-position goes past the 200000 pixel mark (the world is looping), the player suddenly disappears. Is this some region define thing?

Drumpi

what is your resolution value? X is an int, so it has a max value, if you overflow it, it reset to min value, so be carefull. I get same problem on mode7 and character desapear is because is on a different location than camera.
So try to using lower resolution or use "mod values".
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

BlackCurtain

Quote from: Drumpi on October 30, 2010, 06:00:34 PM
what is your resolution value? X is an int, so it has a max value, if you overflow it, it reset to min value, so be carefull. I get same problem on mode7 and character desapear is because is on a different location than camera.
So try to using lower resolution or use "mod values".
You mean the resolution-variable? I've set it to 100. Is there anyway to raise the max value of x or some other way to continue the world loop without doing if(x>200000) x=0; end ?

Drumpi

If you don't use negative values, maybe you can use "unsigned int" (I remember there is this type, but i didn't use it). But, resolution=50 it's a good resolution for looooong maps (i used it for 2500x2000 pixels map). 100 is the best resolution for small maps, but if you play with some GBA games (like GT Advance) you can see that they use less than 30 and it works fine.

But if you are doing a looped world, maybe you must use "if(x>200000) x=0;", just think about it.
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

BlackCurtain

Quote from: Drumpi on October 30, 2010, 11:55:46 PM
But if you are doing a looped world, maybe you must use "if(x>200000) x=0;", just think about it.
I guess that'll work for now. Thanks again!

BlackCurtain

Removed my previous post to not fill the entire topic with double and tripple posts :P

I tried the method described in the MAC osx thread about running the game on Mac but that didn't work, nothing happens and when I try different options it complains about missing lib files. I did set the PATH:s though.