Trying to improve the map generator and playing around with path finding I realize the thing I need most are lists (or arrays, or tables, or whatever you might want to call them).
For the ones not familiar with that term, … it is just that … a list. It allows you to save data in a more organized way for later use. Data within a list is addressed by its position within the list, mostly called the ‘index’ or pointer, or position… different terms, same thing.
This data type is not available within Flowlab by default, but it can be ‘simulated’ by creating your own bundle. I wired one up here -> List Bundle
This is just a quick mock-up, first draft, a simple ‘list’ with basic functionality.

As you can see, you address list items through their index and then you can either ‘write’ or ‘read’ to/from that position. This little list only holds 5 items, good enough for a small RPG inventory system (Health, Gold, Mana, Exp,…) or could keep the result for a dice game (Yahtzee).
The internals look like this, nothing fancy about it:
So … now imagine you want to create a card game
… 52 values to be remembered, kiss your evening good bye if you want to wire that one up :lol:
As you can see, you can speed things up by copy/pasting the highlighted block area. But I’m lazy and I am going to create a script that will do that for me.
As in: You enter a name for the list (was ‘A’ in this example) and the amount of data cells you need (please be reasonable). The generator will create the necessary code that you can copy/paste into Flowlab as you do when you copy other bundles.
It will be available online once done, probably on my Flow-Wiki site , we will see.
Now … I need some feedback before I finalize it.
- the way I made that list bundle … is that the most straight forward, simple, safe way of doing it?
- should I use global variables instead to make access from other areas of the game easier
- this is the basic setup. List ‘experts’ might say, hey I need more (push, pop, init… shuffle…)
- just list what you think it might need
- who else here has a little bit of experience with JS/HTML to help with the web interface?
@grazer … please, please, please just one comment.
Before I go through the effort to do this, please don’t tell me … Oh, by the way, lists are part of the next update … LOL
Can I assume that functionality might still take some time to be implemented and it is worth using this work around in the meantime?