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 data structures?
For example: when a group of coins appears on the screen how are they stored? Did the programmers just use arrays? Or perhaps they had linked-lists?
Cheers!
Edit: I'm interested in various approaches... not necessarily a universal approach.
Edit 2: In a few of my games I use a (potentially bad) approach towards collections and I want to know if any of the older games used a similar approach. I like to do the following:
// statically allocated arrays (max number of coins is 4)
int coinsXs[4] = {0, 0, 0, 0};
int coinsYs[4] = {0, 0, 0, 0};
// bitset that keeps track of which coins are active
int coinsActive = 0;
// ...
// update the active coins in an update function
for(int i = 0; i < 4; i++){
if(coinsActive & (1 << i)){
// update ith coin
}
}