Fastloops/functions in gdevelop - for html5 games

A fastloop “test123” (action - run loop how many times- expression) is a call event that triggers it’s corresponding fastloop condition (on loop “test123”)

How do they work and what they are (in clickteam fusion)

They are called a “function” in construct2 and are slightly more complicated, but also more powerful- since you can parse a value:
more powerful ways of using a function: … onstruct-2

Why are they important:
-Fast loops are a very powerful way of keeping chunks of your code independent of other chunks and reusing logic in general.

  • A fastloop can be run in a number of times (for example the number of specific objects) and be used to evaluate a list of objects and stop at the object that meets the criteria (loopIndex value (expression) = object ID value)

Can we have them in gdevelop at some point? Be it as a function or as a fastloop - this functionality is very powerful

GDevelop supports functions, you can activate them in the Extensions window. They work as standard functions: a function have a name (unique), then you can call it from it’s name and add parameters, finally the function runs its sub-events, of course it can access the parameters through expressions :slight_smile:
The bad new is that parameters can only be strings for now, so you’ll lose performance if you call a function with some parameters many (really many) times (because ToString ==> ToFunction ==> ToNumber conversions) :frowning:

not available for html5 games :unamused:

Oh… yes, excuse me :blush: , but you could specify it too :wink:

I realized it when you brought it up. :smiley:

With all the limitations it has it would be great if it is properly implemented and available for html5 games

Never gonna call it fastloop that sure, it’s an heresy :laughing:
These fastloops are two things:

-While loops, that are already implemented in GDevelop and are surely better implemented that in any other program as they are pure real javascript or C++ loops.
-Functions, which are already implemented but for native games.

Note that I doubt that the C2 implementation is any better that the current one for native games, so please avoid saying that it has “all [these] limitations” :neutral_face:

So the real request is just : can we have functions for HTML5 games :slight_smile: Try to be clear and to find the GDevelop equivalent of what you’re requesting. Otherwise it sounds as if GDevelop is lacking features while it’s not entirely the case! :slight_smile:

ok then. In this case - can we have functions for html5 games?
I find them extremely useful and its a shame html5 games can not yet benefit from them. :slight_smile:

Functions for HTML5 would be awesome!

Added on the roadmap because it is indeed something that should definitely be added someday. Surely not for the next version though!

This is awesome news!! :mrgreen: