Fenix Code Help


When this error comes up, a ; is missing in one of the lines above, in your case:
"graph = 19", it should be "graph = 19;" :D


More errors:

"if BPushed == 1"

should be: "if(BPushed == 1)"

As well as you are missing some other brackets.
And you have too much ends.
If the game compiles, crashes randomly. But I`m, sure you are don`t want to here that yet :p
 
yeah i got the if-bracket-sytem wrong...thx :)


okay fixed everything....took about 2 minutes....and you were right, it DOES crash...it ran like 0.5seconds ]=
 
this may have been answered before, but I can't find it anywhere,
so here goes:

Can GP32 fenix use Mpeg encoding?
if not what's the easiest way to do cutscenes?
 
Encoding or decoding? encoding is a quick no, decoding is a. Well, quick no too. It can't(it can on PC though), and with the overhead Fenix generates decoding mpeg would probably be a bit too much for the GP anyway, so I don't see it happening.

Best(and only realistic) way to do cutscenes is to generate them by code.
 
So basically do a comic strip for the low priority scenes and sprite animation for the bigger ones?

btw I meant whether it could use mpeg.
 
you could always take the single pics from an MPEG and let Fenix display them, but then you'd have no sound...
 
You can take every picture from a short mpg movie and also rip the sound from that movie as wav. And then let this run. But this won`t be a long intro :D
 
OK, I have another question. After looking around I found a bunch of places mentioned that fenix has somehow connected individual sprites to functions or something like that. For instance... the int Collision(int ID) command says that it will tell you if the another sprite(based on it's x, y values) has collided with the current sprite. My question is, how are functions and sprites related? and also how do I know which one is the current sprite? Thanks for the help, if these questions are all answered somewhere and I just can't find it please let me know.
 
Of course they're already answered, just look around sourcecodes!

Make process process1 with graph = 1; - that relates sprite 1 to this certain process.

Make a different process, process2 with graph = 2 - that relates sprite 2 to this certain process.
Now add this function in this process' loop: if(collision(type process1)) signal(type process1,s_kill); end

Run these two processes, and have them move around the screen. When process2 will collide with process1, process1 will disappear.

As you can see, there is no 'sprite' collision, but process collision. You just have to assign a sprite to a process, that's all.

PS: Next time you have a question, please open your own thread rather than revive random threads from the past.
 
Ah, I see, thanks a bunch for your help, that explains a lot. Sorry about putting my questions in other threads, in forums I've been on people usually say it's better to put your questions in a general questions thread then to start a new thread all to yourself. Thanks.
 
I encountered a REALLY strange problem/bug/thingamabob o_0

I got this
Code:
advance(2);
and changed it to
Code:
advance(1);
because the sprite should move slower...but now, they all gone mad! Some of them changed their angle by 45° (one +, the other -), one doesnt move at all. Any solution for this problem or is it a known bug?


Also, I have a problem with another process, it just doesnt appear :blink:
Code:
if(key(_up))batsch(95,116,90000);end;
  if((key(_up))AND(key(_left)))batsch(95,116,135000);end;
  if(key(_left))batsch(95,116,180000);end;
  if((key(_left))AND(key(_down)))batsch(95,116,225000);end;
  if(key(_down))batsch(95,116,270000);end;
  if((key(_down))AND(key(_right)))batsch(95,116,315000);end;
  if(key(_right))batsch(95,116,0);end;
  if((key(_right))AND(key(_up)))batsch(95,116,45000);end;
  if(key(_control))batsch(209,220,90000);end;
  if(key(_alt))batsch(264,219,90000);end; 
  if(key(_esc))exit("",0);return;end

Code:
process batsch(x,y,angle);
 begin
  graph=2;
  
 loop
  advance(2);  
  frame;
  if(collision(type enemy))score+=1;return;end;
  if((x>324)OR(x<-4))return;end;
  if((y>244)OR(y<-4))return;end;
 end;

end;
maybe I should mention that the code of batsch() is identical with the one of the process I wrote about above...and this one does show up :blink:

i know, the name is stupid, but without this problems, noone would have ever known :ph34r:

any help MUCH appreciated,

Nils
 
It`s because of the stupid rounding Fenix does.

Add resolution=100; to all your graphical processes, but be aware that every coord of a "res=100"-process needs to be multiplied with 100!
So to move it one pixel per frame, use advance(100), if it goes outside the screen, its not y=240 to check for, but y=24000... you get the idea :)
 
okay, thanks :) ...the other problem was caused by the fpg it seems...could it be that fenix takes black as alpha channel?

EDIT: garr, got a new problem...I want the program to exactly differ between diagonal and normal directions, so I made up something like
Code:
if(not((key(_up))AND(key(_down)))
 if(key(_up)...
 if(key(_down)...
end;

but now you have to hit them exactly at the same time, which is kinda difficult, because I avoided the whole thing being executed again if the input is held down...
any suggestions?
 
Change it to that:
Code:
  if(not(key(_up) AND key(_down))) //not can also be replace by ! if you want to save space;P
  if(key(_up)...
  if(key(_down)...
end;
 
Back
Top