Tag Info

Hot answers tagged

4

In each tile you can store walls it has on North and East. That way each tile needs to store only 2 more booleans (or ints, if you want to store wall type). Downside is that tiles along South and West edges cannot have walls on South and West unless you add a one more row of hidden tiles that will have them.


4

I added another answer for an alternative explanation of the problem. You can think of this problem as Motion Planning in the Configuration Space of the tetris piece. The Configuration Space Define the configuration of a Tetris piece to be an (x, y) location and a rotation (t). The configuration of a Tetris piece is therefore three dimensional. We can ...


3

I start with coordinate systems — the coordinates for grid locations are (x,y) but as Krom mentioned in a different answer, for walls there can be up to two walls for each grid location. That leads to a second coordinate system, for edges between tiles. In this article I used West and South so the edges can be (x,y,West) or (x,y,South), but you can pick two ...


3

Going 3D when the game is basically a 2D game seems like an overkill. In your place, i'd rather use a 2D engine that handles already tiles and slopes, and just use a few tricks for the parts where a '3D' effect is required. Just a small example, a bridge : So for the player, that would look like : Now you can add some invisible trigger zones that ...


2

In each tile, it could store the neighbours (or connectivity) that it has access to. Perhaps as a bitmap. The walls are where the two adjacent tiles are not connected. This is very friendly with A*. The second approach is to store the connectivity of tile as a enumeration. For example, a fully open tile is 0, a tile with wall to north and rest open is 1, a ...


2

Add a logical third dimension and add logic to tiles by type. So a horizontal bridge will allow you to pass from left to right on Z = 1 and from top to bottom on Z = 0.(like flow bridges game) Now change the Z when walking up or down a hill. Allow jumping 1 unit high. That's about it. edit: here is an example tutorial- http://rpgmaker.net/tutorials/163/


2

I am assuming that your problem is: Assume the placement location is known. How do I find the optimal sequence of moves to put the piece in the correct location? One answer to this question is to interpret the problem as an Action Planning problem. The simplest algorithm to solve it is probably STRIPS. There is another algorithm that is a more ...


1

Hopefully this C# is okay for you - my c++ is very rusty: abstract class MapFeature { public void Draw(); public bool IsWall(); } enum Direction { North, South, East, West } class Wall : MapFeature { public bool IsWall() { return true; } public Tile Front, Back; // Tiles on either side of the wall, otherwise null. #region ...



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