Ive just given my first Steam Gamemaker Game release some 'Quality of Life' update, its exactly 5yrs in April since I release it. Some could argue that its been too long and some things should have been in there at release, but, everyday is a learning day .. Ive learned a lot in them 5 yrs, but your first big one is always a bit special..
If you like what you see, give it a try ..
I need to know
What's written in EULA
I'm trying to make a different sound play depending on which instance of one object the player collides with. Is there like... an if-statement I could use maybe? Like "if it's this instance, then run this code"?
I'm going crazy. I copypasted this directly from working code, and yet the player does not move no matter what key I press.
(ObjDouble8th is the playform the player is spawned on, btw).
Hello. I’ve been doing some work implementing translations for my game and I’ve been successful so far adding languages using greek/latin/cyrillic characters. I have a good system for loading translations. I’m quite familiar with the font editor in gms2 but I have no idea how to add a language with characters not offered by any font that’s installed on my windows pc by default.
My question is how I can install, then load the windows-offered korean fonts into gms2? The common, yet charming “Gulim” font is one I want to add in particular. I’ve tried installing the korean keyboard on my pc running windows 11, but it didn’t install any korean fonts for me to use. Windows makes finding these fonts, or info about how to get these fonts really obscure.
Also if there’s any other considerations you think would be good to know before I start implementing korean, japanese, simplified chinese, and other languages that are far from English with no latin characters - I’d appreciate any advice. There’s not a lot of info about this sort of thing.
Thank you, my smart and helpful comrades :]
Hi. I've looked up tutorials, but none of them have worked for me. I'd like to add a fade in effect when switching between rooms, but I can't figure it out. Please help.
I'm watching a tutorial and there is one part that I do not understand. This is the code:
myTextbox = instance_create_layer(x,y,"Text",obj_textbox);
myTextbox.text=myText;
From what I understand, it is assigning .text to myTextbox to make the dialogue different with a certain npc. The original text was simply called "text" on the object "obj_textbox". However, I do not understand why "myTextbox.text" is used to assign a different string value to the npc. Thanks in advance.
I was looking into a lighting system to test out for a project and I found Jobo's 2D lighting system on the marketplace and a video on how to use it.
but its 6 years old and there are tons of errors when I imported it to my game testing it.
Is the kind of thing to old and no longer compatible? not sure if they'res something newer I could use instead.
Thanks!
I have the player colliding with an object. The sound plays over and over as long as the objects are colliding. How do I make it only play once, when they initially collide?
There has to be a way to do this.
Is there a way to add ai to help program
Last question for today byeee
PS Im not native English speaker
I am Grumpy Wizard, developer of Pixel Wizard.
I am looking for play testers to try my game.
If you like pixel graphics and a hack and slash adventure,
I implore you to take a look at my game entirely made in gamemaker of course;)
Short description:
A medieval fantasy hack and slash adventure where you are a battle pixel wizard. Fast and frantic, fight hordes of enemies and defeat brutal bosses in any order to save the kingdom. Use deadly magic, powerful items and valuable loot to help turn the tide of battle.
If it looks like something you would be interested in playing and testing let me know.
What I need from a play tester.
-
Leave feedback about the game.
-
Report any crashes or bugs in the game.
-
Report general performance of the game.
-
If willing, disclose hardware you are running the game on ie. cpu, ram, os.
-
Report that achievements are working.
-
If possible - record some game-play footage and upload it to google drive.
-
Report time spent in game.
-
Report how many quests you have completed even if none.
-
All testing will be through steam.
The game itself is fully complete and finished.
I need serious testers as I have limited amount of keys to give.
I will run the test for an undisclosed amount of time.
When all testing is complete I will ban all test keys.
Obviously I can't pick everyone for the play-test so don't feel bad if your not picked.
I will be looking at if you have any history at play testing games.
I need real gamers as the game can be quite difficult for a non gamer.
Mature minded people with good communication skills is a plus.
Exceptional feedback will get a credit in the game as a play-tester if you want.
All correspondence will be through reddit.
It doesn't matter if it's through comments or private DM.
That is entirely up to your discretion.
If you have any questions or queries don't hesitate to reach out and ask.
I am more than happy to answer any questions.
Steam Page,
Merry Christmas and happy new year!
Happy testing everyone!
Hi all,
Quite new to Gamemaker (and coding in general) but not new to dev (mostly as an artist though)
I’m toying with a side scrolling shmup.
Got some parallax background effect to work, even got a simple alpha transition between two sets of parallax (for outdoor and indoor parts of my levels) to work.
But now I’d like to be a little more specific about where to show the indoor version of the parallaxes vs outdoor version.
I was thinking of using a tile layer and « paint » the parts I want my indoor set of parallaxes to show in say… white and the outdoor set would show in the black painted parts. This way it’s editing friendly.
Then probably use surfaces and blend mode to draw the end results.
Been struggling a bit to implement that so before I continue butting my head, does that seems like a sound way of doing things?
Thanks in advance
Let's Build a Basic State Machine
Hello everyone, after the recent release of my state machine framework () (so state machines have been on my mind a lot over the last few weeks), I came to the realisation that a lot of people still have a lot of difficulty with state machines, so I decided to throw my hat in the overcrowded ring with yet another tutorial about the amazing topic of ✨State Machines✨!
The State of States
So...What is a state machine? Well, consider a player character in a platformer. They might be able to run around, maybe climb ladders, possibly swim, perhaps even fly through the sky with a power up or something. Each of those “actions” could be considered a state, and a state machine is the thing that handles how you move in or out of those states, and deals with the actual working of the state as well.
Why would you want to build a whole state machine just to handle some actions like that? Let me explain, my dear reader, the pains of trying to implement stuff like that without a state machine. Firstly, you have your general movement. x += hor_speed; y += ver_speed;, etc. Simple and easy, no states required. Ah, but now you want to add climbing. You don't want your character to move horizontally on the ladder, so you decide “Ok, I'll just set an is_climbing flag to true when I start to climb, and then lock the horizontal movement behind a check to make sure we aren't climbing before it can run.
This seems reasonable, but it's the first dangerous step into heavy spaghetti-code territory. Next you try to add swimming, uh-oh, you'll need to add another flag to check for that, and then cancel out of the old movement completely in order to switch to the different movement for swimming (more floaty perhaps, with 360 degree motion). So you've now got three “sections” of code competing with each other, and being tied behind interlocking flags (what happens if you get on a ladder in the water?).
Now you add flying, and suddenly there's a whole new thing you need to check for and stuff is starting to get annoyingly complicated. Gameplay errors start creeping in (weird movement in certain situations, etc), and you're starting to bang your head on the desk wondering where it all went wrong.
This is the part of the story where the triumphant state machine walks into the room, head held high, to heroically save the day.
You see, the secret sauce behind state machines is they let you “carve out” little sections of code into “states” and then guarantee that only the code from one state is run at a time. It makes the states mutually exclusive, which then means, instead of having to try to figure out how your interlocking system of flags is leading to the player sprite incorrectly changing into swimming while you're on land, you can literally just reason about each small chunk of code at a time, safe in the knowledge that flying code will NEVER be run during swimming, no matter how hard your play-testers try to make that happen.
This might not actually sound all that amazing on the face of it, but once you start experiencing the ease of development this code partitioning allows for (and the many varied situations it can be helpful in), you'll wonder how you ever did anything any other way.
This tutorial will build a very simple version of the same kind of system that Statement uses. If you do not have the time to extend this basic machine with stacks, histories, queues and all the edge cases it needs in a real project, then consider . If you do, you'll get an easy to use state machine system with cool advanced features like:
- Queued transitions and declarative transitions.
- State stacks and history.
- Payloads / non interruptible states.
- Pause support, timers, and built in debug helpers.
- And more!
If you want to check out the full feature list, check out the .
For many people, the cost is more than worth the time it would take to develop, test, and maintain all this yourself.
Starting States
So, the preamble is out of the way, and we can begin with an implementation.
First, let me say, there are many, many ways to implement a state machine, from if...else if...else chains (ewwwww) to switch statements (slightly less ewwww but still...) to setting a state variable to different functions and running that state variable (ok, but not very flexible and has some notable shortcomings) and more.
We'll be implementing my favoured method, which is to use a struct for the state machine and for each state, and having the whole thing revolve around a few simple methods called from either the state machine or the state.
So, since we'll be implementing a repeated pattern of struct creation for the state machine structs, we should -immediately- be thinking of a constructor. Let's build a very basic one now. Create a new script, call it scr_state_machine or something and put this code in it:
function StateMachine() constructor {
state = undefined;
}
Done and dusted. We call sm = new StateMachine(); and we have a nice little struct stored in sm with a single member variable called state. Ok, I'll foreshadow that this isn't going to be enough data stored yet, but we'll forge on blindly ahead now. Let's create our state constructor:
function State() constructor {
update = undefined;
}
Looking pretty good so far. Same general setup, call the constructor with new and we'll get a struct with an update member variable. update will hold the code that we want the state to run each step. But we've got a few problems. Firstly, we have to directly reach into the innards of the state machine and the struct to set these fields properly, i.e.:
sm = new StateMachine();
idle = new State();
// Altering state and update directly below here feels a little icky
idle.update = function() {
// Idle code here
}
sm.state = idle;
While this works, it's not pretty and it's not very future-proof (what if we want to change the name of the member variable update to some other name, like run? We'd have to go through our code and find every state we've created and manually edit it to the new name). Much better to create some static methods inside the constructors and assign stuff through them (otherwise known as setters, the companion of getters). We'll start with the state machine and add a setter for assigning a State struct to the state variable.
function StateMachine() constructor {
state = undefined;
// Define a static method that we can pass the state struct to, and it does the updating. If we need to change anything about
// how we assign a state in the future, then we only need to change this one bottleneck here, not every place in the code we change state
static AddState = function(_state) {
state = _state;
return self;
}
}NOTE: By returning self from a method, we can chain the calls together, like
.AddState(_state1).AddState(_state2).AddState(_state3);. This is usually known as a "fluent" interface.
And now we do roughly the same thing for the State.
function State() constructor {
update = undefined;
// Another static method that allows us to provide a function the state will run every step as an argument and assign it to update.
static SetUpdate = function(_update_func) {
update = _update_func;
return self;
}
}Ok, now we can run the methods when adding code to the state and the state to the state machine:
sm = new StateMachine();
// Now we use the new setters instead of direct assignments
idle = new State().SetUpdate(function() { /* Idle code */ });
sm.AddState(idle);
That's a bit better. But wait? How are we even going to run the states update code? Let's add a method to the state machine to handle that:
function StateMachine() constructor {
state = undefined;
static AddState = function(_state) {
state = _state;
return self;
}
//We'll run this from the state machine, and it'll make run the update function we stored in the state (whichever state is currently assigned to the state variable).
static Update = function() {
// First we check to see if our state variable has been set to a struct printed out by a State constructor, using is_instanceof(), so we can be sure it has the update function
if (is_instanceof(state, State)) {
// Then we make sure it's actually a function, since update starts off as undefined and perhaps we forgot to assign a function to it
if (is_method(state.update)) {
// And finally we run it.
state.update();
}
}
}
}A Single State Problem
Ok, so now we can create a state, assign it the state machine and then run that state's code in the Step Event by running sm.Update();
Excellent. But wait a minute. What happens if we want to change states? Surely we don't want our player stuck in the idle state forever? Ok, so we can't just use a single state variable in the state machine to hold our states. We'll probably also want to name our states, so that there's a string we can read to find out what state we are currently in (maybe print it out for debugging, whatever).
We have two choices here, we can either create an array to hold all of our states, or we can create a struct to hold all our states. An array is easily loopable, and slightly faster access as long as there's not too many entries, but a state lets us directly retrieve a specific state without having to search...
Since we'll be mostly wanting to change to specific states, and will rarely want to loop over them all, I think a struct is best here, since we can use the accessor combined with a state name for easy retrieval (for example states[$ "Idle"] would retrieve whatever is stored under the "Idle" key in the states struct, which looks pretty nice to me as a way to grab a specific state), and structs are a little more "human readable" than arrays (less mental gymnastics in the noggin' means more code done in a day).
Finally, we'll want a ChangeState() method that lets us swap to another state that has been added to the state machine.
Let's get that setup.
function StateMachine() constructor {
// We still want our state variable, as it will hold “the current state we are in”
state = undefined;
// But we also want a struct to store all of our states in
states = {};
static Update = function() {
// First we check to see if our state variable has been set to a struct printed out by a State constructor, using is_instanceof(), so we can be sure it has the update function
if (is_instanceof(state, State)) {
if (is_method(state.update)) {
state.update();
}
}
}
// And we need to update our AddState so that it adds the new state to the struct, not simply setting state directly to it
static AddState = function(_state) {
// As a safety measure, we check to see if a state with the same name already exists in our machine.
// If we use the accessor to access a struct, and the key doesn't exist in the struct, it returns undefined
// So we check if it's NOT undefined, which means that the key has already been set for the states struct
// And therefore, we've already previously added a state with that name
if (!is_undefined(states[$ _state.name])) {
// We could exit the function here, or overwrite the state, or whatever we decided
// was valid behaviour. I'll just throw a debug message to console to warn the programmer
// And then simply overwrite it
show_debug_message($"You already have a state named {_state.name} in the state machine!");
}
states[$ _state.name] = _state;
// And we check to see if state has already been assigned to a state struct. If it hasn't, then this is the first state being added to the state machine, and we'll use it as the
// "starting" state. As a side note, this is why setters are often a good idea, if we had just manually assigned state in a ton of places, and then decided to make a change like
// this, we'd have a major refactor on our hands, but because we created a setter function early on, all we need to do is change that one function.
if (is_undefined(state)) {
state = _state;
}
return self;
}
// Now we make the ChangeState method
static ChangeState = function(_name) {
// We run the same check as in Update to see if the state exists in the states struct, and
// if it does, we simply set state to it.
if (!is_undefined(states[$ _name])) {
state = states[$ _name];
}
// If it doesn't exist, we warn the programmer that they are trying to change to a state that
// doesn't exist in the states struct.
else {
show_debug_message("Trying to change to a non-existent state!");
}
}
}
And we want to be able to give names to our states, so that we can use the name as the key for the states struct. Let's replace our State constructor with a version that takes a name as an argument and assigns it to a name variable:
// We give the name as a string for the argument of the State() constructor
function State(_name) constructor {
name = _name;
update = undefined;
static SetUpdate = function(_update_func) {
update = _update_func;
return self;
}
}Multiple State Disorder
With all that done, we can now, finally, setup our state machine and add multiple states. Create an object (obj_player or whatever) and drop this in the Create Event:
// Set a general move speed
move_speed = 3;
// Create our state machine
sm = new StateMachine();
// Create an idle state
idle_state = new State("idle")
// Give the idle state the code we want it to run as an anonymous function through our setter
.SetUpdate(function() {
// All idle checks for is whether A or D is pressed, if it is, we consider the player moving and switch to the "move" state
if (keyboard_check(ord("A")) || keyboard_check(ord("D"))) {
sm.ChangeState("move");
}
});
move_state = new State("move")
.SetUpdate(function() {
// Simple movement on the x axis
var _hor = keyboard_check(ord("D")) - keyboard_check(ord("A"));
x += _hor * move_speed;
if (_hor == 0) {
sm.ChangeState("idle");
}
});
sm.AddState(idle_state).AddState(move_state);Now we need to actually run the state machine in the Step Event:
sm.Update();
And finally, we'll add a little bit of drawing so we can actually see the player and the state's name into the Draw Event:
draw_set_color(c_green); draw_circle(x, y, 32, false); draw_set_color(c_yellow); draw_set_halign(fa_center); draw_set_valign(fa_bottom); draw_text(x, y - 32, sm.state.name);
Make sure you have your object added to your room, run your game, and you should be able to run back and forth, and see the state text above its head change as you switch from moving to standing still. And that's that. We've built a rudimentary state machine. There's many, many ways we could extend it. For instance, keeping track of the last state it was in prior to the current one (or even adding a whole state history to help with debugging). Perhaps we want to be able to run code when a state is entered? Or exited? Or maybe we want to be able to queue state changes? The world is your oyster when it comes to ways you can extend state machines to be more useful. At its core though, they all boil down to the same thing: separating code into buckets, and making sure only one bucket of code runs at a single time.
All that being said, you don't need to develop all this stuff because I've already done it for you (yes it's another plug)! if you're curious to see what a fully featured state machine framework looks like.
Now I think it's time for me to head back into my lair for a bit, but this time, I won't be gone long. There are things brewing and plans afoot that are coming to fruition soon. Be sure to check back regularly to see what they might be (I feel like I have to check my ahem after all this excitement).
If you end up using the tutorial or Statement, a rating or comment on itch helps a lot :D
Catch you on the flipside my peeps.
"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 's self-promotion guidelines.
I've been using game maker 20+ years now. Maybe newer devs don't have the context but in recent years the past 5 or so game maker has become increasingly unstable.
Every weekend I sit down and try to get a good chunk of hours progress working on my game, sometimes there's an update and like a good boy I keep my software up to date.
But these days it's feels like rolling the dice if I spend the day working on the game or troubleshooting some new bug introduced by game maker team.
I have my powerhouse desktop computer using amd cpu, and I have my fresh new laptop using intel which has no alterations beyond installing game maker and I get issues on both systems, so I know it's not hardware specific.
It's just frustrating and I hope we can get a conversation going to put pressure on the game maker team to prioritize stability and QA over pumping out fancy new features 1% of devs will ever use to make it look like game maker is staying relevant.
When I switch between my two monitors, I end up with giant windows, is there a way to adjust it to not make such large windows when I go between monitors?
Problem in version 2024.14.2.212
When using the Dracula theme in GameMaker Studio 2, the floating zoom button in the Sprite Editor appears centered on the canvas instead of staying in the corner.
Disabling the theme fixes it.
This is NOT a DPI issue and NOT related to styles.json**.**
Root cause
The Dracula theme overrides an internal zoom widget style that is shared between the Sequence Editor and image-based editors (Sprite / Tileset).
The problem is in:
styles_sequence_editor.json
Specifically this block:
"sequence_canvas_widget_style": {
"tool_flags": "Default"
}
This widget should not be themed. Overriding it breaks the internal layout calculation and causes the button to float in the center.
Fix (confirmed, no side effects so far)
Remove the block entirely to force GameMaker to use its internal fallback style.
Steps:
-
Open
styles_sequence_editor.json -
Remove:"sequence_canvas_widget_style": { "tool_flags": "Default" }
-
Restart GMS2
Result:
-
Sprite Editor zoom button goes back to the correct position
-
Sequence Editor still works
-
Dracula theme remains active
Notes
-
Removing
styles.jsondoes NOT fix this -
DPI / UI scaling does NOT fix this
-
This is a theme override issue, not a project bug
If you’ve hit this problem, this fix saves a lot of time.
I have a finished Game Jam game that I’m currently trying to build for HTML so it can be played on its itch.io webpage, and I already managed to fix a few issues with the move in platforms.
However, whenever I build my game and display it on itch, the browser seems to zoom in to the top left corner, and only displays that small section of the game. I’m new to Gamemaker, so is this a common problem? How would I go about fixing this?
Any insight would be appreciated, thanks!
So i want to have hd/handdrawn art in my game but i can't find tips or guides anywhere on it, i want my game resolution to be 1080p and dont know what size to make my assets, 128px x 128px still looks very pixellated.
so how can i make sure my game is 1080p and my assets still look sharp and not pixelated?
I'm following a tutorial for a dialogue system and am currently making an image of the character's head appear when they are speaking. When the first textbox with the picture comes up its fine but the one after without it crashes the game, I don't know what to do it just says line 147 invalid reference (sprite) requested -4 max is 109. I would really appreciate it if someone could help me solve this issue please.
Apologies I’m on mobile and incredibly sleep deprived because it’s finals week.
I’m working on a small breeding sim to familiarize myself with GML. I’ve got the base of everything done but I am struggling to figure out the math for the colors.
I’m using HSV for my colors and currently I’m just having both parent colors added together divided by 2. This works perfectly fine, until I get to the pink to red-orange range.
If I combine these two colors, naturally, I get blue.
How would I go about getting red instead?
I don't care about getting paid, i'm out here for the love of the game.
Hello everyone,
So my problem is, it's the first time I'm using GameMaker and wanted to follow RPG tutorial on youtube by GameMaker channel, but then I instantly realized that I was missing the object folder, and a lot more items.
I'm supposed to have 15 of them as shown on the video but I only have 3, I tried reinstalling the sowftware but nothing did it and I can't find similar cases on the internet.
Please if anyone as an explanation, even if it's that I did something stupid, I don't care I just wanna learn GameMaker please.
Thank you for reading.
ELI5, please. I have read the page in the manual, and I'm still confused. Does it move the object? In the platformer I'm making, the arrow keys move the object, so why do I need move_and_collide?
I'm trying to build a script where you give it an (x,y) location and it tells you what tiles are to your north, south, east, and west, so that I can make moving over certain tiles cost more stamina in my game.
I feed the function an array that has all of the tile layer IDs in the room and have it use tile_get_at_pixel for each tile layer to see if there is a (non-blank) tile in each cardinal direction. For some reason, this function behaves differently depending on how many instances are placed in the room editor? But it behaves normally if instances are spawned with code instead of placed in the room editor.
Am I fundamentally misunderstanding tile_get_at_pixel? When there are no objects in the room besides the player, it works as intended.
Here is my code, and screenshots of the behavior. There are currently 4 tile layers. First is the behavior with only the player placed in the room editor and other instances spawned with code. Second is when I place an instance in the room. I've checked that this happens with multiple different instances.
function check_cardinal_tiles(tile_layers,xpos=self.x,ypos=self.y,hori_bound=self.sprite_width,vert_bound=self.sprite_height) {
var center\_offset=1
if xpos != self.x and ypos != self.y {
center\_offset=0
}
var cardinal\_tiles=\["N","E","S","W"\] //initializes array to be returned
for (var i=0;i<array_length(tile_layers); i++) { //loops through all tile layers
if tilemap\_get\_at\_pixel(tile\_layers\[i\],xpos+center\_offset\*hori\_bound/2,ypos-vert\_bound/2)!=0 {
cardinal\_tiles\[0\]=tile\_layers\[i\]; //if there is a tile to the north, set it as north entry of Cardinal Tiles
}
if tilemap\_get\_at\_pixel(tile\_layers\[i\],xpos+1.5\*hori\_bound,ypos+center\_offset\*vert\_bound/2)!=0 {
cardinal\_tiles\[1\]=tile\_layers\[i\]; //check east
}
if tilemap\_get\_at\_pixel(tile\_layers\[i\],xpos+center\_offset\*hori\_bound/2,ypos+1.5\*vert\_bound)!=0 {
cardinal\_tiles\[2\]=tile\_layers\[i\]; //check south
}
if tilemap\_get\_at\_pixel(tile\_layers\[i\],xpos-hori\_bound/2,ypos+center\_offset\*vert\_bound/2)!=0 {
cardinal\_tiles\[3\]=tile\_layers\[i\]; //check west
}
}
return cardinal\_tiles
}
What will happen? How does it work? Has anyone bought Game Maker from THE OFFICIAL WEBSITE? Will I receive a file or what?
PS. If it's a file can I put in on pen drive?
I tried to make the camera autoscroll using this code:
view_xport[0]-=1
It did scroll, but the rest of the room did not appear. Instead this strange stretching thing happened. What might be the issue?
I was watching tutorials and the "Asset Browser" tab looks like this by default on everyone, they have Sprites, Objects folders etc. but i cannot see any of them unless i create one.
I'm trying to figure something out. Keep in mind I'm using game maker 1.49 so 3D zdepth draw is not a thing, just the regular depth variable. I have many shadows but if they overlap then when they intersect the middle gets darker. Doing it this way though allows shadows to lay on top of things.
The alternative is I draw all shadows to a surface and control the opacity of the surface. I can then cut holes from the surface but either way I can control it. It however would be a defined depth, likely on top of the floor. This would go under things.
What I want i the ability for objects to detect the shadow and darker. Like either through a precise collision detection with the surface orrrr you could get the surface pixel. However if the shadow is not 100% opaque then I am concerned I won't be able to detect the shadow as the pixel would vary, or is the pixel based on the surface and not the application surface? I basically want to detect a surface pixel touching an object and then I want to darken on the object or something.
Any idea how to approach that? Once again, the whole shadow surface would be the same depth as it's game maker 1.49. Or eliminate surfaces and just find a way for all shadows to be the same opacity if they overlap.
No idea how to approach this yet. I would get an extension if I have to but it must be GM 1.49 compatible as the game is locked in that format.
Thanks.
I made a post here two days ago, but, just in case you didn't see it, I'm working on a game and it no longer works when I run it on HTML5. The people's best guess is that it's because of a bad update. I switched to and it worked. I can now run the game and publish it on the internet.
Unfortunately, I ran into a different problem. When I play the game, it flickers every time I switch rooms. It goes pitch black for a split second and it's kind of a eye sore. I don't have that problem when I run it on other platforms. HTML5 is not cooperating, so is the only way I can publish my game. Is there a way to use without the flickering? I tried looking up a solution, but I couldn't find anything.
My room is split into 10 rows.
I have a obj_spawner that spawns obj_enemy_parent (there are 3 types of enemy children it picks randomly) into one of the 10 rows randomly.
Obj_spawner Code:
Create:
all_rows[1,2,3,4,5,6,7,8,9,10];
Step event:
var row_arrayindex;
if (instance_number(obj_enemy_parent) < 20) {
var spawned_enemy = instance_create_layer(spawnx, spawny, "Instances_enemies", obj_enemy_parent);
spawned_enemy.row_arrayindex = row_arrayindex;
with (spawned_enemy) event_user(0);I set it up like this, so that the enemy instance that spawned keeps a metadata of which row it spawned in, because later I want the enemy to move to a different row but depending on which row it was originally spawned in.
Obj_enemy_parent code:
Create Event:
target_row_y = y;
User Event 0:
if (want_move_down == true) {
dir = -1; //row above
} else if (want_move_up == true) {
dir = 1; //row below
}
target_row_y = obj_spawner.all_rows[row_arrayindex + dir];
Step event:
y = target_y;
//This is to detect the enemy in other rows above or below the calling enemy
var enemy_intarget_row = collision_rectangle(x, target_row_y - 5, x, target_row_y + 5, obj_enemy_parent, false, true);
var can_change_row_down = //I used a collision_rectangle(); to detect row above
var can_change_row_up= //I used a collision_rectangle(); to detect row below
if (can_change_row_down) {
want_move_down = true;
target_y = target_row_y;
}
else if (can_change_row_up) {
want_move_up = true;
target_y = target_row_y;
}
Problem with this code:
The problem is I need to compute target_row_y before running the obj_enemy_parent step event's code. It has to first detect if the row above or below is clear of other enemies in order to determine whether target_row_y is the row above or below depending on what var enemy_intarget_row gives it, var can_change_row_down, and var can_change_row_up gives. Then decide which row is good to move to then assign that row as its target_row_y.
I know the code is a little ambiguous, but the main problem here has to do something with the order the code is executed, because I need a value first, before executing it elsewhere if that makes any sense.
Perhaps utilizing instance variables will be the solution, but I am not very comfortable with those yet.
Like the title says, I've tried AI searches on this and I just can't for the life of me figure it out. What I'm doing is taking the tiles and drawing them to a surface and make the surface wider at the bottom and what that does it makes it so the tiles near the bottom of the screen like twice as large and spread out. It affectively makes it a perspective 3D view but in a 2D game. It is NOT 3D code. I need the sprites to draw in the correct spot in the view window. The shadows draw to the surface and show the proper place. I need the trees for example to go there with minimal wobble, within reason. I am not choosing to do this project in 3D. It is well well well developed by now and I am just not doing 3D. I have chosen to go this route.
It is in game maker but it doesn't matter because it's a math issue. I just need to know the math. I can figure out the logic of how to solve for the x shift but not the y. It is basic trigonometry but I cannot figure it out as the surface gets twice as tall and wide near the bottom. This has to do with how it is drawn. So moving a sprite up or down has to account for the stretch. My brain is just too slow for this. I am willing to compensate to solve this. Here is a demo program with a screenshot. I know the exe may yell at the computer but it was compiled with game maker 1.49 and maybe windows just has a fit about that. If you don't feel safe opening that, then the screenshot has an image with many numbers indicating what is going on. The jpg. image is probably enough. I can tip anyone who can solve this for me. I hired a guy but he bailed on me or didn't get the notice.
I would also be happy to explain how this effect was achieved in 2D.
Thank you.
EDIT: Okay so I understand the x. You can't think about how it looks. The bottom is twice as wide and your normalize the y value so basically the bottom scale is 2. Adjust that with the x and the x lines up fine. However if you go on the image visually it does appear that the scale for the y needs to be a very close 0.5 to 1.5 instead of 1 to 2 and also the logic is inverted so the top drops and bottom raises. Will try tomorrow but the x is near perfect and also works with skewing such as camera spins.
I have an instance that is in the start room, but whenever I start the project, the animation starts really slow and choppy, before returning to the correct framerate.
Hello there. I've been fiddling around with Game Maker for nearly twenty years, and only now have I started to seriously work on a game. Nothing fancy, mind you. Just a small puzzle game like
The test room I'm working with is doing good so far, but right now, my current problem is in the title of the post. I was thinking I could use variables to determine whether or not the enemies are dead is true or false, but custom variables don't seem to be shared amongst different objects. I don't think they even extend to the room code. How do I have a door or whatever check to see if let's say, three enemies have been killed before it opens? Thanks in advance.
Ciao.
Can I restart a sequence? For example, if a sequence finishes animating but isn't deleted, instead remaining on the last frame, I could restart it without deleting the sequence.
I only need to restart the animation, without deleting the sequence.
Way back in the olden days when I first found GameMaker, Mark Overmars had some incredible written guides on his website. They weren't overly ambitious and they had purpose. They taught you how to do something and then left you to experiment rather than just building an end-product for you.
My feeling is that while the modern tutorials are much cooler, they're better as an example rather than a learning tool.
As an experiment, I decided to do my best to adapt one of Dr. Overmars' tutorials to modern GM. It turned out to be more time-consuming than I expected, so I'm going to decide whether or not to continue with this after I get some feedback.
The link below is a ZIP file containing two PDF guides for making "Catch the Clown"--one in VS and one in GML--, two example projects (again, one for each method), and a folder containing the resources needed to make this game. Please let me know what you think about it.
I was using asset_get_index to turn strings into sprite but weirdly asset_get_index cant find this even if i have a sprite named exactly it
I want to try and recreate the effect they use to make fake metal and specular. I put whatever name I can find them under on the internet in the title but I don't really know what this is called or if this is multiple things. I can't find figure out where to start with gamemaker on this and I'm wondering if I should use shaders or try using code with the vertex buffers I am using to point the normals toward the view myself, can anybody help?
Hello, I'm currently facing some trouble. I have data for this character inside a global array that's in a script, and I call it into my player object, but where I face trouble is I want to modify the variables in the global array, but I believe I'm either making a copy of the array or it just doesn't change any of the data in the script. The code here is for a very simple level-up system. I did consult the GameMaker documentation on structs and lists. I don't believe I'm properly modifying the variables within the struct, so when the function runs, it doesn't seem to change the players' stats when it does run function levelUp. I'm a little bit stumped on how I can modify the stats while also calling them.
(increase the player health, multiply the strength, multiply the total of XP needed, and add 1 to the player level)
oPlayer Create Code
//Player's global array struct stats
pLvl = global.party[0].level;
pXp = global.party[0].xp;
pHp = global.party[0].hp;
pHpMax = global.party[0].hpMax;
pMp = global.party[0].mp;
pMpMax = global.party[0].mpMax;
pStrength = global.party[0].strength;
hpTotal = pHp;
xpTotal = pXp;
xpNeeded = 50;
function levelUp(enemyXp)
{
pXp += enemyXp
if (pXp >= xpNeeded)
{
//Xp and level
pLvl++;
pXp -= xpNeeded;
xpNeeded *= 1.6;
//Stats upgrade
hpTotal += 7;
pHp = hpTotal;
pStrength += 0.9
}
}gameData Script
//Player's data
global.party =
[
{
name: "Monkiki",
level: 1,
xp: 0,
hp: 23,
hpMax: 23,
mp: 11,
mpMax: 11,
strength: 5,
sprites : { idle: monkikiBattleIdle, attack: monkikiAttack, defend:monkikiDefend, down: monkikiDown, up: monkikiUp},
actions : [global.actionLibrary.attack, global.actionLibrary.defend, global.actionLibrary.escape ,global.actionLibrary.waterA]
}
,
]
I've been working on my game for several months. I want to post it on the internet one day, so I always open it on the HTML5 platform to test it. Yesterday, I've come across a problem. I updated Game Maker and I became unable to open my game through HTML5. Whenever I try to, I get a black loading screen followed by a white screen. And no, refreshing the page doesn't work.
I couldn't open my other games through HTML5 either. I could open my game on other platforms, so I'm certain that HTML5 is the problem. I restarted my computer, I changed the browser, I played with the settings, but nothing worked. Do any of you know how to solve this?
Some of my sprites with bright white/silver edges have a strange flicker that happens when i move my character. once i stop moving it continues flickering for half a second and then looks normal again.
I've tried tinkering with most of the sprite options like "edge filtering, seperate texture pack, etc" I also tried disabling "interpolate color between pixels". None have helped. Chatgpt said I could try rounding or flooring my player's follow camera lerping so it would only use whole numbers. Also did not help. Anyone seen this or have any ideas? If I delete these bright white/silver pixels the sprite looks normal again.
I’m extremely new to game development, and I was wondering if someone could point me in the right direction for choosing a good computer. I’m not looking for a big desktop since I don’t have the space for it, and they’re usually more expensive. I’m hoping to find a laptop that can handle game development without costing too much, since I’m not in the best financial situation right now. Any suggestions or recommendations would be really appreciated.
I have a panoramic pic of the office I'm using that's 2000 width by 1000 height and I wanna include that sort of curve view that classic fnaf games have where the sides of the screen are a bit warped rather then flat
However, while the office sprite looks normal without the shader, and I can turn and see the full thing using the mouse movement, when I apply this shader It makes the right side of the image not visible and the camera movement locks (the camera as in the office viewing camera, not the cams you'd use in a fnaf game for other rooms)
It also loads the centre of the sprite to the left upon starting the game, rather then the actual direct middle which I think is what's causing it to not allow me to see the right side
If further explanation is needed I can give it but I hope this makes sense
Hello! I am currently starting a new project and setting up some basic movement using the move_and_collide() function and delta_time. It's kind of new to me honestly, I used to write my own sub-pixel collision functions (using bboxes) and not use delta_time, so I'm running into some issues here.
My movement calculation is not complicated for now. It's a side-view game, so vertical movement is controlled by jumps. I ran into a problem that, sometimes, the player ended up with a tiny 1-pixel gap between the wall. By checking the values, I saw it was being caused by sub-pixel positioning. The thing is, how do I not use sub-pixels when I have to use delta_time for movement calculation? I tried rounding the position on the Draw Event, but it ended up visually pretty choppy.
var move_dir = get_input_direction() // returns -1, 0 or 1 for horizontal movement if(move_dir != 0) velh = move_speed * move_dir check_and_apply_gravity() // if not on floor, increase vertical velocity. if on floor, set it to 0 if(get_jump()) velv = jump_speed move_and_collide(velh * delta(), velv * delta(), obj_colisao) // delta() here just gives delta_time / 1000000
I could just up the game's resolution, but I don't like ignoring these problems as you never know if they're going to be a bigger headache in the future, so the sooner the better. Any ideas?
Overview
has lots of enemies, projectiles, characters, powerups, etc… that need to have some custom behaviors to occur at certain times. An example is that there are pillars that are scattered around the map that need to know when you kill an enemy within a certain area. Trying to link this all together directly would start to introduce a lot of tightly coupled code that would be difficult to change and maintain. Also, it does nothing to help add even more behaviors or situations.
To solve this, I came up with a simple lightweight event system using tags that allows for objects to subscribe to events without any centralized publisher/subscriber system. This makes it really simple to add events and loosely link objects together to add more behaviors.
Code
The code itself is quite simple, just get the tags, and call the objects.
/// @desc Trigger any event handlers on objects for specified event
/// @param {String} _event Name of event to trigger
/// @param {Id.Instance} _source Originator of the event
/// @param {Struct} _args Any additional data to be passed with the vent
function triggerTaggedObjectEvent(_event, _source = id, _args = {}) {
// Find all assets tagged with event
var _tagged = tag_get_asset_ids(_event, asset_object);
// Loop through tagged objects
for (var _i = 0; _i < array_length(_tagged); _i++) {
with (_tagged[_i]) {
// Ensure we actually have a handler defined
if(variable_instance_exists(id, _event)) {
// Call the event handler
self[$ _event](_source, _args);
}
}
}
}Usage
-
Add tags to objects that subscribe to a specific event. I use a format like “onEnemyDestroyed” or “onLevelUp” to help make it clear the tags are for handling events.
-
Inside the tagged object, add the event handler which is a function named the same as the tag:
onEnemyDestroyed = function(_source, _args) { ... } -
Where the event occurs (in this example the obj_enemy destroy event), call the trigger script passing arguments:
triggerTaggedObjectEvent("onEnemyDestroyed", id, { killedby: player_1 }); -
Enjoy having simple events!
Pros/Cons
-
Simple code, no libraries necessary
-
Loose coupling of objects
-
Easy to add new events
-
Any code can trigger an event, a UI Button, a state machine transition, etc...
-
No centralized subscriber system. Nothing has to be running for the messages to be broadcast.
-
Asset browser can be used to filter for subscribers to an event
-
Easy to pass along custom information necessary for the event
-
CON: Requires manual configuration in the IDE for subscriptions
-
CON: Structs cannot subscribe to events directly - an intermediary could work around it.
-
Performance has not been critically evaluated but this is not for code happening every tick and likely should not be a problem/concern.
Hope this helps!
Hello everyone, I'm a beginner GameMaker user and I'm confused about how I should code the movement and collision.
I watched 2 introduction videos on this topic,
and
They use different approaches but I'm unsure which one is better for the long run.
The first tutorial used the place_meeting() function to implement the collisions but apparently he said that there's gonna be issues with the collisions, more specifically the playerobject will sometimes not touch pixel perfectly the wall it's colliding with, which means it will be necessary to implement a fix for this.
Meanwhile the second tutorial simply used the move_and_collide function.
At first appearance it looks and sounds like the second way is better, much much easier and cleaner, but I have no idea if the fact that the solution is simple it will mean that there's gonna be limitations in the future for other specific things that involve the collisions.
I can only import one image. If I import another, it replaces the one before. How do I fix this?
So i'm following the video course from and i've run into this problem.
My code is litterally similar to his, i'm not sure if i messed up at some point while writing the code but i can't think of anything as the bullets oBullet spawn through oGun but when applying the spawn location; it messes up somehow and spawns as seen on the screenshot.
oBullet's code doesn't really do anything but set image_speed to 0 and destroy itself when it detects a collision.
All objects have their origin on the center of their sprite (gun was moved a bit lower to align with character's arms) and the gun's sprite box is tightly set to 32x11 for supposed easier bullet spawning though here we are.
I tried simply adding and substracting the bullet's spawn position until it aligned to the end of the gun's spritea (end of the barrel) but rotating the gun simply shown that the point of origin/rotation is somewhere else.
Do i simply have to do it the difficult way and tweak the values similar to "Begin Step" on "oGun" or is there an actual way to fix this problem?
Any help is greatly appreciated and thank you in advance for your time.
Hey I was thinking about developing a chess game but don't know where to get the computer playing algorithm??? I messed up the idea completely. Kindly help if you know
Something I’m just super curious about but…
Why is GameMaker’s current versioning scheme so weird? I’m not even talking about how the monthlies aren’t even monthly.
I’m talking about why is the current version called 2024.14 when it was released in October 2025? Shouldn’t it be called something like 2025.10 instead? Is it something to do with the betas?
Hi.
I'm porting a videogame I started to develop in Renpy, because it had a strong narrative component, so I thought renpy would be great. But the problem is the game is about survival mechanics, and it was really hard to implement some things in Renpy so I'm migrating it to Gamemaker.
So far it's getting quite cool, and I think I Can finally overcome some issues I had in Renpy. But I have an important question:
During the game, 6 people in a bunker have different conversations, with different moods. So for every line the character can be happy, angry, ok, sad, and or/sick/hungry with several different faces in each of the states. Let's say...for example, 20 variations per character (120 configurations) + some backgrounds.
In Renpy it was really easy. You choose 'show screen boy1' and it loads dynamically the background with the kid and I didn't worry about the memory.
But in Gamemaker you have two choices: Sprites and loading images from /datafiles.
For the conversations, backgrounds are 1920x1080 and characters can be 1000x1000 size.
Can I trust that loading images as the conversation goes will work? Will it have memory issues? Or do I need to flush the image cache or something everytime a new conversation ends or something?
I've never been a very pro coder in this kind of things, so I'm quite newbie in memory management, specially in Gamemaker, since I've been doing a game in Renpy for 2 years already.
Any hints about this?
I did something weird with my scripts folder, and it was just missing. I ended up just using Ctrl+Shift+F to find my actual scripts and forgot about it. I went in the next day to run my game and it wouldn't load. I thought closing and reopening the project would help, but now it wont open at all
I looked online and someone had the same thought process I had with reopening it, and someone's advice worked for them but not me. What do I do? I'm also worried my game's going to be corrupted or messed up if I get it working again.
I do this every time a bullet is shot:
// tear weapon condition
gun.condition -= gun.maintenance;
gun.condition = clamp(gun.condition, 0, 100);
var _jam_chance = (100 - gun.condition) / jam_div;
if irandom(100) < _jam_chance {
is_jammed = true;
}I my mind this should work. When a bullet is shot, it decreases condition, which then increases jam chance.
The jam chance just does not seem to add up when testing. It jams really often even with a e.g. 2% jam chance.
Can someone help me out here?
SOLVED but not sure how; when I was messing with the line of code that had the error, as I was typing "data." Gamemaker suggested the variable "dmg". I tried it and it worked, so I used the find and replace tool to try and find where the original "dmg" variable was defined and it came back with 1 result which was where I had just typed it... I'm not sure how it recommended this blue "dmg" variable and it worked when it couldn't find the original. Is there a "dmg" variable I made somewhere, or is this a built in thing I'm unaware of?
I am following a very simple tutorial and whenever the game goes to do the enemy attack the debug tells me its referencing an "unknown object" that is referenced multiple other places and works fine. I have rewatched the video section 10 times, rewrote the code, and can not figure out what it wants from me.
This has been annoying me quite a lot. Oftentimes, when I work with an object and I get to the event part, I can't see/touch the code because it's too far off-screen. Any time I try to adjust it with my mouse, it goes right back. How do I fix this?
TLDR; I have a very fleshed out platformer outline and example GM project. looking for someone to code while my partner and I make the art and music. I can pay... not much tho... 😅
Edit: I'm 27 if that matters.
Hello all, I'm currently looking for someone who might be able to take the helm of coding an idea for a platformer I have. I know the fundamentals of code, but that is it.
I'm an artist and a musician, as is my partner who would be helping us along the way with the production! I currently have an Outline of the Lore, Worlds, Levels, Main Characters, Player Moveset, Enemies and a 1 room example GameMaker project with the Player and side characters animated just not coded. I also have almost ALL of the background writing done that i would be more than happy to share through conversation!
This is my very first project, so I am more than willing to cut content, discuss changes or simplify things to make the process less stressful, smoother and for you to have your own creative touch to the game as well! I am still learning all of this, and I want to avoid making a convoluted mess of confusion that takes forever to complete!
If you, or anyone you know may be willing to help me out... shoot me a message or direct them to this post! Thank you for yer time, and happy gaming! :)
P.S. No experience required. I am a beginner, if you are a beginner as well, we can learn this process together!
P.P.S. if yer a pro and can take my outline and spit me out some great code, we can totally negotiate a bigger payment option :)
I trying to download from but there is just no button for download. No even button for purchase if its not free! I just cant understand...
"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 's self-promotion guidelines.
Trying to follow the gamemaker RPG tutorial, but instead of walking randomly around in a square and chasing the player when they get close, all my enemies seem to be gravitating towards the bottom right corner of the map. what's wrong with my code? I think I've followed the video correctly.
UPDATE 2
My code now works as intended thanks to the usage of array_equals()!
UPDATE
I forgot commas between each array inside the array, I added those and fixed some issues with my if statement and now the code no longer crashes my game, but doesn't appear to change the direction like intended.
I wrote the following code inside the step event of the player object in order to track which keys are held and which direction they would be moving in as a result:
InputsHeld=[keyboard_check(W),keyboard_check(A),keyboard_check(S),keyboard_check(D)]
InputCombos=[
`[InputsHeld==[false,false,false,false],0]` `[InputsHeld==[true,false,false,false],0]` `[InputsHeld==[false,true,false,false],90]` `[InputsHeld==[false,false,true,false],180]` `[InputsHeld==[false,false,false,true],270]` `[InputsHeld==[true,true,false,false],45]` `[InputsHeld==[true,false,true,false],random_range(0,360)]` `[InputsHeld==[true,false,false,true],315]` `[InputsHeld==[false,true,true,false],135]` `[InputsHeld==[false,true,false,true],random_range(0,360)]` `[InputsHeld==[false,false,true,true],225]` `[InputsHeld==[true,true,true,false],90]` `[InputsHeld==[true,true,false,true],0]` `[InputsHeld==[true,false,true,false],270]` `[InputsHeld==[false,true,true,false],180]` `[InputsHeld==[true,true,true,true],random_range(0,360)]`
]
for(i=0;i<array_length(InputCombos);i++){
`if(InputCombo){`
`direction=InputCombos[i][1]`
`}`
}
When I run my game and the player spawns, I get this error:
############################################################################################
ERROR in action number 1
of Step Event0 for object PlayerMain:
array_get :: Index [90] out of range [0]
at gml_Object_PlayerMain_Step_0 (line 82) - [InputsHeld==[true,false,false,false],0]
############################################################################################
gml_Object_PlayerMain_Step_0 (line 82)
I have tried searching online for people who have also had such an issue but to no avail, and I'm not really sure what to change because I did similar things with a 2D array earlier and it works well:
EnemySequence=[
`[BBatMain,1,500,64,500,-64],` `[BBatMain,2,500,936,500,1064],` `[BBatMain,3,64,500,-64,500],` `[BBatMain,4,936,500,1064,500]`
]
in create of an enemy spawning object, used in step by
for(i=array_length(EnemySequence)-1;i>=0;i--){
`//If it's time, spawn enemy based on inner array at position i of outer array then delete the inner array`
`if(LevelTimer>EnemySequence[i][1]){`
`NewEnemy=instance_create_layer(EnemySequence[i][4],EnemySequence[i][5],"EnemiesMiddle",EnemySequence[i][0])`
`NewEnemy.TargetX=EnemySequence[i][2]`
`NewEnemy.TargetY=EnemySequence[i][3]`
`show_debug_message(EnemySequence[i])`
`array_delete(EnemySequence,i,1)`
`}`
}
I did try changing for(i=0;i<array_length(InputCombos);i++){ to for(i=array_length(InputCombos)-1;i>=0;i--), but I get the same error.
What can I do to either make this array work or track the direction my player should be moving in more efficiently?
Hey everyone,
I'm not sure if this common knowledge, but I found an odd way of simulating non-exclusive (not borderless) fullscreen in the 2022 version of GameMaker for Windows only. In this version the only option is to use the regular exclusive fullscreen, which will disappear if you click off the game on a second monitor. That is expected behavior, but it is annoying.
Since upgrading my entire project to a newer version isn't realistically worth the headache, I tried testing with the various functions and managed to find a way to sort of do non-exclusive fullscreen.
Here is how it works:
-
Set the window position to 0,0 & size to the monitor's size
-
window_set_rectangle(0, 0, _width, _height);
-
-
Sometimes it'll try to shrink the window back down. To prevent this, set a minimum window size.
-
window_set_min_width(_width);
-
window_set_min_height(_height);
-
-
Done
Now, it appears to be fullscreen, but it won't minimize/disappear when you click out of the game. All we've done is make the window the same size as the monitor, and "hid" the window's boundaries outside of the monitors visible area. Depending on how you have additional monitors set up, you may see a thin line of pixels at the edge. This is the edge of your game's window.
I've tested it on a few Windows 10 & 11 machines, and Steam Deck via proton, and it appears to work fine.
I'm not a big fan of this solution, as I suspect a feeling it'll have edge cases where it acts strangely. But I wanted to get everyone else's thoughts on this.
The alternative appears to be upgrading GM, or using an extension.
I'm having a problem setting my game to fullscreen on itch.io. The built-in fullscreen button on the site doesn't actually scale the size of the game:
So instead, I enabled "Allow fullscreen switching" in GameMaker so I can press F10 to enter fullscreen. This works well and good when testing in GameMaker, but when I upload to and test it, I get this error message:
Does anyone know how to make fullscreen work with itch.io?
Resolved: I got it to work by setting the target to and exporting a local zip, then uploading that to like I would with HTML5. I even got F10 to work by including this block of code in a persistent step event:
if(keyboard_check_pressed(vk_f10))
{
window_set_fullscreen(!window_get_fullscreen());
}
So when i am in Game maker and trying to type in a script nothing works. When i hit space, enter, backspace, delete nothing works! Please help.
with (obj_lore)
instance_change(obj_barghest1_lore_sitting, true);
Hey all,
So I just recently started implementing a rudimentary save function into my game, using ini_open ini_write etc. I'm using an ini file called "savegame1.ini" that I have as an included file in the game.
Right now it works perfectly, since I had intended it to work between updated versions I put out on itch, but almost too perfectly, since it seems to edit/read from some global/hidden file and not the one in the gamemaker project file. This is clear to me just because by running any version of the game, even on gamemaker, it'll write to whatever ini they're all grabbing from, not those in their specific folders. I can obviously even delete versions of the game I've unpacked from a zip, unpack them and play them a bit, delete them, unpack them again and the save will still be consistent throughout.
I'm not sure if this is how .ini files are supposed to work and I'm just a huge noob when it comes to this, but at the bare minimum it'd be useful to know exactly why my game is saving how it is!
Thanks
I am using a pretty old version of gamemaker. I am having an issue where gamemaker automatically adds a " at the start of my URL which gives the error page not found. This is code I am using:
url_open("");
Using the drag and drop option is giving the same issue, any ideas how to fix that?
(Note: I thought I had found the answer so I deleted this post. Here it is again, my bad.)
I'm watching this tutorial where you learn how to create a textbox that appears when you collide with an npc. The code is supposed to make it so only one textbox is spawned, but for some reason this code makes the textbox briefly flash and disappear. I'll paste the code for this tutorial down below, as well as the tutorial video in case anyone wanted to see it. Thanks in advance.
Code for NPC:
Step Event
if (place_meeting(x,y,obj_player)){
if (myTextbox==noone){
myTextbox = instance\_create\_layer(x,y,"Text",obj\_textbox);} else {
if(myTextbox!=noone) {instance\_destroy(myTextbox);}
}}Create Event
myTextbox=noone;
Video:
For some reason this doesn't work when I put the objects in an array, but when I put just one of the objects by itself in this with statement it works just fine, does anybody here know as to why that is?
I'm currently working on a game with my partner on github, when i try to open the project gamemaker says "project is missing prefabs sddshaders-1.0.0" , if i click no, the project simply won't open. if i click yes it looks like its downloading but after a while gm just says the package for the prefabs is messing.
I'm not sure what causes this, even tho it works perfectly for my partner, does gm versions have anything to do with this? because our versions may slightly be different.
So I was trying to code an enemy script for a 2D platformer, but the code wasn't working, even though I had the parent object assigned as a parent to a different object then my player object, my player object was still gliding off of the screen when running the game. Annoyed, I deleted the parent object, and the scripts, but my player still glides off of the screen, even though the scripts are deleted. What do I do?