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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
46 views

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.
Nobody's user avatar
  • 1
0 votes
1 answer
135 views

In the context of game dev, what is the preferred memory to use to store structs like Entities or MapData which are large in size and have lifetimes lasting the entire game run-time. For example here ...
Syntax Error12's user avatar
2 votes
0 answers
70 views

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 ...
Jake Lawrence's user avatar
2 votes
2 answers
158 views

I'm using WebGPU and a storage buffer for rects. Currently I have this: ...
user29889977's user avatar
0 votes
0 answers
105 views

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 ...
DrZ214's user avatar
  • 348
0 votes
0 answers
61 views

I am making a 2d rpg game that uses tiles to store the terrain data. Also the map is procedural generated infinite world type. I saw an approach called clipmaps to ...
Syntax Error12's user avatar
1 vote
0 answers
513 views

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 ...
Alex's user avatar
  • 177
0 votes
1 answer
122 views

I'm ready to start working on a prototype of a 2D game. My game has a few phases it cycles through, two of them being a gathering/crafting phase, then a defending phase. In the defending phase, you ...
Alice's user avatar
  • 1
0 votes
2 answers
789 views

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 ...
CPlus's user avatar
  • 153
3 votes
1 answer
868 views

I'm developing a RPG-game. After searching about various ways to save item information in RPG-game, I determined to save information in JSON files. The problem is that in my game, some equipment's ...
evol1102's user avatar
0 votes
1 answer
189 views

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 ...
user7888262's user avatar
0 votes
0 answers
222 views

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
1 answer
284 views

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 ...
CPlus's user avatar
  • 153
3 votes
2 answers
2k views

Since I'm making an RPG in Unity, I need a place to store all the possible moves/attacks in the game. These have the following properties: there will be a very large number of them, in the hundreds ...
Labba's user avatar
  • 133
0 votes
1 answer
137 views

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. ...
Dotz0cat's user avatar
0 votes
2 answers
384 views

I am currently making a game in HTML5 using canvas, and it is currently just 1 js script and HTML file with references to png files for assets. Right now, I have the level data baked into the script, ...
Stormzy18's user avatar
0 votes
0 answers
125 views

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
1 vote
0 answers
52 views

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
821 views

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 ...
noob456's user avatar
  • 21
1 vote
2 answers
145 views

I've learned that storing and loading game saves is commonly done by serializing runtime data into binary files and then loading in those binary files de-serialized to reconstruct the runtime state ...
Michael Moreno's user avatar
0 votes
1 answer
85 views

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 ...
RobinHood's user avatar
1 vote
1 answer
622 views

I've looked but havn't been able to find a the workflow for this searching online. I have an NPC, with a behavior tree. Right now it just moves around the map. It's supposed to have a health variable, ...
Candle's user avatar
  • 141
0 votes
0 answers
55 views

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
1 answer
3k views

I've a RGBA16F texturecube for 4 pointlights shadows rendered in one pass. Each color channel stores the object to light distance for one pointlight shadow (e.g red channel is for light 0 and so on). ...
philB's user avatar
  • 333
-1 votes
1 answer
215 views

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, ...
Noel's user avatar
  • 1
1 vote
2 answers
333 views

Am facing a bit of a problem regarding the structure of a CSV file that will be used to generate levels in a match3 game, my in-engine data structure is the following: ...
alaslipknot's user avatar
1 vote
1 answer
117 views

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 ...
Loospie's user avatar
  • 191
0 votes
0 answers
92 views

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
  • 155
2 votes
1 answer
880 views

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 ...
MightyOwl's user avatar
0 votes
1 answer
342 views

I'm trying to recreate the grid system from RimWorld, and I'm facing an issue when having to save the map, which can be up to 500x500 tiles in size. My map has multiple layers, the base layer is ...
caleidon's user avatar
  • 591
1 vote
2 answers
4k views

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 ...
EnderShadow8's user avatar
0 votes
0 answers
51 views

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
23 views

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 ...
duong_dajgja's user avatar
0 votes
0 answers
173 views

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
1 vote
0 answers
1k views

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
  • 131
0 votes
0 answers
380 views

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
172 views

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
1 answer
1k views

I'm working on a tower defense game. I have this structure: int array (public int[,,,] gridArray = new int[2000, 2000, 9, 9];) that I'm using as a map-bible; by ...
0ne Man shooter's user avatar
0 votes
0 answers
201 views

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,287
0 votes
1 answer
286 views

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
149 views

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
3 votes
2 answers
234 views

Consider this spell: As you can see in my design a Spell is a composition of one or more Effects. An Effect has properties on ...
Josh Sanders's user avatar
0 votes
3 answers
2k views

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
4 votes
1 answer
421 views

My game, a citybuilder, has many simple entities that rendered via glDrawArraysInstanced. A large city has over 600,000 entities, but most of those entities are one of a few hundred meshes. Every ...
Lone Pine's user avatar
2 votes
0 answers
266 views

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
0 votes
1 answer
463 views

My game has an item system that is relatively small compared to most of the RPGs, but it is pretty similar to the games like Half-Life and Counter-Strike where you have an inventory consists of ...
Masea's user avatar
  • 13
0 votes
0 answers
53 views

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
359 views

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
290 views

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
2 votes
1 answer
616 views

Any one have any ideas on how I can serialize / de-serialize an ObjectMap<Enum, ObjectMap<String, Object>>(); (Object is usually a String Integer ...
Macmanmatty's user avatar

1
2 3 4 5
7