Big New Behavior Update: Data Types! 🎉

Datatype Update

Since the beginning, Flowlab behaviors have always communicated using integer values. While this has provided a certain level of simplicity, the inherent inflexibility has prevented us from being able to freely manipulate text, or easily manage data for sophisticated gameplay, or fine-tune many calculations where non-integer values are needed.

In order to eliminate these creative restrictions, the latest version of Flowlab being released today introduces three new data types:

Number: Instead of being restricted to only integers, behaviors are now able to input, output, and store floating point (decimal) values. Often values less than one are helpful when fine-tuning timing delays or game object physics. All behaviors that were previously restricted to integers now allow floating point values if desired. The existing Number block also gained a Rounding setting that will restrict it back to integer values only.

Text: Games often require complex dialogues and narration which was previously not convenient to manage. Many behaviors can now input, output, manipulate, and store Text values to make these types of game elements more practical in Flowlab. The Following Text-specific behavior blocks have been added:

  • Text: Can store a text value, append to it (using the increment input), get a single character, or split it into a list of text values.
  • Text Case: Changes case to uppercase or lowercase
  • Text Length: Outputs the length of some text
  • To Number: Converts the input text into a Number if possible
  • Text Compare: checks if some text matched other text
  • Text Sanitize: removes non-printable characters from text

Text List & Number List: It can be very useful to group values together into a set and manipulate them as a group for things like a player’s inventory, completed actions, or dialogue options. Flowlab now has support for lists of either Text or Number types, as well as new behavior blocks for storing and manipulating them:

  • Text/Number List: Can hold a list of Text or Number values, push items onto the end, pop items off of the end, join it together into a Text value, or search the list for a specific item.
  • List Modify: This enables a list to have items added, removed, or updated.
  • List Order: Change the order of a list by sorting it alphabetically or numerically, reversing, or randomizing it.
  • List Each: Iterate over the list and output the values one at a time, with an optional delay
  • List Count: Returns the number of items stored in a list

In order to make it more obvious which types of data are being sent and received by the various blocks, new colors have been introduced to the behavior input and output ports.

  • Number ports are white, as before. Number outputs can be sent to Text inputs, and the Number will be converted to Text automatically.
  • Text ports are purple, and input ports that can receive Text or Numbers are purple with a white outline
  • List ports are green, and can only connect to other List ports

Since not all inputs and outputs are compatible (e.g. you cannot connect a List output into a Number input), when dragging a new link all incompatible ports will fade out showing only the ports that are available.

Behavior window rendering: Manipulating, dragging, etc should be much snappier when you have a lot of behaviors, and running your game from the behavior window should have much better performance as well. The blocks & links also look slightly different, and Trigger blocks have an orange border to make them more easily noticeable.

The behavior window itself is slightly darker to provide better contrast, but fades out when needed to view the game world, i.e. when editing blocks like Label, Camera, or Proximity.

Mouse wheel now zooms the behavior window in and out.

Updated Behaviors

Keyboard triggers now have an “Any” option which changes it to output text instead of a number. When “Any” is selected, typing the letter “z” will output “z”, etc.

All blocks now have a “notes” setting to add comments. This adds a small icon to the block that can be clicked to display the notes, and they can be clicked to close them. When open, they should stay open when reloading the window or game to serve as a guide when looking at the logic.

Updated Expressions - in addition to outputting floating point values, the number of inputs can now be adjusted. No more “A” and “B” only. Existing Expression blocks will still output integers only, so current games are not affected, but any newly added Expressions have the ability to output floating point numbers.

Global blocks have been changed so that they no longer reset between levels. This fixes a design flaw in the original version and allows globals to be used to store scores, etc throughout the game. Existing games will not be affected, only newly added blocks.

Label blocks now have a width setting (in pixels). If this value is set greater than 0, lines will wrap at that width.

Other New Behaviors

Router: This allows you to direct the output to one of any (also variable) number of outputs to control logic flow. It can also be randomized.

Cloud Save: This is an Indie Only feature that allows you to store a value “In the Cloud”. This means that when one player saves a value, all other players will be able to read that value. This can be used for leaderboards or any other place where a value needs to be readable by more than one player. It works in a similar fashion to the existing “Save” block, but saves and loads are not instant - they can take multiple frames to return since they must communicate with the network.

User Info: If the player is logged in, this will return their username and flowlab user id.

Clipboard: Saves a value to the player’s system clipboard. This must be triggered from a mouse or keyboard click, or the browser will prevent it from working.

A Couple of Examples

11 Likes

woah, just saw this when logging on to flowlab. looks amazing and i can’t wait to try this stuff out!

3 Likes

I am…So confused…also the new Icons look Great!

1 Like

I just logged on and saw this awsome
Also Decimals Awsome

1 Like

Finally, thank you @grazer! I don’t have access to a computer but when I eventually buy one, I’ll definitely check it out! Thanks

https://youtu.be/TCwc-S15qWQ

2 Likes

as soon as i started playing one of my games though, the reload sound keeps playing really fast and making a horrible noise. It wasn’t doing that before and I haven’t changed anything in that object’s code today. i just got rid of that sound for now.

it’s probably something i did but I don’t see anything wrong.

amazing update though!

2 Likes

As a person that got to beta test this I didnt really do much testing, so im intrested in the possibilities

🎉 It's finally released! 🎉

Please welcome the new data types, with Purple for Text and Green for Lists.

2021.01.04-20.27

With help finding bugs, I’ve made an example where you can enter your name and use that name in dialog in the next level, as well as a list of words that you cant use as your name. And with the new note settings, I’ve tried to leave detailed comments in the behaviors. Hope this helps to use the new behaviors and changes!

5 Likes

This is an incredible update! I can’t wait to utilize this in a future project!

1 Like

TEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEXT

Me getting hyped for data types:

1 Like

Fantastic! :smiley:
I can’t wait to see what everyone creates with these new behaviors - and share my creations too!

1 Like

Hell yeah boys! It’s finally come! I can’t WAIT to use this in my games! Thanks so much @grazer! Take a break, i’m sure you deserve it!

1 Like

Holy heck, just saw the examples, and this is AMAZING! This will help so much with game dialogue and so many other things!

@grazer I’m literally having a heart attack right now, this is too good, I love all the new behaviors and I’m dying to use them.

1 Like

This update is going to be SUPER useful for all of our games! Good work @grazer. For me, all of this seems a bit complex to understand, but we all learn from practice.

2 Likes

yay now to get nametags for my game it wont crash my computer

I like this new Zoom in zoom out thing.

flowlab zoom

the new behavior alerts keep on popping up on my game editor every time i open it…