Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How to: True 64x64 display in GameMaker Studio 1 & 2 Sticky

A topic by baku created Jul 31, 2017 Views: 939 Replies: 1
Viewing posts 1 to 2
(6 edits)

Like I did last year, here's a quick tip on how to make GameMaker Studio actually output 64x64 without any dumb sub pixels that would normally show up if you rotate a sprite or position objects at non-integer coordinates. Works in both 1.4 and 2.

The two functions you need are surface_resize and display_set_gui_size. Here's what you gotta do exactly, put these lines in your game controller's or whichever's create event:

surface_resize(application_surface, 64, 64);
  • This makes the application_surface, which is the surface of the game itself, be 64x64 pixels. No matter how you increase the window size beyond 64x64, the game itself won't show sub pixels. Make sure your view size is 64x64 as well, obviously.
display_set_gui_size(64, 64);
  • This makes the GUI, the layer of the game above the application_surface that is used for interface stuff, be 64x64 pixels.

Here's a comparison (using sprites from my lowrezjam 2016 entry) of what your game might look like without running these functions, and what it looks like with them. View size is 64x64, window size is 320x320.

Before ๐Ÿค”๐Ÿ˜ฑ๐Ÿ™…โ†’
After ๐ŸŽ‰โœจ๐Ÿ‘Œ



Good tutorial. There were a few games last year that fell foul of this subtle difference. It's particularly easy to make this mistake if you don't have rotations, actually. So I'll sticky this.