Josh Posted February 27, 2018 Share Posted February 27, 2018 Create or join a lobby, then hold V key to talk. MultiplayerGame.zip Source looks like this: #include "App.h" using namespace Leadwerks; int main(int argc, const char *argv[]) { Steamworks::Initialize(); //World setup auto window = Window::Create("Multiplayer Game", 0, 0, 1024, 768); auto context = Context::Create(window); auto world = World::Create(); auto gui = GUI::Create(context); auto camera = Camera::Create(); //Create server list auto serverlist = Widget::ListBox(20, 20, 400, 300, gui->GetBase()); int count = Lobby::Count({ { "game","mplayertest" } }); Lobby* lobby = nullptr; for (int n = 0; n < count; ++n) { lobby = Lobby::Get(n); serverlist->AddItem(String(lobby->steamid),n==0); } lobby = nullptr; //GUI buttons auto button_join = Widget::Button("Join",20, 20+300, 76, 28, gui->GetBase()); auto button_create = Widget::Button("Create", 20 + 76 + 2, 20+300, 76, 28, gui->GetBase()); bool recording = false; while (true) { if (window->KeyHit(Key::Escape)) break; if (window->Closed()) break; if (lobby) { if (recording) { if (!window->KeyDown(Key::V)) { Sound::StopRecording(lobby); recording = false; } } else { if (window->KeyDown(Key::V)) { Sound::StartRecording(); recording = true; } } } P2P::Receive(-101); Time::Update(); world->Update(); world->Render(); while (EventQueue::Peek()) { auto event = EventQueue::Wait(); if (event.id == Event::WidgetAction) { if (event.source == button_join) { int index = serverlist->GetSelectedItem(); lobby = Lobby::Get(index); lobby->Join(); gui->Hide(); } else if (event.source == button_create) { lobby = Lobby::Create(); lobby->SetKey("game", "mplayertest"); gui->Hide(); } } } context->Sync(); } return 0; } Quote 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 More sharing options...
carlb Posted February 27, 2018 Share Posted February 27, 2018 just crashes for me so can not test Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 Do you have Steam running? Quote 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 More sharing options...
carlb Posted February 27, 2018 Share Posted February 27, 2018 yes do i need to close it down Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 No, but it should work if Steam is running. Quote 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 More sharing options...
carlb Posted February 27, 2018 Share Posted February 27, 2018 mmm working now funny lol Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 I think you might be crashing my app when you join. Did you try to send a voice message? Quote 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 More sharing options...
carlb Posted February 27, 2018 Share Posted February 27, 2018 i can hear someone testing but dont think they can hear me lol Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 So you heard me talking? What did I say? Quote 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 More sharing options...
carlb Posted February 27, 2018 Share Posted February 27, 2018 testing 123 plus i did 123 back lol Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 Hold V key to talk. Quote 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 More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 You may need to check your Windows settings and make sure there is a microphone active. Quote 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 More sharing options...
carlb Posted February 27, 2018 Share Posted February 27, 2018 it may be i have multy mic so will check Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 Okay, I think I just received a message from you and it crashed my computer due to a coding error... Quote 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 More sharing options...
carlb Posted February 27, 2018 Share Posted February 27, 2018 lol ok Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 Ah, there you are!: http://steamcommunity.com/profiles/76561197965276878 Quote 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 More sharing options...
carlb Posted February 27, 2018 Share Posted February 27, 2018 yep that me lol at home off sick for a while so can do lots of testing for you lol Quote Asus ROG STRIX B350-F GAMMING AMD Ryzen 7 1700x 32 gb ddr4 15 TB raid 5 HD Nvidia EVGA 1060GTX Win10 64bit Link to comment Share on other sites More sharing options...
Josh Posted February 27, 2018 Author Share Posted February 27, 2018 Okay, basically it is working but I have to fix something. I will continue tomorrow. Thanks! Quote 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 More sharing options...
Josh Posted February 28, 2018 Author Share Posted February 28, 2018 The download is updated to fix the bug. Can someone please start it up and join my game? Quote 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 More sharing options...
Josh Posted February 28, 2018 Author Share Posted February 28, 2018 Okay, thanks for your help! Basically, it works, although it needs more work to be better. Quote 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 More sharing options...
Recommended Posts
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.