
PSA: Users can have their accounts nuked after just 180 days of inactivity
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.

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.
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?
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:
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.
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.
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.
Before moving on with the development, there are two important decisions to be made:
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.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.
oSteamManager, with steam_update(); on step event and steam_shutdown(); on game end event.% localappdata% so you will have in the root path something like: Root: WinAppDataLocal | Subdirectory <Game Name>/cloud | pattern: *.sav | OS: AllCode 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"
Where do i find text and fonts and how do i make it look good
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.
https://i.redd.it/7xt7980i44kh1.gif
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?
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?
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
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!
I have 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 :)
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?
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.
(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());
}
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.
I have the basefile for a game I'm working on at the minute but I honestly can't figure out the code for the life of me. I also have all the music requirements and the dialogue and foley. I don't expect anyone to help me out for free but I really do need help because I need it by Friday.
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?
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!
___________________________________________
############################################################################################
ERROR in action number 1
of Create Event for object oEnemyParent:
Variable <unknown_object>.totalEnemiesSpawned(100076, -2147483648) not set before reading it.
at gml_Object_oEnemyParent_Create_0 (line 4) - global.totalEnemiesSpawned++;
############################################################################################
gml_Object_oEnemyParent_Create_0 (line 4)
gml_Object_oZombie_Create_0 (line 2)
and it doesn't stop at this, every global variable is saying "not set before reading" and I tryed using a script and persistant objects so the global and not global variables run first but I fear I might be doing this unnessesarly since everything was working before and for some reason it's not working anymore. Also I followed the tutorial videos step by step until the finle video (did not do bonus vid)
so if anyone can tell me why my global variables/variables are not working PLEASE DO.