Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

Steamworks.gml example

Sample project for Steam-based networking for GameMaker. · By YellowAfterlife

variables writing to buffer x256?

A topic by Doombrowski created Jul 24, 2018 Views: 153 Replies: 3
Viewing posts 1 to 2

I have a loop writing sprites and sprite variables to a buffer in obj_steam using buffer_write. For whatever reason, they're writing and/or reading the values*256.  I am using the packet_handle_client script with extra switch case items to read the data on the client side.  What could be the cause of this x256 multiplier? 

Developer

You most likely have a mismatch between what you read and what you write - for example, if you write an u32 but then read u8,u32, u32 would be "overflowing" beyond the payload and off by 8 bits (so *256).

I will look further into this. Thank you for your response.

That was exactly it! Thank you so much! I've spent so much time trying to figure this out. You're awesome! :D