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.

306 questions
10
votes
2 answers

Data structures in older games

I'm curious about the data structures used when programming older games like Super Mario Brothers for NES and Super Mario World for SNES. My understanding is that games of this period were written in assembly. Did the programmers define/use any…
MrDatabase
  • 1,951
  • 23
  • 42
7
votes
1 answer

Settlers-like terrain representation

Remember this beauty? I'm playing it now on my old Amiga 1200. My question is: How do you think they represented the terrain, data structure wise? Obviously it's some kind of points, with a height. Or hexagons. And how did they decide which dots…
Olle
  • 73
  • 3
4
votes
2 answers

What is the best way to store temporary selected characters and their insertion order?

I'm developing word game, similar to "Word Mole". I'm having a hard time determining how to store temporarily selected characters, which in turn, will changed into a word. For example, say, I have the following characters:     0  1  2  3 0 O…
ariefbayu
  • 143
  • 6
3
votes
1 answer

database design help for game / user levels / progress

Sorry this got long and all prose-y. I'm creating my first truly gamified web app and could use some help thinking about how to structure the data. The Set-up Users need to accomplish tasks in each of several categories before they can move up a…
sprugman
  • 133
  • 4
2
votes
1 answer

How do I define spawn patterns for a Fruit Ninja-esque game?

I'm creating a game somewhat similar to Fruit Ninja and others, where bombs are thrown up on the screen and you click or touch them to defuse (here is an example of the game). There are four bomb spawn points and I want to pre-define launch patterns…
kicker
  • 21
  • 2
2
votes
1 answer

What's a good way to store a series of interconnected pipe and tank objects?

I am working on a puzzle game with a 6 by 6 grid of storage tanks that are connected to up to 4 tanks adjacent to them via pipes. The gameplay is concerned with combining what's in a tank with an adjacent tank via the pipe than interconnects…
mars
  • 35
  • 2
2
votes
2 answers

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 little and getting familiar with good design…
user75727
1
vote
1 answer

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 following logic I am using c# but this is not the exact…
kalenpw
  • 121
  • 5
0
votes
2 answers

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 does to handle furnaces, and similar items. A more…
CPlus
  • 143
  • 11
-1
votes
2 answers

Word for a relationship specifying that 2 objects don't affect each other

I am aiming to create an Enum for a terrain_surface_layer.type property. The 3 types of terrain_surface layers I wish to implement are the following: Single - only a single type of terrain_surface is placed on this layer Mixer - when a…
dlots
  • 133
  • 1
  • 7