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
0answers
12 views

How to handle interaction with the map in a 2D-RPG-typed TileMap?

Sorry if this is a long post, but I'd like to explain the context before asking my question ^^" I'm currently working on my "first" game (the more advance one, at least). It'll be a 2D-ARPG where the ...
1
vote
1answer
55 views

C++ Data structure pattern preferability?

So im looking at ways of handling large amounts of data in situations such as an entity manager or particle system. So i have concluded to use an object pool, and there are two things that I could do ...
3
votes
1answer
48 views

Ability/Skill Data and Method Structure (C#, Unity3D)

So I've come to design my game which players will be having a unique set of skill or ability to come with. I can store skill name, mana cost, cooldown, etc in database which each skill have in common, ...
1
vote
0answers
45 views

What is the most efficient way to store world data for a 2D tile game? [closed]

I'm working on a 2D tile based survival game for my programming class and as I was working on GUIs I realized that I would need an efficient way of storing and recalling not only the tile data and ...
0
votes
1answer
25 views

design / data structures

I'm working on a game which I'm writing in Javascript and then porting to iOS/Android via phonegap/cordova. For the most part, I understand how to code and how to get what I want to happen, BUT I ...
2
votes
1answer
80 views

2D infinite grid data structure

I'm currently developing a game, and I'm in a process of experimenting with various data structures to support my game model and simulation. Here are some of the requirements: Grid structure where ...
1
vote
3answers
66 views

Managing data for large number of levels in Unity?

I am making a Unity game vaguely in the vein of Candy Crush Saga for a client and am moving in circles trying to decide how to manage the data for all of their levels. In brief, they want to divide ...
1
vote
1answer
64 views

How do I correctly shift arrays on a Tetris line clear?

I'm writing a Tetris clone in C++ and I am at the last stage, I need to delete a row when it is full. Once a piece falls it is stored in a boolean array grid[20][10]. For example I check which row is ...
1
vote
2answers
28 views

Translating a world position to an array position

Lets keep this simple, so, assuming I have an array like this ... var array = new bool[10,10,10]; .. and then I have a start and end vector3 ... var start = new Vector3(-21,-21,-21); var end = new ...
1
vote
1answer
44 views

About HLSL array packing policy

This is not a question but a confirmation if I'm correct about the behavior of HLSL arrays. I'm working with a standard lighting vertex shader, HLSL plus C++, DirectX11.1 API. For storing my lights ...
1
vote
1answer
55 views

how to check if an array element is defined? (Game-maker studio)

The code is this: if is_undefined(A_SA[V_X,V_Y])=false and A_SA[V_X,V_Y]=0 { //actions from the "if" statement } The error message is this: Push :: Execution Error - Variable Index [0,10] out of ...
1
vote
1answer
22 views

How to give a value to all elements of an array?

This problem is encountered in Game-maker studio: I created an array using the following iteration: V_X=0 //these are coordinates of my "pointer" V_Y=0 repeat(100) { ...
0
votes
1answer
29 views

Why do KD trees put the median split exactly on a point?

I've understood that KD tree split points using the median while cycling on each axis. I've also understood that at each node traversal, a nearest search must use a sphere to store to nearest neighbor ...
2
votes
1answer
136 views

Component arrays vs. entity structs? [closed]

Two of the main systems I've seen in entity system tutorials are: An Entities class with one array / [hash]map for each component, with indices corresponding to entity IDs. A list of Entity structs, ...
2
votes
2answers
102 views

numeric identifiers associative array

edit: clarified my question. I also realized that I didn't pick a very conclusive question title, which unfortunately I cannot change anymore, sorry. Hey everyone, to improve my programming skills a ...
1
vote
1answer
115 views

Is Google's Protocol Buffer viable for the serialisation of game data? [closed]

Simple yes it is suitable, no it is not suitable for communications between game clients and/or server clients. Also is it suitable for serialising and storing game data or is a more customisable, ...
1
vote
1answer
33 views

Separating .js elements/ .js element communication

So I have 2 questions regarding the code below: function goldClick(number){ gold = gold + number; document.getElementById("gold").innerHTML = gold; }; function buyMiner(){ ...
2
votes
1answer
139 views

Efficient datastructure to store a galaxy map

I'm working on a project for an intro level Ai class, and the project I've closen is to create a simulated universe in which Ai actors play against each other economically and militarily. I have the ...
1
vote
0answers
55 views

General pointers and advice in creating inventory structure?

I am working on text-based Diablo-like RPG, where each weapon and armor has unique stats and names and there is a lot of overlap. Ie I can generate Silver Sword with 40 damage, but I can also generate ...
1
vote
1answer
127 views

ID3D11Device::CreateInputLayout: Encoded Signature size doesn't match specified size

I get [ STATE_CREATION ERROR #161: CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE] with the following code: // Vertex data struct VertexData { XMFLOAT3 v; XMFLOAT2 vt; XMFLOAT3 vn; }; // ...
4
votes
1answer
60 views

What is a viable way of finding the minimum swaps to sort numbers in pyramid?

I have made a game that consists of a pyramid of hexagons with numbers from 00 to 99 randomly positioned in groups of 6, 10 or 15 elements. Now, I'm working to create an auto-solver but for the last 2 ...
2
votes
1answer
170 views

How should I store dynamic game entities for efficient area-based selection?

In my 2d block-based game I'm trying to implement a data structure that would store entities entities in a way that's capable of: Direct selection based on coordinate. Iteration Iteration limited ...
2
votes
1answer
41 views

To find a success list in group

I try to find a success list among players for my project. I thought If I find the winning probability of players , it would give me the success list in group. I would like to give an example to ...
2
votes
1answer
51 views

Quadtree splitting

A quadtree has limit on number of item in each nodes. Suppose a node has already has same number of item as the limit. If I add another item on same node the node should split and new item should be ...
1
vote
2answers
124 views

Using hard coded values for Items?

Is it a bad idea to use hard coded values for things like items (static data) that would change infrequently in an online game? I'm designing an online game in node js, and I'm trying to decide if it ...
0
votes
1answer
32 views

Triangle data structure not working for LoD algorithm

I would like to implement a LoD algorithm to my 3D game in order to simplify meshes at certain distances from the player. My meshes are created / loaded using a VBO, so the vertex data is stored in a ...
2
votes
2answers
231 views

Manually creating cycles in planar, procedural trees?

I am creating a procedural map using delaunay triangulation and an MST. I'd like to have a bit more control over my final graph. Like when i was looking looking at the MST I wondered how I can connect ...
2
votes
1answer
143 views

How to deal with a many to many relationship between objects

In my game, I keep a list of all clients currently connected to the server and a list of all actors in the game. Each actor is "relevant" ( currently replicating ) to 0 or many clients, and each ...
0
votes
0answers
29 views

Wrong value from uniform block on OSX+OpenGL

I have a uniform block defined as follows: layout (std140) uniform u_LayerUniform { LayerStruct Layers[150]; }; and the LayerStruct is defined as follows: struct LayerStruct { vec4 ...
0
votes
1answer
60 views

a shader type class in c

Is it possible to setup something sort of like a class in C++ but in c in the simplest terms? I want to avoid using c++ but I would like to create a simple struct that has glsl shader program. for ...
1
vote
1answer
85 views

Finding the “Important” nodes of a grid path

On a Navmesh Grid, all nodes are essentially vertices or turn-points so the returned path is efficient in that it only involves points where an entity must change its direction. A grid path, however, ...
0
votes
1answer
133 views

How to make “Events”/ Scripted Scenes

I want to make cutscenes etc, in my game. I thought of a similar System like in the RPG Maker: If you enter a certain Area, a list of commands and arguments is played. E.g. like this: [Move ...
1
vote
1answer
191 views

Efficient container(s) for units in an 2D RTS game

As the title says, I'm toying around with developing a 2D space RTS game. All of my units are spaceships that basically just shoot at one another, but they have to do a variety of other things as ...
1
vote
3answers
196 views

How can I store a large amount of items in a space-efficient manner?

How can I store a large amount of items inside my game? Are each of the items default data be loaded from a file into an item class and then stored in a giant array/list/dictionary? For a point of ...
0
votes
2answers
60 views

Efficient Collisions Iteration?

My project has upwards of 3000 2D objects but not all of them collide with each other. Between each object that can collide, a CollisionPair is created and stored inside a flattened array. Currently, ...
3
votes
2answers
434 views

Efficient removal and adding of Components in ECS

i'm working with the Ashley Entity-Component-System (related to libGDX) to program a server-side simulation for an online game and i stumbled upon a serious performance drawback, that is probably ...
9
votes
1answer
733 views

Why are 16×16 pixel tiles so common?

Is there any good reason for tiles (e.g. Minecraft's) to be 16×16? I have a feeling it has something to do with binary because 16 is 10000 in binary, but that might be a coincidence. I want to know ...
0
votes
1answer
180 views

How can I store additional attributes on DCEL edges?

I am currently working on a city generator, and I've ran into some issues with data storage while working on the roads. I currently use a doubly-connected edge list (DCEL for short), to store the road ...
3
votes
1answer
233 views

Structure for attacking in RPG

I'm going over different ways to implement attacking in a "dungeon crawler". What I have kind of abstracted out... There are 2 kinds of people, The Player, and the enemies, these are both living ...
-1
votes
2answers
81 views

How to make a proper cache on user computer?

Currently when launching the client of the game, it connects to the server and loads all the cachedata in a normal form (= folders, .txt files and .png files). However I don't like that the players ...
0
votes
4answers
386 views

Class design and data structures for a Tower Defense

I was trying to come up with a structure for a simple TD game that has following elements Tower Each Tower has a set of properties like range, damage, health etc There could be different types of ...
1
vote
2answers
233 views

Bubble shooter clone, structure for storing/adding of bubbles

Im having a few issues trying to figure out what the best data structure to use for storing bubbles on the grid, and how to connect new bubbles to the grid when a moving ball collides with a ball on ...
3
votes
1answer
97 views

Planar scene graph

Suppose there are many line segments on a plane (2D scene) and I would like to redraw only small portion ("window") of the whole scene. The scene is dynamic, meaning one can add/remove/transform ...
2
votes
2answers
3k views

Storing Type/Game Data Within A Unity 3D Game Using An Offline Flatfile Database

I've read several documents on how to manage game type data: Would it be better to use XML/JSON/Text or a database to store game content? How to choose how to store data? Im developing an offline ...
1
vote
2answers
104 views

Organizing scene graph nodes that have multiple parents

I am trying to understand how, from an abstract sense, scene graphs should be organized. Say that in a game, there is a scene where the user is inside a house. The house has four walls, and on one ...
1
vote
2answers
154 views

Encoding/decoding data with byte arrays

For my multiplayer game, I'm trying to figure out a system to send multiple pieces of data from one client to another and separating pieces of data. When sending a message, all parameter data has to ...
21
votes
3answers
3k views

Command Ordering Architecture of Dwarf Fortress

What is the most elegant way to implement a command ordering system for AI? for example in dwarf fortress when you mark a forested area for wood cutting, the dwarfs then would do the following ...
3
votes
1answer
236 views

Is std::deque the best option for storing my graphics objects?

I am currently implementing an object buffer, which stores all the objects used in the game at one place. All other components of the game, like the user interface, the level loader, etc, add objects ...
0
votes
1answer
87 views

Place tile values over 'chunk' boundries

My game has a 'chunk' engine similar to Minecraft's but in 2 dimensions. Each chunk is a square of 32 by 32 tiles. What I want to do is generate a defined shape across multiple chunks without ...
2
votes
2answers
123 views

MeshParts - Why do they exist?

For my current game I'm working on I've decided to implement a custom model class to store my models in. Reasons being is that I want to make adding new models as painless as possible for the rest of ...