Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

SittingDuck

12
Posts
38
Followers
2
Following
A member registered May 09, 2020 · View creator page →

Creator of

Recent community posts

Copied from another comment: GameMaker has a tendency to resize the display buffers when switching (or restarting) rooms. Calling the included crt.resize_surfaces() method after each room change with a persistent crt object should do the trick, but please let me know if it doesn't, and I can take another look.

GameMaker has a tendency to resize the display buffers when switching rooms. Calling the included crt.resize_surfaces() method after each room change with a persistent crt object should do the trick, but please let me know if it doesn't, and I can take another look.

If you're looking for the public domain art used in the screenshots, you can find it here: surt | OpenGameArt.org

A purchase of this asset permits use for any and all commercial and non-commercial projects, so long as the shader's source code is not redistributed in an editable way. No need to credit, though it is always appreciated!

Hello,

Support for this asset is only provided for desktop targets. That's not to say that it couldn't work on HTML5; however, it would likely require some tweaking to work properly. In particular, the resizing of the GUI surface may need to be handled differently on web exports.

I just took a look, and it seems that the screen edge antialiasing is responsible for that 1 or 2 content-pixel reflection. For a quick fix, just change line 134 of shd_crt from this:

float width = max(1.0 / u_output_size.x, 1.0 / u_output_size.y) * 8.0;

Into this:

float width = max(1.0 / u_output_size.x, 1.0 / u_output_size.y) * 1.0;

Hope this helps! I'll most likely fix this in the download at some point in the near future.

The shader will work with any resolution you specify. In the variable definitions of the crt object, just set game_width, game_height, and screen_aspect_ratio to whatever is appropriate for your game.

Hi, thanks for using my asset! If you want to be able to resize your game window, you’ll need to resize the GUI surface; GameMaker doesn’t do this for you except at the start of the game. In either a step event or the resize event, you’ll just need to check if the window dimensions are different from the GUI surface size, and if so, call display_set_gui_size(), and grab the window dimensions with window_get_width() and window_get_height().

Just uploaded a quick patch to fix the one line of code that was causing this! Just an oversight in a with() clause where I forgot to reference crt.gui_user_event instead of gui_user_event.

Thank you for trying my asset! I would suggest taking a look at the "Draw GUI" events for the CRT object, where you'll see that the rendering is wrapped up in a single function call. If you call this function while your surface is the current target, the CRT screen will be drawn directly to your surface instead of the GUI surface. You'll need to ensure that crt.output_width and crt.output_height match the size of your surface, and I'd also recommend disabling the phosphor mask if your surface will be zooming or stretching around the screen.

Hello,

Thank you for trying my asset!

This asset hijacks the application surface to use as the basis of the simulated CRT screen. If you want your HUD to appear on top of the CRT screen, then you'll need to draw it after the CRT object calls crt_apply() in the Draw GUI End event. Alternatively, if you want the HUD to be included inside the CRT screen, then you'll want to draw it directly to the application surface in the Draw GUI event using surface_set_target(application_surface) followed by surface_reset_target().

(1 edit)

Hello,

Thank you for trying my asset!

Whenever you change any of the CRT object's settings at runtime, you'll need to have it call the function "update_uniforms()" to see the changes reflected in-game.

To disable the effect at runtime, If deleting the CRT object causes issues, you could also choose to disable it by setting its "shader" variable to shd_raw. This shader is more or less a passthrough shader that only handles aspect ratio and optionally curvature (which you could disable for a raw pixel art look).

I hope this helps!