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.
311 questions
0
votes
0
answers
40
views
Can a single large SSBO in vulkan store different types of structs?
I was using tinkering with vulkan and was wondering if a SSBO can store a mix of structs of different kind like shown in picture and pass offsets of the said structs to access them in shader.
2
votes
0
answers
67
views
Best Approach for Storing / Serializing Property Value Animations
Background
I'm making a platformer game, in C#, in Monogame. I've got a middling amount of experience with gamedev, having done some mini projects in Unity in the past and deciding I don't like a big ...
0
votes
0
answers
97
views
For an isometric adventure game, what is a good way to store the objects in 3D?
I'm creating a game in C++ and raylib. This is a real-time isometric game, so it is technically 2D graphics, but the rooms have a 3D structure because there will be many blocks and other objects that ...
1
vote
0
answers
487
views
How can I make an Amiibo from an NFC card?
For Christmas, I got an NFC reader/writer for my PC, and about a dozen NTAG215 tags. I found this Amiibo Database on GitHub, but I found out the NFC files alone aren't enough for my New Nintendo 3DS ...
0
votes
2
answers
779
views
What data structure would be the most efficient for a task scheduler?
So in a game with various objects that perform various tasks, a naive approach would simply be to update the state of all of the existing items in the world every game update. This is what Minecraft ...
0
votes
1
answer
187
views
Where to put data/values of Status Effects... in Status effect object or just reference from Ability source?
for turn based game, units can get buffed/debuffed with status effects, like poison, etc. I would like to ask the advisable place where to put amount of poison in the data structure. I can think of ...
0
votes
1
answer
279
views
How can I handle voxels that require extra data in my octree?
I am using octrees as an efficient way to store voxel data in a voxel game. The details of my octree implementation can be found here, but in a nutshell, each node is 16 bits, and the most significant ...
0
votes
1
answer
137
views
How to add a slot to processing queue using a ring buffer with three pointers?
I am working on a farm game made in C. I am currently working on adding item processing, such as milling wheat into flour. Under the hood, I am using a ring buffer to handle the queues for processing. ...
0
votes
0
answers
124
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 ...
1
vote
1
answer
817
views
Data structure for storing / looking up type objects representing different item types
I'm still learning C++ and am no way an expert so I could be conceptualizing this wrong.
I'm having trouble getting the right data structure for items in my game. I don't need actual object instance ...
0
votes
1
answer
84
views
Should the state object be defined inside the actual object? For Save/Load purpose
I have a class Furniture with a subclass of FurnitureState where all the "live" data will be stored. During gameplay when the furniture will be turned off or relocated (Player action) it ...
0
votes
0
answers
55
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, ...
-1
votes
1
answer
213
views
Best way to save game in story game
In a while I plan to create a story game that would have different routes and endings and I was wondering what would be the best way to save a game of a game like this, if it would be a folder, ...
1
vote
1
answer
117
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 ...
2
votes
1
answer
869
views
How is data regarding items in RPGs and other loot-based games stored and implemented?
I am currently practicing game design and development by implementing singular (or a small set) of mechanics in Unity.
For example, -- and this is relevant towards the end -- I've just finished a ...
1
vote
2
answers
4k
views
What data structure do I use to store Archetypes in ECS?
I am implementing an ECS with "archetypes" similar to how they are defined in Unity:
A unique combination of component types is called an Archetype. For example, a 3D object might have a ...
0
votes
0
answers
23
views
Appropriate database schema for heroes' skills in a Tower Defense game? [duplicate]
In a Tower Defense game, each hero (or character) has some skills. Each skill has some "chance of appearance" (CoA for short) when attacking enemies and if appeared it has some "hit ...
1
vote
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 ...
0
votes
0
answers
171
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 ...
0
votes
0
answers
197
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, ...
0
votes
0
answers
148
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 ...
0
votes
3
answers
2k
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 ...
2
votes
0
answers
265
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 ...
0
votes
0
answers
53
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 ...
0
votes
0
answers
290
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 ...