0 Favourites

A library for functions would be great

  • It would be great, if there was a library for functions,

    where all functions can be saved seperately and one can include & call them simply by dragging&dropping them to any Project.

  • I think that might lead to the overuse of functions, but that type of modularisation is planned for C3.

  • One can use a knife to cut bread or to kill somebody - in the right hands it will be an asset, while the wrong Hands have enough opportunities to go wrong even without a knife.

  • Cant we already include another event sheet and call functions from it?

    The event sheets are not seen as a resource type that can be easily transferred between projects unfortunately - because of their dependency on the objects in the scene. You can't refer to objects via a variable - that makes it harder to make reusable event sheets.

    That stuff is available in godot and game maker btw- it's much easier to do it there. Of course, you gotta learn other engines and some scripting then. Most game engines allow you to have classes that extend other classes and scripts that can call functions from other scripts. You can reuse functions by passing the game objects they are affecting as parameters- and even easily expose them to the editor - where the designer selects what game object is to be affected by the reusable function without typing a single line of code.

  • Well the problem with functions is that they aren't very linear, the return event can be anywhere. To continue the simile, it's like a blade, and a handle that are separate.

    If you wanted to "sharpen" the blade you might have to go digging for it, and includes might actually complicate things.

    They might work great, or terrible depending on how well they are planned.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • newt is right - you have to carefully design your reusable logic and one glove doesnt fit all. If you want more flexibility, learn programming. Construct's event sheet is awesome, but it does have limitations compared to what you can do compared to godot for example.

    The more flexibility you have - the more complexity and learning curve

    The linearity in functions is not a problem at all - once it completes execution of whats inside the function, the process should continue from after the line where the function was called. Unless inside the function you haven't rerouted the execution to some other specific part of the game loop - which would defeat the purpose of the function - to be reusable.

    My suggestion is to plan it out on paper first- say to yourself exactly how you want to structure it.

    I personally try to make things modular, but have fallen in the trap of tangling myself in a mess in the past

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
56 7,311
Eric Matyas's avatar
Eric Matyas
Unread hot topic
57 30,555
duanegrundy's avatar
duanegrundy
Unread hot topic
41 3,218
Napelazam's avatar
Napelazam