Hi,
The game I’m working on is a port of a Gameboy game i once made, I’m currently testing it all but the game seems to function fine as far as i can tell but i do have a couple of questions.
-
Is it bad to never exit the main loop function ? My game has game states and i just have a big game state loop inside the main loop function where each game state calls another function with a loop specific to that game state and remains in that loop until the game state changes. In each of those function i make use of
arduboy.NextFrame
as usual but use a continue statement instead of exit. This seems to work all fine, but I’m just wondering if never exiting the main loop function might have some kind of consequences. And i rather not change this if it’s all fine todo this as It would require a lot of changes in my game. -
About the UP / DOWN key combination for resetting on arduboy fx, i found a thread that links to a custom wiring.c that handles this but i have not included it in my game. Should i release my game without this and rely on python tools or the FX Builder site to patch my game or is it better to include this beforehand? If so what happens on older arduboy’s without fx chip ?
-
I’m using “normal” libs and not the homebrew optimized arduboy board specifications with optimized core code (i only found out about it later). My game runs fine with the normal board specifications (about 3-4 % CPU usage at 10 fps) and arduboy libs is there any reason why i should be using the homebrew / optimized core instead of all the default libs and should i switch to using the optimized core / homebrew code ?
-
About EEPROM usage, I’m guessing on the arduboy FX games can have collisions on saving to EEPROM (like using the same addresses), is there a list somewhere which games use which addresses or did the FX games got patched somehow to prevent least amount of collisions or should i report somewhere (upon release) which EEPROM addresses my game uses ?
-
EDIT: i did exactly this, disable sound when both sound and music are turned off, and also disable sound / music on boot if the global sound flag is set to disabled. I enable global sound again if either music or sound is being enabled in options screen. So this question is void as well
Original question:
I read somewhere there is a reserved EEPROM address to enable or disable sound globally, my original game had options to disable / enable sound and music separately and i still use this so i also save these 2 separate options to EEPROM. I’m guessing i should somehow enable / disable this global sound flag as well (for example if both sound and music is turned off) otherwise if another game disabled sound completely it won’t be possible to enable sound (globally) again in my game. -
EDIT: This is not true anymore, i was using an older version of project ABE (v078) and there this was needed but in project ABE (v081) this is not needed anymore the audio flag seems to be set to “1” by default so calling
arduboy.audio.on()
is not needed anymore
original question:
Is there any way to know if I’m running inside the project ABE emulator or on the real device ? To make (partial) sound work in the emulator i have to explicitly callarduboy.audio.on()
because EEPROM is completely initialized with zero’s as far as I’m aware but on the real device i should not call this and make use of the global sound setting to adhere to people having sound turned off. So i need a way to know if I’m running on the real device or in the emulator to call that function or not. How do people handle this ? And is there a way to know this ?