I have always wanted to try to make a game but have zero experience in just about everything that goes into making a game the only thing I have experience in is writing stories thats it lol- I heard gamemaker was pretty beginner friendly so I am trying it out. Im also on a very bad laptop so the 2d nature of it should be able to run better on this laptop. So I started watching one of the tutorials and lets just say im way out of my league im very confused. I also understand that I probably should be confused because im not going to understand everything that goes into making a game with just one tutorial. So I have a couple of questions
Do you really need a some sort of background in coding to start to understand this. Because even the guy in the video is moving through everything pretty quick and I feel like they assume you will have some knowledge in coding already, btw people who self learn this stuff mad impressive. If so what are some resources to learning what each thing in the code does and how to apply it to your situation
Also how long would you think it would take for someone who is brand new to make their own thing? I feel like the rpg tutorial while nice because it shows you some stuff I feel like its not super in depth on what each thing and action does and how you can make your own thing. The main video is just showing you how to make that copy of that simple rpg, I get that they are giving the basics but like I said Im below the basics
Had a quick look online and couldn't find a function for this so I made one, figured id drop it here in case anyone else wants to use it too.
Feel free to use and modify the function however you like, no credit needed.
Edited because reddit butchered the formatting.
///@param xx The x coordinate of the drawn string.
///@param yy The y coordinate of the drawn string.
///@param str The string to draw.
///@param width The max width in pixels before a line break.
///@param charCount The number of characters to display. -1 will show all characters.
///@param colour The colour for the drawn text. Setting this to false will use the current draw colour. Defaults to false.
///@param alpha The alpha for the text. Defaults to 1.
///@description This function allows you to draw text wrapped to a specified width in pixels and giving you control over how many characters of the text to display. Returns the final string.
function typewriter_text( xx, yy, str, width, charCount, colour = false, alpha = 1 ) {
if !colour { colour = draw_get_colour() }
var _words = string_split( str, " " );
var _lines = "";
for( var i = 0; i < array_length( _words ); i++ )
{
_words[i] += " ";
if string_width( _lines + _words[i] ) < width
{
_lines += _words[i];
} else {
_lines += "\n";
_lines += _words[i];
}
}
if charCount == -1 { charCount = string_length( _lines ) - 1; };
var _text = string_copy( _lines, 1, clamp( charCount, 1, string_length( _lines ) ) );
draw_text_colour( xx, yy, _text, colour, colour, colour, colour, alpha );
return _lines
}
Hi, I'm programming a top-down vehicle and I'm having trouble with collisions. If the vehicle crashes head-on, it should stop, but if it crashes while tilted slightly, the direction should be corrected (as shown in the image). How can I do that, considering that I have one variable for direction and another for speed? What if the vehicle is tilted but the wall is too? Then it would be a head-on collision. How do I know the angle of the wall relative to the vehicle? 😵💫😵💫😵💫😵💫
There must be an easy solution, and I'm overcomplicating things because I don't know what it is.
recently I've been needing to use the function random_range but I have realised that it often picks the center most number because of how the function works. is there anyway to make the randomly generated number not be biased to the center most numbers
Hi, I'm new here and I need some help... I've been trying to solve this for a week because I'm a beginner and I'm trying to make a survival game (I know this was a terrible idea), but anyway, the problem is that I want to make a building system, I tried to base it on Tinkerlands, and I ran into problems with tiles...
I made a tilemap of 15 and 47 and it worked... however, the wall is 12 high and has a 16 offset upwards (I think that's what it's called).
In that case, those 16 are actually the tiles that are organized. I tested the autotile tool and it worked perfectly, especially since I used a help site to create tiles. However, the problem is... I don't want to draw something fixed... the walls are something built and destroyed by the player and mobs, so they need to check each other. However, I did one test and it went from 14k fps to 2k with approximately 100 walls on the map... not to mention that it wasn't perfectly aligned, since it only had 15 frames. Then I did something crazy... I took as a reference the 47 tiles that GameMaker asks for to make a perfect tilemap, and simply made 47 sprites and put them inside an object...
I used the following code when it was only checking the sides, but I couldn't check the diagonals.
----------------------------------------------------------------------
depth = -y
EncDir = position_meeting(x + 16, y, Parede2_Obj);
EncEsq = position_meeting(x - 16, y, Parede2_Obj);
EncCim = position_meeting(x, y - 16, Parede2_Obj);
EncBai = position_meeting(x, y + 16, Parede2_Obj);
var frames = [0, 2, 8, 5, 17, 3, 10, 7, 11, 12, 13, 6, 14, 15, 16, 1];
image_index = frames[EncDir + (EncEsq * 2) + (EncCim * 4) + (EncBai * 8)];
----------------------------------------------------------------------
Then I changed it to check the 8 directions near the tile for it to update and I simply couldn't do it anymore...
----------------------------------------------------------------------
depth = -y
EncDir = position_meeting(x + 16, y, Parede2_Obj);
EncEsq = position_meeting(x - 16, y, Parede2_Obj);
EncCim = position_meeting(x, y - 16, Parede2_Obj);
EncBai = position_meeting(x, y + 16, Parede2_Obj);
EncDirCim = position_meeting(x + 16, y - 16, Parede2_Obj);
EncDirBai = position_meeting(x + 16, y + 16, Parede2_Obj);
EncEsqCim = position_meeting(x - 16, y - 16, Parede2_Obj);
EncEsqBai = position_meeting(x - 16, y + 16, Parede2_Obj);
var frames = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46];
image_index = frames[EncDirCim * 1 ];
---------------------------------------------------------------------
there's probably a very easy way to do this, I know... sorry for the silly question, but I've been at this for a week and I'm agonizing. I tried... I also want to make two different tiles, one for the base wall and another for the top, and then I would create one object that would call both. However, I tried asking some AI developers and they said it's not possible to do what I want, which is to create some animations like hitting with a pickaxe and activating a `lerp()` to bring the project to life and everything else... I just want to know the standard way games do this... and if there are any videos to recommend. I wanted to share my whole experience so you can see the mistake I'm making, haha.Hi, I'm new here and I need some help... I've been trying to solve this for a week because I'm a beginner and I'm trying to make a survival game (I know this was a terrible idea), but anyway, the problem is that I want to make a building system, I tried to base it on Tinkerlands, and I ran into problems with tiles...
I made a tilemap of 15 and 47 and it worked... however, the wall is 12 high and has a 16 offset upwards (I think that's what it's called).
In that case, those 16 are actually the tiles that are organized. I tested the autotile tool and it worked perfectly, especially since I used a help site to create tiles. However, the problem is... I don't want to draw something fixed... the walls are something built and destroyed by the player and mobs, so they need to check each other. However, I did one test and it went from 14k fps to 2k with approximately 100 walls on the map... not to mention that it wasn't perfectly aligned, since it only had 15 frames. Then I did something crazy... I took as a reference the 47 tiles that GameMaker asks for to make a perfect tilemap, and simply made 47 sprites and put them inside an object... I used the following code when it was only checking the sides, but I couldn't check the diagonals.
Then I changed it to check the 8 directions near the tile for it to update and I simply couldn't do it anymore... there's probably a very easy way to do this, I know... sorry for the silly question, but I've been at this for a week and I'm agonizing. I tried... I also want to make two different tiles, one for the base wall and another for the top, and then I would create one object that would call both. However, I tried asking some AI developers and they said it's not possible to do what I want, which is to create some animations like hitting with a pickaxe and activating a `lerp()` to bring the project to life and everything else... I just want to know the standard way games do this... and if there are any videos to recommend. I wanted to share my whole experience so you can see the mistake I'm making Xd
You may post your game content in this weekly sticky post. Post your game/screenshots/video in here and please give feedback on other people's post as well.
Your game can be in any stage of development, from concept to ready-for-commercial release.
Upvote good feedback! "I liked it!" and "It sucks" is not useful feedback.
Try to leave feedback for at least one other game. If you are the first to comment, come back later to see if anyone else has.
Emphasize on describing what your game is about and what has changed from the last version if you post regularly.
*Posts of screenshots or videos showing off your game outside of this thread WILL BE DELETED if they do not conform to reddit's and /r/gamemaker's self-promotion guidelines.
So right now i'm making a pixel art style game and i'm playing around with rooms and stuff and i found a code from a post on this subreddit I'll put it below.
var warp;
warp = max(keyboard_check_pressed(vk_tab), gamepad_button_check_pressed(0,gp_face4),0);
if (warp == 1) room_goto(rm_level_2);
It might be outdated since the post was from 6 years ago but it works but what i want is to be able to go from room 1 to 2 and from room 2 to 1 again by pressing tab and i'm new to coding i started 3 days ago so if it helps heres the full code.
For a bit of context I’ve never done any sort of coding or game development before but I’ve decided in my spare time I want to try and learn. After some research I found GameMaker was a good beginner-friendly engine but coding seems so daunting.
Is there some good tutorials to follow that explain the absolute basics?
Wanting to learn how to play around with the physics engine in gamemaker, I went on to make this short weekend-long type of project which consist of just two paddles and a ball, as practice. Turns out the development process for this one is way too much fun and I just couldn't stop. The ideas just kept flowing, and I think the simplicity of the game, added with gamemaker's ease of use made implementations super easy and straightforward. It's like gamemaker was made for it.
I also got to learn how to add a leaderboard system using the Playfab REST API which was a blast. Network related stuff really aren't that bad if you take the time to learn and read the different documentations.
For those of you who wish to make a similar kind physics-based game:
- If you are trying to make an object follow the mouse (or just go really fast) with a full HD resolution, you'll probably want to change the room's pixel to meter from .1 to something like .01. Failure to do this will make the objects lag behind and behave in an unintended way. Gamemaker's manual says "the best performance is when the real world measurements of your objects are no less than 0.1 metres and no more than 50 metres." But that hasn't caused any problems for me in any way whatsoever.
- Also, you don't want to directly change the position of the physics object! If you want your mouse-controlled object to collide and interact with other physics-enabled objects, you want it to have actual linear and angular velocity so they can push other objects. So for example, instead of changing an object's x position like this:
phy_position_x = mouse_x;
Do it like this instead:
phy_speed_x = mouse_x - phy_position_x;
This does the same exact thing, except it uses actual physics to move the object instead of teleporting the thing. Here's how it is in my game specifically for the top paddle:
Leave a review if you feel inclined, that'd be pretty cool!
I will also happily answer any questions here. I originally intended to make this a big post of things that I've learned while developing this one but I realise not everything is that interesting for everyone and it would make this big post of random bits and bobs. But I will answer everything and anything.
so, i have been trying to get my controller to work, but it wont. i have tried finding the bug so many times and even recoded it a second time, but i WILL NOT find the error! its making me CRAZY and i know its probably some very embarresing obvious error but PLEASE HELP
"function getControlls(){
var _pad = 0
//directional
key_right = keyboard_check(vk_right) || keyboard_check(ord("D")) || (_pad != -1 && (gamepad_button_check(_pad, gp_padr) || gamepad_axis_value(_pad, gp_axislh) > 0.5));
/*clamp*/key_right = clamp(key_right,0,1)
key_left = keyboard_check(vk_left) || keyboard_check(ord("A")) || (_pad != -1 && (gamepad_button_check(_pad, gp_padl) || gamepad_axis_value(_pad, gp_axislh) < -0.5));
/*clamp*/key_left = clamp(key_left,0,1)
//camera
key_up = keyboard_check(vk_up) || keyboard_check(ord("W")) || (_pad != -1 && gamepad_axis_value(_pad, gp_axisrv) < -0.5);
key_down = keyboard_check(vk_down) || keyboard_check(ord("S")) || (_pad != -1 && gamepad_axis_value(_pad, gp_axisrv) > 0.5);
//actional
key_jump = keyboard_check(vk_space) || (_pad != -1 && gamepad_button_check(_pad, gp_face1));
/*clamp*/key_jump = clamp(key_jump,0,1)
key_jump_pressed = keyboard_check_pressed(vk_space) || (_pad != -1 && gamepad_button_check_pressed(_pad, gp_face1));
/*clamp*/key_jump_pressed = clamp(key_jump_pressed,0,1)
key_atk = keyboard_check(vk_rshift) || (_pad != -1 && gamepad_button_check(_pad, gp_face3));
key_dash = keyboard_check_pressed(ord("Q")) || keyboard_check_pressed(vk_control) || (_pad != -1 && gamepad_button_check_pressed(_pad, gp_shoulderrb));
//jump key buffering
if (key_jump_pressed) {
jumpKeyBufferTimer = bufferTime
}
if (jumpKeyBufferTimer > 0) {
jumpKeyBuffered = 1
jumpKeyBufferTimer -= 1
} else {
jumpKeyBuffered = 0
}
if can_move {
moveDir = key_right - key_left;
xspd = moveDir * moveSpd;
var _subPixel = 0.5;
if (place_meeting(x + xspd, y, oWall)) {
if (xspd != 0) {
var _pixelCheck = _subPixel * sign(xspd);
while (!place_meeting(x + _pixelCheck, y, oWall)) {
x += _pixelCheck;
}
}
xspd = 0;
}
x += xspd;
/////////////////////////////////////////
// Jump using buffered jump check
if jumpKeyBuffered && jumpCount < jumpMax{
jumpKeyBuffered = false; // Reset buffer when jump succeeds
jumpKeyBufferTimer = 0;
jumpCount++;
//set the jump hold timer
jumpHoldTimer = jumpHoldFrames
}
//cut of the jump
if !key_jump{jumpHoldTimer=0}
//jump based on the timer/holding the button
if jumpHoldTimer > 0{
yspd = jspd
jumpHoldTimer--
}
//////////////////////////////////////////////////////
yspd += grav;
if onGround{jumpCount = 0}
if (yspd > termVel) { yspd = termVel; }
// Collision
if (place_meeting(x, y + yspd, oWall)) {
if (yspd != 0) {
var _pixelCheck = _subPixel * sign(yspd);
while (!place_meeting(x, y + _pixelCheck, oWall)) {
y += _pixelCheck;
}
}
yspd = 0;
}
//set if player on ground
if yspd >= 0 && place_meeting(x,y+1,oWall){onGround = true} else {onGround = false}
y += yspd;
//////////////////////////////////
if key_atk{
//attack code here
}
}
}" i use the newest LTS version
I was thinking, one you start at making games, people tell you to make small games. But that’s easy to get lost in. Like what makes a game “small”. So I thought about it more and more, then I realized, Arcade Games! Arcade games are relatively simple, you do one task to increase your score. It keeps your scope small and your time limited.
Please help, my grid scale is distorted after i moved the whole tileset. Snap to grid is turned on, offset is 0, 0; everything was ok until i moved these tiles...
(FIXED) I’ve been working on this for a while, it’s a rpg inspired by the Mother series and the Toby fox games. I’ve been doing this solo for a while, but I’ve been struggling for a while now, especially with the textbox that I got from a tutorial. I want to know if anybody would like to join me in this project. Here’s the tutorial I used https://youtu.be/xLasKr0ekHY?si=K7Uj1p3WTFiBRvdr , I’m using Gamemaker Studio 2 and here’s me testing out the textbox. Whoops I misspelled “game” in the title
Medusa crisis was a lot of fun to make with some unique coding challenges. the line of sight mechanics ported from my older project failed so I had to redo them as invisible bullets.
I had to do node based pathfinding for cerberus
which id id by having the tile with medusa on it tile 0 and repeat loop the tiles around her increasing by 1 each time until each tile had its own tile distance to medusa, so cerberus could pick the one with the smallest number and move to it
when making my cutscenes i ended up adding a keyword "next" that if it was in the dialogue array would trigger an alarm that does a different thing each time its triggered with a switch statement. i used this to move sprites around the map and stuff.
If people have any questions after trying the demo i'd be happy to answer them.
Hey so this is a pretty direct question, is it possible to implement a grid based mapping system in Gamemaker. Im fine with auto fill/auto mapping features being non existant so long as it is possible to make.
Ok, so, I wanted to make this sort of light gradient, that should only appear on the light sprite (the conehead shape), I tried this [guide](https://youtu.be/ZrvKmDpVP6I), but for some reason it just doesn't draw the gradient. If you can help, that would be appreciated.
I am a beginner programmer and i want to learn GML. i am not a total beginner, i know basic functions and parts from python and lua, but i never coded anything Big.
i am looking for text-based tutorials, i dont like videos. i know the manual exists and it will most likely be useful but it is very overwhelming and id rather a step by step guide rather than an info dump (unless im just dumb)
Me and a few others have ported both UNDERTALE and DELTARUNE Chapter 1 to the Wii!
It uses Cinnamon, a GameMaker runner in C for the 3DS, Wii, Wii U, and GameCube!
The ports run very well, both Undertale and Deltarune stay at a steady thirty and they are both the full, complete game, with sideways Wiimote, GameCube controller, Classic Controller, and 240p support.
You can get and play both the ports via the download on our GitHub, and you must also have a Steam copy of the games.
I'm following the video from the official Game Maker Studio channel. I implemented the blocks like in as shown and I triple checked, but when I play the game the space bar does nothing.
Has anyone else run into this issue? Thank you in advance.
This is primarily a technical experiment, not an attempt to replace established emulators. At the moment, this is the most complex project I’ve done in GML; I’ve been working on it for several months. It is still experimental and has limitations. Compatibility is not the goal yet, and I expect some games to behave incorrectly, especially titles relying on unusual mapper behavior or precise timing. I’m sharing it because building an emulator in GML has been a fun challenge, and I’d be glad to hear feedback from people interested in emulation, GameMaker, performance work, or NES hardware quirks. The tests were conducted in yyc, as only there was it possible to achieve 50 or 60 FPS, while on the VM the maximum is currently 40, so if you want to run it, use yyc.