Skip to main content

Questions tagged [data-structure]

An entity for organizing data in a specific way so it can be used efficiently. Examples are arrays, objects, records, structs.

36 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
342 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 ...
Paydirt's user avatar
  • 37
3 votes
0 answers
73 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 ...
Tim S.'s user avatar
  • 131
2 votes
0 answers
213 views

How can a system similar to Dwarf Fortress' legends mode be implemented?

In Dwarf Fortress, nearly everything that happens during world generation is logged and viewable in legends mode. An XML file containing that information can be exported and loaded into a utility such ...
Austin's user avatar
  • 31
2 votes
1 answer
162 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 ...
Ben's user avatar
  • 2,141
1 vote
0 answers
42 views

Is there a name for a game world structure composed of component trees?

im having trouble phrasing the issue, so apologies if the title isn't correctly descriptive. I'm creating a basic game engine for the first time and have an idea for setting up the worlds data. The ...
noob456's user avatar
  • 21
1 vote
1 answer
73 views

How do I handle a non-hierarchical, referential network of game data?

I've been using JSON to store a lot of my game's data. I love it compared to my previous workflow. Having a human-readable hierarchy of arbitrary information is a godsend. My needs have grown more ...
Lake's user avatar
  • 191
1 vote
0 answers
151 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 ...
jvc26's user avatar
  • 111
1 vote
0 answers
115 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 ...
The Law's user avatar
  • 111
1 vote
0 answers
735 views

Big game in Flash - how to create levels structure

I'm building a game in Flash similar to the structure of Angry Birds or Cut the Rope (where there are a number of "rooms" and unique levels created within each "room"). The user gets through the game ...
mintfiend's user avatar
1 vote
0 answers
407 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 ...
Paul Renton's user avatar
0 votes
0 answers
52 views

Clarification on scene graph implementation. Adding object/node to a root node or container?

I learned about scene graphs from this chapter on learnopengl and using this I'm trying to make a simple imgui window that can display the scene graph, but one thing that wasn't made clear/I'm having ...
Konjointed's user avatar
0 votes
0 answers
132 views

Separating Game code and Engine code

I've decided to take on a challenge of making 16 c++ games based on this challenge from FamTrinli, I'm using SDL + OpenGL. I've created a simple 2D game in the past, but I didn't like the code ...
koogel's user avatar
  • 79
0 votes
0 answers
105 views

Euro Truck Simulator Standard Telemetry Format

My son's enjoying Euro Truck Simulator 2 on a Windows PC. I've ben looking a the SDK to extend its functionality. I thought it would be useful to serve the telemetry and build a physical dashboard ...
KDM's user avatar
  • 101
0 votes
0 answers
86 views

Group voxels into object?

I'm working on Voxel editing software, and I need to have the ability to group voxels into objects. As for simple editing, I'm using the following data structure: Chunk - represents a fixed 3d grid ...
Sergey Sharpov's user avatar
0 votes
0 answers
45 views

How to separate player state on shared object?

I'm new to game dev and I'm learning about quadtrees for planet rendering. I'm curious on how do I separate player state with quadtrees. For example I have a ship A that's getting close to a planet, ...
Memory1's user avatar
0 votes
0 answers
68 views

TRPG data structure

I have this question since a while now. In a TRPG game like Fire Emblem or Advanced Wars (or even in something simpler like a chess game) with tiles and units, you need to store where each unit is in ...
STK Oscar's user avatar
  • 145
0 votes
0 answers
30 views

Organising gameobjects into multiple lists

I have a very simple little game that consists of a player, zombies, food, and treasure. It's all automated. The player will walk towards a zombie and shoot within a certain distance, which costs ...
BBQSquirrel's user avatar
0 votes
0 answers
123 views

Where to store polygons and polygon animation?

I thought about making something with ApeOut graphics long before it came out and its release motivated me to try - I'm having tons of fun but I stumbled upon a pickle. I can imagine storing polygons ...
cprn's user avatar
  • 254
0 votes
0 answers
1k views

Loading external file data into Scriptable Object in Unity

I've been at this for two long days, trying to figure out a way to handle saving and loading data for a mobile puzzle game I'm working on. The game has level packs and each level pack has multiple ...
Norbert's user avatar
  • 121
0 votes
0 answers
285 views

Data structure backing tile-based map?

I'm building a tile-based game with a similar art style as Stardew Valley, but have a few questions around technique. My understanding is that it's best to store the maps as a byte array of tile ids ...
Adam Arthur's user avatar
0 votes
0 answers
131 views

How do multiplayer turn based games handle computation

I am building a turn based multiplayer simulation game that at the end of each turn takes all of the users inputs/actions then compiles all the data and interactions returning the result of the ...
Branson Boggia's user avatar
0 votes
0 answers
149 views

Data structure for objects in a galaxy of star systems

I'm having some difficulty coming up with the appropriate data structure to use for a game. I'm aiming for a galaxy view with tens of thousands of visitable star systems. Structure Hierarchically, ...
Basic's user avatar
  • 1,278
0 votes
1 answer
230 views

Is naming convention a good base for a sorting and tagging system for game assets?

TLDR: what are the pros and cons of using a naming convention for tagging and sorting game assets? for the UI to search and handle it for devs and gamers to move files around I am building a game ...
formatc2013's user avatar
0 votes
0 answers
106 views

How to make a snake game where each snake tile follows it's connected tile

I want to make a basic snake game. It has a head and a series of tails that occupy a tile in a grid. The first tail in the series is adjacent to the head. and each tail that comes after is adjacent to ...
eguneys's user avatar
  • 247
0 votes
3 answers
1k views

How to smooth a voxel mesh?

Currently I have refined voxels, I want to smooth it to achieve accurate projection. After some web search, I came across smoothing algorithms such as Catmull-Clark, Doo-Sabin etc. Along with this, I ...
Aravindh SK's user avatar
0 votes
0 answers
37 views

Efficient system to reach the "parent" variable

I've been stuck doing this in a very inefficient way and really want to know if there's some design pattern that solves this because it seems like a pretty common problem to have. I have a system ...
Taceo's user avatar
  • 1
0 votes
0 answers
329 views

How to organize objects in a tile-based game

I'm currently developing a tile-based RPG from scratch using C++ and SFML2. So far, I got the map rendering and collision detection working just fine and in a clean, maintainable way. The next step ...
Benjamin Weps's user avatar
0 votes
0 answers
238 views

Help deciding data structure for spatial partitioning, using only value-types in c#

I simply want to implement some sort of grid where I can sort units in an RTS into cells, and then for each unit check to avoid other units and attack other units, in 2d. My map grid is currently 10 ...
Tree3708's user avatar
0 votes
0 answers
43 views

Best data types for DNA, edibles and creatures

So I am making a sort of continuous evolutionary system in the Unity3D engine. Currently I have a DNA class that has values that gets applied to a Creature object on initializing e.g.: ...
Arne de Beer 's user avatar
0 votes
0 answers
127 views

How to organize data transfer between the client and the game server?

I have a game like minecraft, I can run, set and delete blocks. The world consists of a limited set of chunks. I want to write a server for it with the help of a library called boost asio. I need help ...
Dre4msNoEvil's user avatar
0 votes
0 answers
562 views

How to set up a Quiz game with multiple types of questions? (Structs and DataTables)

I am looking to integrate a quiz mode into a game I am in the process of developing in Unreal Engine 4. I'm really just kind of stuck on how to set up my data structures and not really know the way to ...
Dtb49's user avatar
  • 243
0 votes
0 answers
101 views

Are unit/building types generally stored as full objects or imported properties?

I'm trying to write a generic turn-based strategy game, with a few unit types, building types, etc. Since this is something I've never done before, and its not a very easily searchable subject, I'm ...
Prime624's user avatar
  • 101
0 votes
0 answers
69 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. ...
newguy's user avatar
  • 255
0 votes
0 answers
191 views

Data structure to store map layers in each Tile while keeping the order of terrain, items and monsters intact

My game represents its map as a 2D array of tiles, each of which stores a stack of layers. I'm looking for a data structure to efficiently represent this . I want to be able to add layers dynamically,...
Mystra007's user avatar
  • 101
0 votes
1 answer
207 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 ...
Zimano's user avatar
  • 137
-1 votes
2 answers
106 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 ...
minisurma's user avatar