I think that having the ability to take game screenshots from within the code would be nice. Sometimes games want to allow the player to capture the scores screen and stuff.
To implement it, an engine function declaration needs to be added to ArcadeMaker.Core/IGame.Funcs.cs file, and the implementation needs to be added at ArcadeMaker/Engines/MonoGame/Core/ArcadeMakerMonoGame.cs.
A quick Google search shows that MonoGame has a RenderTarget2D class that can be used for that. The frame needs to be drawn to an instance of this target class, and it should happen in Draw event, so I guess that our engine function will need to throw an exception if its called outside of Draw event.
Note that a futile implementation of the function would also be needed at the IDE project, in the FutileGame class. Just add the signature of the method to the class, with empty body.
If you have any questions, please feel free to ask! 🙂
I think that having the ability to take game screenshots from within the code would be nice. Sometimes games want to allow the player to capture the scores screen and stuff.
To implement it, an engine function declaration needs to be added to ArcadeMaker.Core/IGame.Funcs.cs file, and the implementation needs to be added at ArcadeMaker/Engines/MonoGame/Core/ArcadeMakerMonoGame.cs.
A quick Google search shows that MonoGame has a
RenderTarget2Dclass that can be used for that. The frame needs to be drawn to an instance of this target class, and it should happen in Draw event, so I guess that our engine function will need to throw an exception if its called outside of Draw event.Note that a futile implementation of the function would also be needed at the IDE project, in the FutileGame class. Just add the signature of the method to the class, with empty body.
If you have any questions, please feel free to ask! 🙂