Tag Info

10

I think this might be easier with a visual aide. Here are some different things we might mean when we ask for "tiles within a given radius" From the OP's responses above, it sounds like the top-left version is desired (Euclidean - screen space). That seems to have generated a bit of confusion since most tile-based games consider ranges in tile space. No ...

8

You don't need to change the parser, just the renderer. The tiles will be at the 'same' place, except the projection is different. The good news is that the good context 2d can do isometric just by setting the right isometric transform. Once you set it, just draw in a regular way (including drawImage), and all will be drawn in the isometric way !!! magic !!!...

7

I think that layering is the way to go. Layer 0 would be the ground, then layer 1 would include everything that is on the ground, and finally layer 2 would be anything above the ground (blimps, clouds, etc.). Add/remove layers as needed. Each layer would be painted in order, and a painting algorithm would be used to order the entities within each layer. ...

7

You can always just use 3d models instead of 2d art (3d models don't neccessarily mean a 3d game). Apart from that, not much. You could mirror half of the sprites, but that may interfere with the lighting a bit.

6

I need vector in iso coordinates that leads outside the monitor (is normal to a monitor screen). It's two rotations. Your tiles are half as high as they are wide. Projection/dot product is proportional to cosine, and arccosine(1/2) == 60 degrees, which means that's your first rotation. It is followed by a 45-degree rotation. You start with unit-z, 0, 0, ...

5

Pretty sure the easiest way to do rotation like this is to actually hard-code a simple rotation of the underlying array representing the isometric world. Say you have a small array representing tiles, something like this (9 tiles total): [0 2 0] [1 0 4] [1 0 1] Rotate 90 degrees clockwise could be done by swapping the numbers in the array around: [1 1 0] ...

5

Blender is a good start. To get "isometric" view you just need to configure the camera to orthographic projection and place it at the correct angle above and to the side of your model. Then you need to animate the model as required. Here you need to ensure that the number of animation frames equals the desired sprite sheet. Then you "film" the animation ...

5

You could look at Theta* - it's invented for exactly that purpose. Pretty much like A*, except when adding a node it tests if the new node can be reached directly from the active node's parent, and if so from that node's parent, and so on. It produces very-nearly-perfect paths in most conditions. Image is the output of my very, vey buggy C++ implementation....

5

When people refer to an isometric perspective in the context of pixel art or video games, they are usually talking about a dimetric projection where the z-axis is vertical and the x and y axis go diagonal with a vertical:horizontal ratio of 1:2. The reason is that this is much easier to pixel than a "true" isometric projection: Alternatively there are also ...

5

I guess you have two options: Render more angles, 12 or 16. If you create your asset in a 3d program you can create it once and render many angles in no time. Only limit is the texture size. I guess 12 sprites are enough. Splitting your sprite in two parts allows you two animate the curves more smoothly. However you still have the problem that your sprite ...

5

Brief : This answer suggest to break big sprites into one by one tiles so the zPosition for each sprite which is used to sort them in depth will work correctly. To understand my proposal you will have to stop thinking in tiles for a while, even if your finished game needs to guarantee that all objects will be tile aligned. I suggest you to adopt the same ...

5

Here is a solution without resorting to 3D coordinates or splitting your sprite into 1x1 elements, that works if your objects occupy rectangular areas of tiles. Let (ei,ej) be the coordinates of the bottom tile of entity e. I assume the x axis is pointing north-east and the y axis is pointing north-west, so that (ei,ej) has the smallest coordinate values ...

5

This is a square grid shown using an isometric projection: Note how it's wider than it's tall. In fact, even if the grid was a rectangle with unequal sides, it still will be wider than taller, due to the nature of isometric projection. If you use a different projection, you can reduce the width-to-height ratio but you'll never get it taller than wide. The ...

5

In a typical isometric-style projection, tiles are roughly twice as wide as they are tall (depending on whether you're using true isometric or its close cousin often used in games, the 2:1 dimetric projection). So, as you move around the tile grid, measuring out from the player's current focus, you eat up horizontal space about twice as fast as vertical. ...

5

The problem with per-pixel collision detection is that 1. it can be very slow and 2. your graphic design can have a lot more impact on your game mechanics than you would like. It is usually better to try to approximate the collision zones of the objects in your game with simple geometrical shapes. The last time I made a game with an isometric perspective, I ...

4

Store flags for the edges of tiles, not the whole tiles. For instance, the "Southeast Wall" tile might have the flags SouthWall and EastWall set. When doing collision tests, check the boundaries you're crossing, not the whole tile. Alternatively, for even more flexibility, store both tiles (floors) and the boundaries/walls in separate or interleaved ...

4

Basically if you number X and Y iso-coordinates their sum is the number of the diagonal, you sort tiles by diagonal, and then draw first tiles with lower Z. This is indipendent of screen coordinates. (of course assuming the camera is in the bottom left corner of the image)

4

Firstly, a 2:1 ratio is not isometric. It is a similar-looking dimetric projection (where two of the three axes are equally foreshortened, and the vertical axis is slightly less so) Isometric projection is when all three axes are equally foreshortened. An axis-aligned square tile lying in the horizontal plane has an isometric projected width:height ratio of ...

4

I don't have a specific example for an Isometric camera, but it sounds like you are asking about the basic camera system in general. The camera I use in my games is somewhat simple and is illustrated in the figure below: The Camera class contains the following member variables: Vector2 position; Vector2 viewport; Rectangle worldRectangle; Converting from ...

4

As I found out later here isometric in video games in game development it is better to have tiles with a 1/2 height/width ratio, which displays better and is nice for calculations. As I measured, having those ratios also means having a 127 degrees angle. Later, I found this answer on gamedev : What is the view perspective angle of most 2.5D isometric games ...

4

2D It is normal for 2D games to have these drawn and ordered / overlapped by code (loop), using e.g. the painter's algorithm. However, there are special conditions for constructing complex isometric terrain in 2D and you should look around at other Q&A on this site by typing [isometric] (tag) into the search bar at top right of this page. You want to get ...

4

You can represent the transformation between 3D world coordinates to 2D screen coordinates as a projection matrix: $$\begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} X_x & Y_x & Z_x & T_y \\ X_y & Y_y & Z_y & T_y \\ X_z & Y_z, & Z_z & T_z \\ \end{bmatrix} \cdot \begin{bmatrix} X \\ Y \\ Z \\ 1 \end{bmatrix}$$ ...

3

These are the two main solutions I can think of: If you use tilesets, add a rectangle on top of your tiles. You should also move the collision detection up a bit, not to have your character walking on the edge of the blocks. However, this can easily look like the character's feet are passing through the ground but it mostly depends on the quality of the ...

3

If I'm not mistaken Math.tan(x) does not take angles as degrees, but rather radians. If you want to supply angles as degrees, try the following code sample: function getTanDeg(deg) { var rad = deg * Math.PI/180; return Math.tan(rad); } Source - Mozilla Developer Network

3

3D DDA is the algorithm used for this. It is similar to the method used for lighting occlusion in roguelikes.

3

There is absolutely no way of making it perfect because you simply don't have enough information about depth. You have 2D representations of 3D objects. Think about this. If it were a real object, there would be parts of it that the camera can't see, but still block the light and cast a shadow. Also, think about each pixel, there is no way to know how high ...

3

You can do it with a topological sort (usually) but even with just straight rectangular prisms you can still get cycles, so you have to watch out for that. But you may well be able to avoid that in your level design. Here's a great introduction (since the article has moved once, this is the code on github, which should hopefully always have a current link ...

3

The artificial depth from x and y is worth exactly as much as a the one from perspective projection, meaning all normal depth operations apply to it. There are essentially two possibilities for solving your problem: Keeping the static tiles in an already sorted structure and using the depth buffer. Sorting and Redrawing pros: lower graphics memory ...

3

These are (simplified version of) the formulas I use in my current project wizardwar.com: tile_x = screen_y - 0.5 + screen_x; tile_y = (screen_y - 0.5 - screen_x) * -1; By the way: I would recommend you to use different terminology for screen-coordinates and world-coordinates to avoid mixups. I use x and y for screen coordinates and left-down and right-...

3

Isometric games are indead games viewed from above, in such a way that the x, y and z axis are exactly 120 degrees from eachother. So an isometric game is a game viewed in an isometric projection: http://en.wikipedia.org/wiki/Isometric_projection (this source is very reliable :P). So as you have already guessed, it is about the way the game is drawn.

Only top voted, non community-wiki answers of a minimum length are eligible