i am creating a sort of 3d rpg.

Talk about making games.

Postby DilloDude » Wed Jun 21, 2006 2:57 am

I have just started preparing for an isometric type game, and I have two problems
  • I want to be able to walk behind bits of wall, but the wall should go transparent. As far as I know, I can't make just one section of wall transparent unless I make them separate clones. Harder still is adjusting z-depth.
  • With tiling, it appears in the editor that the tiles individual z-depth is determined by their order of creation. However, in game mode, it is different. I want to
    1. have it look the same in the editor as it will in the game, and
    2. have a means of editing those z-depths

These are the problems I have encountered so far.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Wed Jun 21, 2006 3:20 am

I want to be able to walk behind bits of wall, but the wall should go transparent. As far as I know, I can't make just one section of wall transparent unless I make them separate clones. Harder still is adjusting z-depth.
The best way may be to make each section of wall a clone, then I just have to figure if you are behind it or in front of it.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby duracel92 » Wed Jun 21, 2006 2:27 pm

I wouldn't use z-depth, Transparency is really much easier, but the game will need to be played on a faster computer... I still like z-depth sorting, it can be helpful.
duracel92
 
Posts: 132
Joined: Sat Jan 21, 2006 10:45 pm
Location: UK
Score: 0 Give a positive score

Postby Fuzzy » Wed Jun 21, 2006 3:42 pm

The real best way to do it is to set the z-depth of the actor with the create actor event. Set the z-depth based on the y coordinate of the actor. The Lowest depth tile is going to be at the top of the screen, and the highest at the bottom.

Once you have that, set your player and monsters depth as well, using the same formula, but with a slight offset.
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 DilloDude » Thu Jun 22, 2006 4:12 am

I ended up making the walls that overlap bits of ground cut away. Then I added another actor that filled in those cut-offs, and made it transparent, and darker. You then get dark transparent bits. The z still isn't right (you don't go behind them), but oh well. I might make it an option to turn them off if they affact performance too much.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Tue Jul 25, 2006 3:25 am

The basic method of zdepth (yscreen/view.height, or in my case ((yval + (H + 1) * zval) / ((H * 11) + 70)) + .01)works well for some cases, where the actor has a square or round base but where it goes diagonal you could get problems:
Code: Select all
Above the line is behind, good at ^, not at *
Bolow the line is in front, good at v, not at x

    /|\
   / | \
  /  |  \
 |  /\   \ 
 | /  \^  \   
 |/    \   \     
  \     \   \     
  *\     \   \
 ---\-----\--+-
     \     \x|
    v \     \|
       \    /
        \  /
         \/
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Tue Jul 25, 2006 3:45 am

One solution would to be to make it out of separate square blocks, but it wouldn't work so well for doors, so they would have to be made square.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Game A Gogo » Tue Jul 25, 2006 10:01 pm

make it like
Code: Select all
if(zdeph<0.333)zdeph=0.333;
in draw actor, thats what i used in one of my uncoming game so, it dosnt disapear under the grass.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Previous

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron