Fenix Wip Tutorial Chapter 0


airds

Still Fresh
Joined
Jan 12, 2005
Messages
6
Location
bradford, uk
Website
www.notdead.co.uk
figured it out,, thanks,
when are these gonna be updated every few days? every week, ??

if you cant wait, you could always have a look at

http://www.div-arena.com/tutorials.phtml

I know they are DIV tutorials, but I found that Shane Monroe "QUICK START GUIDE", was a pretty good starter. Using that and EvilDragon's tutor I had graphics/pictures on my screen today :D

Now if I could only get the input to work (see my other thread) :blink:
 
Last edited by a moderator:

EvilDragon

Administrator
Staff member
Joined
Mar 4, 2003
Messages
29,778
Age
43
Location
Ingolstadt
ps. the link to the gp32 compatible fenix says it is going to
http://www.meniego.net/files/fenix_all.zip
but it links to
http://fenix.divsite.net/download/Fenix084-win32-binary.zip

You can try the ones you get from fenix.divsite.net - but the compiled files will not be compatible with your GP32 (tried that myself).
You need to get the ones I mentioned in my tutorial.


I think he was just saying that the link in the pdf links to the divsite address rather than the meniego address, this happened to me also, so I just typed it in manually. Great tutorial EvilDragon already done and hungry for more. :)

Thanks again

Aaah, okay, thanks, I'll fix that :)

Thanks to EvilDragon :D
Just tried then example. It runs fine in FlameBird but when i use it on my GP32 i get the following error:

Fenix runtime error 1
Error al abrir %s

Press any button to reboot



I'm pretty sure ive done everything correctly, anyone help?

It sounds like it doesn't find the dcb file (abrir = open)

Make sure the .fxe and .dcb file have the same name (just a different extension) and that the .dcb file is in a directory which has also the same name.

Also, don't put any spaces in your name and don't make the name longer than 8.3 (don't know if that's all neccessary, but it could be a problem).
 
Last edited:

meandu229

Zubeman
Joined
Mar 20, 2004
Messages
1,170
Age
34
Location
England(north east)
Website
www.zubeonline.com
ohh my word i just deleted alot of code(well alot for me) by mistake, i just made a man be controlable by the joy stick(including jump) and then be able to shoot a man on other side of screen using a crappy gun and him blow up,, hehehehe,, am i top of the class, can i have a gold star???
 

elektrocution

Member
Joined
Sep 22, 2004
Messages
169
Age
41
Location
Norway
Website
www.systm.no
i have an actually r-type spaceship, fully moveable up,down, right and left with stars in the background :D

but now im a bit stuck again, but i will check out the tutorials at div-arena now :)
 

EvilDragon

Administrator
Staff member
Joined
Mar 4, 2003
Messages
29,778
Age
43
Location
Ingolstadt
and its only 57 lines of code so far ;)
btw, hopefully part 2 (1) of your tutorial will come soon evildragon! :D

Well... I'm really kind of worn out at the moment (because of all the ADIC uploads, the tutorial, being jury of a band contest... and all that while I have my normal work in real life...), I only had 3 hours sleep for the last 5 days...

So the next part won't be finished before next week I'm afraid... but every week a chapter should be fine... I guess :)

But don't worry, I'll continue it :)
 
Last edited:

Hokutoy

Member
Joined
Feb 21, 2003
Messages
389
Age
42
If you use firebird to make the .DCB file be sure to uncheck "include DCB files" in options.

Or try to "compile" from FXC.exe directly.

Byes
 

Rik

Member
Joined
Dec 21, 2004
Messages
103
Age
38
Website
Visit site
Hmm been messing around with Fenix now, very cool thanks for the start-up, EvilDragon. Is there a way to control the GP32 clock speed? I've noticed my programs seem a bit choppy on the GP32 but fine on PC.

Even this simple project: (you'll need a font.fnt to run it).

Code:
Program Test;  
Global 
   Int font;         
   Int move_y;
   Int move_x;
   Int pos_y;
   Int pos_x;
Begin         
	
SET_FPS(60,1);
SET_MODE(320,240);
DRAWING_Z(0);
DRAWING_COLOR(4);
DRAW_BOX(0,0,320,220);
DRAWING_COLOR(191);
DRAW_BOX(0,220,320,240);
font = load_fnt("font.fnt");

   Loop
     
     If(key(_left)) move_x -= 2;end
     If(key(_right)) move_x += 2;end
     If(move_x>0) move_x -= 1;end
     If(move_x<0) move_x += 1;end
     If(move_x>15) move_x = 15;end
     If(move_x<-15) move_x = -15;end
     move_y += 1;
     If(key(_control) AND pos_y > 205) move_y = -30;end
     pos_x += (move_x / 3);
     pos_y += (move_y / 3);

     if (pos_y > 206) 
	move_y = 0;
	pos_y = 206;
     end
     if (pos_x > 330) pos_x = -10; end
     if (pos_x < -10) pos_x = 330; end

     write(font, pos_x, pos_y, 0, "@");
     Frame; 
     DELETE_TEXT(0);
     
   End

End
 

elektrocution

Member
Joined
Sep 22, 2004
Messages
169
Age
41
Location
Norway
Website
www.systm.no
and its only 57 lines of code so far ;)
btw, hopefully part 2 (1) of your tutorial will come soon evildragon! :D

Well... I'm really kind of worn out at the moment (because of all the ADIC uploads, the tutorial, being jury of a band contest... and all that while I have my normal work in real life...), I only had 3 hours sleep for the last 5 days...

So the next part won't be finished before next week I'm afraid... but every week a chapter should be fine... I guess :)

But don't worry, I'll continue it :)

Cool, take your time. No hurry :) As long as more tutorials are coming, i guess most people would be happy ;)
 
Last edited by a moderator:

EvilDragon

Administrator
Staff member
Joined
Mar 4, 2003
Messages
29,778
Age
43
Location
Ingolstadt
Isn't there somewhere an example game available which i can modify?
So i can better find out 'what' happens when i do 'that'

Check the links section in my tutorial - there's a link to the Fenix Site (http://fenix.divsite.net/index.php?opcion=1&lang=en).

In the downloads section are some examples.

From Tutorial Chapter 2 on, we're going to go through some example scripts step by step :)
 
Last edited:

airds

Still Fresh
Joined
Jan 12, 2005
Messages
6
Location
bradford, uk
Website
www.notdead.co.uk
Isn't there somewhere an example game available which i can modify?
So i can better find out 'what' happens when i do 'that'

I wrote this the other night, my first program that worked on the GP32 :D

Its crap, and basically the program from the DIV tutorial, with "borrowed" graphics, and its probably not the best bit of code, but it works :)

graphs in the fpg are
2=starfield
150=ship
200-202= asteriods (diff colours)
203= end logo
250=shot

Code:
program fire;
global
shooting=0;
shipx=100;
rockcnt=0;
score=0;
lives=3;
begin
    load_fpg ("new.fpg");
    put_screen(0,2);
    while (!key(_tab) and lives >0 ):
	
        
      ship();
      if (key(_control) and !shooting) 
        fireshot(shipx);
      end;
      if (rockcnt <10 and rand(0,10) >3 )
    rockcnt+=1;  
      	rocks();	
      end;
      doscore();  
      frame;
    end;
    if (lives <1) 
	signal(type ship,s_kill);
	signal(type rocks,s_kill);
	signal(type fireshot,s_kill);
	delete_text(0);
	while !(key(_tab)):
  graph = 203;
  x = 150;
  y= 80;
  write (0,120,120,0,"Score = "+score);
  frame;
	end;
    end;
end;  
      
process doscore();
begin
	delete_text(0);
	write (0,0,0,0,"Score = "+score);
	write (0,250,0,0," Lives = "+lives);
end;              
       
process ship();
private
shipcoll=0;
begin
    graph=150;
    y = 180;
    if (key(_left) and shipx >0)
	shipx -= 10;
    end;
    if (key(_right) and shipx <320)
	shipx += 10;
    end;  
    x = shipx;  	
    size =50;
    shipcoll = collision(type rocks);
	if (shipcoll)
  signal(shipcoll,s_kill);
  lives -= 1;
  rockcnt -= 1;
  
    	end;
    frame;
end;      

process fireshot(newx);
private
firecoll;
begin  
    shooting=1;
    graph = 250;
    size =75;
    for (y = 160;Y>0;y=y-10); 
	firecoll=collision(type rocks);
	if (firecoll)
     signal(firecoll,s_kill);
     shooting=0;
     signal(type fireshot,s_kill);
     score += 1;
     rockcnt -= 1;
	end;
    	x = newx; 
      frame;
    end;    
    shooting=0;
   
end;
process rocks();
begin 
    graph = 200 + rand(0,2);
    size = 80 + (rand(0,2)*25);
    x = rand(0,320);
    for (y =-10;y <220;y=y+5)

	frame;
    end;
	
    rockcnt = rockcnt-1;
    
end;

sorry about the formatting, it looked ok before I sent it :(
 
Last edited by a moderator:
Top