I've been trying to figure out for weeks now, how are games like Urbz for DS or Medal of Honor: Infiltrator for GBA made in regards to draw order? Are they tile based? Layered images? I ask because I plan on making a game with this draw style, however I can't figure out how this is done. I've given the multi-layer style a try, but the problem arises when you move below something that draws over you (breaking perspective). How might I make a game like this? I currently have a collision layer that is overlapped by multiple decor layers, but that's when the perspective breaking happens.
Urbz
[IMG]http://i.imgur.com/GTLWPMa.jpg[/IMG]
MoH:Infiltrator
[IMG]http://i.imgur.com/FGAN6Kw.jpg[/IMG]
i'm pretty sure they are tile based where images with bounding boxes are overlayed onto it
i might be completely wrong though
[editline]13th April 2013[/editline]
if you want doorways you could make an object that fades out when you get within a certain area of it and draws the tile below
The top one is isometric, which is pretty easy to do:
There is a 2D array of stacks. Each stack contains X amount of elements. For simplicity, an element is a basic .png image of a 3D cube.
(It can be expanded upon, so each element contains 6 other images (floor, NW wall, NE wall, SW wall, SE wall, roof). They just gotta be drawn in the correct order as well.
Image:
[img]https://dl.dropboxusercontent.com/u/99717/isoDrawTut.png[/img]
Draw order pseudo code:
[cpp](for every tile in in the grid the image order)
{
(for every element in the stack from bottom up)
{
element.draw();
}
}[/cpp]
Hope this helps more than it confuses.
For the lower one, I presume it's the same principle. It's rotated to have vertical and horizontal lines.
If you're doing non-isometric tiles, layers are enough. The trick is designing your artwork and levels such that the perspective-breaking doesn't happen. I.e. for an arch the sprite would need to be separated into several pieces: one piece for the base (which will always be drawn before the player) and one piece for the top portion (which will always be drawn after the player).
The guy behind Project Zomboid made a big writeup about Isometric development on his [url=http://projectzomboid.com/blog/index.php/2011/04/isometric-development/]blog[/url]. The pictures are all broken though, which makes it hard to understand what he's talking about, but it's still a good read.
[QUOTE=Larikang;40281594]If you're doing non-isometric tiles, layers are enough. The trick is designing your artwork and levels such that the perspective-breaking doesn't happen. I.e. for an arch the sprite would need to be separated into several pieces: one piece for the base (which will always be drawn before the player) and one piece for the top portion (which will always be drawn after the player).[/QUOTE]
This might become my approach. It presents a few limitations in the creation of the map, however it would be better for my artist, as he would prefer not to create tiles sets.
I recommend taking a look at the RPG Maker assets. That uses layered sprites, so you can learn a few tricks by seeing how they arrange things.
I just assumed that the 2.5d effect was created by resorting the draw order of objects on the screen.
It's also a good idea to have a buffer texture for each static layer that you can draw at various offsets/wrap around, that way you only have to draw each tile once once it gets reasonable close to the view.
Sorry, you need to Log In to post a reply to this thread.