Feature Request: Inclusion of SDL2_net

Started by CTxCB, Sun 03/12/2023 22:04:02

Previous topic - Next topic


I haven't posted here in ages, but I come to ask for, following the transition to SDL2, for SDL2_net v2.20, the seemingly final version of that library for SDL2 (with the move to focusing on SDL3), to be included with AGS. SDL2_net is a pretty powerful, but also simple to understand, socket-based networking library. I feel like having networking as an option, would give the engine new uses beyond traditional Adventure Game (such as people making multiplayer versions of board games, card games, dice games, etc, which could realistically use AGS with just the inclusion of networking).

Crimson Wizard


I agree that an optional networking support is a good idea.

But first of all, I guess the goal should be not in including the particular library, but in developing a networking script API, because we'd need to decide which kind of API do we have to expose for user scripts, and then library to use will be a secondary question here.

That said, this may also be done as a plugin, because AGS plugins can export their API to user script too.

We had a Sockets plugin made by WyZ years ago, and it (or some variant of it) has been used in AGS Awards client for a long time now.
(I also recall couple of actual games being made with that plugin in the past, although idk about their fate.)

Perhaps an effort could be put into writing a new convenient and easier to use networking plugin which uses cross-platform implementation like SDL2_net. This may also be better from the perspective of the engine's maintenance: as it is traditionally not meant for networking, very little games might be ever using this, so having the network support embedded would increase the engine's size, and add extra tasks to the core dev team (which is quite small).


Crimson Wizard

Quote from: Snarky on Sun 03/12/2023 23:52:45The socket plugin is available here: https://github.com/FTPlus/AGSsock

From a quick glance in the code, it seems that it still windows-only?



About this I have a couple thoughts on this, but for the time being, just want to note in case anyone adventures on this that SDL2_Net almost ceased to exist as it was not very maintained and currently what we have is SDL3_Net that uses SDL3 and it's different API wise and functionality wise. At some point once SDL3 is released (no date yet, but probably at some time in mid 2024) we will need to think about SDL3.

SMF spam blocked by CleanTalk