Message Board


Message Board > Fenix / Bennu / Gemix / DIV > new with some questions

February 16, 2011, 02:55
DoctorN
Whiskered
91 posts
hey there. my name is DoctorN. I am new here. I had trouble finding a good homebrew forum that was still active (for what im looking for that is). im into dreamcast homebrew, and while most of you probably edit for pc's. im posting here in fenix/flamebird/etc because that is what im using and the code is no different, just the fenix. I am not used to this at all (im an expert at adobe flash for a couple years), and this is like a new ground for me, even visualbasic wasnt that hard (but then again, visualbasic cant make dreamcast games). So I need some help (usually once i get a good template, i study it then i become great at it from there, like i did with flash). I need help with:

*how to use fpg edit 2005. seriously, its in espanol
*is there a good platform ending thats just like mario? all i need is something so basic ill list it here:
-mario (he walks left and right, and jumps)
-goomba (moves left and right, falls, can be jumped on)
-a collectable of some kind (say a coin)
-health bar (just text in the top corner will do, when you are hit by a goomba you get knocked back and lose about 10 health, coins do not regenrate health, maybe make another collecable for that)
-no scrolling necessary, i just need to make like a border system (like i did in flash) that would go to the next part of the level (this way, my game can stay true to the pc version and i wont have to retweak it, might add mode 7 later but thats not a priority).

what i need help with in fpg edit is how to make parts transparent, make "masks" (like you can in game maker, so thats the actual part that collides with anything else), and stuff. flame bird seems pretty easy. but like i said, my brain cant process things unless theres a formula there, once i have that formula, i can add onto it. thanks
____________
#
February 16, 2011, 11:10
raverdave
Don't Give A F*CK
155 posts

There's a setting in a pulldown menu within fpgedit2005 that allows one to set the language to english ;)
I can't remember exactly which so you will have to fiddle around, but it involves loading in a language file...
Once you load that in it is all pretty simple, the bottom area is for FPG's/maps whilst the top is for bmps/jpegs/png's and such, first order of the day in it is to click on NEW FPG icon..give it a name.. the top part (pictures bit) you can then browse for pictures through, they list in the main biggest top white area of the program..simply drag a pic from there into the fpg part (bottom half)! once in there you can edit what is now the maps attributes, as the FPG file holds MAPS that once were pics of the bmp ..png ... etc. format! You get it right?! Cool! Then RESAVE the fpg! hope this helps..

[Edited on February 16, 2011 by raverdave]
____________
Gimme my toetag already...
#
February 17, 2011, 00:10
Mezzmer
Square-theorist
792 posts

I would encourage anyone writing currently in Fenix to immediately use Bennu.

But as you are coding for the Dreamcast as target platform, I guess you could pick up Bennu later on - It's built on Fenix with major improvements and modular system. Also versions compile for Linux, PSP, Wii, GP2X & Caanoo & Wiz. But funnily not the Dreamcast(?)

Have a look at Bennuwiki for Bennu documentation and see the difference/improvements. (link should be in my signature at the moment!)

[Edited on February 17, 2011 by Mezzmer]
____________
#
February 17, 2011, 05:22
DoctorN
Whiskered
91 posts
you go to tools -> configure fpg edit 2005 -> click the bar under the espanol.ini and select english. any tutorials?
____________
#
February 17, 2011, 05:25
DoctorN
Whiskered
91 posts
how do i make an animated image?
____________
#
February 17, 2011, 19:08
raverdave
Don't Give A F*CK
155 posts

well, in a process, you would assign the local var graph a number, for example :

Code:
 

Program test;
Begin
    load_fpg ("whatever.fpg");
     myanim1(); //call the anim process once
     Repeat
         frame;
     Until (key(_esc))
  // kill all other remaining processes and exit
    let_me_alone();
    exit();

End
Process myanim1()
private 
v=1;
begin
  
  Loop
      graph=v;
      v++;
      if(v>3)
        v=1;
      end
  End
   frame;
End


so if you made and loaded in a fpg file with 3 maps in it, that process would display maps 1-3 in a loop as we make the local var graph = v, graph is the command to set that process's map, we reset the var v back to 1 so it loops through.. or at least it does in bennu !

If I am totally wrong then please forgive me! As I havent used this for a while!
____________
Gimme my toetag already...
#
February 18, 2011, 00:22
DoctorN
Whiskered
91 posts
how do i flip and image
____________
#
February 18, 2011, 00:23
DoctorN
Whiskered
91 posts
and can you find me a decent tutorial site that has like jump gravity and stuff?
____________
#
February 18, 2011, 02:26
Mezzmer
Square-theorist
792 posts

DoctorN, hi again!

Try Bennu wiki tutorials for Fenix-type and Bennu solutions.

Really, reading that wiki is the best thing I ever did whilst creating homebrew.

[Edited on February 18, 2011 by Mezzmer]
____________
#
February 18, 2011, 04:30
DoctorN
Whiskered
91 posts
i will take your word on that. and i just noticed you have 666 posts. lol
____________
#
February 18, 2011, 05:01
DoctorN
Whiskered
91 posts
alot of code doesnt work. and im gonna dot eh dreamcast so it has to be fenix.
____________
#
February 18, 2011, 14:54
raverdave
Don't Give A F*CK
155 posts

You flip an image using the rather handy 'flags' local var of that process ..
And just in case you ask, you can also resize an image using the local size var of that process, so size=50 will show it 50% its original size:

Try em out as I cannot remember the param numbers correctly
and each number does i different thing,also you can combine numbers
but probably it is this for example:
Code:
Process flipexample()
Begin
graph=1;
Flags=1 ;
    Loop
        blahblah ....
        frame;
    End
End
End

To be honest you need to learn alot! But If I have time this weekend I will Whip you up a jump example ...
But you really are stretching my memory here! :P

[Edited on February 18, 2011 by raverdave]
____________
Gimme my toetag already...
#
February 18, 2011, 15:48
Rincewind
programmer
1545 posts

Quoting DoctorN:
and can you find me a decent tutorial site that has like jump gravity and stuff?

In this post you can find code for jump gravity and how processes can be mirrored!

Quoting Square:
DoctorN, hi again!

Try Bennu wiki tutorials for Fenix-type and Bennu solutions.

Really, reading that wiki is the best thing I ever did whilst creating homebrew.


The beginners tutorial on there is really Bennu targetted and incompatible with Fenix. For Fenix there's the Fenix wiki, but there aren't any game tutorials on it.
____________
Personal website: http://www.loijson.com
#
February 19, 2011, 04:33
DoctorN
Whiskered
91 posts
jump in the code gives me unknown variable, and when the game loads up, it flashes for a second then goes away
____________
#
February 19, 2011, 04:40
DoctorN
Whiskered
91 posts
eh, the tutorial looks good enough. but can you lay out the code so i just need to retype it in? my games resolution is 320x240x8. i tried making them global and local variables but the things just being a butthole with me. could be that its the dreamcast fenix but thats what ive got to use. or it could be im just eh with fenix. thank you. if i see some code. raverdave, same thing, if you make a tutorial, can you show me where to enter in the rest of the code for resolution and fps and stuff? thanks :)
____________
#
February 19, 2011, 22:13
DoctorN
Whiskered
91 posts
I got it to work but the problem is the game turns on for just a second and then closes, the window is pure black.
Quote:
program platform_engine;
const
   
global
   
local
   
begin
    SET_MODE(320,240,8);//setting the graphics mode
    LOAD_FPG("C:\Documents and Settings\Administrator\My Documents\DC Homebrew\Nick\Platform.fpg");//loading an fpg :)
    delete_text (0);
    write (0, 64, 16, 1, "Platform Game");
end

Global//ground_height
End

Process Player(file,graph,x,y)
Private
xspeed=8;
yspeed=0;

y_start_acceleration=3;
y_acceleration=0;

jump=0;

ground_height=495;//global variable

Begin
Loop
//Walking
If (key(_left) or key(_right))
If (graph==1)
graph=2;
Else
graph=1;
End

If (key(_left)-key(_right)>0)
flags=0;
x-=xspeed;
Else
flags=1;
x+=xspeed;
End
Else
//Standing still
graph=1;
End

//Jumping
If (jump==0)
If(key(_space))
jump=1;
y_acceleration=y_start_acceleration;
End
Else
y_acceleration-=1;
If (y=>ground_height)
jump=0;
y+=ground_height;
y_acceleration=0;
yspeed=0;
End
End

yspeed+=y_acceleration;
y-=yspeed;

Frame;
End
End

____________
#
February 21, 2011, 11:02
Dennis
どこかにいる
2092 posts

This is what happens:

-> BEGIN
-> application starts
-> set_mode
-> load_fpg
-> delete_text(0)
-> write
-> END --> application shuts down

To prevent it from shutting down you should call your processes.

It's always a habit of me to keep the "main" program alive with endless loop where you constantly send frames to your screen.

Your platyer process seems fine, it is looping frame-statements so it never disappears.

Fenix code:
begin
    SET_MODE(320,240,8);//setting the graphics mode
    LOAD_FPG("C:\Documents and Settings\Administrator\My Documents\DC Homebrew\Nick\Platform.fpg");//loading an fpg :)
    delete_text (0);
    write (0, 64, 16, 1, "Platform Game");
    player(<parameters>); // call player process
    loop frame; end //not necessary but my habit
end


____________
Kwakkel
#
February 21, 2011, 16:59
DoctorN
Whiskered
91 posts
ok i got soemthing working now, the character flickers when it moves and is invisible when it stopes and it spawns in the top right corner. but i guess thats something i can easily do with code, right?
____________
#
February 21, 2011, 17:58
DoctorN
Whiskered
91 posts
hmm....i keep getting errors. i cant figure out a place for the player to spawn. it keeps giving me this (() error. and the character.... just paste that code into your flamebird. make the fpg whatever. youll see what i mean. but make graph 1 mario standing (facing ->), and graph 2 mario jumping (facing ->).
____________
#
February 21, 2011, 19:25
Rincewind
programmer
1545 posts

First of all, the Player process' graphics 1 and 2 should be images of the 'walk' animation, both facing left, with image 1 being standing still and image 1 with one leg forward I think. That's not what you have right now!

Currently you have ground_height=495; - this means the 'floor' where the character will stop falling is y=495. This means that when you have a resolution of 320x240, the floor is lower than the height of the screen (240), and won't be visible. So either use a different resolution or change the ground_height variable.

When you call the player character in the main program, you should fill out the variables file, graph, x, and y. So for player(file,graph,x,y) you should fill out when you call the process (where Dennis has <parameters>) for example: Myfpg,1,50,50. The character should then fall automatically to the floor.

Don't forget to assign your loaded FPG-file a variable:
Fenix code:
Global
    Myfpg;
begin
    SET_MODE(320,240,8);//setting the graphics mode
    Myfpg=LOAD_FPG("C:\Documents and Settings\Administrator\My Documents\DC Homebrew\Nick\Platform.fpg");//loading an fpg :)
    delete_text (0);
    write (0, 64, 16, 1, "Platform Game");
    player(Myfpg,1,50,50); // call player process
    loop frame; end //not necessary but my habit
end



If you still can't get it to work, please upload your code file and FPG somewhere and link us to it, then we can make it alright for you.
____________
Personal website: http://www.loijson.com
#
February 21, 2011, 21:52
DoctorN
Whiskered
91 posts
Quote:
program platform_engine;
const

global
PlayerFPG;
ground_height;

local

begin
SET_MODE(320,240,8);//setting the graphics mode
PlayerFPG=LOAD_FPG("C:\Documents and Settings\Administrator\My Documents\DC Homebrew\Nick\Platform.fpg");//loading an fpg
delete_text (0);
write (0, 64, 16, 1, "Platform Game");
Player(PlayerFPG,1,50,50);//loads up the player
loop frame; end
end

Process Player()
Private
xspeed=8;
yspeed=0;

y_start_acceleration=3;
y_acceleration=0;

jump=0;

ground_height=240;//global variable

Begin
Loop
//Walking
If (key(_left) or key(_right))
If (graph==1)
graph=2;
Else
graph=1;
End

If (key(_left)-key(_right)>0)
flags=0;
x-=xspeed;
Else
flags=1;
x+=xspeed;
End
Else
//Standing still
graph=1;
End

//Jumping
If (jump==0)
If(key(_space))
jump=1;
y_acceleration=y_start_acceleration;
End
Else
y_acceleration-=1;
If (y=>ground_height)
jump=0;
y+=ground_height;
y_acceleration=0;
yspeed=0;
End
End

yspeed+=y_acceleration;
y-=yspeed;

Frame;
End
End


Im getting an "incorrect number of parameters for the Player still, and I got rid of everything inside the () in the 2 different spots for player() and I got a "variable already declared" for ground_height.

could it just be the dreamcast version of fenix?
____________
#
February 21, 2011, 21:56
DoctorN
Whiskered
91 posts
and if I move the (file,graph,x,y) to the player process as well I get an invalid name (1) thing
____________
#
February 21, 2011, 23:36
Rincewind
programmer
1545 posts

Process Player() should be Player(file,graph,x,y) and you should remove ground_height from Global, because you already defined it as a private variable in process Player.

Got your PM, I'll be waiting for you to send all the files to me then.

Try to understand what's happening in the code! Don't expect to make a tiled game like Mario right away - this example isn't going much further than this. You first should probably be doing a spaceship game instead, like the tutorial from the DIV games studio manual (an old game creation package which Fenix is based on). I once wrote a Fenix tutorial with a Dutch version of the DIV tutorial, it's probably more useful to understand the code of that first, and to expand upon the game yourself. I translated the code to English for you:


Spaceship game

The following game uses a 16 bit FPG called images.fpg, with 3 graphics. First graphic is a 100x100 graphic of a spaceship facing right, Second graphic is a 3x3 bullet graph, the third graphic is a 100x100 enemy space ship graphic facing right.

Fenix code:
Program Myfirstprogram;
Global
        Myfpg;
Begin
        Set_mode(640,480,16);
        Myfpg=Load_fpg(“images.fpg”);

        Spaceship();
        Enemy(320,240,rand(0,390000));

        Escaper();

        Loop
                Frame;
        End

End

       

Process Spaceship()
Private
        Keybuffer;

Begin
        File=Myfpg;
        Graph=1;
        x=320;
        y=240;

        Loop
                If (key(_up))
                        Advance(4);
                End

                If (key(_left))
                        Angle+=10000;
                end

                If (key(_right))
                        Angle-=10000;
                end

                If (key(_space) and keybuffer==0)
                        Bullet(x,y,angle,4);
                        Keybuffer=1;
                End

                If (not key(_space) and keybuffer==1)
                        Keybuffer=0;
                End

                Frame;
        End
End


Process Bullet(x,y,angle,speed)
Begin
        File=Myfpg;
        Graph=2;

        //Let the bullet advance 40 pixels in order to 'come out' at the front of the spaceship, instead of the middle!
        Advance(40);

        Loop
                Advance(speed);
               
                // If the bullet flies off the screen, exit the loop.
                If (x<0 or x>639 or y<0 or y>479)
                        Break;
                End

                Frame;

        End
End


Process Enemy(x,y,angle)
Begin
        File=Myfpg;
        Graph=3;

        Loop
                Advance(2);

                If (collision(type bullet))
                        Break;
                End

                Frame;
        End
End


Process Escaper()
Begin

        Loop
                If (key(_esc))
                        Exit("byebye",0);
                End

                Frame;
        End
End


First try to wrap your head around this completely, before attempting anything else. If you don't understand any command, look it up at http://www.fenixdocs.com. Play around with this, and expand upon the code. Actively look things up like the concept of private variables, the command advance, and anything else you encounter in the tutorial.

Try to implement some of these expansions yourself first, with help of the Fenix wiki:

1. Enemies that keep spawning on random locations, at a certain speed (not too fast!).
2. A score counter top left of the screen, showing the amount of spaceships the player killed.
3. Implement it that the enemies shoot bullets too (at a slow speed).
4. Create a health counter, display it on the screen, and implement that the enemy's bullets cause damage to your ship and decrease your health.
5.Think of more things to add yourself!

Then come back to us. :D

[Edited on February 21, 2011 by Rincewind]
____________
Personal website: http://www.loijson.com
#
February 22, 2011, 00:15
DoctorN
Whiskered
91 posts
ok. im just like the people at valve though, i cant really work my way up. especially since i have an expertise at actionscript and gml. i believe the first game i ever made was actually a platform game, lol.
____________
#
February 22, 2011, 00:20
DoctorN
Whiskered
91 posts
i kept getting postmaster errors with your email. so:
http://www.mediafire.com/?rbrj7ru7j6toz35

and fenix for dreamcast will work on windows. i also included an .fpg for something i havent included in the game yet. do you think you could help with that? thanks
____________
#

Page 1 , 2


Message Board > Fenix / Bennu / Gemix / DIV > new with some questions

Quick reply


You must log in or register to post.
Copyright © 2005 Booleansoup.com
Questions? Comments? Bug reports? Contact us!