An entity for organizing data in a specific way so it can be used efficiently. Examples are arrays, objects, records, structs.

learn more… | top users | synonyms

3
votes
1answer
268 views

Dynamic Quad/Oct Trees

I've recently discovered the power of Quadtrees and Octrees and their role in culling/LOD applications, however I've been pondering on the implementations for a Dynamic Quad/Oct Tree. Such tree would ...
0
votes
1answer
91 views

Player & Level class structure in 2D python console game?

I'm trying to create a 2D console game, where I have a player who can freely move around in a level (~map, but map is a reserved keyword) and interfere with other objects. Levels construct out of ...
0
votes
1answer
72 views

Array of map data

I'm looking for your thoughts on the best way to store map data. I need to store data for territory ownership for each pixel on the map. The data for each pixel is as such: Player 1 points: 24 ...
0
votes
2answers
129 views

What are some ways to store level data in a game like Gunpoint? [closed]

Gunpoint is a 2D stealth game available here. I was wondering how you might go about storing level data for a game like this. I'm mostly concerned about how the collision detection is saved. There are ...
2
votes
1answer
76 views

How should I store grid-based character inventories in the database?

I used to encode the whole inventory data into binary but I'm thinking of doing something different now. The inventory has a 64 slots in an 8×8 grid. Large items like weapons fill up 6 to 8 ...
19
votes
4answers
1k views

Is there a 3D equivalent of hex tile maps?

Probably the biggest advantage of a hex-based versus square-based map tiling is that the center of each hex has the same distance to all its neighboring hexes. Is there a similar shape that tiles this ...
6
votes
2answers
207 views

How do I simplify terrain with tunnels or overhangs?

I'm attempting to store vertex data in a quadtree with C++, such that far-away vertices can be combined to simplify the object and speed up rendering. This works well with a reasonably flat mesh, but ...
1
vote
2answers
105 views

Best way to store a large amount of game objects and update the ones onscreen

Good afternoon guys! I'm a young beginner game developer working on my first large scale game project and I've run into a situation where I'm not quite sure what the best solution may be (if there is ...
7
votes
1answer
380 views

Settlers-like terrain representation

Remember this beauty? I'm playing it now on my old Amiga 1200. My question is: How do you think they represented the terrain, data structure wise? Obviously it's some kind of points, with a height. ...
0
votes
1answer
44 views

assets access with index offsets

My question if about resource management. Is it a good idea to store resources like Sounds in an array and then make a second array(lets call this SoundCollections) as a sort of reference table(name + ...
4
votes
1answer
468 views

How to edit key-value pairs (like a Dictionary) in Unity's inspector?

I have a spell system I am creating, the principle is as follows: Each spell is an autonomous prefab. It contains a script with some properties (base damage, duration...) that can be modified in the ...
0
votes
0answers
99 views

Big game in Flash - how to create levels structure

I'm building a game in Flash similar to the structure of Angry Birds or Cut the Rope (where there are a number of "rooms" and unique levels created within each "room"). The user gets through the game ...
2
votes
1answer
134 views

Pokemon Game - MySQL Data Structure

I'm making a Pokemon MMO Game with Unity + SmartFoxServer/MySQL and at the moment i'm creating the base structure for the database. But i'm stuck because i don't know the best structure for the moves ...
0
votes
1answer
79 views

Possibly a more efficient way to structure my game's map?

I need a little help with structuring my map. I want to make it efficient but I'm not sure if there's a better way to do this: public class Map { Chunk[][] Chunks; Object[] Objects; } public ...
1
vote
2answers
77 views

Is any data structure more efficient than quad-tree for storing and querying points that lay within an OBB?

Is there any method more effective than quad-trees for storing and searching sets of points that are not spread uniformly on the plane? I need to be able to add, remove and search for points that are ...
0
votes
0answers
33 views

How to combine vertex, normal, UVW arrays optimally?

In Unity, meshes have multiple arrays for various vertex components (Normal, Position, UV coord, etc), and triangles consist of three indices that define the (same) offset into each array to build the ...
1
vote
0answers
164 views

How do i define array in shader's constant buffer with C#?

I am using SharpDX to render 3D graphics and i cannot get to work constant buffer in my shader since it contains an array. Currently it looks like this: cbuffer cb0 : register(b0) { matrix ...
0
votes
1answer
115 views

Data structure fo a ship like in Faster Than Light

I am wonder me, whats the best data structure for a ship like in FTL. At first I thought its easy and I need only to make a array with the rooms(Tiles). But than I noted, that I must put somewhere the ...
3
votes
2answers
332 views

Alternatives to storing all my entities in an SQL database

I've been trying to build my entity system based on pure SQL data storage as explained in this post series. The idea is that every entity or component is stored in an SQL table. I created my framework ...
3
votes
3answers
2k views

How can I implement fast, accurate 2D collision detection?

I'm well aware of how to detect if two or more 2D objects collide but I'm interested in how to decide whether to check for a collision. In previous projects, I just had every object check against ...
1
vote
1answer
178 views

Is it more efficient to store my tile grid as a dictionary or an array?

I've just started making a video game in AS3, and I'm trying to keep the graphics, sound, and actual game state in three completely different spots and sets of classes. That being the case, the ...
2
votes
1answer
107 views

How do I define spawn patterns for a Fruit Ninja-esque game?

I'm creating a game somewhat similar to Fruit Ninja and others, where bombs are thrown up on the screen and you click or touch them to defuse (here is an example of the game). There are four bomb ...
1
vote
1answer
294 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 ...
0
votes
2answers
133 views

How to store tiles with different sizes?

in a tilegame, how can we use several tiles for 1 object? I thought I could add each tile in a json file, with the type and its coordinates, like : "line1: type1_xTile1_yTile1, etc." "line2: ...
1
vote
1answer
229 views

How to generate AABB, OBB & Sphere from polygon soup

How can I generate AABB, OOBB and Sphere from a polygon soup, where the bounding volumes are defined as follows: AABB should be specified by min(x,y,z) max(x,y,z) OOBB should be specified by ...
1
vote
0answers
78 views

What should the data structure of a flexible ability system look like? [duplicate]

Hi guys I am currently working on a turn-based RPG that will require me to create numerous abilities with little overlap. I've been looking to other games to see how their ability and combat system is ...
-1
votes
3answers
262 views

Do I need “cube subclasses” to represent the blocks in a Minecraft-like world?

I would like to try to develop a very simple game like Minecraft for my own education. My main problem at the moment is figuring out how to model classes that represent the world, which will be made ...
4
votes
2answers
286 views

a flexible data structure for geometries

What data structure would you use to represent meshes that are to be altered (e.g. adding or removing new faces, vertices and edges), and that have to be "studied" in different ways (e.g. finding all ...
2
votes
0answers
81 views

Graph Isomorphism > What kind of Graph is this? [closed]

Essentially, this is a variation of Comparing Two Tree Structures, however I do not have "trees", but rather another type of graph. I need to know what kind of Graph I have in order to figure out if ...
6
votes
1answer
254 views

How Do Shapes (Rectangles) Work in Quad Trees?

I've been told that a quad tree is the ideal data structure for my game, but I'm having trouble understanding how exactly shapes work within quad trees. I'm doing this in JavaScript, but I think ...
1
vote
2answers
229 views

Should I use an arraylist to store client connections [closed]

I am running a server, and I have an arraylist of clients. When a client connects, I create a new object in the arraylist(all running on their own threads) When a client disconnects, the server ...
0
votes
2answers
238 views

What alternatives to large arrays do I have for level data?

So I'm going to store my levels in int[] arrays. Most levels are going to be 300*300*300. However, there will be about 24 levels and so that is 24 int arrays of size 300*300*300. However, that would ...
0
votes
2answers
236 views

Inventory structure for games like Dragon Warriors

I'm wandering what would be a suitable way of storing items in inventory. Many games have an inventory that stores different items with its quantity. For example, [ "Herbs" x5, "Torch" x2, ..]. so I ...
5
votes
6answers
412 views

Data structure for random outcome from a hit probability table

The basic idea of a hit-table is carried over from pen & paper role playing games. You roll a die or a number of dice representing your ability to attack an opponent. Your opponents defense is ...
1
vote
0answers
82 views

How to space actors in scene uniformly? [duplicate]

I have a Array data structure right now, which contains 10 soldiers in my army. They can setup initially in various formations - e.g. o o o o o o o o o o The user can move one of the ...
1
vote
0answers
201 views

Image Texture Tracing Algorithm - Cocos2D Box2D

Context: I am working on a 2D Destructible Terrain engine for Cocos2D with Box2D. All images, when a level loads, have their border's traced and cached for the purposes of forming Box2D b2EdgeShape ...
5
votes
4answers
799 views

Do associative array data structures have a place in game development?

Is it a bad idea to use a map data structure (an associative array or dictionary) in game development? According to this flowchart, the ideal container for storing game object's container would ...
3
votes
2answers
253 views

Spell design and comunication with Player

Im trying to design Spell class that can modify almost anything, Player, Units, other spells, etc. I figured out two ways of doing it, but none of this seems proper for me. Thats mainly because of ...
8
votes
2answers
209 views

When should I represent points and sizes as structures?

As part of my simple Ruby 2D game development framework, my game objects have position (x and y values) and size (width and height). class MyGameObject attr_accessor :x attr_accessor :y ...
9
votes
3answers
329 views

Object of arrays or array of objects?

I'm making a management sim game, something along the lines of Roller Coaster Tycoon. I want to know what the best way to structure my world objects is so to maximise performance. Let's say I have ...
1
vote
1answer
189 views

When to use an Array vs When to use a Vector, when dealing with GameObjects?

I understand that from other answers, Arrays and Vectors are the best choices. Many on SE claim that Linked Lists and Maps are bad for video game programming. I understand that for the most part, I ...
31
votes
3answers
2k views

When should I hard-code data versus load external data?

I'm a thousand or so lines of code into making my own 2D space-based game, which creates networks of randomly generated star systems and populates them with a random selection of planets, stations, ...
0
votes
2answers
476 views

How do I organize my class structure for networking?

In my gameclient I have the following classes(compontents): Game, GameScreen, GameWorld, Player. They are structured like this: Game has two GameScreens: MenuScreen and MainScreen. MenuScreen has an ...
0
votes
1answer
130 views

How to store NPC movement data?

In my 2D tile-based game, I have NPCs that move around on a fixed path. I am putting the information about the NPCs in a .plist file that is loaded on startup. The thing is, I'm not sure how to format ...
7
votes
2answers
556 views

How to define areas filled with water?

I would like to enhance my little game engine with nice looking water simulation. To start working on that I need to find a proper way to represent water in the game. Unfortunately I don't know much ...
7
votes
2answers
893 views

Comparing two tree structures

I'm having a hard time trying to describe this in correct terms so I will just give as much detail as possible and hopefully someone knows what I'm trying to do =-) I am trying to compare two node ...
-2
votes
1answer
203 views

Game code structure using openGL / Android [closed]

My game will have 3 activities (splashscreen, options menu and main game). As it stands, each is a separate activity with it's own activity class and GLSurfaceview class. Is this structure the right ...
4
votes
4answers
405 views

Storing data for a pokemon like game

The game I'm developing is close to Pokemon. How should I store the data? I am currently thinking of text files where I save the map and have a corresponding textfile for the trainers and their teams ...
9
votes
4answers
786 views

Is there a way to make a dynamic world such as a MMORPG horizontally scalable?

Imagine a open-world of 500+ players with data changing as fast as 20 updates/player/second. Last time I worked in a similar MMORPG, it used SQL, so obvioulsy it couldn't query the DB all the time. ...
3
votes
1answer
146 views

What data structure to use to implement ocean currents and trade-winds

I'm creating an RPG/simulation game which is similar to the Uncharted Waters Series. The game allows the player to control a fleet to explore and navigate the world on the world map. My Game stores ...