1. 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...
  2. 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...
  3. 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?
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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)...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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!
  18. Dengar

    Legacy GM help figuring out buffer save/load system

    im creating a buffer save/load system that saves sprites and variables to a single external file. below is what I have sofar. its just doing variables and it works but how do I handle sprites? I understand I have to draw sprites to a surface and use buffer_get_surface and buffer_set_surface...
  19. Zaid

    GMS 2 [SOLVED] Multiple textures on a single vertex buffer

    GMS2 IDE v2.2.1.375 GMS2 Runtime v2.2.1.291 Preface: I have been briefly learning how 3D works within GMS2 and am trying to write a simple 3D game by scratch so I understand all of the ins-and-outs. No 3rd party extensions and 3rd party scripts are only allowed if I fully understand them. Just...
  20. Pfap

    buffer surface functions

    I did some searches in the Gamemaker Community and it sounds like these functions were iffy in Gms1 and that it might be the user's system causing problems. Create event: buff = buffer_create(1024, buffer_grow, 1); opp_surf = -1; //will write to buffer here alarm[0] = 60; //the main...