chrismaltby / gb-studio

A quick and easy to use drag and drop retro game creator for your favourite handheld video game system
https://www.gbstudio.dev
MIT License
8.57k stars 471 forks source link

Build flags #1591

Open permartinson opened 1 month ago

permartinson commented 1 month ago

Is your feature request related to a problem? Please describe. For creating different language versions, or adding debug-specific options, the ability to use build flags would be very helpful.

Describe the solution you'd like I imagine a simple event very similar to the event group, with an additional dropdown to select one of the defined build flags. If the flag is set to true when compiling, the group will be included in the build. Otherwise it is ignored. The build flags could be defined in the Build Options section of the settings. A dropdown at the left of the build button could contain checkboxes to activate and deactivate the flags.

Describe alternatives you've considered I have currently made a custom event for my project with a similar solution. But because I wanted to prioritize my time to focus on the game, I edit the flags directly in the .js file before compiling.

maxoakland commented 1 month ago

This would be useful for me. I already use build flags and just set them manually in an empty "Init" scene that I only use to initialize variables at the start of the game