-
Posts
2,600 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by reepblue
-
What's the perks of doing this? Would we be able to hide shadows on a per entity basis this way?
-
Also you can tell were 2 volumes meet/overlap. I never felt it did radiosity as well as precomputed solution like the rad tools in Source. You had to crank up the brightness to the max to see texture lights look like they are emitting light which made everything else washed out.
-
Leadwerks had like very weak light bouncing. I have to set an ambient light color for my indoor scenes inorder for it to not look too dark without using hundreds of lights. The correct way for this should be to use a black ambient light and let the bouncing of light do all the work. Really hopeful that UltraEngine fixes this.
-
This series is really good.
-
-
The right panel doesn't seem to make sense with models unless it's talking about the texture that's being used on the model? It would actually be nice to be able to view/edit an assets model, material and texture without changing windows. Being the engine loads gltf, I think it would be the only way.
-
View this video Description Steam: *Coming Soon* itch.io Page: https://reepblue.itch.io/cyclone Discord: https://discord.gg/Hh7Ss9fWaW Blog Post about it: https://www.ultraengine.com/community/blogs/entry/2732-leadwerks-fmod-studio/ This video shows basic implementation of FMOD being implemented in Cyclone/Leadwerks Game Engine. It's still a work in progress but the groundwork is done.
-
Cyclone was shaping up visually, but I was getting feedback about the sound implementation not being so good. I previously created a script system that defined all my sounds under profiles. This was a step in the right direction and made it easier to tweak sounds without recompiling code. However, no matter how much I played with variables, I never was able to satisfy the complaints. After I showcased my first gameplay trailer, I decided to finally sit down and really understand FMOD. I was really overwhelmed at first as I was looking at the core api, but then I was suggested to use the FMOD Studio API instead. FMOD studio is a nifty program that allows much more fine control how sounds are played in a 3D environment. You can also add parameters to alter the sounds with code in real time. In this example, the engine sound can be changed via the RPM and Load values given. (You can check the examples of the SDK on how to do this.) FMOD Studio packs everything into bank files. You can have as many banks as you want, but for my game, I only use one. To load a bank file, I just do a for loop in a directory called Media. void Initialize() { if (!initialized) { Msg("Initializing FMOD sound driver..."); FMOD::Studio::System::create(&system); system->getCoreSystem(&coreSystem); coreSystem->setSoftwareFormat(0, FMOD_SPEAKERMODE_DEFAULT, 0); system->initialize(1024, FMOD_STUDIO_INIT_NORMAL, FMOD_INIT_NORMAL, NULL); system->setNumListeners(1); system->update(); //Load any .bank files in main directory Leadwerks::Directory* dir = Leadwerks::FileSystem::LoadDir("Media/"); if (dir) { for (std::size_t i = 0; i < dir->files.size(); i++) { std::string file = dir->files[i]; std::string ext = Leadwerks::String::Lower(Leadwerks::FileSystem::ExtractExt(file)); if (ext == "bank") { std::string fullpath = Leadwerks::FileSystem::RealPath("Media/" + file); Msg("Loading FMOD bank file \"" + fullpath + "\"..."); FMOD::Studio::Bank* bnk = NULL; FMOD_RESULT err = system->loadBankFile(fullpath.c_str(), FMOD_STUDIO_LOAD_BANK_NORMAL, &bnk); if (err == FMOD_ERR_FILE_NOTFOUND || err == FMOD_ERR_FILE_BAD) Msg("Error: Failed to load FMOD bank file \"" + fullpath + "\"..."); } } delete dir; } initialized = true; } } Another thing to note is that you manually need to update FMOD each frame. I've created my own wrapper update function and call it in my Stage class. This also calls my Initialize function. void Update() { FMODEngine::Initialize(); if (!initialized) Initialize(); if (system != NULL) system->update(); } Now, that we have the basics in, we first need a listener which was actually the hardest part. At first, I wasn't sure how I can match the location and rotation calculations from Leadwerks to FMOD. I first tried implementing the position and thankfully, FMOD uses the Left-Handed system by default. Rotation was a bit difficult for me but grabbing random code from stackoverflow saved me again and pushing the Y rotation 90 degrees made the 1:1 match. void UpdateListenerPosition(Leadwerks::Entity* pOwner) { if (pOwner == NULL || system == NULL) return; Leadwerks::Vec3 entity_position = pOwner->GetPosition(true); // Position the listener at the origin FMOD_3D_ATTRIBUTES attributes = { { 0 } }; attributes.position.x = entity_position.x; attributes.position.y = entity_position.y; attributes.position.z = entity_position.z; float radians = Leadwerks::Math::DegToRad(pOwner->GetRotation(true).y + 90); float fx = cos(radians); float fz = sin(radians); attributes.forward.x = -fx; attributes.forward.z = fz; attributes.up.y = 1.0f; system->setListenerAttributes(0, &attributes); } There's nothing to create since a listener is initialized with the system. You just need to update its attributes each frame. I call the above function in my UpdateMatrix hook for my main camera. Last, we need a way to play simple sounds. 2D and 3D sounds are defined in the bank file, but to play a sound with no 3D settings, it's as simple as the following. void EmitSound(const std::string& pszSoundEvent) { FMOD::Studio::EventDescription* pDest; std::string fulldsp = "event:/" + pszSoundEvent; system->getEvent(fulldsp.c_str(), &pDest); FMOD::Studio::EventInstance* instance; pDest->createInstance(&instance); instance->start(); instance->release(); } And to play a sound at an entity's location, this has been working for me so far. void EmitSoundFromEntity(const std::string& pszSoundEvent, ENTITY_CLASS pEntity) { FMOD::Studio::EventDescription* pDest; std::string fulldsp = "event:/" + pszSoundEvent; system->getEvent(fulldsp.c_str(), &pDest); FMOD::Studio::EventInstance* instance; pDest->createInstance(&instance); FMOD_3D_ATTRIBUTES attributes = { { 0 } }; attributes.forward.z = 1.0f; attributes.up.y = 1.0f; attributes.position.x = pEntity->GetPosition(true).x; attributes.position.y = pEntity->GetPosition(true).y; attributes.position.z = pEntity->GetPosition(true).z; instance->set3DAttributes(&attributes); instance->start(); instance->release(); } All you need to pass is the name of the event. If you decided to use subfolders, you'll need to include them in the parameter. It acts like a virtual directory. For anything with more control (such as loops, playback, etc) we're going to need our own Source/Speaker class. This class just stores the event instance and acts like the standard Source/Speaker class. I also support both the engine's OpenAL implementation and FMOD via a switch, but my actors only care about this game speaker class and the EmitSound functions. class GameSpeaker { #ifdef USE_FMOD FMOD::Studio::EventDescription* m_pDest; FMOD::Studio::EventInstance* m_pEventInstance; int m_iLength; #endif // USE_FMOD Leadwerks::Source* m_pOpenALSpeaker; protected: Leadwerks::Vec3 m_vPosition; int m_iState; public: GameSpeaker(); ~GameSpeaker(); void Play(); void Stop(); void Pause(); void Resume(); void Reset(); void SetVolume(const float flVolume); void SetPitch(const float flPitch); void SetPosition(const Leadwerks::Vec3& vPosition); void SetTime(const float flTime); const float GetVolume(); const float GetPitch(); const float GetTime(); const int GetState(); const float GetLength(); const Leadwerks::Vec3& GetPosition(); void BuildSpeaker(const std::string& pszEventName); static GameSpeaker* Create(const std::string& pszEventName); static const int Stopped; static const int Playing; static const int Paused; }; extern std::shared_ptr<GameSpeaker> CreateGameSpeaker(const std::string& pszEventName); I still have very minor things to work out, but overall, this has been a success. This also could be implemented exactly the same way in Ultra Engine if you're reading this in the future. Basic FMOD Implementation in Cyclone - Work in Progress - Ultra Engine Community - Game Engine for VR
-
I like it better like that. Just remember to implement resizing of the pan.
-
I recall some X apps not working under Wayland. Hopefully this has been fixed.
-
I there was the correct way of doing this on this form. I probably should write a blog to centralize the information.
-
Didn't 18.04 try to make Wayland default? Only thing I can think of and that might have been for a beta.
-
Oh yeah, I forgot about the log file. You can also relocate it by assigning the logfile__ stream pointer to the Filesystem:: Writefile() function.
-
Not ony PC atm but near the top of the main.cpp file there is a block of code that defines the location of the settings file using Filesystem::GetAppDirectory(). You can swap it for the path you wish to save your files. Normally, the default is "correct" but if you want Steam Cloud support for saved games, you'll need to have the app create and look for files in the game directory.
-
Steam: *Coming Soon* itch.io Page: https://reepblue.itch.io/cyclone Discord: https://discord.gg/Hh7Ss9fWaW Find out more at http://reepsoftworks.com/cyclone/ Cyclone is a passioned driven indie title from a former mod developer. This small slice of gameplay features exciting movement gameplay in which players can place cyclone vortexes launching objects or themselves up or across distances. An important layer of this small title is the future plan of user generated content support. Cyclone aims to make players into creators by providing a way to load in custom maps and additional scripts using Lua sandboxing.
-
Steam: *Coming Soon* itch.io Page: https://reepblue.itch.io/cyclone Discord: https://discord.gg/Hh7Ss9fWaW Find out more at http://reepsoftworks.com/cyclone/ Cyclone is a passioned driven indie title from a former mod developer. This small slice of gameplay features exciting movement gameplay in which players can place cyclone vortexes launching objects or themselves up or across distances. An important layer of this small title is the future plan of user generated content support. Cyclone aims to make players into creators by providing a way to load in custom maps and additional scripts using Lua sandboxing.
-
Steam: *Coming Soon* itch.io Page: https://reepblue.itch.io/cyclone Discord: https://discord.gg/Hh7Ss9fWaW Find out more at http://reepsoftworks.com/cyclone/ Cyclone is a passioned driven indie title from a former mod developer. This small slice of gameplay features exciting movement gameplay in which players can place cyclone vortexes launching objects or themselves up or across distances. An important layer of this small title is the future plan of user generated content support. Cyclone aims to make players into creators by providing a way to load in custom maps and additional scripts using Lua sandboxing.
-
That should be really helpful for tracking activity with release builds.
-
Are you using the latrst build tools? I would upgrade myself but I still need the 2017 tools for Leadwerks.
-
Neat. I can probably use this if it's not that expensive.
-
-
I heard in a discord server that the new compiler should be backwards compatible. You should be able to download the 2019 compiler without the full IDE.
-
-
Ultra Engine Benchmarks Revealed - 10x Faster than Unity, Leadwerks
reepblue commented on Admin's blog entry in Ultra Software Company Blog
Get it on video! -
Ultra Engine Benchmarks Revealed - 10x Faster than Unity, Leadwerks
reepblue commented on Admin's blog entry in Ultra Software Company Blog
I think those demos should be publicly released so people can see the results for themselves. Also, really looking forward to that editor.