Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

Steamworks.gml example

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

steam_net_packet_receive

A topic by ahmetbehram created Jun 11, 2021 Views: 89 Replies: 3
Viewing posts 1 to 3
(1 edit)

Hey, yesterday i was testing my project and i implemented all the stuff needed for my game. The thing is i created a lan networking and my lan networking is using async networking event and working perfectly and fast but on the other hand for steam we are using steam_net_packet_receive in a while loop and if there is lots of packages coming from steam that means some old computers will not be able to keep up with the game and will receive lots of latency. So i need some kind of a multi-threading system or at least i need to get packages via async events. Is there any way to achieve this in gamemaker studio 2 ?

Developer

You could add the incoming buffers to a list and then process them, but if the data is coming faster than you can process it, you might have more problems.

well yeah my problem exactly happens if the data is coming faster than i can process it since gamemaker games are single thread. My question is i send the exact same amount of data on lan network and gamemaker is processing data in async events. Is there any way to handle steam packages async ?

Developer

“async” events are simply data that has been queued for handling later. They are not multi-threaded.

The difference might be simply whatever overhead that comes from Steam Client interop with the game.