r/gamemaker • u/Big_Belt_5375 • 16h ago
Help! I wan to make a 320 x 240 pixel perfect game but its coming out stretched. Any tips?
It will be fullscreen and i want it to be 4:3 with like those black boxes on the edges ig
r/gamemaker • u/Big_Belt_5375 • 16h ago
It will be fullscreen and i want it to be 4:3 with like those black boxes on the edges ig
r/gamemaker • u/Primary-Community827 • 23h ago
Hi,
I recently downloaded Gamemaker on my Macbook but whenever I open the application, the ui is really spread out and my mouse is completely desynced, with buttons only being abled to pressed when my cursor is far away from them.
Sometimes if I close and restart the app enough times and mess with my display size it will work as intended and the buttons and cursor all work normally, but this is not repeatable and super annoying to do everytime I open it.
Has this happened to anyone else/any suggestions on fixing it? I've deleted and redownloaded Gamemaker twice to no avail.
I added an image of what it looks like when the ui is desynced and when I've managed to get it to work
TLDR: Cursor/ui desynced when starting application on Macbook
r/gamemaker • u/ugglebug3 • 22h ago
Hey everyone,
I am very new to game dev (under a week of using gamemaker) and ive been working on a simple platformer game. I wanted to add dialog into the game so I made an NPC called "dummy", which triggers dialog once the player is less than 32 pixels away from them and press the F key.
As well as adding dialog, I wanted to add a shader to the NPC to give it a dynamic outline that changes colour once the player is within the interaction distance, going from a black outline to a white one. I followed Sara Spaulding's tutorial on outline shaders from years ago and miraculously it worked completely fine. But now I'm at the point where I want to add the ability for the shader to change colours. I tried doing it myself but got confused so tried to look elsewhere for help, but I can't find anything on the topic, at least nothing that works with my code.
Here's the code:
sh_outline Fragment Shader
// Simple passthrough fragment shader
//
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
uniform float pixelH;
uniform float pixelW;
void main()
{
//figuring out the size of a pixel
vec2 offsetx;
offsetx.x = pixelW;
vec2 offsety;
offsety.y = pixelH;
vec4 texColour = texture2D(gm_BaseTexture, v_vTexcoord);
//figuring out pixels location on the sprite
float alpha = texColour.a;
float original_alpha = alpha;
alpha += ceil(texture2D(gm_BaseTexture, v_vTexcoord + offsetx)).a;
alpha += ceil(texture2D(gm_BaseTexture, v_vTexcoord - offsetx)).a;
alpha += ceil(texture2D(gm_BaseTexture, v_vTexcoord + offsety)).a;
alpha += ceil(texture2D(gm_BaseTexture, v_vTexcoord - offsety)).a;
if (alpha > 1.0) alpha = 1.0; //claim alpha
if (original_alpha != alpha) {
gl_FragColor = vec4(0.1529,0.1529,0.1529,1.0);
}
else {
gl_FragColor = texColour;
}
gl_FragColor.a = alpha;
}
obj_dummy Create Event
//Outline Shader
uPixelH = shader_get_uniform(sh_outline,"pixelH");
uPixelW = shader_get_uniform(sh_outline,"pixelW");
texelW = texture_get_texel_width(sprite_get_texture(sprite_index,0));
texelH = texture_get_texel_height(sprite_get_texture(sprite_index,0));
//Default Dialog
text = [
"Default Text",
]
obj_dummy Draw Event
//Outline Shader
shader_set(sh_outline);
shader_set_uniform_f(uPixelW,texelW);
shader_set_uniform_f(uPixelH,texelH);
draw_self();
shader_reset();
obj_player Step Event
//dialogue initiation
if (keyboard_check_pressed(ord("F"))) {
if (currently_talking == noone){
var check_x = x + (32 * moveDir);
var who_is_here = instance_place(check_x,y,obj_dummy);
if who_is_here != noone {
audio_play_sound(sfx_interact,1,false);
current_text = (who_is_here.text[0]);
currently_talking = who_is_here;
current_text_index = 0;
current_text_line_number = 0;
instance_create_depth(x,y,1,obj_pauser);
}
} else {
if (current_text_line_number < array_length(currently_talking.text) - 1) {
audio_play_sound(sfx_interact,1,false);
current_text_line_number++;
current_text = currently_talking.text[current_text_line_number];
current_text_index = 0;
} else {
currently_talking = noone;
instance_destroy(obj_pauser);
}
}
}
Basically, the code checks if the F key has been pressed, then if the player is in proximity to the NPC at the time of the key press, dialog initiates. Im thinking I should swap around the keypress and whoishere if statements so that whoishere is being detected constantly, then when the player detects theres an NPC infront of them they send a message to the dummy that tells the shader to change the outline colour to white. Only, thats the bit where I'm stumped.
I'd really appreciate any help I can get on this. Definitely dont want to use AI for coding advice.
Thanks!
r/gamemaker • u/themufnguy • 10h ago
I'm trying to make a bullet sequence for my game and for some reason I can't just copy this animation curve to move a second bullet the same way it did the first, it just moves the original one when i copy and paste it.
I want to paste all 3 of the green tracks (same curve) and have them repeat 5 times before ending the sequence

r/gamemaker • u/CrocJohn • 17h ago
Hello, while creating my open-world I ran into a problem with the hotbar. It follows viewort 1 but not smoothly.
This is my objects end step event:
x = camera_get_view_x(view_camera[1]) + camera_get_view_width(view_camera[1]) / 2;
y = camera_get_view_y(view_camera[1]) + camera_get_view_height(view_camera[1]) - 20;
Hope you find a solution to this.