0
votes
0answers
27 views

Data structure for storing game objects in a tile based game [on hold]

This is my first time developing a game using C++, so I want to do it right. I decided to start with a tile based game since it has always seemed simpler to me. Previously the way I managed objects ...
1
vote
1answer
204 views

How to store generic data in game database?

To clarify things a bit: I want to create a kind of database for my game, that simply is a class that stores all game-state information like object positions, player scores, etc. The main problem I ...
1
vote
1answer
152 views

Direct3d - Code structure

I'm learning directx in a master's degree and they taught us to have a GraphicsLayer class which is the one connecting with the direct3d library. That way this class is completly independent from the ...
5
votes
2answers
1k views

Custom extensible file format for 2d tiled maps

I have implemented much of my game logic right now, but still create my maps with nasty for-loops on-the-fly to be able to work with something. Now I wanted to move on and to do some research on how ...
0
votes
1answer
168 views

Design patterns for effects between actors and technology

I'm working on my first game, and taking the opportunity to brush up my C++ (I want to make as much of it as portable as I can.) Whilst working on the technology tree and how it affects actors ...
1
vote
1answer
647 views

game data structures

I am working on a game that will be a 3D-shooter (camera trailing player), and want to impose some architecture on the game being that a level is composed of rooms where each room can hold ...
8
votes
3answers
1k views

Proper way to handle destruction of game entities

Imagine a game world where loads and loads of entities are dynamicly loaded all the time, I would represent that as a list of entities perhaps, but what about removing them? While when adding i ...
5
votes
3answers
1k views

Why aren't linked lists more common data structures for enemies?

I was recently listen to a talk that Jonathan Blow gave, you can find it here. In the talk, he was talking about what data structures he (and he seemed to imply many others) use, and why. Which is ...
7
votes
1answer
1k views

How to create a game save file format in c++ using STL

Hey so i just learned about the i/o part of the STL, more specifically fstream. Although I can now save binary info and classes i've made to the hard drive, i am not sure how to define how the info ...
3
votes
1answer
750 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 ...
3
votes
4answers
188 views

Associate a texture to an object (from a data-model, not graphical point of view)

I'm writing a roguelike where objects and floor can be made of different materials. For instance, let's say we can have a wooden chair, an iron chair, a golden chair, and so on. I've got an Object ...
16
votes
5answers
5k views

When should vector/list be used?

I can understand when to use lists, but I don't understand when it is better to use vectors than using lists in video games: when it is better to have fast random access ? (And I understand why it's ...