Jump to content

EvilTurtleProductions

Members
  • Posts

    63
  • Joined

  • Last visited

Everything posted by EvilTurtleProductions

  1. I haven't posted here in ages, but don't worry the game has been released as planned and has seen many updates since my last post and we're starting to grow a small community on Discord too Feel free to pop in if you're looking for players to play with: https://discord.gg/vV7KDVMBZz
  2. I'm using Steam API, since it's incredibly convenient and the game's on Steam anyways
  3. Okay, I've experimented a bit with OpenAL EFX, but it doesn't work so well on old OpenAL. I think I'll wait for the LeadWerks update to OpenAL-soft, so I can do things a bit more proper haha For now I've implemented a very basic "dynamic" sound system which just uses two versions of the same sound, one muffled and with reverb and the other without those effects. This works well enough for now Definitely going to look into a proper EFX implementation when the time comes though, I just love DSP stuff haha, plus it might help others too.
  4. If you want to exclude things from decals, but can't use the settings in the entity properties in the editor, you can always remove the following lines from the shader that you use for the entity. Beware that changing a shader changes it for all entities that use that shader, so you might end up needing a separate non-decal shader with these lines removed: if (decalmode==1) materialflags += 4;//brush if (decalmode==2) materialflags += 8;//model if (decalmode==4) materialflags += 16;//terrain It's a bit hacky, but it works well.
  5. Yeah, from what I understood OpenAL-soft does software mixing, i.e. uses actual software DSP to mix all playing sources together into one final output. Much like an actual DAW does. With how powerful CPU's are nowadays (counting the past 5 years) you can easily have something like 100+ playing sources in a game, I'd say based on my experience with programming DSP & DAW plugins. Of course it also depends on how heavy the game already is CPU-wise, might be more or less The old OpenAL actually uses the (rather limited) hardware of your soundcard, which from what I've read & observed often boils down to 16 to 64 maximum sources playing until things go awry (usually with a crash caused by OpenAL), even if OpenAL reports something like 255 as the max. Hardware mixing has been outdated for so long now.
  6. Yeah I noticed this looking at the code you send me. I was under the wrong impression that the LW source contain the AL source too. This also explains why I had issues with my custom sound manager. Learning so much today
  7. Yeah I'm a little wary of it for those reasons. Still, it allows me to experiment with things until the OpenAL-soft update for LW hits. Have I mentioned I can't wait for that LeadWerks update haha I'll have a gander at the code today, thanks
  8. Experimentation mostly at the moment to see what's possible, what the performance of OpenAL EFX is etc. I want to implement some dynamic sound effects in a future update for Disinfection. So where do I fetch that ID?
  9. I'm playing with the OpenAL-soft EFX library, already compiled the game with the latest version of OpenAL-soft and it all seems to work well so far. To make effects work I need to configure the OpenAL source to send the audio signal to the EFX aux, but I have no clue how to fetch the ID of the source? Basically like this: Source* mysource; ALuint uiSource = mysource->OpenALID; alSource3i(uiSource, AL_AUXILIARY_SEND_FILTER, effectslot, 0, NULL); @Joshis this in any way possible? I see no (exposed) member or method in the various audio-related classes for this.
  10. Okay it gets stranger: I changed a material in a model... and the bug happened. No hierarchy changes or anything, just swapped the glass material with a new one and there went all the children
  11. Here's the catch: the hierarchy's unchanged. I should explain a little bit better actually: I always collapse the models. When updating the model file I have to collapse it again. I noticed the bug happens too in this scenario even though the hierarchy ends up being the same.
  12. I've encountered this bug many times now, so should really make a report already haha. I had to fix a small mistake in a model today, so I changed it in Blender, exported to FBX and LW automatically updated the .mdl file. Noticed that if you have the editor open that any changes in hierarchy (due to the updating of the model file) makes all the children of that model/entity go into nowhere-land. Almost as if it applies the global position values of the children to the local position. But it gets stranger: everything looks normal and the positions of the children are normal too. However if I either restart the editor or re-open the map the children are all in that "global" position (see the screenshots). I've had to re-position the children a few times now due to this, after noticing that a model wouldn't render (I guess because the AABB check is all wonky now?). I also noticed that whilst I could move a Pivot child, the icon did not move. A restart fixed that.
  13. I noticed something interesting: if our game crashes, after saving the player stats to a file and having finished this, the save file is empty. The bit of code below is the stats saving, wrapping up some gameplay-related things and then clearing the procedurally generated level. Sometimes the game crashes when clearing the level, which is way after the stats file has been saved. Yet the file is empty. Stream* statsfilestream = FileSystem::WriteFile("playerstats.sav"); if (statsfilestream) { System::Print("Saving player stats: " + std::to_string(playerstats_local.XP) + ", " + std::to_string(playerstats_local.level) + ", " + std::to_string(playerstats_local.money)); statsfilestream->WriteInt(playerstats_local.XP); statsfilestream->WriteInt(playerstats_local.level); statsfilestream->WriteInt(playerstats_local.money); statsfilestream->WriteInt(playerstats_local.logs); statsfilestream->Release(); } //SOME EXTRA BITS AND BOBS OF CODE HERE //SUCH AS UPDATING INGAME MISSION SCREENS AND PLAYING VOICE ACTING SOUNDS //clear level ClearLevel();
  14. I've solved it now by using a bool for every control which sets if the control is a mouse or keyboard control (i.e. 'mouse_throw' for 'key_throw' etc). After that it's just checking like this: (window->KeyHit(key_throw) && !mouse_throw) || (window->MouseHit(key_throw) && mouse_throw) And this works fine. Just wondering if there's other ways of doing it
  15. So I want the players to be able to change the controls in the options menu, but I've encountered an interesting roadblock of which I'm not sure how to handle it. Since the mouse is handled in separate methods in Window I can't simply pass the Key::whatever value, I also need to switch between the MouseDown or KeyDown function depending on what the setting chosen is. Is there some clever way this can be done neatly?
  16. Ok I'll dive into that source code. Not sure if I can still get to doing that today, busy busy haha Oh, something else that came to mind: Lobby::GetOwner() only returns a valid ID if you actually joined that lobby already. This isn't mentioned in the docs anywhere and might give some confusion for people
  17. I've gotten reports that people have trouble with joining friends-only lobbies i.e. they simply do not appear in the list. I've spend the past 2 hours experimenting and I noticed that the Lobby::Public setting works fine, but lobbies set to Lobby::FriendsOnly simply aren't detected by Lobby::Count(). Here's the lobby creation code: std::string lobbytype = "private"; if (permissions == 0) { lobbytype = "public"; currentlobby = Lobby::Create(4, Lobby::Public); } else if (permissions == 1) { lobbytype = "friends"; currentlobby = Lobby::Create(4, Lobby::FriendsOnly); } else currentlobby = Lobby::Create(4, Lobby::Private); if (currentlobby != nullptr) { world->Clear(true); currentlobby->SetString("game", title); currentlobby->SetString("type", lobbytype); currentlobby->SetString("mission", "0"); currentlobby->SetString("description", serverdescription->GetText()); etc... And here I fetch the lobbies when someone goes into the join menu: int count = Lobby::Count(); System::Print("Lobbies available: " + std::to_string(count)); for (int n = 0; n < count; n++) { Lobby* lobby = Lobby::Get(n); if (lobby->GetString("game") == title && lobby->GetString("type") == jointype) { std::string desc = lobby->GetString("description"); if (desc == "") desc = "(No name)"; desc += " | " + std::to_string(lobby->CountMembers()) + "/4"; if (lobbylist->CountItems() == 0) { lobbylist->AddItem(desc, true); selectedlobby = lobby; } else { lobbylist->AddItem(desc); } } } I've solved it now by setting friends-only lobbies to Public and setting lobby owner's SteamID in the lobby strings (SetString()). When I fetch the lobbies in the join menu I simply check if the steamID is this user's friend by using the GetFriendRelationship() API call. This seems to work fine for now, but I'm wondering if I'm missing something dumb with the FriendsOnly thing
  18. Yes, we are aware. That's why I said that Steam has issues installing it Setting the redists for the game was one of the first things we did. This problem seems to have been plaguing many commercial games already and it doesn't seem it's gonna change anytime soon. Hence my post about it, because I'm sure more people might run into this.
  19. Yeah from what I've seen it doesn't always fail. It seems things start breaking when people uninstall OpenAL themselves and then at a later date install a Steam game that has OpenAL as a dependency. Somehow Steam doesn't start the installation process. Judging by the many, many forum posts for other games this is a very common issue. Some bigger titles too.
  20. So... We found out the hard way that Steam has issues with installing OpenAL (45% refund rate oof). If OpenAL isn't installed the game simply doesn't start, without any error messages... To Josh: is it possible to make it so the engine/game gives an error message if OpenAL fails to initialize or if the DLL isn't found? If you intend to publish your LeadWerks game on Steam I highly recommend creating a custom installation script for OpenAL. I did this by including the OpenAL installer in the game folder and writing the following SteamWorks InstallScript: "InstallScript" { "Run Process" { "2.0.7.0" { "HasRunKey" "HKEY_CURRENT_USER\\SOFTWARE\\Valve\\Steam\\Apps\\YOUR_DEPOT_NUMBER_HERE" "process 1" "%INSTALLDIR%\\oalinst.exe" "command 1" "/s" "NoCleanUp" "1" } } } Don't forget to add the InstallScript to your BuildScript too, keep in mind that the paths may be different for you depending on how you have your SteamWorks build process setup: "FileMapping" { // copy install script into depot root folder "LocalPath" "..\\openalinstall.vdf" "DepotPath" "." } "InstallScript" "..\\openalinstall.vdf" For more information on this check: https://partner.steamgames.com/doc/sdk/installscripts https://partner.steamgames.com/doc/sdk/installscripts#build
  21. Valve has given the go-ahead, so the game's now scheduled to release June 1st 2022!
×
×
  • Create New...