/r/gamemaker

Photograph via snooOG

This subreddit is dedicated to providing programmer support for the game development platform, GameMaker Studio. GameMaker Studio is designed to make developing games fun and easy. Coders can take advantage of its built in scripting language, "GML" to design and create fully-featured, professional grade games. This subreddit is not designed for promoting your content and is instead focused on helping people make games, not promote them.

GameMaker is software designed to make developing games easy and fun. It features a unique "Drag-and-Drop" system which allows non-programmers to make simple games. Additionally, experienced coders can take advantage of its built in scripting language, "GML" to design and create fully-featured, professional grade games.

subreddit_guidelines()

Content that does not follow the subreddit guidelines is subject to deletion, so please become familiar with them.

  1. Content must be directly related to GameMaker
  2. Content must be in English
  3. Content must not be obscene, illegal, racist or offensive
  4. Content must not use "click-bait" titles, shortened links, or solicitation
  5. Content must demonstrate a previous effort and research before posting and must provide adequate detailed information
  6. Show respect to all users of the subreddit and have patience with other users when providing help
  7. Promotional content must contribute to the community
  8. Technical support requests are to be directed to YoYo Games Support
  9. Content must be appropriately flaired at the time of submission

community()

Conversation

/r/gamemaker sponsors three chat-rooms: IRC, a Discord server, and a Slack team. Join in the conversation, get help with any issues you might have and connect with your fellow developers! We also have a Steam Group for playing games. Feel free to join.

Scheduled content

Schedule Content Summary
Monday Quick Questions Ask questions, ask for assistance or ask about something else entirely.
Wednesday Game Design & Development Discuss game design and game development.
Friday Feedback Friday Play games and lend feedback
Saturday Screenshot Saturday Share the latest pictures and videos of your game
Monthly Monthly Challenge Are you in need of motivation? Then take a stab at these creative challenges.
Bi-weekly Community Spotlight Shining a light on high-quality projects and resources created by our community.

gm(48)

For more than 8 years, the tight-knit community of /r/gamemaker has run the game jam gm(48) for GameMaker developers of all ages and experience levels. The gm(48) is a casual, fun game jam that helps you to learn and grow as a developer.

The next gm(48) will take place on Oct 20, 2018.

/r/gamemaker

89,606 Subscribers

2

Advice for debugging high memory usage

TLDR: any rules of thumb for a novice to debug and find the source of high memory usage for a created game?

Hey everyone, I'm a pretty big GM novice, having messed with it on and off for a few months but finally starting to get into developing a small test game so I can learn the system. I have some unrelated code development in matlab, which has made the coding process pretty simple for me to learn, but it is probably leading to some inefficiencies.

At the moment I'm trying to build a simple dwarf-fortress inspired water system, which involves saving water position and height across a grid and iterating using simple physics rules. However, when running the game for some period of time memory usage seems to grow exponentially, starting at 30MB and going up to and beyond 100MB. This is pretty confusing to me, since to my understanding I'm just keeping track of a few global arrays and structures and some local variables.

Either my implementation of these systems is incorrect or there is some other mistake I've made in the programming, I just don't know where to look. Any advice for how to identify memory inefficiencies, or does anything seem hugely wrong based on the small amount of information I've provided about my code structure?

9 Comments
2024/12/02
04:11 UTC

2

Is this a realistic idea?

A top-down 2d soulslike with 4 player multiplayer. I've been using gms2 for a year now, and are ok at it for that timespan.

4 Comments
2024/12/02
03:51 UTC

1

Jumping off of moving platform crashes game test

Edit: The odd values for the jump count have since been changed. They are back at jumpcount = 0 and jumpmax = 2. I may have not specified what it was for when I had them at 1 and 3.

I have encoutnered a bug with moving platforms while following a guide. If I jump onto a moving platform and wait at least half a second, everything's fine/ However, if I land and immediately try to jump off the moving platform I get this error that crashes the game:

___________________________________________

############################################################################################

ERROR in action number 1

of Step Event0 for object obj_Player:

Push :: Execution Error - Variable Index [-1] out of range [2] - -6.jspd(100045,-1)

at gml_Object_obj_Player_Step_0 (line 110) - yspd = jspd[jumpCount -1];

############################################################################################

gml_Object_obj_Player_Step_0 (line 110)

From what I understand this is checking the array set for jump speeds related to the jump count. I tried setting the default count to 1 and the max to 2 so that there's a margin for negatives, or even adding a negative value in the jump speed array but neither works. Only thing I can think to do is set the above code to having a third value in the array to buffer the potential backwards check and set the default to be the second in the array.

Here is the code relative to the jumping sections in both the create and step events:

https://preview.redd.it/m2cxbm8u1d4e1.png?width=359&format=png&auto=webp&s=c9d9a90ed6bf7021ff4cddc6907982bd2e121202

https://preview.redd.it/mwau8m8u1d4e1.png?width=552&format=png&auto=webp&s=d17802911cceb365a3ce2685360bf50f0255b8d9

https://preview.redd.it/gqtvqk8u1d4e1.png?width=490&format=png&auto=webp&s=47063539f61f38b355896ab2fbcdf4b68749fcf0

Create:

//Jumping Values

//Gravity and jumping height basic

grav = 0.3;

termVel = 8;

jspd\[0\] = -3.75;

jspd\[1\] = -3.75;

jspd\[2\] = -3.5;

//Number of maximum jumps

jumpMax = 3;

jumpCount = 1;

//Timer to control height of jump further

jumpHoldTimer = 0;

jumpHoldFrames\[0\] = 12;

jumpHoldFrames\[1\] = 12;

jumpHoldFrames\[2\] = 8;

onGround = true;



//Coyote Time

//Hang Time

coyoteHangFrames = 4;

coyoteHangTimer = 0;

//Jump Buffer Time

coyoteJumpFrames = 10;

coyoteJumpTimer = 0;

Step:

//Reset number of performed jumps

if onGround 

{

	jumpCount = 1;

	coyoteJumpTimer = coyoteJumpFrames;

	} else {

	//If player is in the air, make sure they can only double jump

	coyoteJumpTimer --;

	if jumpCount == 1 && coyoteJumpTimer <= 0 { jumpCount = 2; };

}



//Jump

if jumpKeyBuffered && jumpCount < jumpMax

{ 

	//Reset the jump buffer

	jumpKeyBuffered = false;

	jumpKeyBufferTimer = 0;

	

	//Increase the number of performed jumps

	jumpCount++;

	//Set jump hold timer

	jumpHoldTimer = jumpHoldFrames\[jumpCount-1\];

	//Tell ourself we're off the ground

	setOnGround(false);

	}

	//Cut off jump

	if !jumpKey

	{

		jumpHoldTimer = 0;

	}

	//Jump based on timer/ holding jump input

	if jumpHoldTimer > 0

	{

		//Constantly set yspd to jump speed based on jump count

		yspd = jspd\[jumpCount -1\];

		//Count down the timer

		jumpHoldTimer --;

	}

I may be horribly misunderstanding the guide I'm following, but I think this is what's all being taken into account besides maybe the moving platform part of the collision

15 Comments
2024/12/02
03:38 UTC

62

Update: 3D card effects using perspective matrices

7 Comments
2024/12/02
01:28 UTC

0

Slope issues

Ive been trying to code slopes for like a hot 4 hours now and i copied Shaun Spaldings momentum based code and slopes just dont work. Help!

Example:
///Get the Player's Input

var key_right = keyboard_check(vk_right);

var key_left = -keyboard_check(vk_left);

var key_jump = keyboard_check(vk_space);

//React to the player's inputs

var move = key_left + key_right;

if (key_left = -1) var previous_dir = -1;

if (key_right = 1) previous_dir = 1;

//Acceleration

if (hsp < max_hsp) && (hsp > -max_hsp)

{

hsp += move * movespeed;

}

else if (hsp = max_hsp)

{

if (key_right)

{

hsp = max_hsp;

}

else

{

hsp -= 1

}

}

else if (hsp = -max_hsp)

{

if (key_left)

{

hsp = -max_hsp;

}

else

{

hsp += 1;

}

}

if (hsp > 0) && (key_left = 0) && (key_right = 0) && (place_meeting(x,y+1,obj_parent_wall)) {hsp -= .5}

if (hsp < 0) && (key_left = 0) && (key_right = 0) && (place_meeting(x,y+1,obj_parent_wall)) {hsp += .5}

//Gravity

if (vsp < 10) vsp += grav;

if (place_meeting(x,y+1,obj_parent_wall))

{

vsp = key_jump * -jumpspeed

}

//Wall Jumps

if (place_meeting(x+1,y,obj_parent_wall)) && (!place_meeting(x-1,y,obj_parent_wall))

{

if (key_jump) && (!place_meeting(x,y+1,obj_parent_wall))

{

vsp -= 15;

hsp -= 5;

}

}

if (place_meeting(x-1,y,obj_parent_wall)) && (!place_meeting(x+1,y,obj_parent_wall))

{

if (key_jump) && (!place_meeting(x,y+1,obj_parent_wall))

{

grav = normal_grav;

vsp -= 15;

hsp += 5;

}

}

//Wall Slides Left

if (key_left = -1) && (vsp > 0) && (place_meeting(x-1,y,obj_parent_wall)) && (!place_meeting(x,y+1,obj_parent_wall))

{

if (vsp <= 11) && (vsp > 1.5) vsp -= 1;

if (vsp <= 11) && (vsp > 0) grav = .05;

}

if (key_left = -1 && (place_meeting(x-1,y,obj_parent_wall)) && (!place_meeting(x,y+1,obj_parent_wall)))

{

grav = normal_grav;

}

if (key_left = 0)

{

grav = normal_grav;

}

//Wall Slides Right

if (key_right = 1) && (vsp > 0) && (place_meeting(x+1,y,obj_parent_wall)) && (!place_meeting(x,y+1,obj_parent_wall))

{

if (vsp <= 16) && (vsp > 1.5) vsp -= 1;

if (vsp < 10) && (vsp > 0) grav = .05;

}

if (key_right = 1 && (place_meeting(x+1,y,obj_parent_wall)) && (!place_meeting(x,y+1,obj_parent_wall)))

{

grav = normal_grav;

}

if (key_right = 0)

{

grav = normal_grav;

}

//Horizontal Collision

if (place_meeting(x+hsp,y,obj_parent_wall))

{

while(!place_meeting(x+sign(hsp),y,obj_parent_wall))

{

x += sign(hsp);

}

hsp = 0;

}

x += hsp;

//Vertical Collision

if (place_meeting(x,y+vsp,obj_parent_wall))

{

while(move_and_collide(x,y+sign(vsp),obj_parent_wall))

{

y += sign(vsp);

}

vsp = 0;

}

y += vsp;

1 Comment
2024/12/01
21:57 UTC

10

Looking for some feedback regarding this shop menu design :)

4 Comments
2024/12/01
19:47 UTC

1

Same error occuring,

Hey, so I've been working on my game and this code keeps popping up and I can't seem to figure it out, any tips?

############################################################################################

ERROR in action number 1

of Step Event0 for object OPlayer:

Variable <unknown_object>.rightkey(100012, -2147483648) not set before reading it.

at gml_Object_OPlayer_Step_0 (line 7) - moveDir = rightkey - leftkey;

############################################################################################

gml_Object_OPlayer_Step_0 (line 7)

4 Comments
2024/12/01
19:46 UTC

1

Trying to close all nodes / reset layout crashes GM

This have been bugging me for a while now. I'm working on a somewhat big project with lots of resources, and got kinda careless with the workspace so there are just dozens of nodes opened at the same time. UI is kinda slow and I can't close the workspace, close all nodes or reset the layout because either of the options crashes GM. Do you guys know if there's some workaround? Like clearing the file that stores UI configuration (have no idea where it is stored)

2 Comments
2024/12/01
19:27 UTC

0

Reducing volume.

so... i want in event collison the sound (Snd_room1) reduce to zero when the collison start. it's pretty simple, but i can't do it xd

1 Comment
2024/12/01
18:56 UTC

1

Error compiling Ubuntu VM but I don't know what the logs mean.

This is the error:

"/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/bin/igor/linux/x64/Igor" -j=8 -options="/tmp/GameMakerStudio2-Beta/GMS2TEMP/build.bff" -v -- Linux Run

Loaded Macros from /home/auste/.config/GameMakerStudio2-Beta/Cache/GMS2CACHE/UT_Orange__36CABCDB_1FD2CE0F/macros.json

Options: /home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/bin/platform_setting_defaults.json

Options: /home/auste/.config/GameMakerStudio2-Beta/austenandrew334_4672262/local_settings.json

Options: /home/auste/.config/GameMakerStudio2-Beta/Cache/GMS2CACHE/UT_Orange__36CABCDB_1FD2CE0F/targetoptions.json

Setting up the Asset compiler

/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/bin/assetcompiler/linux/x64/GMAssetCompiler.dll /c /mv=1 /zpex /iv=0 /rv=0 /bv=0 /j=8 /gn="UT Orange STREEEETCH" /td="/tmp/GameMakerStudio2-Beta/GMS2TEMP" /cd="/home/auste/.config/GameMakerStudio2-Beta/Cache/GMS2CACHE/UT_Orange__36CABCDB_1FD2CE0F" /rtp="/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700" /zpuf="/home/auste/.config/GameMakerStudio2-Beta/austenandrew334_4672262" /prefabs="/home/auste/.local/share/GameMakerStudio2-Beta/Prefabs" /ffe="d3t+fjZrf25zeTdwgjZ5em98a3GCN4ODbTZzeH5vdnZzfW94fW82eH92dnN9cjZ2eXFzeGl9fXk2fm99fjZtf31+eXdpb3iANnBzdn41cII2cYJpd3luaYFrdnZ6a3pvfDZxgml3eW5pcWt3b31+fHN6NnZzgG9pgWt2dnprem98aX1/bH1tfHN6fnN5eDZ8eXZ2bGttdTZteW5vN29uc355fDZtfHl4f302fW18c3p+N3R9Nn1+fHN6aX94f31vbmlrfX1vfn02f3pua35vN3p8eW1vfX02enxvcGtsN3ZzbHxrfIM=" /m=llvm-linux /studio /tgt=128 /llvmSource="/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/yyc/"

/nodnd /cfg="Default" /o="/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC" /sh=True /optionsini="/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/options.ini" /baseproject="/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/BaseProject/BaseProject.yyp" "/home/auste/Downloads/UT Orange STREEEETCH/UT Orange STREEEETCH.yyp" /preprocess="/home/auste/.config/GameMakerStudio2-Beta/Cache/GMS2CACHE/UT_Orange__36CABCDB_1FD2CE0F"

Found Project Format 2

+++ GMSC serialisation: SUCCESSFUL LOAD AND LINK TIME: 559.1063ms

Loaded Project: UT Orange STREEEETCH

finished.

Found Project Format 2

+++ GMSC serialisation: SUCCESSFUL LOAD AND LINK TIME: 12.0895ms

Loaded Project: __yy_sdf_shader

finished.

Found Project Format 2

+++ GMSC serialisation: SUCCESSFUL LOAD AND LINK TIME: 16.3422ms

Loaded Project: __yy_sdf_effect_shader

finished.

Found Project Format 2

+++ GMSC serialisation: SUCCESSFUL LOAD AND LINK TIME: 11.4827ms

Loaded Project: __yy_sdf_blur_shader

finished.

Found Project Format 2

+++ GMSC serialisation: SUCCESSFUL LOAD AND LINK TIME: 28.5292ms

Loaded Project: GMPresetParticles

finished.

Release build

Options: /home/auste/.config/GameMakerStudio2-Beta/Cache/GMS2CACHE/UT_Orange__36CABCDB_1FD2CE0F/PlatformOptions.json

homedir : /home/auste

Options: /home/auste/.config/GameMakerStudio2-Beta/Cache/GMS2CACHE/UT_Orange__36CABCDB_1FD2CE0F/MainOptions.json

Options: /home/auste/.config/GameMakerStudio2-Beta/Cache/GMS2CACHE/UT_Orange__36CABCDB_1FD2CE0F/ExtensionOptions.json

PlatformOptions

[Compile] Run asset compiler

/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/bin/assetcompiler/linux/x64/GMAssetCompiler.dll /c /mv=1 /zpex /iv=0 /rv=0 /bv=0 /j=8 /gn="UT Orange STREEEETCH" /td="/tmp/GameMakerStudio2-Beta/GMS2TEMP" /cd="/home/auste/.config/GameMakerStudio2-Beta/Cache/GMS2CACHE/UT_Orange__36CABCDB_1FD2CE0F" /rtp="/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700" /zpuf="/home/auste/.config/GameMakerStudio2-Beta/austenandrew334_4672262" /prefabs="/home/auste/.local/share/GameMakerStudio2-Beta/Prefabs" /ffe="d3t+fjZrf25zeTdwgjZ5em98a3GCN4ODbTZzeH5vdnZzfW94fW82eH92dnN9cjZ2eXFzeGl9fXk2fm99fjZtf31+eXdpb3iANnBzdn41cII2cYJpd3luaYFrdnZ6a3pvfDZxgml3eW5pcWt3b31+fHN6NnZzgG9pgWt2dnprem98aX1/bH1tfHN6fnN5eDZ8eXZ2bGttdTZteW5vN29uc355fDZtfHl4f302fW18c3p+N3R9Nn1+fHN6aX94f31vbmlrfX1vfn02f3pua35vN3p8eW1vfX02enxvcGtsN3ZzbHxrfIM=" /m=llvm-linux /studio /tgt=128 /llvmSource="/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/yyc/"

/nodnd /cfg="Default" /o="/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC" /sh=True /optionsini="/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/options.ini" /baseproject="/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/BaseProject/BaseProject.yyp" "/home/auste/Downloads/UT Orange STREEEETCH/UT Orange STREEEETCH.yyp" /debug /optionsini="/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/options.ini" /bt=run /rt=yyc

Looking for built-in fallback image in /home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/bin/BuiltinImages

Compile Constants...finished.

Remove DnD...finished.

Compile Scripts...finished.

Compile Rooms...finished..... 0 CC empty

Compile Objects...finished.... 0 empty events

Compile Timelines...finished.

Compile Triggers...finished.

Compile Extensions...finished.

Global scripts...finished.

finished.

collapsing enums.

Final Compile...

-------------------------------------------------------

NOTE: 1 Unused Assets found (and will be removed) -

-------------------------------------------------------

finished.

saving file /tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/UT Orange STREEEETCH.zip

Writing Chunk... GEN8 size ... -0.00 MB

option_game_speed=60

Writing Chunk... OPTN size ... 0.00 MB

Writing Chunk... LANG size ... 0.00 MB

Writing Chunk... EXTN size ... 0.00 MB

Writing Chunk... SOND size ... 0.00 MB

Writing Chunk... AGRP size ... 0.00 MB

Writing Chunk... SPRT size ... 0.00 MB

Writing Chunk... BGND size ... 0.00 MB

Writing Chunk... PATH size ... 0.00 MB

Writing Chunk... SCPT size ... 0.00 MB

Writing Chunk... GLOB size ... 0.00 MB

Writing Chunk... SHDR size ... 0.00 MB

Writing Chunk... FONT size ... 0.00 MB

Writing Chunk... TMLN size ... 0.00 MB

Writing Chunk... OBJT size ... 0.00 MB

Writing Chunk... FEDS size ... 0.00 MB

Writing Chunk... ACRV size ... 0.00 MB

Writing Chunk... SEQN size ... 0.00 MB

Writing Chunk... TAGS size ... 0.00 MB

Writing Chunk... ROOM size ... 0.00 MB

Writing Chunk... DAFL size ... 0.00 MB

Writing Chunk... EMBI size ... 0.00 MB

Writing Chunk... PSEM size ... 0.00 MB

Writing Chunk... PSYS size ... 0.00 MB

Writing Chunk... TPAGE size ... 0.00 MB

Texture Group - __YY__0fallbacktexture.png_YYG_AUTO_GEN_TEX_GROUP_NAME_

Texture Group - Default

Writing Chunk... TGIN size ... 0.00 MB

Writing Chunk... FEAT size ... 0.00 MB

Writing Chunk... STRG size ... 0.00 MB

Writing Chunk... TXTR size ... 0.00 MB

0 Compressing texture... writing texture __yy__0fallbacktexture.png_yyg_auto_gen_tex_group_name__0.yytex...

1 Compressing texture... writing texture default_0.yytex...

Writing Chunk... AUDO size ... 0.00 MB

Stats : GMA : Elapsed=652.3955

Stats : GMA : sp=5,au=0,bk=0,pt=0,sc=1,sh=3,fo=0,tl=0,ob=2,ro=1,da=0,ex=0,ma=6,fm=0x400000000

/bin/bash -c 'cd ~ && mkdir -p /home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH'

/bin/bash DONE (0)

cp "/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/Ref.h" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/Ref.h"

cp DONE (0)

cp "/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/YYStd.h" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/YYStd.h"

cp DONE (0)

cp "/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/YYSlot.h" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/YYSlot.h"

cp DONE (0)

cp "/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/YYGML.h" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/YYGML.h"

cp DONE (0)

cp "/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/YYRValue.h" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/YYRValue.h"

cp DONE (0)

cp "/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/libyoyo_yyc-x64.a" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/libyoyo_yyc-x64.a"

cp DONE (0)

cp "/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/makefile" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/makefile"

cp DONE (0)

cp "/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/linux/execute.sh" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/execute.sh"

cp DONE (0)

/bin/bash -c 'cd ~ && chmod +x /home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/execute.sh'

/bin/bash DONE (0)

/bin/bash -c 'cd ~ && mkdir -p /home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/Game/'

/bin/bash DONE (0)

rsync -ap "/tmp/GameMakerStudio2-Beta/GMS2TEMP/UT_Orange_STREEEETCH_2D9A570B_YYC/Game/" "/home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH/Game/"

rsync DONE (0)

/bin/bash -c 'cd ~ && rsync -c -r /home/auste/GameMakerStudio2/yyc/FromPC/UT_Orange_STREEEETCH /home/auste/GameMakerStudio2/yyc'

/bin/bash DONE (0)

/bin/bash -c 'unshare -mUprf sh -c '\''mount -o bind "$1" "$2/tmp/" && PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin" chroot "$2" /bin/sh -c "export PATH=/usr/bin:/bin && cd /tmp/ && make -C /tmp/ -j `nproc --all`"'\'' -- /home/auste/GameMakerStudio2/yyc/UT_Orange_STREEEETCH /opt/steam-runtime'

System.Exception: command 'unshare -mUprf sh -c 'mount -o bind "$1" "$2/tmp/" && PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin" chroot "$2" /bin/sh -c "export PATH=/usr/bin:/bin && cd /tmp/ && make -C /tmp/ -j `nproc --all`"' -- /home/auste/GameMakerStudio2/yyc/UT_Orange_STREEEETCH /opt/steam-runtime' failed with exit status 1

at Igor.LinuxBuilder.plink_async(String command, Boolean fail_on_error)

at Igor.LinuxBuilder.LinuxSendAndBuildMakefile(String _dir)

at Igor.LinuxBuilder.Run()

at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)

at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Igor complete.

elapsed time 00:00:02.7308849s for command "/home/auste/.local/share/GameMakerStudio2-Beta/Cache/runtimes/runtime-2024.1100.0.700/bin/igor/linux/x64/Igor" -j=8 -options="/tmp/GameMakerStudio2-Beta/GMS2TEMP/build.bff" -v -- Linux Run started at 12/01/2024 11:08:12

FAILED: Run Program Complete

For the details of why this build failed, please review the whole log above and also see your Compile Errors window.

0 Comments
2024/12/01
17:13 UTC

3

Enemy collision with enemy without bouncing into a wall

Help Im making a top down project with some tiles as ”walls”, a player and a bunch of enemies who follow the player with a mp grid path code, avoiding the tile walls.

A problem I have though is that enemy objects go through eachother and I still cant figure out how to implement enemy collision with other enemies. If I give them a ”bounce” code (opposite direction + movespeed+alarm) theyll just keep getting knocked into the tile walls and get stuck there. And if I do a new mp path grid thing but w enemies and other enemies, theyll just get stuck in their own grid cell.

A lil help would be really appriciated!

3 Comments
2024/12/01
15:17 UTC

1

[LTS] Is there a replacement for GMFMODSimple.dll?

I've recently picked back up GMS2, at least the LTS version since i'm trying to run a project that utilises a likely old dll of the FMOD system for GameMaker, only when i got this error:

___________________________________________

############################################################################################

ERROR in

action number 1

of Create Event

for object objGlobalControl:

Error defining an external function.

at gml_Script_LoadFMOD (line 15) - global.dll_FMODfree=external_define("GMFMODSimple.dll","FMODfree",dll_stdcall,ty_real,0);

############################################################################################

gml_Script_LoadFMOD (line 15)

gml_Object_objGlobalControl_Create_0 (line 44) - LoadFMOD();

I had no idea why it's not working as basically it seemed fine, until i found out that this .dll seems to work only with 32bit exports. Any idea if this dll has a unofficial fix for 64bit systems?

1 Comment
2024/12/01
11:04 UTC

3

window_set_size not setting window size

Just started learning GameMaker and I am following this tutorial. It is very easy to follow but for some reason when i try use window_set_size() it doesn't actually change the window size like it is supposed to. I assume it has to do with the dimensions set in the room settings which are set to width: 320 and height: 180 while I set window_set_size() in the oPlayer creation event. This is exactly what the instructor does in the tutorial and I didn't see anything in the comments section that indicated anyone else is experiencing the same issues as I am so I have to be doing something wrong, I just can't figure out where I'm going wrong. I've tried restarting and following the tutorial a few times but I still run into the same issue. If anyone has any insight as to why this might be happening please let me know. Also you need more information or clarification I'll provide as needed. Thanks in advance!

Edit: I figured out it was because I was dragging the sprite into the room instead of the object which I didn't notice in the tutorial

https://preview.redd.it/ab4pc0s1674e1.png?width=698&format=png&auto=webp&s=8c33fd69fb2e087d05d040a8ecef1395b00c8165

https://preview.redd.it/b4zvibb2674e1.png?width=2086&format=png&auto=webp&s=d58ff4d95dd1bca3af6c3004f241e642d3e5c40b

2 Comments
2024/12/01
08:30 UTC

74

i made this by "abusing" array_sort haha

19 Comments
2024/12/01
04:55 UTC

1

Using a viewport within a viewport?

I am trying to use viewport to create a picture-in-picture effect and I'm not sure how. I'm making a game where the levels are purchased in the games store, however I want a preview of the level to hover on the gui so players know what they are buying. To crank this up a notch, I want my levels individual parallax backgrounds to scroll within the preview windows. Using the draw_sprite_tiled function I can draw and scroll my parallax but it has to fill a viewport. So I created a second viewport that is half the size of my games main viewport and plan to use draw_sprite_tiled_ext to scale my sprites down but my issue is how to use the viewport to create said windows and then operate within it without affecting my current viewport. Thanks so much for Any help!

5 Comments
2024/11/30
22:40 UTC

2

Using third party fonts?

I'm trying to use "Old London" for my gamemaker game but I can't find out how to import it and I can't find any tutorials on YouTube either. Does anyone know or have a direction they can point me in? Is it possible?

5 Comments
2024/11/30
21:45 UTC

2

How do I make a layer fade in and out?

So, my game is heavily dependent on tiles, and when an encounter with an enemy starts, I want to fade in a tile layer that shows the borders of the battle, there is no other way of doing this, as the borders are tile-based, and there is no changing that.

I looked up everything online and I can't seem to find an answer, and I'm still too new to this to figure out one myself. My best bet is to draw that tile layer to a surface and change the surfaces alpha when an encounter starts. Problem is I don't quite know how to do that.

Any other alternatives?

NVMD ISSUE FIXED: followed a Sara Spalding tutorial. She is a lifesafer. I swear im going to include her in my games credits

2 Comments
2024/11/30
21:21 UTC

1

Make player body parts keep alignment when rotating

I'm making a game where you control a plane, and it can be customized. The thing is, I'm drawing all the plane parts but they're only aligned when the plane is in it's original direction, when I rotate, it loses this alignment. How do I update the parts' x and y coordinates to keep it aligned with the player?

The first image is the main plane body, the others is demonstrating the problem.

5 Comments
2024/11/30
20:23 UTC

2

help me with vertical collision pleas

it is my first time making a game so can anyone help this is my code vertical collision do not work

// Gravity variables

grv = 0.5; // Gravity strength

yspd_max = 10; // Maximum vertical speed

/// Apply gravity

yspd += grv;

yspd = clamp(yspd, -yspd_max, yspd_max); // Limit vertical speed

/// Check for collision with the ground

var collWall = collision_point(x, y + 2, Object2, 0, 0);

/// Jumping logic

jumptimer--; // Decrease the jump timer

if (jumptimer <= 0 && grounded == 1) { // Only jump if timer is 0 and grounded

yspd = -jump; // Apply upward speed for jump

grounded = 0; // Set the object as airborne

jumptimer = irandom_range(120, 180); // Reset the jump timer

}

/// Vertical collision detection

if (place_meeting(x, y + yspd, Object2)) {

while (!place_meeting(x, y + sign(yspd), Object2)) {

y += sign(yspd); // Move close to the collision

}

yspd = 0; // Stop vertical movement

grounded = 1; // Object is on the ground

} else {

grounded = 0; // Object is in the air

}

/// Update position

y += yspd;

4 Comments
2024/11/30
20:16 UTC

1

Rollback Game Glitches: variables assigned to assets, assigning depth in the step event, etc.

I've been making games in GMS2 for about 4 years now and have never run into these kinds of issues until trying to use the rollback function.

If I use the line of code: depth=-bbox_bottom; in the step event, no error is thrown, but the game freezes then crashes. After removing this line, the game works properly but now my objects don't draw in front of each other the way they should.

If I assign sprite names to variables, and then use those variables in the step event to assign sprite_index to those variables, the same issue occurs. If I instead assign the sprite_index directly to a sprite asset without the variable middleman, no issues.

If I assign room names to the global variable global.newroom and then use a fader object that fades out the screen and uses room_goto(global.newroom); the game errors. If I use room_goto with the direct name of the room, no issues.

Is my file corrupted, or does the rollback function change a lot about how the engine works? I know some things are different, like all inputs have to come from rollback_define_input() and rollback_get_input() and that you can't change variable assignments in the draw event, but these seem more like glitches.

2 Comments
2024/11/30
14:49 UTC

6

Pixelart program for tracing?

In my game I'm trying to make my sprites, but I'm not very good at pixelart, so my plan is to draw on paper the sprite and then trace it with pixelart, is there any program that allows you to do that without lowering the traced picture's resolution?

12 Comments
2024/11/30
13:39 UTC

0

Frames per second: 0 vs 1

Hello,

Just wondering, for immobile sprites or backgrounds, in order to economize resources, is it necessary to lower the Fps?

And if so, what is the correct option:

frames per second: 1

or

frames per second: 0

Thank you.

7 Comments
2024/11/30
11:00 UTC

0

How to do "figure of eight" sine waves in GML using ChatGPT

After doing some basic sine waves in GML, I wanted to know how you could make a figure of eight pattern, but I was struggling to get it working.

I tried Google, and it didn't turn up much useful stuff, so I tried ChatGPT, and thought it probably not understand or wouldn't work correctly. It has been hit and miss in the past.

To my surprise, it totally understood and the code worked correctly with no changes.

Here's just the GML code:

//CREATE
// Amplitudes for x and y
amp_x = 100; // Amplitude of x-axis
amp_y = 100; // Amplitude of y-axis

// Angular frequencies
freq_x = 2; // Frequency for x-axis
freq_y = 1; // Frequency for y-axis

// Phase difference
phase = pi / 2; // Phase shift (90 degrees)

// Time variable
time = 0;

// Speed of animation (adjust as needed)
time_step = 0.05;


//STEP
// Update time
time += time_step;

// Calculate x and y based on the parametric equations
x = room_width / 2 + amp_x * sin(freq_x * time); // Horizontal sine wave
y = room_height / 2 + amp_y * sin(freq_y * time + phase); // Vertical sine wave with phase shift


//DRAW
// Draw the path (for visualization)
for (var t = 0; t < 2 * pi; t += 0.01) {
	var px = room_width / 2 + amp_x * sin(freq_x * t);
	var py = room_height / 2 + amp_y * sin(freq_y * t + phase);
	draw_point(px, py);
}

// Draw the object
draw_self();
7 Comments
2024/11/30
10:08 UTC

1

Can't get buffer_get_surface to work

I'm having issues with buffer_get_surface. The surface is 256 by 20 and type is surface_r8unorm. The code below is in my draw event right after I have drawn to the surface. It gives an error at the line with buffer_peek saying that _buffer is undefined. If I remove the middle line with buffer_get_surface the error goes away so I know this is the issue. What am I doing wrong?

var _buffer = buffer_create(256*20, buffer_fixed, 1);

_buffer = buffer_get_surface(_buffer, surf_stars, 0);

var _test = buffer_peek(_buffer, 0, buffer_u8);

2 Comments
2024/11/30
03:14 UTC

2

Looking for tutorials on making enemies and bosses for a 2D platformer.

Code and visual are both fine. I have watched Slyddar's D&D 2D platformer enemy tutorial on Youtube and have made a couple different types of enemies based on it. But I would like to make some more interesting enemies, especially enemies that can through projectiles.

1 Comment
2024/11/30
00:48 UTC

8

Is this optimization script any good?

I'm making a shooter/vampire survivor game and I'm doing some optimization code for it to not go overboard with the amount of objects on the room

so i did this script that runs every frame to see if its on the player's "loading zone" or not:

function get_on_loading_zone()
{
  //How many times the camera size is the loadind zone
  var amt = 1.3;
  
  var _camx = camera_get_view_x(view_camera[0]);
  var _camy = camera_get_view_y(view_camera[0]);
  var _camw = camera_get_view_width(view_camera[0]);
  var _camh = camera_get_view_height(view_camera[0]);
  
  var _x1 = _camx - _camw * amt;
  var _y1 = _camy - _camh * amt;
  var _x2 = _camx + _camw * (amt+1);
  var _y2 = _camy + _camh * (amt+1);
  
  if !((x >= _x1) && (y >= _y1) && (x <= _x2) && (y <= _y2))
  {
    instance_destroy();
  }
}

is this code good? any other suggestions?

13 Comments
2024/11/29
23:50 UTC

0

Status on implementing JavaScript?

Does anyone know if GameMaker is still going to implement JavaScript and approximately when?

According to this post they were supposed to do it this year. The year is coming to an end. Has this made it into the GameMaker releases this year? If not, is there any news for when it might come out?

"... One of the upcoming features includes JavaScript as a first-class language in GameMaker. You will be able to write your scripts and events in JavaScript, within GameMaker, starting later this year...."

-- https://gamemaker.io/en/blog/gamemaker-update-2024

14 Comments
2024/11/29
22:39 UTC

Back To Top