Jump to content

Game layer ordering logic


Alex

Recommended Posts

I'm creating a relatively small game with a flash client and I'm having some problems with the design of a certain part. In the game you have a character and you can walk around a map. It's multi-player so there are other users walking around as well. Because the game is isometric you can walk in front of and behind other users, so the order of the layers needs to be readjusted every time something moves; however, this isn't possible due to another design decision I made.

 

Because as you walk around the game you character doesn't actually move, it's always positioned in the center, and the maps and other players move instead. I thought it would be a good idea to have 3 layers: 1. a layer for yourself, 2. A layer for the map, and 3. A layer for other players. This makes it simple because when you move the map and "other players layer" can be moved. The problem with this is that because the other players are on a separate layer from yourself you can't be positioned between 2 other users, that would require your layer to be somewhere in between the "other players layer", which just isn't possible.

 

Anyone have any ideas on another way? I've been trying to come up with solutions for this problem for a while and tried a few different things with no success. I've also tried posting on more game oriented forums where I'd be more likely to find help, but again I haven't gotten a solution.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.