Data stack/queue

This forum is currently in read-only mode.
  • We need a way to store information in form of a stack or queue; the Array object isn't flexible and the hashtable is... uh, unsuitable for certain purposes.

    Quite often a flexible data container is needed; it would store any amount of data in the order that it was fed and return it the preferred way - Last In First Out (stack) or First In First Out (queue).

    Ex.: I want to score a path - a set of waypoints - that the sprite would follow. I'd also want to remove some waypoints, add more etc., while the sprite would follow waypoints and remove them as it passes them (possibly storing it into another container named "Flight Log" to be able to trace back).

    So, it should support adding, removing and inserting entries; the entries would automatically shift when an entry is inserted or removed.

    I don't know much about data structures, however Array object is too bulky for those types of operations and hashtable is giving me headaches.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This sounds like a good starter project for someone new to the SDK; just basically wrap std::vector (simple and well documented in many places).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)