Will a future C3 build convert old functions to the new system?

0 favourites
From the Asset Store
Dynamic, heavy and powerful rock themes. 11 music tracks.
  • well lets say i define a jump function to the string of "jump" i could then have different implementation of a jump function that i can map to that jump string at any time, this would avoid having branches for power up that would increase jump height or something like that? it's very basic example, and you could just pass in the jump height as a param? but it allows you to switch the implementation of your function kind of like a "strategy design pattern", which i think will be very flexible.

  • > what would be the benefit of having it be it's own block?

    I don´t see why such a map would need to be created during runtime with individual actions, rather than just beeing there.

    I think the best Idea is to support both ways if it's possible as some people would like to create at Run Time and some before RunTime I think, I can see the benefits through creating before RunTime if you have heavy Loops & Events Running at the start of layout and you prefer to avoid extra Events & Actions

  • > what would be the benefit of having it be it's own block?

    I don´t see why such a map would need to be created during runtime with individual actions, rather than just beeing there.

    > i think it will just be for better visual, since its integrated into the new function system

    But it isn´t really, if you have to create it in an "on start of layout" event with individual actions.

    so having it as an action won't really effect performance, that map is going to be in memory and the lookup are are super quick, since its a dictionary type data structure. having it as a custom event block it will probably behave exactly the same, your still going to have the map in memory, and insert and lookups will perform the same. so the only difference between them is more for looks, i would imagine.

  • One Question that makes me Wonder

    when you >>>>Call function from "color" map with <string>

    and we have the Function with 3 Options

    On function ColorCall

    -> Map "color" string "Red" to RedFunction

    -> Map "color" string "Green" to GreenFunction

    -> Map "color" string "Blue" to BlueFunction

    How does it check which one we passed as a Parameter, Does it work Like "Else" or it just calls directly the one Selected one from the Parameter String? so basically its this method better and faster than do it in the old fashion way with Else, Else like I did on my previous Pictures

  • I think the main benefit of events are they can use a dynamic string for expressions when creating a function map. Given the whole point of the feature is to allow for a more dynamic use of function calls this seems to make sense. Also new actions are relatively easy to add, but new event blocks are a lot of work to integrate in to all sorts of parts of the editor (everything from internal logic, UI, drag and drop, copy/paste, saving/loading to projects, find all references, find by text, etc...). It would be a shame if we did a lot of work to make a new block for this, then the first request after that was for the ability to use dynamic strings - in which case it may as well have been events from the start.

  • How does it check which one we passed as a Parameter

    Internally this would be done with a map lookup, which is very fast (and faster than a sequence of if-else-ifs).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > How does it check which one we passed as a Parameter

    Internally this would be done with a map lookup, which is very fast (and faster than a sequence of if-else-ifs).

    Hoo Grate! that sounds really good Thanks

  • Fair enough. I'm excited either way, but I'll have to wait until these maps drop to convert my current project. :)

  • Hey Ashley,

    One issue I noticed here trying to convert the functions of a project, is that when I convert a function, all actions where the function is called that it is originaly disabled, the respective action of the build-in function is not disabled.

    Example: (tried to upload screenshots, but it seems image upload is not working, so I'm using 'Copy as text' feature)

    Old function :

    -> [DISABLED] Function: Call "test" ()

    Converted to build-in-function:

    -> Functions (built-in): Call test

    It seems like a little issue, but in large projects it can create big trouble.

  • Please file a bug report for that otherwise it will get lost in the forum.

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