Fenix Platform Game Help...


Rik

Member
Joined
Dec 21, 2004
Messages
103
Age
41
Website
Visit site
Very new to Fenix... Infact just started yesterday thanks to EvilDragon's tutorial.

Started making some form of platform engine.

(source / files)

I have a few questions.

1: Despite running very smoothly at the 60fps I've set, it doesn't VSYNC... It's not noticeable on the PC.. But it looks pretty distracting on the GP32. :S ...I tried all sorts of fps settings but none seem inline with the refresh rate? Is there no way to wait for v.sync before the next loop? Or is there a set_fps setting that looks good on GP32? Is there a way of double buffering in fenix?

2: My platform movement is probably a bit dodgey. Is there a better way of testing background colisions? (I'm basicly checking 1 pixel of the map where the character will be in the next loop... Is there a way to check a block at once or some thing even better?).

3: Scrolling... I'm a bit stuck here. I've basicaly changed it so that the background moves all the time instead of the character at all. Is there an easy way to have both depending on how close to the screen edge the character is? At the moment this would mess up my lame n00b collision detection. :S'

I did download a couple of code examples but all the comments were in Spanish, and they were even worse than mine. :blink:

Any help would be v.much appreciated, thank you. :)
 
You might want to try the collision() command. It checks if the current process collides with a process of a specified type. If for instance you would want to check if your 'Spaceship' process collides with any process you called 'Bullet', simply use
Code:
if(Collision(type Bullet))
  //Collision!
end
in the Spaceship process. Collision() returns in successive calls all ID's of processes that collide, or zero when there are no more collisions. The if statement works because all ID's are odd numbers, if you would want to get all ID's of colliding processes you could for instance use:
Code:
while(an_id = collision(type bullet))
  /All id's! Note that an assignment returns the value of the right side expression to the while
end
The list resets after a frame statement.

Edit: Forgot to mention: collisions are pixel perfect :)
 
I doubt it exists in the GP32 port, but if it exists it should make things smoother(though you probably hardly notice it on the Gp).

Are you kidding, it's worst of all on the GP. It looks fine on PC and DC.

I'm thinking I should give up on Fenix. Which is a shame cos it'd be really nice to make programs on DC, PC and GP32 all in one go. But I can't see a way around this refresh rate, and the sound sounds awful with all the crackling. :S And the only people who might know anything about these issues seem to all be spanish.
 
Last edited by a moderator:
Huh? I meant that you would hardly see any difference between the double buffering being on or off. Where are you having sound crackling? Never heard that before? And the refresh rate can be changed with set_fps(int fps) if that's what you mean.
 
Back
Top