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

0
votes
1answer
55 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
0answers
26 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 ...
0
votes
1answer
53 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
54 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
25 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 ...
0
votes
1answer
45 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 ...
1
vote
0answers
74 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
98 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 ...
2
votes
2answers
276 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 ...
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 ...
0
votes
2answers
104 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
0answers
76 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
vote
1answer
163 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 ...
2
votes
1answer
95 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 ...
4
votes
2answers
263 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 ...
-1
votes
3answers
253 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 ...
2
votes
0answers
77 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
207 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
190 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
226 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
215 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 ...
1
vote
1answer
145 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 ...
4
votes
6answers
364 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
81 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
175 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 ...
3
votes
2answers
240 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
202 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 ...
8
votes
3answers
312 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
172 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 ...
5
votes
4answers
733 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 ...
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
1answer
120 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
511 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
574 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
175 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
373 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
708 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
142 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 ...
4
votes
1answer
654 views

RPG game engine. Skill application calculations

Short preface I am a part of a small team which is entering game development. We're creating a new RPG setting with custom game system and mechanics based on dice rolls. I'm server-side java ...
0
votes
1answer
166 views

Good way to store entity data

I'm building an RPG style game, but i have some trouble with storing data from entities. These entities can carry data including but not limited to their location, their graphics, whether they are ...
3
votes
1answer
406 views

Storing items in external data files

My project, in its current state, keeps all of the info for each inventory item in script files. That means, inventory items and their properties are part of the codebase. This works well, but I'm ...
3
votes
5answers
525 views

Saving data in games?

I'm soon going to make a game for the iPhone as a school project. My idea was to make a TLOZ remake, with Tiled Maps. However, I'm not quite sure how save the data. In TLOZ you have a lot of ...
3
votes
1answer
787 views

Need info on creating a tile grid data structure in Java

I'm trying to create a game with a fixed size map (2D Tile array). I suppose I can inherit other tiles from this base Tile, e.g.: a BankTile. Placing and removing tiles is all too easy, but forming ...
15
votes
5answers
1k views

Why is chunk size often a power of two?

There are many Minecraft clones out there and I am working on my own implementation. A principle of terrain rendering is tiling the whole world in fixed size chunks to reduce the effort of localized ...
3
votes
1answer
840 views

Best practice for organizing/storing character/monster data in an RPG?

Synopsis: Attempting to build a cross-platform RPG app in Adobe Flash Builder and am trying to figure out the best class hierarchy and the best way to store the static data used to build each of the ...
4
votes
2answers
320 views

Space-efficient data structures for broad-phase collision detection

As far as I know, these are three types of data structures that can be used for collision detection broadphase: Unsorted arrays: Check every object againist every object - O(n^2) time; O(log n) ...
1
vote
1answer
484 views

Data structures for a 2D multi-layered and multi-region map?

I am working on a 2D world editor and a world format subsequently. If I were to handle the game "world" being created just as a layered set of structures, either in top or side views, it would be ...
1
vote
1answer
423 views

How do I simplify a 2D game grid for level management while keeping its by-pixel features?

(I cross-posted this from StackOverflow as this seems to be a more appropriate f̶o̶r̶u̶m̶ community. I've looked around a little here and I did not find an answer, so I hope this is not a recurring ...
0
votes
2answers
430 views

map data structure in pacman

i am trying to make a pacman game in c# using GDI+, i have done some basic work and i have previously replicated games like copter-it and minesweeper. but i am confused about how do i implement the ...
0
votes
1answer
162 views

Using NumPy arrays as 2D mathematical vectors?

Right now I'm using lists as position, velocity, and acceleration vectors in my game. Is that a better option than using NumPy's arrays (not the standard library's) as vectors (with float data ...