1
vote
3answers
184 views

What datastructure would you use for a collision-detection in a tilemap?

Currently I save those blocks in my map that could be colliding with the player in a HashMap (Vector2, Block). So the Vector2 represents the coordinates of the blog. Whenever the player moves I then ...
0
votes
0answers
38 views

Image layer into tile map concept

I'm not really familiar with programming but I wanted to ask if someone could give me some tips. I would like my game maps could be easily designed in some kind of graphics editor. I came with an idea ...
1
vote
2answers
198 views

How to check for collisions in “diagonal” tiles?

I want to create a tiled map in the following scheme: The player should be able to walk on the blue line (street). Now, what is the best way to solve collision detection in this case? For example, ...
0
votes
2answers
222 views

Why does my player stop when stepping onto a new tile?

Me and my friend are creating a game from scratch. He is in charge of art design and I am in charge of coding. I have done well so far with the code, but I have a collision detection problem when the ...
2
votes
1answer
146 views

Detect obstacles in path on a tile-based map

I'm creating a 2d game with a tile-based map, but smooth movement. I currently use A* in combination with some other tricks for pathfinding, and one issue what I've been dealing with is getting the ...
1
vote
2answers
181 views

Collision detection via adjacent tiles - sprite too big

I have managed to create a collision detection system for my tile-based jump'n'run game (written in C++/SFML), where I check on each update what values the surrounding tiles of the player contain and ...
-3
votes
1answer
202 views

Simple collision detection implementation [closed]

I'm making a game with C++ where the program extracts the lines out of an image (via openCV), stores them in an std::vector< std::vector< int > > and the builds a tile map out of it which is ...
-1
votes
2answers
117 views

Java Tilemap Collision

I have tilemaps represented by values from 0 to 4. How can I make the player collide with tiles represented by 3 and stop the player from passing through it ? Here is my code for the player and ...
0
votes
2answers
186 views

How to get surrounding tiles in a tile array

I've created a tiled map that holds two layers, one for the tile type, and the other for whether it is solid or not. I plan on creating very big maps, and checking every tile seems like it would slow ...
0
votes
1answer
600 views

Top-Down Tilemap Rendering and Collisions in Libgdx

I'm sorry if this question has been previously answered, but I was unable to find an answer here or through google. I'm trying to make a simple roguelike-like that would feature a top-down tile map, a ...
2
votes
1answer
167 views

Using latest TiledMap, how do you get a specific tile from x and y index?

Seems basic enough, but I can't seem to find the answer: I am trying to implement collission detecton and for that I need the properties of the tile the player is currently entering. I am using ...
0
votes
1answer
99 views

Passing through edges of AABB collision

When I move, I grab the tile in front of the player, but when the player is colliding between two tiles, I grab the wrong tile due to rounding error. I made a video explaining what I mean. As you can ...
3
votes
1answer
362 views

How do I detect a tile map collision's direction? [duplicate]

I'm implementing collision detection with the map for my platformer. I have a method that generates a polygon on every tile and checks if the player hits it -- that's all fine. The problem is that ...
-1
votes
1answer
757 views

Xna tile map collision

I finally found a tutorial on tile maps and loading them in from a file that I understand (http://circlessuck.blogspot.co.uk/2012/09/xna-tutorial-basic-tile-engine-part-2.html), however the tutorial ...
1
vote
1answer
2k views

How do I detect and handle collisions using a tile property with Slick2D?

I am trying to set up collision detection in Slick2D based on a tilemap. I currently have two layers on the maps I'm using, a background layer, and a collision layer. The collision layer has a tile ...
0
votes
0answers
142 views

How to manage multiple objects for a tile based game for collision?

So I'm making the tile-based 2D sandbox platformer...thing to get an idea of how to manage different elements of coding games. Currently I'm at the point where my collision system works fine for a ...
2
votes
2answers
621 views

Collision checking problem on a Tiled map

I'm working on a pacman styled dungeon crawler, using the free oryx sprites. I've created the map using Tiled, separating the floor, walls and treasure in three different layers. After importing the ...
5
votes
1answer
2k views

Circle-Rectangle collision in a tile map game

I am making a 2D tile map based putt-putt game. I have collision detection working between the ball and the walls of the map, although when the ball collides at the meeting point between 2 tiles I ...
0
votes
1answer
409 views

2D Tile Based Particle Collisions

I have a basic 2D particle system and I'm now looking to implement collisions, however I'm not sure on what the best way to do it is. My game is tile based and runs in XNA Game Studio 4.0. I've seen ...
2
votes
2answers
369 views

Tile map collision is not working properly

I am having problems setting collision between my sprite and the tiles. I have only done the code for colision for moving upwards but some places on the map it moves up and some places it doesn't. ...
1
vote
2answers
851 views

How to calculate the direction a ball must bounce

I have a tile engine I have made. I can detect collision between the ball(the player) and the tiles. When a collision is detected all the colliding tiles are stored inside a list. My question now is, ...
1
vote
1answer
531 views

2D Tile based Game Collision problem

I've been trying to program a tile based game, and I'm stuck at the collision detection. Here is my code (not the best ^^): void checkTile(Character *c, int **map) { int x1,x2,y1,y2; /* ...
1
vote
2answers
353 views

improve Collision detection memory usage (blocks with bullets)

i am making a action platform 2D game, something like Megaman. I am using XNA to make it. already made player phisics,collisions, bullets, enemies and AIs, map editor, scorolling X Y camera (about 75% ...
5
votes
2answers
2k views

How do I resolve a collision with two tiles at once?

I am having some problems with collision detection. I have 2 types of objects excluding the player. Tiles and what I call MapObjects. The tiles are all 16x16, where the MapObjects can be any size, but ...
0
votes
2answers
546 views

How do I handle specific tile/object collisions?

What do I do after the bounding box test against a tile to determine whether there is a real collision against the contents of that tile? And if there is, how should I move the object in response to ...