1. 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...
  2. 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...
  3. 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?)
  4. 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...
  5. 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...
  6. 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?
  7. 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...
  8. 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...
  9. 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...
  10. Duckbob

    Android / Amazon Fire 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...
  11. 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...
  12. 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...
  13. 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)...
  14. 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...
  15. 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...
  16. SupernaturalCow

    GMS 2 Buffer value is an int32 but not a real?

    Hi all, I don't really understand why an unsigned, 8-bit integer fast buffer could read a value that returns true for "is_int32" but not "is_real". Is this another bug, or am I missing something about the way GM handles data types? var _class_id = buffer_read(_bufferSave, buffer_u8), // 7...
  17. D

    How to update part of a buffer with part of a surface

    I am new to this forum, so hello to everyone. English is not my native language, so forgive if you sometimes find it strange what I write. I am programming a game where players can modify the level (a sprite) in a way similar to what lemmings (the classic game from 1991) do while they dig. I...
  18. C

    Question - Code [SOLVED} Buffer / Surface confusion

    Not sure whether I should post here or whether Tech Support would be a better bet, but when I minimise a running project that only creates a buffer in memory when: if(!surface_exists(global.LevelSurface) ) indicates that the buffer has not been created yet. If I minimise and then restore the...
  19. R

    GMS 2 data and chunking a world

    I have been working on a project that will eventually have a fairly large open world, where I will need to chunk it in order to manage the memory in a reasonable way. I started out with a bunch of ds_grids inside of a root ds_grid to store the data. but, ran into the main issue of basically...
  20. O

    Check buffer

    Hello, i use buffer_read, but if someone use old version, it will return outside of buffer error. Is there a way to check if it's in buffer last data input? Something like if(ver = buffer_read(net_buff, buffer_string)) // This wont work. Thanks for help!