Which type of event would best help with fighting game optimization?

Hello there! I’ve been working on a fighting game for…god knows how many months now. During that time I’ve tried to implement multiple characters as best I could, which led me to experiment with various types of events. At first I tried to place the mechanics of each character in the scene’s event itself, but at some point…I thought that might bloat the scene and make it run worse. I’ve tried to add external events, to lighten the load on the scene…but this is making me think…what would be the best way to implement them? You see, I have 2 playable characters, which can each be picked as either a Player1, a Player2, or an AI. Now, what would be best? Create an external sheet for each version of each character (Character1_P1, Character1_P2, Character1_AI), or lump every state into one sheet (Character 1 has P1, P2, AI etc.)? I’d like to know what would be the pros and cons of each, which kind of event would make the game run better, and cause the least conflicts with other code?

Hi,

This is what the documentation says about external events:

“External Events help keep event sheets clean, and prevent the need to repeat the same events in multiple places.”
https://wiki.gdevelop.io/gdevelop5/interface/events-editor/external-events/

It is not mentioned that the use of external events is improving the performance.

In the “How to troubleshoot poor game performance” part, there is no mention of external events as method to run your game better.
https://wiki.gdevelop.io/gdevelop5/tutorials/how-to-debug-poor-performance/

If you think about that, it cannot work this way, as the events from the external event sheet will run in your scene anyway. If the events are for some reason performance-heavy, they will slow your game down, no matter if they are part of an external event or of a huge event-sheet in your scene.

Anyway, maybe there are other good reasons to use external events and someone else can give their perspective.

1 Like

Depending on how big your game is
BUT If you want it to be efficient

Game play scene should be always same and you load crap to it depending on which map should be loaded
Same with players

I would 1st build all that crap in one single scene
And AFTER i have done them map transfer it to external layout and events

Same with players
Keep their stuff in ONE events sheet so its easier to debug/adjust
After i am done split each character to external event and that would be MY correct way of doing it

1 Like

As always, Zero, your answers are always helpful! Didn’t even think of it that way. I always thought that having EVERY SINGLE EVENT in one scene would just bog down the entire scene. I’ll try going at it with everything on just one scene. Thanks a lot!

1 Like