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

1
vote
0answers
241 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
886 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
271 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
217 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
361 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
201 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 ...
32
votes
3answers
3k 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
513 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
142 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
630 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 ...
8
votes
2answers
2k 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
220 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
455 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
867 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
153 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 ...
5
votes
1answer
902 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 ...
2
votes
1answer
116 views

Torque2D, Class vs Datablock

I'm scripting my first game with Torque2D and have not fully understood the difference between "Class" and Datablock. To me it seems like Datablock is similar to a struct in C/C++ or a Record in ...
4
votes
1answer
605 views

Is using a half-edge mesh structure feasible?

Is it feasible to use half-edge mesh in games instead of vertex-face structure? What comes to my mind is that it could be useful in mesh simplification (dynamic level of detail). But I'm worried it ...
3
votes
5answers
580 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 ...
0
votes
1answer
180 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 ...
2
votes
1answer
806 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 ...
5
votes
2answers
4k views

Quad Tree with a lot of Moving Objects

I have a Quad Tree implementation that is very useful for what I am trying to do. My problem is that when my viewport has a lot of objects, the Update for the Quad Tree takes a very long time. It ...
4
votes
1answer
1k 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 ...
10
votes
5answers
1k views

Data Structures for Logic Games / Deduction Rules / Sufficient Set of Clues?

I've been cogitating about developing a logic game similar to Einstein's Puzzle , which would have different sets of clues for every new game replay. What data structures would you use to handle the ...
2
votes
1answer
125 views

Managing different utility classes between engine and libraries

I'm currently in updating some engine code (which does not work, so it is more like creating a engine). I've decided to swap over to SFML (instead of my own crappy renderer, window manager, and ...
3
votes
1answer
1k 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
456 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
651 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
529 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
604 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
231 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 ...
1
vote
1answer
168 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 ...
2
votes
1answer
209 views

Ray Tracing concers: Efficient Data Structure and Photon Mapping

I'm trying to build a simple ray tracer for specific target scenes. An example of such scene can be seen below. I'm concerned as to what accelerating data structure would be most efficient in this ...
2
votes
1answer
480 views

Object detection in bitmap JavaScript canvas

I want to detect clicks on canvas elements which are drawn using paths. So far I have stored element paths in a JavaScript data structure and then check the coordinates of hits which match the ...
1
vote
1answer
79 views

Data model for unlockable card collection

My game has a collection of cards (about 64) that are unlocked (one by one) provided that 4 items are collected/gained in the game. Right now the deck of cards is modeled with a plist file, like ...
-4
votes
2answers
264 views

Read only array, deep copy or retrieve copies one by one? (Performance and Memory) [closed]

The question is asked regarding an environment with garbage collection.(Java, AS3) I am writing a level editor using MVC and the view needs to have read only access to the data in the model for ...
2
votes
2answers
687 views

Game Database Connectivity Java

I'm developing a simple multi-player puzzle game in Java. Both players should be able to view the same game board on his own computer. Then, when one player makes an action in the game (ex. drags an ...
2
votes
2answers
1k views

Data structure for bubble shooter game

I'm starting to make a bubble shooter game for a mobile OS. Assume this is just the basic "three or more same-color bubbles that touch pop" and all bubbles that are separated from their group ...
1
vote
2answers
364 views

Best practice for designing a risk-style board game

I'm just trying to figure out how to set up the code for a game like risk... I would like it to be extensible, so that I can have multiple maps (ie- World, North America, Eurasia, Africa) so ...
6
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 ...
2
votes
1answer
457 views

Which data structure should I use for dynamically generated platforms?

I'm creating a platform type of game with various types of platforms. Platforms that move, shake, rotate, etc. Multiple types and multiple of each type can be on the screen at once. The platforms will ...
4
votes
2answers
1k views

RPG Monster-Area, Spawn, Loot table Design

I currently struggle with creating the database structure for my RPG. I got so far: tables: area (id) monster (id, area.id, monster.id, hp, attack, defense, name) item (id, some other values) loot ...
0
votes
1answer
299 views

What data structure should I use for a 3D platformer game?

I am developing a platformer game with XNA framework like Metroid but in 3D. Now I have to draw models and I have the question of the title. I read many post and I know that the main data structures ...
0
votes
1answer
189 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 ...
8
votes
6answers
823 views

How can I store all my level data in a single file instead of spread out over many files?

I am currently generating my level data, and saving to disk to ensure that any modifications done to the level are saved. I am storing "chunks" of 2048x2048 pixels into a file. Whenever the player ...
3
votes
1answer
542 views

Tic-Tac-Toe game AI

I'm looking into creating a simple tic tac toe/noughts and crosses game in Actionscript3 and am trying to understand the ideas behind the AI used in a game like this. I've seen some simplistic ...
0
votes
2answers
312 views

Storing and sending English word list using trie data structure

I was planning on making a word based game something like Scramble or Boggle. I searched on the internet and found that one of the best way to store the Word List is by using a trie. My question: Is ...
0
votes
2answers
878 views

Game Logic - Tree Based Game Design

I'm trying to write an easy to use and extremely modifiable game engine in C++. I was thinking about using a tree to store game data. All objects would inherit a from the Node class and would have ...
1
vote
2answers
145 views

Implementing an existing (but out of print) game electronically

One of my favorite games is the old Avalon Hill class, PanzerBlitz. I would like to implement it electronically, and have a couple questions related to that: Would I be in legal trouble if I do ...
-4
votes
1answer
226 views

Database structure for level packs, levels and level information

I have a game which shall consist of several level packs (and also be extended by additional level packs). Each level pack should contain some levels. Each level will have its own level information. ...