title: data structure for side scrolling game
body: <p>I was just wondering what the best data structure would be to use to represent data objects in a side scrolling game, basically the stuff the user can't see isn't on the stage so I would generally create a custom class to define its properties (x,y,weight,type, derp, etc) and then push that into an array and as the user moves forward I project the info from the array while checking if their x position is appropriate.</p>
  
  <p>The problem that can occur is that the user can move left and right so whats the best way to keep track of the indexes? </p>
  
  <p>Thanks</p>