• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!


  1. FatalSleep

    Handle padding for received data packets?

    From the GMS2.x docs: async_load[? "buffer"] "buffer": This is the unique "buffer ID" which is generated by the event. A "grow" type buffer, byte aligned to 1, is created to hold the ID should be stored in a variable and used for all further function calls to the buffer in this event. Just like...
  2. solarcrispz

    GMS 2 Attempting to write outside buffer, line -1?

    Hey guys I've been putting together a multiplayer game with pretty good success. I've encountered "attempting to read from outside buffer, returning 0" errors before, but they're never as ambiguous as the one I'm consistently running into recently. Here it is: FATAL ERROR in action number 1 of...
  3. king javo

    GMS 2 Buffer Memory Usage

    Hi, I'm noticing when using buffer_delete() I'm not seeing the memory usage come down. For example, if I create a new buffer using buffer_create() the memory increases by let's say 20 MB. When I delete the buffer using buffer_delete() the memory really doesn't move. Then if I repeat this...
  4. mbeytekin

    SOLVED Illegal buffer index error when using gif_save() function

    I'm trying to save animated gif in GM2. I'm using GM and sometimes I get an error when I use gif_save() function; ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of...
  5. mbeytekin

    SOLVED Sending a surface or buffer to a C++ DLL and getting processed image from it to a surface or buffer back

    I'm trying to send a surface to dll and process it in DLL, and after this get this processed image back. I tried send surface as buffer (argument as double) but it's not working. My mean goal is using opencv library in C++. Anyone can help please ?
  6. D

    GMS 2 Losing connection after changing levels

    Like the title says, both players lose connection when I change rooms. Before hand, I'm new to networking and I'm spawning both of them on a setup room to verify if both players are working correctly. However, going to the first level makes the buffers not reach the host and the clients. I've...
  7. 5

    Decompressing a compressed buffer loses data

    Can somebody tell me what I doing wrong in this? before = buffer_create(1024,buffer_fast,1); buffer_poke(before,0,buffer_u8,255); buffer_poke(before,1,buffer_u8,127); buffer_poke(before,2,buffer_u8,63); buffer_poke(before,3,buffer_u8,31); show_debug_message("size...
  8. andev

    In what circumstance is 'size' in network_send_* ever not buffer_tell(buffer)?

    As the title asks. Why is it necessary to state the size of the buffer when sending a packet? When would you ever use a different value (and what happens if you do? I assume it crops the buffer but then again?)
  9. Erik Leppen

    GMS 2 Vertex buffers: extend after vertex_end? Drawing a trace curve

    How do I extend a vertex buffer with additional vertex data after it has been closed with vertex_end, and without removing all existing vertex data in it? Basically what I want is a moving instance drawing its trajectory. Because drawing all segments every step is way too slow, I want to use a...
  10. E

    GML Check if outside of buffer

    Hello, is there a way to check if data exists in the position of a buffer you're trying to read from? My code for sending the data has no errors, because my server runs fine for hours, but sometimes it randomly sohws an error "Attempting to read from outside the buffer (line -1)". I think it...
  11. M

    Followed networking tutorial, getting same issue

    buffer_read argument 1 incorrect type (undefined) expecting a Number (YYGI32) at gml_Object_Server_NetworkingEvent_1 (line 47) - buffer_read(buff, buffer_string) Happens, when I try to read from a buffer, called buff. How to resolve it?
  12. Rui Rosário

    GML Buffer Encryption / Decryption

    Hello GMC, Looking at the documentation for GM:S 2 I can find functions to calculate checksums of buffers or even compress them. But there doesn't seem to be any native support for buffer encryption and decryption. Looking at the Marketplace there seems to be a few extensions for encryption but...
  13. E

    GML Can you store a 4 byte integer in a buffer aligned to 1 byte

    Hello, i have a little online chat and i'm creating a buffer to send a string (1 byte) and a colour value (4 bytes). Since i have a 4 bytes (buffer_u32) colour value, do i have to use alignment 4 in my buffer? Or can i set it to 1? Because im sending a string in the same buffer, and i think if...
  14. O

    GMS 2 Sending a map via internet.

    Lately I've been dabbling a bit in multiplayer coding and now I've come to a point where I'd like to have some help. The basic idea is that I generate a random map of 1024x1024 destroyable tiles. Now what I'm wondering is how to transfer this map to the players. The option that makes most sense...
  15. Duckbob

    Android Networking event Crash, Shutdown - in 2.2.4 update.

    There's no logical problem at all, so it worked perfectly before the 2.2.4 update. It works normally on the PC and some Android phones after the 2.2.4 update. However, a shutdown is inevitable on the home screen if a large(sometimes small) buffer is received after a successful connection is made...
  16. F

    Java Extension returns a Bitmap(img) as a Byte[] as a String and in GM change it back to sprite.How?

    Hi, so I have a java extension( java code: https://pastebin.com/cpwf5LzT ). It has 1 function and the function have 1 argument that is a String called fname. And it returns a String. The function should get the file from the path of fname and if it's an image file, get it as a Bitmap. then I...
  17. Desix

    Shaders [Solved] Applying shader to coloured vertex buffer

    Hi there. I'm sure this one's simple to those experienced with shaders and buffers. The goal itself IS simple to explain. I need to apply a fade shader I have (or create a new one to perform the same function) to a plain colour/alpha un-textured vertex buffer. I'm not that great with either...
  18. Sozidar

    GMS 2 [Solved] How to reduce the file size of the saved buffer?

    Original png file size is 3.58 kb and file size of the saved buffer is 1088 kb, which is kinda sad. Is there a way around this, or am I doing something wrong? Any help is greatly appreciated :) w = 128; h = 2176; surf = surface_create(w,h); surface_set_target(surf)...
  19. tagwolf

    True Perfect Platformer Controls (input buffer, air control, diagonal collision, etc)

    GM Version: Studio 2 Target Platform: Windows Download: see code below Links: NA Summary: I've noticed pretty much no platformer tutorials account for tweaking control feel, input buffering, air control, etc. So I'm tossing it here hoping it will be of help to someone. Features: * Move...
  20. vdweller

    GMS 2 Putting a n-bytes C++ value in a buffer for GM to read

    Hi all! I am working on a C++ dll's ability to return a char array. My first question is: The template specifies a return type of char pointer . Is there a problem if the function returns an unsigned char pointer? I did some tests and it seems like it has no problem, but maybe it won't be OK...