Jump to content

Multiplayer with Lua


Atmosaero
 Share

Go to solution Solved by Canardia,

Recommended Posts

  • Solution

Yes, you can use the Steam API in Ultra with Lua, with it you can send and receive any data between players or server:
https://www.ultraengine.com/learn/Steamworks_CreateLobby?lang=lua

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Beware steamworks lobby is P2P only. This made me curious about something else tho, it appears lua's require doesnt work? I was trying it with enet, eg `require "enet"` and it blows up. If require isnt working, that would be nice to become available so the reams of existing solutions (eg, love community) could be used

 

I did look at the Plugin architecture but that looks unrelated

Link to comment
Share on other sites

2 hours ago, Dexter said:

Beware steamworks lobby is P2P only. This made me curious about something else tho, it appears lua's require doesnt work? I was trying it with enet, eg `require "enet"` and it blows up. If require isnt working, that would be nice to become available so the reams of existing solutions (eg, love community) could be used

I did look at the Plugin architecture but that looks unrelated

Lua DLL modules need to be placed in the /Modules folder. Lua code file modules should be placed in /Source.

Enet is nice to use but it doesn't support NAT punch-through, so it might not be very useful for modern networked games.

The P2P system is pretty nice because when the lobby owner leaves, ownership gets transferred to another player. This acts like a dedicated server without needing to program and maintain one.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

1 hour ago, Josh said:

Lua DLL modules need to be placed in the /Modules folder. Lua code file modules should be placed in /Source.

Enet is nice to use but it doesn't support NAT punch-through, so it might not be very useful for modern networked games.

The P2P system is pretty nice because when the lobby owner leaves, ownership gets transferred to another player. This acts like a dedicated server without needing to program and maintain one.

ahh great, I had dlls next to exe, thanks. Fair point on ENet, just throwing out there are alternatives

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...