Author Topic: [PLUGIN] AGS Fake Screen + Box Blur (OPEN SOURCE) - v1.0  (Read 95 times)


  • Local Moderator
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    • Dualnames worked on a game that was nominated for an AGS Award!
1. Prologue:

So, what this module basically does is it perfectly replicates your screen MINUS the UIS and the mouse and other overlays. This can be used essentially for capturing screenshots. And essentially for BOX BLUR.
And it's faster and better than the module that already exists. I can do a boxblur of 3 iterations with zero framedrop. Most of the code is based on Steve's wonderful idea almost a decade ago with the FakeScreen, so this is essentially an up from that. The code is open sourced, for those that want to improve it and such.

2. Instructions/Going through the functions

1. Import the module in your project (AGS Fake Screen.scm)
2. Import and enable the plugin (AGSFakeScreen.dll)

AGS Fake Screen Functions

  • int FakeScreenUpdate();

    This returns a graphic sprite number where everything is drawn to as a replica of the screen.

Code: Adventure Game Studio
  2. function TakeScreenShot()
  3. {  
  4.   int getGraphic=FakeScreenUpdate();
  5.   DynamicSprite*screenshot=DynamicSprite.CreateFromExistingSprite(getGraphic,false);
  6.   int setSlot=5;
  7.   screenshot.SaveToFile(String.Format("$SAVEGAMEDIR$/%d.bmp",setSlot));
  8. }
  9. //this will draw a replica of the screen and save it

DrawBoxBlur(int sprite, int radius)

This takes a sprite as a parameter, in this example case it will take the sprite that we'll be using to BoxBlur our entire screen, but it can blur any sprite. Radius defines how many times BoxBlur will be applied. Ranges from 1-however many u like/your pc can support

Code: Adventure Game Studio
  1. Overlay*screenlay;
  3. function repeatedly_execute_always()
  4. {  
  5.   int getgraph = FakeScreenUpdate();
  6.   DrawBoxBlur(getgraph, 3);  
  7.   screenlay=Overlay.CreateGraphical(0, 0, getgraph, true);
  8. }
  9. //this will box blur with 3 iterations your entire screen every frame.

3. Download links


*ZIP file containing both*

4. Source

The source files can be found on GITHUB

Box Blur 3 iterations
« Last Edit: 12 Jun 2019, 19:37 by Dualnames »
No more military army stuff. I'm alive and back.


  • ǝsıɔɹǝxǝ ʞɔǝu puɐ uıɐɹq
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
    • selmiak worked on a game that won an AGS Award!
    • selmiak worked on a game that was nominated for an AGS Award!
Re: [PLUGIN] AGS Fake Screen + Box Blur (OPEN SOURCE) - v1.0
« Reply #1 on: 12 Jun 2019, 21:46 »
nice. And very quick <3

does this work on other operating systems than windows as it requires a dll?