1. Anixias

    GMS 2.3+ Unions in GML

    Hi, all. (This is for use with networking, but it might be useful for save data) I have created a BitPacker which allows you to read/write at the bit-level instead of the byte-level to/from buffers. The issue of course was reading and writing data types other than unsigned integers. The...
  2. Pelican Police

    buffer_read - but it won't crash if you read beyond the end

    GM Version: 1.4 Target Platform: ALL Download: N/A Links: N/A Summary: If you try to read beyond the end of a buffer, you will get an error. This is a problem if your game uses buffers for networking, because anyone could maliciously send a buffer that ends unexpectedly, triggering this...
  3. DonMaklesso

    [SOLVED] Sending surface over network

    Hi, I've been trying to send an application_surface in a buffer (I'm using a server-client system) and displaying it in the client's game so that he would "see what the server sees" but this doesn't seem to work. It doesn't crash or anything just nothing happens. Here's the code: // Server -...
  4. S

    GMS 2 Reading from outside buffer

    Hey all, I've run into a weird networking bug. I've got two projects, a client and a server. When I run both on my local computer, or both on an Azure VM, they work fine. However, if I try to run the client on my local machine and the server on a VM, I get the following error as soon as I...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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 ?
  10. 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...
  11. 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...
  12. 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?)
  13. 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...
  14. 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...
  15. 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?
  16. D

    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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...