What is an Array? How does it work and how can I use it for my video games?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By elrico26

I’m making a game and from what I see from the tutorials I occupy an array but I don’t know how they work or what they do, look at the godot documentation but the explanations are very cheap

:bust_in_silhouette: Reply From: Ertain

So I guess the definition of “Generic array which can contain several elements of any type, accessible by a numerical index starting at 0” isn’t very understandable? Then how about this definition: “An array can be defined as an ordered collection of items indexed by contiguous integers.” Does that make more sense? Arrays are containers for collections of data objects. The individual objects (called "elements”) can be referenced by their place in the collection (the count for this begins at zero).