frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

New update (finally) - Big Behavior Update!

edited June 28 in Announcements
So I have just deployed a pretty big update mostly focused on Behaviors, but with a few other tweaks and bug fixes thrown in. My main focus has been trying to create tools to make it easier to organize and reuse complex behaviors.

New Stuff:

Behaviors
Behaviors in general have gotten some improvements. Dragging behaviors is smoother now, and they snap to an (invisible) grid when you drop them. This should make it easier to keep your behavior trees tidy. When dragging a single node, all of its outputs are dragged as well - this takes a bit of getting used to, but it's super handy for moving & organizing big sections. The old behavior (just dragging one node) is accessible by holding the *shift* key before dragging.

Some behaviors now have error messages that alert you when you try to do things like add a Motor to a static object, or try to play an animation without creating one first - this will hopefully cut down some frustration. Please let me know if you encounter cases that should have an error message, but do not.

There is a new behavior type called "Function" which is just a set of commonly useful Math functions such as sine, cosine, absolute value, etc.

The "Scroll View" node has been renamed to "Camera", which I hope is less confusing to newcomers. It has also gained two new inputs: "move x" and "move y" which allow you to move the camera position while it is scrolling. This enables you to use autoscrolling in general, but still tweak the camera position for stuff like focusing on a part of the level, or for adding screen shake.

Bundles
Bundles in particular have gotten a major overhaul. They have been terrible for a long time, and this update should make them much more useful for organizing behaviors. The big news for bundles is that they can now have inputs and outputs, so you can essentially create your own entirely custom behavior nodes. When you are inside a bundle (click bundle, then "open"), then there are "New Input" and "New Output" buttons available in the "Bundle" section of the left behavior menu.

Editing nested bundles is now much easier as well, and you can nest behaviors as deeply as you like and still be able to edit them properly.

Bundle Library
Once you have a useful bundle, you can add it to your global library by clicking the bundle and checking the "add to menu" checkbox. This will add the bundle to your behavior menu for all your games. To remove a bundle from your library by clicking and holding the menu button and then selecting "Delete" in the menu that pops up

Select, Copy and Paste
Behavior window zoom has been changed from a slider to zoom in/zoom out buttons. This is more convenient than the slider and makes room for a new button: bundle selection. If you click the select button, then you can drag to select multiple behavior nodes, and have the following options:

1) Bundle - this will convert the selected nodes into a new Bundle
2) Copy - copy the selection to your clipboard
3) Cut - copy the selection to your clipboard and delete it

Once you have copied some behaviors, clicking on the behavior workspace area will show a "Paste" menu option. The behavior copy and paste is converted to text, which means we can share behaviors by copying and pasting them anywhere ( like this forum for example :) ). The only limitation is that when pasting in behaviors copied from outside the game, you have to use "ctrl+v" to paste - this is a browser security measure.

To wrap it all up, here is an example - a "Screen Shake" behavior node that is just a custom bundle. You can copy it from here and paste it directly into your game:
{"behavior":{"links":[{"input_id":"38305985c54a824ci0","output_id":"382f26e0a2d9f343o0"},{"input_id":"383055fb77d01d4ai0","output_id":"382f26e0a2d9f343o0"},{"input_id":"3830206d54fc8c4ei2","output_id":"38305985c54a824co0"},{"input_id":"382e7c23c93f1c4fi0","output_id":"382e4e82e014b345o0"},{"input_id":"382f26e0a2d9f343i1","output_id":"382e4e82e014b345o0"},{"input_id":"382f26e0a2d9f343i2","output_id":"382ec193613f3d43o0"},{"input_id":"382f26e0a2d9f343i0","output_id":"382e7c23c93f1c4fo0"},{"input_id":"3830206d54fc8c4ei3","output_id":"383055fb77d01d4ao0"}],"nodes":[{"name":"Screen Shake","outputCount":0,"group":"","y":0,"behaviorType":"logic.NodeGroup","x":-270,"inputCount":1,"id":"382dfd747d25194a","isMenuItem":false},{"name":"Switch","outputCount":1,"group":"382dfd747d25194a","y":256,"_startVal":0,"behaviorType":"logic.logic.Switch","x":630,"inputCount":3,"id":"382f26e0a2d9f343"},{"name":"Random","outputCount":1,"group":"382dfd747d25194a","y":192,"min":-4,"behaviorType":"logic.logic.Random","max":4,"x":810,"inputCount":3,"id":"38305985c54a824c"},{"x":990,"maxRight":20,"group":"382dfd747d25194a","scrollY":true,"y":224,"parallax":100,"top":0,"scrollX":true,"repeatBG":false,"minLeft":0,"inputCount":4,"id":"3830206d54fc8c4e","bottom":9,"name":"Camera","outputCount":4,"behaviorType":"logic.components.View"},{"name":"Bundle Input","outputCount":1,"group":"382dfd747d25194a","portId":"382dfd747d25194ai0","y":256,"tag":"shake","behaviorType":"logic.NodeGroupInput","x":450,"inputCount":0,"id":"382e4e82e014b345"},{"name":"Always","outputCount":1,"group":"382dfd747d25194a","y":352,"behaviorType":"logic.triggers.Always","x":450,"inputCount":0,"id":"382ec193613f3d43"},{"name":"Timer","outputCount":1,"group":"382dfd747d25194a","count":1,"y":128,"behaviorType":"logic.triggers.Timer","x":630,"inputCount":3,"delay":20,"id":"382e7c23c93f1c4f"},{"name":"Random","outputCount":1,"group":"382dfd747d25194a","y":288,"min":-4,"behaviorType":"logic.logic.Random","max":4,"x":810,"inputCount":3,"id":"383055fb77d01d4a"}],"v":"2"}}
Website
There is a small update to the website where you can unlist your game from the games page if you are using a paid version. There is a "Don't display in games list" checkbox in the game settings panel. If you select this box your game will be removed from the games page listing on the site. Keep in mind that t may take a couple minutes for this change to take affect, since the game listings are cached.
«13

Comments

  • edited May 24
    Well FINALLY!

    The scroll view update seems really nice... screenshake and easier camera-moving will really ramp things up.
    The rest seems pretty darn complicated to me. Private games are not needed for me yet, but I'm pretty sure many school users would like this.

    Edit: Yet this update's really bothersome in some ways...
    1. The background doesn't repeat (really urgent in my game)
    2. The behaviors are really blurry
    3. The game does the "White freeze" thing way more often

    Please fix. My game's especially bothered by the first problem...

  • edited May 24
    link? The bg shouldn't be affected by this update, but I'll check it out for sure.

    The private game thing has been requested a few times, but it most recently came up here: http://forum.flowlab.io/discussion/comment/10880/#Comment_10880

  • Just to be clear - are you saying this issue is new with tonight's update? or this is something that has been an issue previously?
  • Tonight's update
  • Hey @Luminous700 - I think that the issue may be that you have multiple cameras, and not all of them are set to have a repeating bg, so they are conflicting. I see that at least your Boss Fighter object has a Camera with repeat bg turned off - maybe try verifying that all objects with Cameras have a repeat bg set to to true, and reloading the game?

  • edited May 24
    The boss fighter wasn't supposed to have one, as there was no background for lv5, and it was only supposed to show up in that level. I have no clue what's happening either, it used to work fine until I came back to check on it. :disappointed:

    *Both lv1 and lv2 are experiencing the same problems, without any reused material through both levels, though with similar-looking sprites.
  • The Camera may have been there a long time and not caused a problem due to load order, this latest update just may have triggered it if the behaviors happen to load in a different order now. In any case, this is a bug in the Camera loading behavior that I'll fix - thanks for pointing it out!
  • WHY AM I ALWAYS LAST TO KNOW!!!
    anyway, that's awesome. Thanks
  • edited May 24
    Using the zoom out button, I just learned how horribly organized/big my ship behaviors are...
  • what app are you using for the track pad jngthree? Or is tI even app?
  • edited May 24
    Wow this update is amazing!
    Thanks Grazer :smiley:

    @Myw He's using his phone/tablet, It's called puffin browser :)
  • How'd he get the track pad, puffin never let me use it? is it in settings? also thanks
  • It's in there...
  • @grazer how exactly do I paste the camera shake bundle in there? I can't seem to get it.
    I go to the behaviors, press Ctrl+V and nothing happens. I click the Behavior Bundles menu, Ctrl+V, nothing happens. What do I do?
  • @jngthree You can also just click on the behavior workspace, then click paste

    @grazer Make it double click please.. I think that would be much better. Also, can you add a shortcut for selecting behaviors. Like ctrl+click. And add a button to remove the selected behaviors.

    And there's a bug with zooming out. When you drag a behavior it becomes its normal size. When you drop it, it becomes small again.
  • @latif3 doesn't work for me
  • edited May 25
    @Latif3 & @jngthree - you can't click the behavior window and paste with the menu - that only works when pasting from inside the game. The browser security model only allows pasting from outside the game using ctrl+v, I wish there was a workaround, but it was a struggle to get it working at all :(

    Anyway, there are two things I recommend you checking:

    1) Zoom all the way out before pasting - maybe it is getting positioned outside of the viewable area?
    2) Make sure that you have copied the *entire* bundle, if you leave off even a single character from the beginning or end it will not work. Here is the entire thing with no scrollbars, just make sure:

    {"behavior":{"links":[{"input_id":"38305985c54a824ci0","output_id":"382f26e0a2d9f343o0"},{"input_id":"383055fb77d01d4ai0","output_id":"382f26e0a2d9f343o0"},{"input_id":"3830206d54fc8c4ei2","output_id":"38305985c54a824co0"},{"input_id":"382e7c23c93f1c4fi0","output_id":"382e4e82e014b345o0"},{"input_id":"382f26e0a2d9f343i1","output_id":"382e4e82e014b345o0"},{"input_id":"382f26e0a2d9f343i2","output_id":"382ec193613f3d43o0"},{"input_id":"382f26e0a2d9f343i0","output_id":"382e7c23c93f1c4fo0"},{"input_id":"3830206d54fc8c4ei3","output_id":"383055fb77d01d4ao0"}],"nodes":[{"name":"Screen Shake","outputCount":0,"group":"","y":0,"behaviorType":"logic.NodeGroup","x":-270,"inputCount":1,"id":"382dfd747d25194a","isMenuItem":false},{"name":"Switch","outputCount":1,"group":"382dfd747d25194a","y":256,"_startVal":0,"behaviorType":"logic.logic.Switch","x":630,"inputCount":3,"id":"382f26e0a2d9f343"},{"name":"Random","outputCount":1,"group":"382dfd747d25194a","y":192,"min":-4,"behaviorType":"logic.logic.Random","max":4,"x":810,"inputCount":3,"id":"38305985c54a824c"},{"x":990,"maxRight":20,"group":"382dfd747d25194a","scrollY":true,"y":224,"parallax":100,"top":0,"scrollX":true,"repeatBG":false,"minLeft":0,"inputCount":4,"id":"3830206d54fc8c4e","bottom":9,"name":"Camera","outputCount":4,"behaviorType":"logic.components.View"},{"name":"Bundle Input","outputCount":1,"group":"382dfd747d25194a","portId":"382dfd747d25194ai0","y":256,"tag":"shake","behaviorType":"logic.NodeGroupInput","x":450,"inputCount":0,"id":"382e4e82e014b345"},{"name":"Always","outputCount":1,"group":"382dfd747d25194a","y":352,"behaviorType":"logic.triggers.Always","x":450,"inputCount":0,"id":"382ec193613f3d43"},{"name":"Timer","outputCount":1,"group":"382dfd747d25194a","count":1,"y":128,"behaviorType":"logic.triggers.Timer","x":630,"inputCount":3,"delay":20,"id":"382e7c23c93f1c4f"},{"name":"Random","outputCount":1,"group":"382dfd747d25194a","y":288,"min":-4,"behaviorType":"logic.logic.Random","max":4,"x":810,"inputCount":3,"id":"383055fb77d01d4a"}],"v":"2"}}

    If it still doesn't work let me know what browser and OS you are using, and I'll try to see if I can reproduce the problem here.
  • @Latif3 - can you step through how to reproduce that zoom bug? I can't seem to make it happen here.
  • edited May 25
    @Luminous700 - does removing the camera (or setting bg = repeat) in that Boss Fighter object fix the issue? We should maybe make a new thread to discuss this issue if it's still occurring.
  • edited May 25
    @grazer I meant the sidebar that holds the behaviors.
    So do I click the behavior screen then use ctrl+v? I can't seem to get it.

    I use Chrome and sometimes puffin.

    I'm probably being really, REALLY stupid right now, but can you give me step-by-step instructions?

    I made this game to test the update out, and to make a simple little platformer in the process. https://flowlab.io/game/view/668504
  • Oh, that works! Thanks grazer.
  • @Luminous700 are you able to pull it off?
  • I never used it... but probably will sometime. It looks complicated O_o
  • edited May 25
    Hey @jngthree - it looks like the problem is that paste isn't working on Chrome, sry about that :/

    I don't have a fix yet, I'll have to play with it some to figure out a workaround.
  • Ok, as long as it's not just me. Thanks!
  • Great update all its missing is my request
  • @grazer safari won't work either
  • @grazer (sorry for my bad english)
    There is an issue at your upgrade, when I delete a camera, its white thing doesnt gets destroyed. Again, sorry for my bad english
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch