How to have games communicate with each other using multi game system where you can control everything and situation.
This page is under the BSD-3-CLAUSE and everything on this page that the BSD-3-CLAUSE does not cover is under this license: This work is licensed under Attribution 4.0 International.
Link to main page, repository and game wrapper.
We would be using a universal game state system and here is how it works.
Warning: You will have to add hooks to your or open source games or emulators(or add the hooks in settings for specific games in the emulator). I would use Lutris as the game wrapper but its under GPLv3.0 and if you cannot use Lutris because of that you will have to create your own game wrapper or find any wrappers under a weak copyleft or permissive license if they exist. With the scripts in Lutris they are post-exit scripts.
- Game Or Emulator Detects Trigger Event
- Open source or your emulators watch memory addresses.
- Native games(your own games, recomps and open source games) use source code hooks at event locations.
- Hook Writes Binary State File
- First few bytes are things related to game ID.
- The next few bytes are things related to game levels/areas
- Game Process Exits
- Emulator or native game terminates.
- Game Wrapper Detects Exit And Checks For Transition
- Wrapper checks if binary file exists.
- If yes:
- Read and parse the file.
- Launch next game.
- Delete the binary file.
- If no: Do nothing.
- Next Game Loads At Specific State
- Emulators load the game at specific memory addresses.
- Launcher tells native games to load at specific areas.
- Cycle Repeats