An entity for organizing data in a specific way so it can be used efficiently. Examples are arrays, objects, records, structs.
-2
votes
0answers
25 views
How do I open or extract data from a .vid file
I want to extract or open files with the .vid extension. They are files from an old game, which may include image data or code. I think 005.vid may be from the Steam engine.
Here is a collection of ....
0
votes
2answers
36 views
Game maker - How to make compound data?
In other languages, such as Lisp, there is such a thing as "compound data", where several variables are grouped together.
For example, if I want to represent an orbital that rotate around the player ...
1
vote
2answers
70 views
Most efficient way to determine if an entity is in a player's field of vision?
So I'm creating a real time multiplayer game.. and I only want entity data to be sent to a user if it's in their field of vision + a little more. (It's third person so it would be a giant box around a ...
0
votes
1answer
38 views
Appropriate data structures for large item database
I'm currently building an RPG Game and as such I intend to have a lot of items. In my current system I have a database of items stored in a JSON file which I read and then store the items in a generic ...
1
vote
2answers
76 views
What pattern is used to render tiles?
I want to render a tile-based map and I am not sure which class structure to use to keep logic and rendering separeted.
My class structure so far on the logic side: One abstract parent class Tile ...
0
votes
0answers
30 views
Choosing a data structure for a group of static (almost) thousands of objects on HTML5 canvas
I have this requirement to implement a data structure for a group of thousands of displayable objects, on HTML5 canvas. Something like a particle system. The objects are randomly spread on the map. ...
1
vote
1answer
82 views
Is this Data Oriented Programming without OOP or am I doing it wrong?
I have been reading many resources about data oreinted programming, and one thing I do understand about it is that it's about keeping chunks of memory together to improve performance. Other than that, ...
0
votes
2answers
56 views
Flipping Textures in Modern OpenGL
How do I flip a texture in modern OpenGL (3.1+)?
This is the unflipped render, keep in mind it is drawn with 8x8 tiles from a texture atlas, so I edited green squares below him into the image to ...
0
votes
1answer
49 views
Best way to add and remove quads in a VBO?
What's the best way to handle adding and removing 2D sprites (quads) in a VBO?
I am working on a mobile board game and sometimes game pieces (represented by quads graphically) need to be added to or ...
2
votes
0answers
44 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
63 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
49 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
70 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 ...
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
36 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 ...
1
vote
1answer
118 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
80 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
102 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
74 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
87 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
83 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
104 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
92 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 ...
32
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
322 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
112 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
585 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
104 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
375 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
83 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
49 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
280 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
432 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
129 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
40 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
239 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
648 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
34 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
151 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
279 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
520 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
37 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
193 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
65 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
308 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
76 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
322 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
47 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 ...