An entity for organizing data in a specific way so it can be used efficiently. Examples are arrays, objects, records, structs.
1
vote
0answers
35 views
Representing a high-resolution deformable solid in 3D
I am currently working on a design that will incorporate an object that can change size and shape.
For an example, I'll use a brick of clay. It starts out with normal dimensions of 1"x3"x6", but that ...
0
votes
1answer
60 views
How do I manage monster tables and item databases in my Android game?
To learn more about AI during combat, I made a demo in Unity where a player would fight a creature in an arena. I started here because I plan to implement the system I'm working on in another game. In ...
1
vote
1answer
47 views
Barter system data type
My game has 4 supplies, Gold Wheat Iron Fuel, a player is allowed to select a supply to trade and what supply to receive from merchant NPCs.
Currently, when the user trades an item I have the ...
0
votes
2answers
58 views
Help with Unity3D/2D Proper Prefab Creation
I have been looking around for information regarding this process but I was unable to come across anything that would help me out. Basically, in a game where you may have many items or enemies or ...
1
vote
1answer
29 views
get value from UniformParameterPtr in Ogre
I have a variable of type UniformParameterPtr decalared by Ogre and I want to get its value.
What is the right way to this?
I tried the method .get() but it doesn't really give the value.
something ...
0
votes
0answers
8 views
How to store set of behavioral rules?
I have this idea in my head to create a game where the player creates a bot and defines its behavior. The bot is then sent to an open world (a very simplistic one) and has to survive as long as ...
1
vote
1answer
29 views
Having trouble with constructors and the deque class [closed]
I've recently been trying to make a better version of my previous remake of the classic snake game by implementing data encapsulation and abstraction. I also decided to replace my horrible choice of a ...
0
votes
1answer
33 views
Feasibility of nested voxels
Out of curiosity, does anyone know how feasible it would be to have a voxel engine that allowed for voxels within other voxels? For example, you would have the usual chunks filled with voxels, but ...
0
votes
0answers
75 views
Implementing linked list game objects
I am using a basic drag and drop inventory system interface for implementing linked list in game object. I have been following this tutorial. I am trying for something similar to Blendoku.
I want to ...
1
vote
1answer
94 views
Data Structures for Game State
I'm writing my first game. It's an adventure-RPG in the style of Starflight. I'm thinking about how to represent game state. There are three obvious parts of game state: dialog, combat, and story/...
1
vote
2answers
77 views
Difficulty with linked lists in drawing
I've recently started game development in C++ and decided to make an ASCII based snake game. To hold the values of the snake tail I decided to use a linked list due to its flexibility when it comes to ...
2
votes
2answers
94 views
What kind of data structure to use for planetary populations?
I am in the process of building out the prototype for my space strategy game, which is focused on empire building type gameplay.
One of the most important elements of the game are the various planets ...
1
vote
1answer
73 views
How to change a class's variables at runtime without knowing in advance which class's variables to change?
I am creating a nuclear war simulation game a bit like Defcon if any of you have played that. In the game you can chose one of several regions to play as and in my game I want each region to have ...
0
votes
1answer
73 views
Saving Information in Byte[]
sorry for the unhelpful title. I'm trying to understand how to convert information to bytes so that I can save it using Google's Saved Games feature that comes with Play Services, as explained here.
...
0
votes
0answers
80 views
Database design
I have a Ship class, into which components can be added which change the performance of the ship.
The question is regarding modelling this. My first approach essentially was an EAV approach (a ...
3
votes
1answer
87 views
General Octree question: What do you actually store?
Ok, So I'm experimenting with various terrain generation methods, primarily in Unity, but i'll admit to not use all its features because I started learning about Game Dev in XNA YEARS ago. So, I made ...
0
votes
0answers
69 views
Time-based events in Unity
I want to do stuff based on some time (I have a list of events and a corresponding Unix timestamp). The frequency of events in time varies and I want to capture that in a efficient and not to ...
31
votes
5answers
6k views
Use an instance or a class for game resources (wood,iron,gold)
So I'm making a game where you can send ships to locations to sell or buy resources like wood, iron, gold, etc.
Now I was wondering how the resources should be created in de game. I came up with 2 ...
5
votes
1answer
321 views
Data structure to store breakable parts of a mesh
I have a wall mesh that is divided into destructible pieces. As it gets destroyed, the wall can collapse into separate objects with physics that can be destroyed as well. (Cut the wall in half ...
0
votes
1answer
111 views
How to program destructibles?
I'm thinking about programming a 2d simulation of a spaceship that takes damage depending on where the projectile came from (e.g. from behind - engine, from the front - lasers, sides - hull, etc.). ...
0
votes
1answer
500 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 ...
2
votes
1answer
101 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
292 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
75 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
37 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
224 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
307 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
112 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
37 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
202 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 ...
0
votes
1answer
481 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
32 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)
{
A_CA[V_X,V_Y]=choose(-1,0,1)...
0
votes
1answer
113 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
236 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
119 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
512 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
36 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
175 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
62 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 ...
2
votes
1answer
248 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
68 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 ...
5
votes
1answer
277 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 to ...
2
votes
1answer
45 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
73 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
141 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
45 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
241 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
144 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
41 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 EffectColor;...
0
votes
1answer
73 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 ...