Dreikblack Posted May 25, 2023 Posted May 25, 2023 No problem with models but LoadSound returns null (and works for sounds outside an archive). In the asset editor sounds can be loaded. #include "UltraEngine.h" #include "Components/CameraControls.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); world->SetAmbientLight(0); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load FreeImage plugin auto plg = LoadPlugin("Plugins/FITextureLoader"); auto quakeLoaderPlugin = LoadPlugin("Plugins/QuakeLoader"); //Load model WString path = AppDir(); auto pak = LoadPackage(path + "/PAK0.PAK"); ChangeDir(path); auto model = LoadModel(world, "progs/quaddama.mdl"); model->Turn(0, 180, 0, true); auto soundPath = WString("sound/misc/water2.waw"); auto sound = LoadSound(soundPath); sound->Play(); //Environment maps auto specmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/specular.dds"); auto diffmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/diffuse.dds"); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0, 0, 1); camera->SetPosition(model->GetBounds().center); camera->Move(0, 0, -0.3); camera->SetRange(0.01, 100); camera->SetFov(70); camera->AddPostEffect(LoadPostEffect("Shaders/PostEffects/FXAA.json")); //Create light auto light = CreateBoxLight(world); light->SetRange(-10, 10); light->SetArea(15, 15); light->SetRotation(45, 35, 0); light->SetColor(1.2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Quote Check out Slipgate Tactics - turn based tactics Quake fan game, which is made with Ultra Engine/Leadwerks 5: https://www.leadwerks.com/community/topic/61480-slipgate-tactics-demo/
Solution Josh Posted May 25, 2023 Solution Posted May 25, 2023 47 minutes ago, Dreikblack said: water2.waw Quote Let's build cool stuff and have fun.
Dreikblack Posted May 25, 2023 Author Posted May 25, 2023 I chose for an example a sound with simple name and path just to make sure it has not typo Will make water tiles but later. Quote Check out Slipgate Tactics - turn based tactics Quake fan game, which is made with Ultra Engine/Leadwerks 5: https://www.leadwerks.com/community/topic/61480-slipgate-tactics-demo/
IceBurger Posted May 25, 2023 Posted May 25, 2023 7 minutes ago, Josh said: You don't know about WaW files? Quote i now hate love C++ Beeeeeeeeeeeeeep~~This is a test of the emergency signature system~~Beeeeeeeeeeeeeep RX 6800XT | i5-13600KF | 32GB DDR5 | 1440p is perfect
Dreikblack Posted May 25, 2023 Author Posted May 25, 2023 Oh wait, wav, not waw, so it was a typo after all 2 Quote Check out Slipgate Tactics - turn based tactics Quake fan game, which is made with Ultra Engine/Leadwerks 5: https://www.leadwerks.com/community/topic/61480-slipgate-tactics-demo/
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.