More about Construct's new functions

You're viewing a single comment in a conversation. View all the comments
  • 3 Comments

  • Order by
  • Function maps is a feature I really dislike on the new runtime, I mean there's no really dynamic call. I can't do things like concatenating the name of the function I wanted to call, I always from now and on, need to know the exact function I'm executing thus dynamic functions are really not in there anymore. Although I've managed to map and semi-dynamically execute callback functions for buttons, for instance, I need to run an initial mapping function in order for this to work, therefore reusing this code is always bound to knowing exactly what you are going to call. Having a "find references" for dynamic functions as one of the selling arguments for mapping adds no value to the engine (just my opinion), you guys are doing a great job with Construct, I really liked it and now I'm creating my own plugins, but definitely function mapping is something that, for a programmer like me, makes me feel crippled from a code perspective.

      • [-] [+]
      • -1
      • Ashley's avatar
      • Ashley
      • Construct Team Founder
      • -1 points
      • (1 child)

      The way function parameters now work is far better. The problem with completely dynamic calls is there is no way to know which parameters should be added. Function mapping solves the problem of calling by a string while still being able to pass along known parameters. Normally completely dynamic function calls are not necessary - if you restructure your functions to work with the new system, they may well be much cleaner and easier to understand afterwards.

      • I'm not saying the way it works now is worst, I just don't feel as free as I used to before changing to function maps. Just take that in consideration now that you are working with the javascript feature, it will definitely constrast.

        Keep up the good work.