0
votes
1answer
93 views

How do I handle this type of collision?

So I've been messing around with simple game development for a while and just found an interesting game idea here . I'm using SFML 2.1 with C++ and so far I have a tilemap in a VertexArray using a ...
0
votes
0answers
64 views

Tile Collision - subtracting a minor value to the box size

I'm having a certain problem when doing collision checks on bounding boxes that have their edges aligned with upper or right tiles. It shouldn't count as an intersection but I don't know a good ...
2
votes
2answers
608 views

Loading map in tile based game

I'm currently working on a simple 2D tile based game. I want to let users (=players) to create really large maps without problems with performance. That is why I'm searching the way how to optimalize ...
0
votes
1answer
188 views

How to achieve selection of a tile from a tile sheet based on an ID?

Let's say I have a tile sheet that contains 8 sprites per sheet. Each sprite is a tile of 30x30. I wrote my own custom map parser/map loader however I'm having trouble extracting a certain tile ...
1
vote
1answer
284 views

SDL: How would I add tile layers with my area class as a singleton?

I´m trying to wrap my head around how to get this done, if at all possible. So basically I have a Area class, Map class and Tile class. My Area class is a singleton, and this is causing some ...
4
votes
1answer
451 views

How to use caching to increase render performance?

First of all I am going to cover the basic design of my 2d tile-based engine written with SDL in C++, then I will point out what I am up to and where I need some hints. Concept of my engine My ...
3
votes
4answers
504 views

How to prevent fleeing monster from backing himself into a dead end?

I've been building a rogue-like for more than a year now, and so far I've only ever implemented very simple monster behaviour - such as moving toward the player when he's in the line of sight, and ...
21
votes
3answers
1k views

Making walls in tile-based games: what am I missing?

After spending time today to jot down some notes regarding the implementation of walls into my tile-based game, I've suddenly realized it's not going to be as simple as I imagined before. While the ...
4
votes
2answers
1k views

Container classes in tile-based games.

I've recently begun working on a tile-based tactical game, and I have questions regarding a couple of key moments. Is it feasible to organize the tilemap as an array of containers, which can hold the ...
3
votes
1answer
764 views

Implementing a tile-based game

Which data structure should be best used to store a pile of tiles from which a player can pick a random tile?
6
votes
5answers
4k views

Alternative to 2D array in a tiled-map structure

After searching for a long time, I'm surprised this question was not asked yet. In a 2D, tiled-map game, how do you handle the map ? I'd be glad to have your point of view in any languages, though I'm ...