Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
10 views

Unity: Get excel type data from an html website

So is there a way that I can use an html page as a database? My end goal is to put everything into an excel sheet that the people I am making the application for want. I need to upload data from the ...
0
votes
0answers
41 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 ...
1
vote
3answers
178 views

How to efficiently store a large amount of data?

I am doing minecraft-like game. I have a limited world in size 32x16x32 chunk. Each chunk is a structure in which there is a three-dimensional array containing the values ​​of the blocks located in it....
0
votes
1answer
60 views

Sequencing / triggering messages based on conditions in an adventure game

I've been struggling conceptualizing the best way to make a level flow with dialog and help hints changing as you play etc. Imagine your goal is to make this one screen 'adventure' game, where you ...
2
votes
2answers
216 views

How should I store world data in a 2D grid sandbox game?

I'm just a beginner game developer and working on my own first project (beyond copying other games for learning skills). Because I really like sandbox games (like Minecraft, Rimworld, Terraria etc..),...
1
vote
1answer
62 views

Running a scene in the background

I've made 2 scenes where a room is another scene and the other is the outside of it. But whenever I do something in either scenes, and enter the other, it resets everything I did in the first one. I'm ...
0
votes
1answer
106 views

How do I allocate to a C# dictionary having a string key and an integer 2D array or transform for value?

I'm working in C# on a Unity 2D game that spawns a shape that has only one correct landing place. There are 7 basic shapes but the component 4 squares of each shape are unique, with each bearing, say, ...
0
votes
1answer
33 views

Tiledata management

I've been trying to create a grid-based open world game. In order to do that I've decided to create a personal map editor. The problem I've encountered is handling data because of the actual data size....
2
votes
2answers
107 views

How to better refactor loops in procedural world generation?

One of the steps for cell-based dungeon generation is deciding the amount and location of exits for each room. My current set up consists of the following: Define my exits. There are 15 types of room ...
0
votes
1answer
36 views

C++: Setup the basic Update function in different classes which all derive from GameObject

Im working on a little game-framework in c++. Currently i have a (base)class called "GameObject" from which all future in-game objects will derive from. Class enemy will be ...
1
vote
2answers
104 views

Simulating an aging population

Introduction: The main idea is to "classify population as they age". Let me further explain it with an example: Example: There are 50k population (we are not going to care about if male or female ...
0
votes
0answers
72 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 ...
3
votes
7answers
2k views

Benefit of using Vector2 data type over separate x & y variables

I'm really curious about why a lot of people and game engines use Vector2 as its coordinate system instead of the traditional x and y value. Is there any benefit to this? I feel like it's just slow ...
0
votes
1answer
187 views

Implementation a Prefix tree or Trie in Unity C#

I am trying to make a word game in unity. The game shall be an online game with 4-6 players. The gameplay is somewhat like this: Suppose 4 players are playing the game- p1, p2, p3, and p4. All ...
1
vote
1answer
38 views

Data structure for a body

I'm writing a game in Java and am struggling to think how to appropriately manage character's bodies. My current structure is, in relevant part: ...
0
votes
1answer
62 views

Rotate a ds_grid 90 degrees in GMS2

I need a function that allows me to rotate a grid data structure an arbitrary number of times 90 degrees clockwise. Currently it doesn't appear as though the function has any effect on the ...
2
votes
2answers
348 views

Appropriate Cache Friendly Associative Container For An Entity Component System

The intro to this problem is a bit of a long one so my apologies in advance. In short I am asking for suggestion as to what type of collection I should use to store data for a particular part of my ...
0
votes
0answers
45 views

dcitonary memory efficiency - unity

I'm trying to implement a word validator in unity for a word game, but every implementation I've tried so far has used too much memory. The least expensive attempt so far with adequate performance was ...
1
vote
2answers
94 views

Voronoi graph - traversing from vertex to vertex

I'm working on a Unity Project in C# I've built a 3D Voronoi Diagram using the csDelaunay library from PouletFrit and using the X and Y values from a 2D diagram to instead setup some Vector3's with ...
-1
votes
1answer
75 views

C++ Storing Mass Data Sets for Future Use

I didnt know how to title this... Background: I am currently trying to develop a windows command console game with C++ for a final project. The game is text based. I have only been programming C++ ...
1
vote
1answer
223 views

Applying Perlin Noise to Tiles

Playing with some Documentation about Perlin Noise i managed to create this map: Nothing different from other Procedural Generated Maps. It is a HeightMap with colours at given heights. The problem ...
0
votes
1answer
168 views

Creating a Nations Stockpile

If I created different XML files for each Nations' Stockpiles and made an XMLmanager to do updates such as resource consumption and trade, wouldn't that be too much resource intensive? I mean, if I ...
0
votes
0answers
111 views

How to add “data” to a gameObject in Unity

First of all i suck at making randomized simple maps (never done that before). But sure it's my first step towards an Open Development game i would like to create and learn from. EDIT: The concept i ...
0
votes
1answer
92 views

Formatting Unity data for communication with a REST API

I am pretty new to unity but I am not new to programming. I am building a Hololens application in Unity 2017.2 and it communicates with a REST api that I built. I am using Unity as a front end more or ...
4
votes
2answers
293 views

How do I implement Pokemon-style moves?

I'm developing a Pokémon/classic Final Fantasy inspired game, in the sense that game play consists in many creatures, possessing many moves with different effects (attacking, healing, buffing, ...
0
votes
1answer
484 views

Best data structure to store large amount of data

I am making a minecraft kind of game. In which I have 100s of objects and their crafting recipe. Now I want to store them inside the program, ie I cannot load external files. Everything must be ...
0
votes
0answers
95 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 ...
2
votes
2answers
258 views

Managing game progress - states, stages, or flags

I am creating an rpg. So far I've used a global game stage as well as individual npc stages (increased when completing a quest for example) to control the "stage" the game is in. I.e if I have a log ...
5
votes
1answer
380 views

Managing complicated RPG character data

For a detailed survival RPG, the data that needs to be managed can easily become overwhelming if approached in an ad hoc manner. First, you may want to do away with HP and instead have a system of ...
0
votes
1answer
91 views

Structure GameObject - States - Visual representation

Question: What is the best data structure for GameObjects that have different states and thus different visuals? The situation is: I'm creating a game for mobiles (written in Kotlin, no Engine used)....
2
votes
1answer
512 views

How to store and organize my data in a JRPG style game?

I am trying to make a JRPG style game using Unity. See this image below to get a sense of the "feel" of the type of game I am making: http://www.juicygamereviews.com/uploads/3/0/5/0/30501048/...
0
votes
1answer
546 views

Is there a reason to inherit both generic and non-generic version of an interface? [closed]

I've just gotten into some C# programming and decided to expand my knowledge of how games are made in C# by looking through some open-source frameworks. While doing this I noticed something very odd; ...
4
votes
1answer
654 views

How to design a Skill/Monster/Item etc. dictionary for a game?

I am trying to build a turn-based RPG where party members and enemies can cast skills and use items. How could I implement a modular list of skills/items/monsters (and maybe character classes, if I ...
0
votes
2answers
183 views

Relational Databases vs XML vs public static finals: Pros and Cons [closed]

I'm working on a game (single player, metroidvania type, Java) and I'm torn as to how data should be stored. For example, monster stats, dialogues, flavor text for weapons, gear stats... there is all ...
2
votes
1answer
388 views

How can I build a data structure that will persist across saves/loads in GameMaker version 8.1 and earlier?

I wish to build data structures such as trees, linked lists, graphs, stacks, queues, etc. in Game Maker. However, the concept of object in Game Maker Version 8.1 and older does not have a reliable ...
-1
votes
2answers
122 views

How do I convert data from a custom editor to a static data structure for use in-game?

I have created a custom editor to allow me to structure data regarding "actors" in a scripted dialogue. This allows me to conveniently store information about how that "actors" dialogue should be ...
0
votes
1answer
183 views

Three levels deep composition (player<-character<-spell), with preset character+skill sets

So I'm creating a rather generic strategy game similar to Warcraft or League of Legends, which needs to have: a Player class for representing the users playing the ...
0
votes
1answer
168 views

How to implement Boids steering efficiently? (ie. find nearest neighbours of moving entities)

As I understand it, modern pathfinding uses ideas such as Boids steering on top of traditional A* and Dijkstra's algorithm. It's easy to find recommendations for implementing Dijkstra's algorithm ...
0
votes
0answers
34 views

Card game - save who has what cards [duplicate]

I have designed a card game which is now ready to be digitalised and made in to a game. I have placed all the cards, images, values, and information in a sql database ready for when i start actually ...
1
vote
2answers
582 views

Where and how to store players collection in a computer card came?

I am developing a trading card game ( something like Hearthstone but not as complex) and I am faced with the following problem: I don't know what is the optimal way to store players collections and ...
1
vote
1answer
190 views

How to structure a non rectangular maze

I have built a few mazes and are familiar with maze algorithms however all examples I have learnt from are square or rectangular. In these mazes the code structure usally has a 2d array of maze cells ...
0
votes
3answers
129 views

How to make compound data in Game Maker?

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
3answers
136 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
383 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
100 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 ...
0
votes
0answers
63 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
143 views

How do I use data-orientated programming without object-orientated programming?

I have been reading many resources about data oriented programming, and one thing I understand about it is that it's about keeping chunks of memory together to improve performance. Other than that, I ...
0
votes
2answers
368 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
111 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
55 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 ...