Questions tagged [game-maker]
Game Maker is a cross-platform game creation tool made by YoYo Games mostly used to develop 2D video games.
433
questions
0
votes
0
answers
28
views
GMS2 - Game showing the wrong object
I'm making an Undertale fangame in GMS2 and i have a problem with my Game:
It's supposed to show this:
But it shows this:
obj_next_room code:
The car (obj_torcar) doesn't have code.
Room creation ...
0
votes
1
answer
18
views
Graphical bug when changing room
Here is a video showing the problem I'm encountering.
And here's my room change code:
if(room_exists(room_previous(room))) room_goto_previous();
1
vote
1
answer
43
views
Game Maker Studio 2 - Pixel Distortion
I am new to game development and am trying to learn how to use Game Maker to create pixel art games.
I've created a demo game with 16x16 pixels art style, the room size is 1024 x 768 and the viewpoint ...
0
votes
1
answer
45
views
My character becomes small when moving
When I move, my character becomes small, I don't know why though. Here is my code: the first one is to go right, and the second one is for going left.
-1
votes
1
answer
31
views
Problem with my walking in gamemaker
Hello I am making a game with my friend and I am the scripter and I wanted to sort out walking he is coming to help me tomorrow. So when I click to go left I go right here is my code
Here is my code ...
0
votes
1
answer
35
views
How to make a character walk in GameMaker
I am making a game with my friend and I'm sorting out some scripts. When I was writing the script for walking, I got the error message below. What did I do wrong?
Here is my code:
0
votes
1
answer
69
views
Basis of Estimate (BOE) for Freelance Game Developers
First off I wanted to apologize if this isn't the right place to post this; I wasn't sure where else to go. I plan to cross-post this question to the Game Maker forums since that's the engine the game ...
1
vote
0
answers
186
views
1Bit Bayer Ordered Dithering Shader
I’m having a problem trying to fix my 1bit ordered dithering shader.
This shader is going to be perfect to be used but there is some detail that I would like to fix.
First of all, this shader is not ...
0
votes
1
answer
890
views
How to create a game app in Game Maker Studio for Chrome OS
There are multiple app types in Game Maker Studio you can export to. Which one would be for a Chromebook? I've tried to research the topic, but I haven't seen anything that clearly states if GMS can ...
0
votes
0
answers
51
views
How to assign a new value to a global variable in GML
I have a variable called global.goldchance = irandom(99);. I use it to get a random number from 0 to 99. However, I need to be able to run it again so that the ...
0
votes
1
answer
346
views
Raycasting in GameMaker Studio 2 to implement hitscan weapons?
I'm working on a 2D top-down shooter game in GameMaker Studio 2, featuring different weapons and obstacles all around the levels.
Since I don't need a high degree of simulation, I'm implementing ...
0
votes
1
answer
169
views
How to display localized text from the selected language's script file?
I am trying to make a textbox engine for my RPG using Gamemaker Studio 2 as my game engine, and so far I have managed to make a pretty good-looking animation for when the textbox comes in and out. I ...
0
votes
1
answer
51
views
How to detect when a shot hits the opponent from behind?
I'm making a game where the enemy can turn on its own axis in 360 degrees (top view game).
The player-controlled character has a bow. With this bow he shoots and deals damage when he hits the enemy.
I ...
0
votes
1
answer
93
views
How do I create a powerup that affects speed for a limited amount of time?
I am looking to create a powerup such that when the "playership" object collides with it will affect the playership's speed for a few seconds, let's say 30-60 seconds. I cannot seem to ...
0
votes
1
answer
217
views
How do I adjust speed of an object in gamemaker studio 2
Currently, I have this in my step event.
y += sign(mouse_y - y);
I am trying to adjust how fast it goes towards the mouse so I can have it scrolling up and down the screen. sorry if this has been ...
0
votes
1
answer
179
views
Debugging shader script in GLSL ES - Game Maker 2 (CompileError)
I am trying to use this shader in the game I am making with Game Maker Studio 2.
I tried to convert it for GM2 and here is my result:
Shader type I used on GM2 is ...
1
vote
0
answers
65
views
Gamemaker Studio 2 window_set_fullscreen() causes entire screen to go gray, CRTL ALT DEL doesn't work
I'm working on a small game in Gamemaker: Studio 2 in which the user can press F11 to toggle fullscreen. In the "Key Press - F11 Event, I've added the following code:
...
0
votes
2
answers
82
views
How to extend a line to infinity?
In my game I have a line that simulates the trajectory of a gun shot, fired by the main character.
The line starts at the character and ends at the mouse position at the moment of the click.
What ...
0
votes
1
answer
51
views
Function destroying wrong object
I am using the collision_line_list function to detect all objects of a type.
In this case, the object is obj_CapMan.
Code:
...
1
vote
1
answer
38
views
How to round/smooth the path of an object/sprite that orbits around another object?
Below is a code that defines the values that cause the sprite to start at the top of the object being orbited:
Create Event:
...
0
votes
0
answers
11
views
Application stops working when I add two fonts
I created a game that has two fonts.
Being precise, the two fonts are PRESS_START_2P with the difference only in size. One of the fonts serves to write the title and the other for all other things.
...
0
votes
1
answer
71
views
How to develop a GameMaker game for both desktop and mobile
For a few months I have been creating a game using GameMaker Studio 2 Desktop.
It turns out that I would like to launch it also for cell phones, and for that I bought GameMaker Studio 2 Mobile.
That's ...
0
votes
2
answers
327
views
Multiple small UDP packets vs One big constant UPD packet
I'm making a MMO Bullet Hell game on Game Maker Studio 2 with a node.js server and I'm already able to receive and send information through UDP connections. I NEED to keep the server as fast as ...
0
votes
1
answer
100
views
Ini files only work on my computer. How to create ini files in a directory on another computer?
I am creating a game that requires the use of ini files.
The game works perfectly on my computer.
When I create and executable, the executable even uses the ini files when I am programming/testing the ...
1
vote
1
answer
2k
views
Variable not set before reading it error in GameMaker Studio 2
I am following along with a guide. I'm trying to reference code from an instance in my room, but whenever I try to run the script I get this error:
ERROR in action number 1 of Create Event for object ...
0
votes
1
answer
140
views
Problem when importing color in hexadecimal format from an ini file
In my game I can import a color correctly when it is in the "engine format".
Example ("color.ini"):
...
0
votes
1
answer
87
views
How to access the raw memory of d3d model in game maker?
I am using the d3d model creation functionality in Game Maker. I also use dlls and I want to be able to modify a 3D model (change uv values) without recreating a model. Is there a way to locate the ...
0
votes
1
answer
32
views
Image of the room appearing incorrectly for no apparent reason
In the game, when I call the room (room_Corrida) from the room of the selection menu, it was for that to appear:
It turns out this is how the room appears:
The effect is as if it had a white ...
0
votes
1
answer
250
views
Android Build Failing Game Maker Studio 1.4
In Game Maker Studio 1.4 I'm trying to export my game to Android API 29. Whenever I start to compile, the build fails because the API 28 support library is too low for the Target API 29. I have the ...
0
votes
1
answer
38
views
Score won't save to Android in Game Maker Studio 1.4
I have oController as the first object to run when the game is opened. In oController's Game Start event
I have the following code:
...
-1
votes
1
answer
44
views
Run n' Gun game: Fixating the gun's angle
I am trying to have the gun stick to facing the left or right when the player isn't pressing any of the arrow keys. For instance, if the player is aiming diagonally up-left, then when the player lets ...
0
votes
1
answer
28
views
When updating app from Google Play will the app data be deleted? [closed]
My question is pretty simple.
I developed a game, uploaded it on the store. In order to keep player level record and UI prefs it writes an ini file.
When the next update is up on the store and the ...
0
votes
0
answers
94
views
Game Maker - Selecting tiles in an isometric grid
I have implemented an isometric grid with rotation in 2 directions in Game Maker. I did this by first calculating the points of the grid in 3D space and then converting them to 2D points through ...
0
votes
1
answer
687
views
Creating Complex Collision Shapes in GMS2
I'm pretty new to Game Maker Studio 2 and I've hit a wall in programming with their built-in physics engine. I created a irregularly shaped object and I want to modify the collision shape so that it ...
0
votes
1
answer
335
views
How do I get my team NPC to follow the player? | Game Maker Studio
I would like to have 4 teammate NPC's that would follow behind the Player. First off, I know how to get the movement and collisions working properly but getting the NPC's to follow the player is where ...
0
votes
1
answer
52
views
Enemy gun won't aim properly when collision line is flipped | Game maker studio
When the enemy move's to the right their gun faces right. When they move left the gun will face left as it should. When the player collides with the enemy collision line on the right side, the enemy ...
0
votes
0
answers
45
views
How to reverse the movement of the mouse on the X and Y axes?
I would like to know, how to do so that when moving the mouse to the right, it would go to the left and vice versa.
I looked for something related on the gamemaker page, but I didn't find what I'm ...
0
votes
0
answers
44
views
How do I get the id of an object that created a point in a path?
I'm making a rollercoaster tycoon type game. As the title says, I need to get the id of an object that created a path point. These points are currently greated by the rail pieces. I need this because ...
-1
votes
2
answers
189
views
Are there functions in GML?
I am trying to learn how to use GML to solve one of my previous prolems, as well as everything I have heard has said it is better to just learn it over DnD. As I have only ever programmed in python I ...
1
vote
1
answer
286
views
Someone downloaded my game but it failed on Game Start due to code that doesnt exist
As stated in the title, they get the following error:
...
1
vote
1
answer
162
views
How to extend GameMaker Studio's IDE editor, like in Unity?
Unity allows you to create custom inspectors, custom editor windows and custom property drawers.
Is there a counterpart of this in GameMaker Studio 2.x or isn't it possible yet?
0
votes
1
answer
208
views
What type does one cast the result of "get_function_address" to in order to call the function within a C++ DLL?
According to the game maker documentation for dll manipulation:
get_function_address('function_name')
Returns the address of a GameMaker function. This can be passed to
DLL's so the can call ...
4
votes
3
answers
326
views
How to model chess knight movement in GameMaker?
I am making a chess game in GameMaker, and I have the basic movement down for all of the other pieces except for the knight. I am using a system where I have an if statement that checks if the mouse ...
0
votes
0
answers
600
views
How to change application surface size without changing view size? (GMS2)
I am working on a pixel art project in GameMaker 2 with native resolution 428x240. In order to enable "subpixel" rending, I am trying to increase the resolution of my ...
0
votes
1
answer
74
views
How to draw a line based on an angle with a defined size?
I have a game where the player shoots a projectile based on the mouse direction when clicking, which travels 500 pixels.
I wish I could draw a line exactly where the projectile will be destroyed.
...
0
votes
1
answer
48
views
Formula for calculating time difference regardless of speed
See the following situation:
The first car has a speed of 10 pixels per second and completes one lap in a circuit in 84 seconds.
I want the ...
0
votes
1
answer
68
views
Way to Round Numbers
I have it when the player clicks the mouse they can move the peice aoround the board. I am trying to have the chess pieces snap to a grid after the mouse has been released. Is there any way to round ...
0
votes
1
answer
82
views
Fill with Transparency in Built-In Sprite Editor
When I imported an image for a sprite, I realized it had a white background. I went into the built-in sprite editor to remove it. I tried using fill as there was a transparent color in the color ...
1
vote
2
answers
213
views
How to script sequential events in GameMaker?
I am wondering if there is an elegant way to script sequential events in GameMaker 2.
In Godot 3.1, it is very easy to chain events together using yield() and ...
0
votes
2
answers
119
views
How to make a more accurate lap time? get_timer() LIMITATION?
In the room there are 22 cars. All cars have a different speed.
The cars are numbered from 1 to 22 with the help of the variable carNumber.
CODE - obj_Car / Set car speed (Create Event):
...