Z-axis?

Game Editor comments and discussion.

Z-axis?

Postby DesignerSpecial » Thu Feb 15, 2007 3:34 am

Hi everyone. I just finished going through the included tutorials and I'm starting to like this program a lot. However, I have a question that might make or break my using Game Editor for a particular project. Hopefully someone can help.

I'm looking to create a simple beat-em-up, such as Final Fight or Streets of Rage, but I don't see a way to move actors on the Z-axis (into the background). Is this even possible with this program? I know I could move them up and down, but then the characters could not jump and also not pass in front or behind each other like they could using a Z-axis. Any advice is appreciated.

Thanks in advance
DesignerSpecial
 
Posts: 3
Joined: Thu Feb 15, 2007 3:28 am
Score: 0 Give a positive score

Postby DilloDude » Thu Feb 15, 2007 4:59 am

There is no z-axis in game-editor. However, there is z-depth, so you can change how far back or forward an actor is drawn (choose which ones are in front of each other). You can also create your own z-variable, and use that to effect things.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Fuzzy » Thu Feb 15, 2007 6:29 am

You could have several versions of the actor, and use the z-depth to set the animation too.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby DesignerSpecial » Thu Feb 15, 2007 6:33 am

Thanks very much for the replies. Hm, those methods might work if there were only a few Z-levels to move back into (kind of like in the early Fatal Fury games where you had a foreground and background), but for free z-axis movement, I think it might be easier to use a different engine. Maybe Game Editor will add z-axis movement in a future version.

Thanks again, it's appreciated.
DesignerSpecial
 
Posts: 3
Joined: Thu Feb 15, 2007 3:28 am
Score: 0 Give a positive score

Postby Fuzzy » Thu Feb 15, 2007 4:54 pm

You can simulate having only several Z levels by defining them as constants.

define HIDE 0.0
define DISTANT 0.25
define BACKGROUND 0.5
define MIDGROUND 0.75
define FOREGROUND 1.0

then doing this when needed

ChangeZDepth("Event Actor", MIDGROUND);

or even

ChangeZDepth("Event Actor", MIDGROUND+0.1);

if that doesnt suit your needs you can do this:

enum depth { ZERO, LOW, MED, HIGH };

which assigns the values 0, 1, 2, 3. These are perfectly valid values for the Zdepth.

One thing, you dont use depth like a variable. use the contents of the enum type.

ChangeZDepth("Event Actor", HIGH);

You cannot, however, do this:

depth = 3;
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby DesignerSpecial » Thu Feb 15, 2007 8:16 pm

Fuzzy, I'm not nearly fluent enough in code to understand most of that, but thank you anyway. :)

I actually was mistaken about needing a true z-axis for a fighter anyway though, the illusion of depth is created because the only 'collidable' part of the characters are their base. I guess this could be simulated by parenting a second object to their feet and adding collision data to that? Still not sure how a character would jump (unless it's not a true jump and just an animation), but creating this type of game seems to be a little more feasible now.

Thanks.
DesignerSpecial
 
Posts: 3
Joined: Thu Feb 15, 2007 3:28 am
Score: 0 Give a positive score

Postby Sgt. Sparky » Thu Feb 15, 2007 9:18 pm

or you could make a var called depth, and on the draw cator Event Have this script ->
Depth = animpos;(you can also have it * somthing or / somthing)
if the actor has an animation that gets smaller,
and on collision with your varios actors:
if (depth == whateverdepth you want for the other actor)
{
have a phisical responce ect;
}
and on the create actor events for the other actors:
depth = the depth you want;
:D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron