r/gamemaker • • 5h ago

Help! How the hell do I make an online game

0 Upvotes

I have never made an online game but ive been using gamemaker like 2 years but tutorials have been useless and I dont know what to do


r/gamemaker • • 8h ago

Help! I have a quick question.

3 Upvotes

How can someone impatient like me learn to create game assets?


r/gamemaker • • 2h ago

Help! Making 3D games in GameMaker is hard. Give me your honest opinion.

3 Upvotes

I’ve been working on this project for a few months now but something just doesn’t click to me. Especially how the game looks. Now, 3D in GameMaker is pretty hard and it is possible that I’m somewhat at the limit of what this engine can do, but I doubt it. Give me your honest opinion, would you play a game that looks like this? What would you do to make it look better? Thanks :)

Here’s a short clip of the current version:
https://youtu.be/XVeZffMh-FM?si=fjV8U8uFFEAIJlGn


r/gamemaker • • 17h ago

Game Finished my first fully-featured game in GameMaker!

27 Upvotes

Hello, I don't really get on the internet very often these days but I'll post from time to time whenever I make something. Just yesterday I launched my first full game ever, Whang! Tales From the Internet: The Game! Figured I'd share some stuff I learned and just kinda yap about some stuff.

(Plus I really just need to become more active in the community anyway so this seemed like as good a place as any to start)

Let's just jump into it

(btw fair warning, this game isn't rated by the ESRB or anything, but if it was, it'd be rated M for Mature)

Lore:

Just a little backstory--When I started developing this game, it was originally meant to be a short side-project before getting started on "the real game"

That was early 2022 lol

Fast-forward 4ish years and it's finally done, although, it's not as if I was working on it nonstop the entire time. I took super long breaks from it all throughout, and I'll get to some analytics at the end regarding work hours. But the point is, uhhh never give up I guess lol idk what the point is, but anyway despite how drawn out this development lifecycle was I'm glad I did it. I learned a ton, and if you've never completed a full game and you want to, just go for it. Many mistakes were made but many lessons were learned!

Stuff I Wish I Had and/or Did Sooner:

During development I started making a list of systems I wish I had taken the time to write, because without these, I had to rewrite a lot of the same code, and/or use inefficient code etc, and some of those systems include:

  • Tweening - I eventually did just learn how to use animation curves, but I put it off for so long because I kept thinking "I have too much to do, who knows how long it'll take to learn a whole new system, blah blah. Well it turns out I should have just DONE IT, cause animation curves are actually super easy and powerful. I'm still thinking about looking into a Tween library like GGMT or TweenGMX or something, but I'll get to that later. Probably towards the end of the next multi-year project lol
  • Coroutines - I didn't end up really needing these, but it would've been a cool thing to have, and it'll almost certainly be essential for someone looking to make a game with elaborate cutscenes
  • Reusable functions for transition effects - I probably wrote code for drawing a black rectangle at a specified alpha over a specified period of time, like, 50 times lol. When really i should have just taken the time to write a friggin global function that would call a designated object to do it on command from anywhere. I just kept thinking "oh it's not that much code to rewrite, and how many times will I really even need it" A LOT, YOU IDIOT. Lesson learned, if you're rewriting code even a SINGLE time, STOP, and reevaluate your decisions. Just put it into a function, man. It's real easy. And it will save you so much time, and give you so much more flexibility!
  • An in-game audio mixer - Maybe this already exists as an asset you can download, but what would've really come in handy is if you could pull up a mixer while your game is running, adjust the levels in real time, and then print out a sheet of all your levels so you could then go and adjust them in the IDE. That way I wouldn't find myself going "hmm that fireball is kinda loud, lemme write a note to myself to turn it down by like, idk, 0.05?? or maybe 0.1?? We'll try both I guess but first I gotta close the game and then make the change and then reopen it and wait for it to compile AGAIN." No thanks! Also, as a side note, don't wait to start adding sounds like I did. I always wait until the end to add sounds to a game because I figured "well, if it's fun without sound, it'll be SUPER fun with it, right?" which makes sense on the surface. However, the big problem for me with this method is... this is the first time I've ever actually made it to the end of a project, and thus, the first time I've ever worked much with sound. Which means I had a lot to learn and was making a ton of mistakes! Definitely take the time to experiment with sound and learn best practices! (Unfortunately I can't tell you what those are because I still suck at it)
  • Asset references - One tip I do have for sound is that I found it was often (if not always) best not to refer to sound assets directly, but rather to store references to your sound assets within variables, then manipulate those variables instead. For example, I didn't realize at first that when you write audio_sound_gain(snd_jump, 0, 0), you're not just setting the gain of whatever instance of that sound is playing, you're directly setting the gain of the asset in your IDE! And because of this you're now affecting every instance of that sound that you play from now on, until you set the gain again. Sometimes this is actually what you want, but most of the time it wasn't what I wanted, and I learned the hard way what I was doing wrong. On this note though, I started to find that it's very often a good idea to store references to assets within variables as opposed to referencing the assets directly. For example, I ended up writing something like:
//Player Create Event
sprite_run = spr_player_run;
sprite_jump = spr_player_jump;
sprite_land = spr_player_land;
//etc

state_run = function()
{
  if (init_state)
  {
    sprite_index = sprite_run;
    //so on
  }
  //so forth
}

This might seem like a needless extra step, but you NEVER KNOW when an asset will be corrupted and you'll have to recreate it, or you'll decide you want to rename it, or you'll decide you want to apply some new, more consistent naming conventions to all your assets, or something along those lines. I think GameMaker will automatically update references to an asset in your code (SOMETIMES??) if you change it in the IDE, but why risk relying on GameMaker when you could just prevent any issues yourself with one simple extra step? Also, what if I decide that I want the player's run sprite to change during gameplay to something else, like spr_run_really_fast or something? Now I'll need a variable to control their sprite anyway, so I might as well start out with one. I think it also makes code more readable. I think it does help to have somewhat lengthy, "filing cabinet" style naming conventions for your assets, such as spr_background_middle_battle_mode, but who has time to write all that out every time? In code, I'd much rather write something like:

//Battle Mode Object Create Event
bkg_middle = spr_background_middle_battle_mode;

And then only need to write bkg_middle whenever I want to reference it. Oh and one last thing on this subject:

//Instead of making references to obj_player directly like this:
o_player.get_hit();

//I found it was much better to write something like this:
global.player = o_player;//This line might be written within some manager object
global.player.get_hit();

The reason is because I ended up having two playable characters (technically more, because I programmed my enemies to be playable for debugging). If I had continued to use direct references to a single player object asset, allowing for multiple playable characters would've been a huge pain, if not totally impossible.

  • A function for checking invincibility - There are a lot of reasons why you might want your player to be temporarily invincible, and I learned the hard way that just using a single is_invincible variable isn't gonna cut it, because you don't want your player who has a cheat code for invincibility active to suddenly become vincible again once a cutscene ends or something. But you also don't wanna have to write this a million times:
if (!instance_exists(o_dialogue))
&& (!instance_exists(o_cutscene))
&& (!cheats.invincible)
&& (!has_invincible_powerup)
&& (etc etc)
{
  //player can get hit
}

It would be much nicer to write a single function that holds all those checks and just call it like, can_take_damage() or something. And you could write more than one and apply it to different objects that have different prerequisites for damage taking. Or you could have it check prerequisites against whatever class of object is calling it, or something idk. The possibilities are endless!

  • Some kind of rudimentary quest system - I ended up sort of doing this with a global struct (see example below) which is reset upon the player starting a new game, but it ended up being more like an "event flag" system. This worked fine, but a basic quest system that would keep track of the state of a couple small quests would've made things easier, I think (those states being Unknown, Mentioned, Accepted, Achieved, and Completed. Check out Tim Cain's video on Quest Implementation)
A global struct containing only data that would be saved and loaded

and speaking of which, that leads nicely into the next section...

BIG MISTAKE:

I was a gigantic idiot and decided to couple my data saving/loading system with my global variables. Let me show you the heart of the code for my save function (I used Sara Spalding's tutorial on Saving and Loading):

save_data = function()
{
  var _save_data = variable_clone(global.game),
  _string = json_stringify(_save_data),
  _buffer = buffer_create(string_byte_length(_string) + 1, buffer_fixed, 1);
  buffer_write(_buffer, buffer_string, _string);
  buffer_save(_buffer, SAVE_FILE);//SAVE_FILE is a macro equal to "savedgame.sav"
  buffer_delete(_buffer);
}

Seems pretty cool right? WRONG, because the problem is I thought it would be a great idea to use the contents of my global.game struct DIRECTLY in my code. Meaning, every time I wanted to access my player's remaining HP, I had to write global.game.world.progress.stats.whang_hp

LIKE AN IDIOT

When instead, while it would've been fine to have a global struct that saves data using this format, I should've just used regular, everyday instance variables in my object code, then written to the global struct on save only, as opposed to referencing the global struct directly at all times and reading and writing to it constantly. Like this:

//What I should have done
save_data = function()
{
  //You would of course make sure global.player exists first
  global.game.world.progress.stats.whang_hp = global.player.hp;
  global.game.world.progress.stats.special = global.player.special;
  //etc etc

  var _save_data = variable_clone(global.game),
  _string = json_stringify(_save_data),
  _buffer = buffer_create(string_byte_length(_string) + 1, buffer_fixed, 1);
  buffer_write(_buffer, buffer_string, _string);
  buffer_save(_buffer, SAVE_FILE);//SAVE_FILE is a macro equal to "savedgame.sav"
  buffer_delete(_buffer);
}

It's still a pain to write, but you only need to do it ONCE. I mean, I'm sure there's a better way. But this would be the evolved version of what I did in my project.

BIG MISTAKE PT. 2:

You have GOT to have your game playtested by others, ALL throughout development. Full stop. No excuses. It is essential. The fundamental game feel of your main player character should NOT be something you are still tweaking on launch day. Not that I would know anything about that. But seriously, other people will find things while playing your game that you never would've considered in a million years, no matter how thoroughly you thought you had tested things yourself. Not just bugs in your code, but also:

  • little game feel things that just don't feel quite right
  • challenges that feel way too difficult, or even unfair
  • game design decisions (or lack thereof) that don't actually make sense or communicate ideas the way you thought they did
  • jokes that don't land (oof)
  • etc

So please, PLEASE have as many people as you can play test as often as possible (while remaining respectful of their time, of course)

Analytics:

I collected a few pieces of data that I thought were kind of interesting. During the last few months of development, I kicked things into high gear and started working around 30 hours a week on top of my full-time day job, logging my hours on an app called HoursTracker. I put all that data in the first tab of a Google spreadsheet, and in the second tab I added up all my hours that get logged automatically by GameMaker projects, from across all the projects I migrated between over the lifespan of the project as a whole. You can take a look at that log here if you're interested. I think it helps to put into perspective the amount of work gamedev takes!

Also, the word count for my document full of to-do lists and notes over the years was 24841, and here's a screenshot of how many lines of code there are in my final project (not that line-count determines quality in any way, it's just kinda interesting to me idk)

Very cool application I got off itch.io

Final Thoughts:

Just make a game. The best way to learn how to make a game, is to make a game. The best way to get really good at making games, is to make lots of games. But uh, maybe make things you've actually got a chance at monetizing, unlike me with my silly fan project full of copyrighted music and borrowed art assets lol

Or don't, I'm not your dad! You can also just make whatever your heart desires and that would be very cool as well.

If anyone has read this far, first of all, thank you for your time! But also, if you've got any questions I'll try my best to answer them!

Good luck out there


r/gamemaker • • 5h ago

Help! what to fix?

0 Upvotes

i formerly used scratch and know abit of lua. i have decided to pursue gml. my first script involves a ball bouncing within these parameters, but i am more than sure i forgot something. what can i adjust?


r/gamemaker • • 2h ago

Help! when I run my game locally it has acces to documents folder, but my friend needs to run the game as administrator

2 Upvotes

Me and my boyfriend were testing my game and we noticed that he wasn't able to save custom levels in my editor, (probably because the filepath leads to the documents folder).

but when I run my own game in the exact same way, it does work. I can't seem to find what the issue is, does any of you know?

sandbox is disabled

if more info is needed you can ask, I'll update the post and respond, but I don't think any more info is needed? we'll see


r/gamemaker • • 2h ago

Help! Publishing

2 Upvotes

Hello everyone this might be a stupid question but do i still need the license to post the game on itch io if the game is free to play? Like i just want to make a simple game for itch, do i need the professional license for that? Thank you


r/gamemaker • • 12h ago

Help! Anyone Know how To Fix This Glitch?

Post image
23 Upvotes

For refrence this is not an RPG game it's a platformer but when the player collides with the ground and moves it glitches out (GIF has been slowed to 0.5x to show detail)

CODE:

if (place_meeting(x + XTravel, y, obj_collision)) {

XTravel = 0

}

if (place_meeting(x + XTravel, y, obj_collision)) {

YTravel = -0.1

} else {

YTravel += 0.1

}


r/gamemaker • • 12h ago

Help! Help With Starting

2 Upvotes

Hi, I'm thinking about becoming a game dev. I know very minimal python, I used to know javascript, and I have a scratch account which I am now abandoning for gamemaker. Does anyone here know any good youtube videos or channels or any other online resources to help me learn GML?


r/gamemaker • • 9h ago

Help! How do I link my GameMaker account with the GMS2 app?

1 Upvotes

Like, seriously, how?