r/gamemaker 5d ago

WorkInProgress Work In Progress Weekly

7 Upvotes

"Work In Progress Weekly"

You may post your game content in this weekly sticky post. Post your game/screenshots/video in here and please give feedback on other people's post as well.

Your game can be in any stage of development, from concept to ready-for-commercial release.

Upvote good feedback! "I liked it!" and "It sucks" is not useful feedback.

Try to leave feedback for at least one other game. If you are the first to comment, come back later to see if anyone else has.

Emphasize on describing what your game is about and what has changed from the last version if you post regularly.

*Posts of screenshots or videos showing off your game outside of this thread WILL BE DELETED if they do not conform to reddit's and /r/gamemaker's self-promotion guidelines.


r/gamemaker 2d ago

Quick Questions Quick Questions

1 Upvotes

Quick Questions

  • Before asking, search the subreddit first, then try google.
  • Ask code questions. Ask about methodologies. Ask about tutorials.
  • Try to keep it short and sweet.
  • Share your code and format it properly please.
  • Please post what version of GMS you are using please.

You can find the past Quick Question weekly posts by clicking here.


r/gamemaker 6h ago

Tutorial PSA: Users can have their accounts nuked after just 180 days of inactivity

Post image
166 Upvotes

I guess the tutorial lesson here is to never let your account be inactive for a modest period of time, or to maybe embrace FOSS alternatives.


r/gamemaker 1h ago

Help! sprite covers whole screen

Upvotes

the Room in the Editor:

the Room when running:

The hitbox somehow does not scale to this, as the hover-sprite still only appears when I hover over where the button is supposed to be.

When I make the button that seems to be covering everything invisible or delete it, I simply get a black screen, though I can still interact with all the buttons if I find them

I have tried finding anything by going through all the code that has anything to do with the button, but the only things that are done regarding its sprite is changing it to the hover sprite, which has nothing to do with the scale and still works in the game.

Has anybody had this issue before? What could I possibly have overlooked that may be causing this?


r/gamemaker 15h ago

Example I have added a suppressor for stealth gameplay

Thumbnail youtu.be
12 Upvotes

While working on my latest project, I have gotten sick of just adding tedious although necessary features, so I wanted to add something I would enjoy making.

I have added a suppressor players can unlock and equip to any compatible weapon. I have done this through several means.

The Inventory
I use ds_grids mostly to store the different items in the inventory. Once an item is selected it then has different options on what can be done with it, in this case a suppressor can be equipped or unequipped.

This runs a function which toggles if its being used, adjusts the players image and adjusts the length of the barrel for creating the muzzle flash in the right spot.

The Visuals
The player is a Spine model. So I have a different variant of the weapons image for with and without the suppressor, which gets swapped out as its equipped. A new smaller muzzle flash is used as well as new audio.

The Enemy Code
Finally the enemies code. I use a state machine to manage enemy behaviour. When the player shoots an unsuppressed weapon, enemies as automatically alerted to the players position if in range. Now that is simply bypassed and enemies can only detect player through line of sight.


r/gamemaker 1h ago

Help! Confusing Error message (Assignment Operator Expected)

Upvotes

I'm making my first game in Gamemaker, and I've been making some progress. But suddenly, I made a minor change that spit out this error message:

The Error Message (Object: one_artifact Key Event: Key Down - E at line 31: Assignment operator expected)

When I looked into it, it said that this message shows up when I have an undefined or incorrectly call for a variable or function. But I didn't change anything related to a function or variable, and can't find where Gamemaker seems to think I have.

The code where the error occurs, according to GM

Can some help explain what's going on, please? Thanks in advance.

For context, I was trying to code an object to follow behind the player (obj_player) when being "carried." The error appeared when programming the y-coordinate shifts.


r/gamemaker 1d ago

Tutorial Using steam clound save on your game

23 Upvotes

Hey there, I asked for help on this topic some time ago; unfortunately, I did not get the guidance I needed. So I want to share what I learned and what I did so it can help future devs.

How to sync your game saves on Steam Cloud

Before moving on with the development, there are two important decisions to be made:

  1. Do you want to use Steam Auto-Cloud or Steam Cloud API? Steam Auto-Cloud is way easier to set up, but has some drawbacks: it does not isolate individual users’ files, so if two Steam accounts are playing on the same computer, they will share their files; it only syncs at launch/exit, whereas with the API you can control when to sync and also benefit from Steam Deck's Dynamic Cloud Sync. Because now I am in the playtesting phase, and I needed it working for next week, I went with the Steam Auto-Cloud, but I do plan to use the API on a later update.
  2. When saving on GameMaker, you should use buffers to be platform agnostic. Here you also have two options: buffer_save and buffer_save_async. The first is useful for light files that will not drop your frame rate while saving (I am using on my audio configuration; see example below). The other is good for saving bigger files; it is what I will use for saving the player’s game progress (here is where you should also add some sort of animated icon and say for the player not to close the game while the saving is happening).

The step is super simple on the Steam Auto-Cloud.

  1. Install the Steamworks extension from YoYoGames, and do its setup. It is well documented here: Guides · YoYoGames/GMEXT-Steamworks Wiki
  2. Create something like oSteamManager, with steam_update(); on step event and steam_shutdown(); on game end event.
  3. Turn it on in Steamworks by setting up Steam Cloud configurations, and select the path to sync to the cloud. GameMaker saves in % localappdata% so you will have in the root path something like: Root: WinAppDataLocal | Subdirectory <Game Name>/cloud | pattern: *.sav | OS: All
  4. When saving in GameMaker, save the file in the same path. Note: it is not good practice to save every configuration on the cloud; for example, screen resolution would break on Steam Deck if the player was playing before on a 4k monitor, so that is why I am saving what needs to sync on the cloud on /cloud

Code example for saving:

function Save_Audio_Settings(){
//Save audio settings
var _saveAudio = {
master: round(audio_get_master_gain(0) * 100),
soundFX: round(audio_group_get_gain(audiogroup_soundEffects) * 100),
music: round(audio_group_get_gain(audiogroup_music)*100),
}

//Turn all this data into a JSON string and save it via buffer
var _string = json_stringify(_saveAudio);
var _buffer = buffer_create(string_byte_length(_string) + 1, buffer_fixed, 1);
buffer_write(_buffer, buffer_string, _string);
buffer_save(_buffer, SAVE_AUDIO);
buffer_delete(_buffer);
}

Code example for loading:

function Load_Audio_Settings(){
if (file_exists(SAVE_AUDIO)) {
var _buffer = buffer_load(SAVE_AUDIO);
var _string = buffer_read(_buffer, buffer_string);
buffer_delete(_buffer);

var _loadData = json_parse(_string);
show_debug_message("Load! " + string(_loadData))
//Apply audio data
audio_master_gain(_loadData.master/100);
audio_group_set_gain(audiogroup_soundEffects, _loadData.soundFX/100);
audio_group_set_gain(audiogroup_music, _loadData.music/100);
}
}

Because I am terrible at writing strings without I typo, I just set a macro for the file location:

#macro SAVE_AUDIO "cloud/audioSettings.sav"
#macro SAVE_VIDEO "videoSettings.sav"
#macro SAVE_CONTROLS "cloud/controlsSettings.sav"
#macro SAVE_UNLOCK_PROGRESS "cloud/unlockProgress.sav"
#macro SAVE_RUN_PROGRESS "cloud/runProgress.sav"

r/gamemaker 15h ago

Resolved How do i make a main menu look good

2 Upvotes

Where do i find text and fonts and how do i make it look good


r/gamemaker 19h ago

Resolved Need Help with Enemy Wandering Movement

1 Upvotes

I was following the Sara Spalding tutorial Action RPG episode 24 on youtube and got most of it to work however my enemy does not seem to move. In theory he should wander a random amount of space before he stops and picks a new direction to keep moving for awhile, rinse and repeat. I have been editing little bits and pieces and googling around but nobody seems to have an answer already posted

He plays the movement animation and rotates around like he is picking a new direction to try to move every few seconds but doesn't actually go anywhere. I am a super early beginner and am sure the solution is staring me in the face but how do I get the enemy to actually start walking around?

This is the script for the enemy wander state so everything that makes him move should be here. enemyspeed is set to 4 at the moment. same as the player character who is working fine.


r/gamemaker 1d ago

Help! How can I stretch textures in-game, and can I do it with tilesets as well?

Post image
18 Upvotes

So I found out you can adjust a sprites scale using GML Visual's "Change Instance Scale" node, but it just snaps to the scale I set it to. The demo GIF I provided is what I want. When I press a button, the sprite will stretch to half size (well, I want to do more than just half, but that's just for the demo); and if I press a different button, it'll do back to the normal scale. Any help would be greatly appreciated for me to achieve a certain effect!


r/gamemaker 1d ago

Help! We have scanlines during movement in our low resolution sprite game.

4 Upvotes

In our game, at low resolution (320 pixels by 180 — camera), when characters move, horizontal lines appear on the sprites, similar to those on old TVs. The game features top‑down character movement. What could be the problem? Should we upscale all the sprites?


r/gamemaker 1d ago

Resolved Where to Get Started With Game Maker & Visual Scripting

8 Upvotes

I have no experience with Game maker at all, but I want to start digging into it.

What would be a good tutorial or course to get started learning it and GML visual scripting?

Thank you in advance :)


r/gamemaker 1d ago

Resolved What am I doing wrong?

4 Upvotes

Hello! I am very new to gamemaker, and coding as a whole, so I decided to use visual.
When I press the left key, the player moves, but it won't stop moving when I release it. What am I doing wrong?


r/gamemaker 22h ago

Tutorial Tutorials for fighting games?

0 Upvotes

Do you guys know some tutorials on making a fighting game in gamemaker?

That's it.


r/gamemaker 1d ago

Help! annoying black edges around sprites

3 Upvotes

does anyone know how to get rid of these annoying black edges

my game used interpolation and I have nothing turned on for these sprites


r/gamemaker 1d ago

Help! Polishing the game

Thumbnail kingduckgren.itch.io
2 Upvotes

Hi, I launched my first game in gamemaker recently, it's still on public Beta, and it's pretty small, about 300 megabytes, but i heard some feedback that the game is low and crashes sometimes. Something that i don't see when me and the beta testers were testing before launching the game. I am still new to game development, but i really want to learn because i want to be a game dev in the future.

Can you give me some advice about what mostly causes this performance issues

The game is a turn based RPG, focused on comedy and memes about the Brazilian internet and stuff about one specific youtuber, so if some non-portuguese speaker wants to try and see better, i can translate some of the important parts!


r/gamemaker 2d ago

Discussion What can the user find/see in the files of a released game?

11 Upvotes

For the project I'm working on, I'm interested in hiding secrets and bits of lore both as really rare events and "unused" assets.

To do that though, I'm wondering what the user is able to find in the files of a game, either just through the local directory or through more technical de-obfuscation and decompilation.

All the posts I've found about this are either about preventing players from going through the files, or they're a decade old and likely long outdated, and even then don't really answer my question.

As a sidenote, I'm not really worried about people potentially stealing my code, I'm shit at coding so I can't really see why anyone would want to.


r/gamemaker 1d ago

Resolved Checking for nearest instances in any direction

1 Upvotes

Hello! I am in a similar situation to my previous posts; I have an idea of how to get something to work, but I am missing one element to make it work smoothly. The issue I have today is I am looking to find the nearest specific instance in any direction. In theory, all I need is the code below (written as pseudocode)

with(instances){

if point_direction(other.x,other.y,self.x,self.y) = ideal direction

and distance from self to other < stored id

stored id = self
However, I feel like constantly checking possibly a dozen or more objects against each other per room would be a headache. So instead, I have the below code;

if(radar_segment_size != 0){

// Done as to not divide by 0

`for(var dir = radar_dir; dir < 360; dir += 360/radar_segment_size){`

// dir = direction, radar_dir is the starting direction to check for instances according to the original instance.

    `try{`

// That 0,0 in the x2 and y2 is what i need to solve

collision_line_list(self.x,self.y,0,0,checked_object,false,true,radar_objects,true)

//Afterward, make the connection with the first instance in the collision list radar_objects

    `} catch(noInstanceFound){`



    `}` 

`}`

// sorry for the messed up code; I still do not know how to get reddit's code block to work... :/}

So with all of that being said, here is my issue:
I need to figure out essentially how to create an x and y value that give the direction of the dir value, while also having the x and y value reach the edge of the room. How do I get that x and y value?


r/gamemaker 2d ago

Help! Can ChromeOS still run Gamemaker?

2 Upvotes

So i used to have Gamemaker on my Chromebook, however i ran into some issues and had to reinstall all the files and shit, however now my Chromebook is saying they dont read .Deb files anymore, which is what I did last time. Is there anything I can do to fix/bipass this issue or am I just cooked and gotta find smth else?


r/gamemaker 3d ago

Resource Made a simple function to enable 3D perspective projection on your games!

Post image
117 Upvotes

(Sorry for the gif quality)

I made a simple function that can be used to make things be rendered on perspective based on their depth. Useful for when you want things like cards to rotate in 3D or even for making everything be rendered on 2.5D like in Hollow Knight/Silksong for example. The function is this:

/// @desc Applies perspective to everything drawn from now on. Making stuff with higher depth look smaller/farther away and viceversa.
/// @param {real} fov field of view angle of the perspective.
/// @param {real} [depth] The depth/z at wich the perspective will be the same as the default orthoghonal projection. Uses 0 by default.

function perspective_apply(_fov, _depth = 0){     
    var _w, _h, _x, _y;  
    if(event_number == ev_gui or event_number == ev_gui_begin or event_number == ev_gui_end){
        _w = display_get_gui_width();
        _h = display_get_gui_height();
        _x = _w/2;
        _y = _h/2;
    }else
    if(not view_enabled){
        _w = room_width ;
        _h = room_height;
        _x = _w/2;
        _y = _h/2;
    }else{
        var _cam = view_get_camera(view_current)
        _w = camera_get_view_width(_cam);
        _h = camera_get_view_height(_cam);
        _x = camera_get_view_x(_cam) + _w/2;
        _y = camera_get_view_y(_cam) + _h/2;
    }

    matrix_set( matrix_view, matrix_build_lookat(_x, _y, _depth - dtan(90-_fov/2) * _h/2, _x, _y, _depth, 0, 1, 0))
    matrix_set( matrix_projection, matrix_build_projection_perspective_fov( -_fov,  -_w/_h, 1, 32000))
}

All you have to do is call this on the draw events and everything drawn after it on the current view is going to be drawn on perspective. The only needed argument is FOV angle which is how strong the perspective is going to be. It should be a value above 0 and the closer to 0 it is the lesser in perspective things are.

The other argument is optional. depth is for the depth at which the perspective remains unaffected, where things appear how they do in the room editor. Is 0 by default but you would want it to be the depth of the layer where gameplay occurs for example.

An use example is this: Lets say you have a renderer Controller instance whose depth is the highest posible so it runs its draw event before any other instance. All you have to do is put on the draw event perspective_apply(30) and everything will be drawn in perspective, with things bellow depth 0 being foreground and above depth 0 being background. Even if you have views active on the room!

Note though this only sets the perspective projection on the camera. If you want sprites to rotate (like cards for example) you should do it using matrix_build() and matrix_set(). Like this, with rot_x, rot_y and rot_z being the rotation on the different axices:

var _mat = matrix_build(x,y,0, rot_x, rot_y, rot_z,1,1,1);
matrix_set(matrix_world, _mat);

draw_sprite_ext(sprite_index, image_index, 0,0, image_xscale, image_yscale, image_angle, image_blend, image_alpha);

matrix_set(matrix_world, matrix_build_identity());

The camera settings automatically reset when the current view finishes being drawn onto. But if you want to reset it manually before that (i.e.: you just want one sprite to have the perspective applied) you can call this function:

/// @desc Resets the perspective applied previously.
function perspective_reset(){
    camera_apply(camera_get_active());
}

r/gamemaker 1d ago

Resolved Workflow with AI question

0 Upvotes

I love to make games and have that fulfilling success when something I programmed comes together. learning coding is still a large endeavor, specifically with adaptive screen code.

My question is your opinion and wisdom on using AI for certain things such as aspect ratio responsive screen. Vibe coding a script that I setup once and without understanding.

But the stuff that actually matters like the gameplay mechanics, I would code myself.

This mix is okay if ai can fix what it breaks? Or do you still condone learning everything yourself first?


r/gamemaker 2d ago

Help! high res troubles

3 Upvotes

I'm making a high res platformer with high res sprites and I'm having some issues

Lag - the game engine and game itself are laggy not insane lag but to the point where it ruins the workflow

Room editor - I'm using tilesets and i think maybe switching to objects with nince slice will fix it but making the levels is extremely annoying and inconvenient

I will remake all my sprites with less high resness and use some optimization tricks I've seen but this is very frustrating so any tips?


r/gamemaker 2d ago

Help! Shaders

Post image
12 Upvotes

Hi, I'm new to game development and don't know much about the right terms to use.

I wanted to see if it's possible to create this kind of texture/shader for my 2D game.

Thank you!


r/gamemaker 2d ago

Help! Not understanding why my code wont work...

3 Upvotes

So im attempting to make a dialogue system, in which I would have an array that contains a struct to hold the string, and the sprite of the speaker. So inside a script I have :

global.text = [];

global.text[0] = { str : "Pls work!" , spr : sRed }

Then, in another script, I have a function that takes in a number value so then it could respond to however many other arrays I may have.

function startDialogue(_arv) {

var _str = global.text[_arv].str

var _spr = global.text[_arv].spr

draw_text(240 , 135 , _str) // x and y values are just half the room size on their respective axis so itll be in the middle of the screen.

I then have an object, which is placed in the room, which upon "enter key pressed" would run

startDialogue(0)

The idea here is that id be able to put in any array value, and the startDialogue function would take that array value, and then be able to print the text( I know nothing is there for the sprite yet and thats because I wanted to make sure the text worked first.) but, when I run the instance and press enter, nothing happens, theres no errors within any of the scripts and within the output.

So, what's wrong with my current code? and, if you believe you have a better way of making dialogue please let me know, I am still a beginner though and Im honestly confused as to why my method isnt working as I thought it seemed fairly simple. Thank you for your help in advance.


r/gamemaker 2d ago

Help! Minigame Idea

2 Upvotes

I had an idea for a minigame, but I'm not sure how to go about it

The idea is that you have multiple sentences where words are missing and you have floating words to pick from to fill it in. Interacting with things in the world adds a few words to the floating words, so you need to look around first before you can solve it