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. My code is exactly the same, albeit C++. (The gfxmode is first fetched from the System::GetProperty values (or a default setting if there are none saved) and used for that first attempt at window creation.) And again: the FPS Sample that comes with LeadWerks has the same issue, so you can test it with that if necessary. I've had one of our testers try some things out and: Windowed mode does seem to work fine with scaling at more than 200%. So yes the issue is with the fullscreen mode.
  14. It seems that some people prefer an high scaling when using 4k monitors. One of our testers often has their scaling set to 225% and I've seen a few other people use similar scaling settings with 4K. I myself was able to replicate the issue in a virtual machine, I had to since my GPU and monitor are both maxed at 1080p but VMware does not care much for the host resolution limits
  15. We've gotten a bunch of bug reports that our game doesn't start when the Scaling setting in Windows is set to more than 200%. Tested this with the LeadWerks 'FPS sample' project too and get the same issue. Works fine up too 200% (though the resolution is capped down) but higher than that it will not start. Any currently known solution for this? Here's the log of the FPS Sample: Initializing Lua... Warning: Lua sandboxing disabled. Executing file "D:/Downloads/Telegram Desktop/FPS_sample/FPS_sample/Scripts/Error.lua" Executing file "D:/Downloads/Telegram Desktop/FPS_sample/FPS_sample/Scripts/Main.lua" Executing file "D:/Downloads/Telegram Desktop/FPS_sample/FPS_sample/Scripts/Menu.lua" Initializing OpenGL graphics driver... OpenGL version 460 GLSL version 460 Device: NVIDIA GeForce RTX 3070/PCIe/SSE2 Error: Window is NULL Seems window creation fails?
  16. 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();
  17. I noticed something interesting earlier today and have been testing it. Seems consistent in what goes wrong (all in C++ btw): I have doors that make a sound when they open or close. I've currently switched to using EmitSound() for this with a range of 10, no looping or pitch changes. The sounds are loaded with Sound::Load() on the door actor Attach() and released on Detach(). When standing within the range of the door (10) and open/close it the sound plays, adding 1 Source to the list, then after it's done the Source is released and the list shrinks by 1 again. From what I've gathered this is expected behavior. However I've noticed that if I open/close the door, then run away until I'm out of range the Source does not seem to be cleared as the list is not decremented by 1. I also noticed that when I'm standing outside of the range and the door auto-closes, thus playing the close sound, the Sources list is also not decremented. I've noticed similar behavior with other entities. There's an AI running around the map, which makes a sound when it performs a certain action using EmitSound(), looking at the Debug console I clearly see the Sources list incrementing every time. I've tried loading the sound when doing the action/triggering a door open or close, then releasing it after the EmitSound() call but this made no difference. I'm aware I could use create a Source in the door actor, but since some levels have dozens of doors this really stacks up. It's what I used so far but I noticed that a lot of Sources causes sound issues. At this point I'm just wondering if I should make a few dedicated sources in the player actor instead and use these to play all the sounds near the player, though that would require a bit of setup and management which honestly the engine should handle, right? Sorry to keep hammering about these sound issues, but our game relies heavily on sounds for atmosphere and cues, plus I do want LeadWerks to improve one final time haha
  18. 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
  19. 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?
  20. 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
  21. 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
×
×
  • Create New...