Josh Posted December 30, 2022 Author Share Posted December 30, 2022 There is in the documentation, but I have not been able to get it working in the forum. Would be nice to have! 1 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...
SpiderPig Posted December 30, 2022 Share Posted December 30, 2022 Indeed! That's probably where I saw it then. Link to comment Share on other sites More sharing options...
reepblue Posted December 30, 2022 Share Posted December 30, 2022 1 hour ago, Josh said: I have not done any comparisons of this, but from that screenshot it's apparent my approach of using persistent 2D objects has performance that absolutely destroys imGUI's immediate mode method. It'll probably be a bit faster once those drop shadows are instanced! One thing imGUI does have out of the box is resizable/moveable panel windows within the context, but can probably make my own with some work. Can't wait to try these updates. I have so many ideas. 1 Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
toonmad Posted December 30, 2022 Share Posted December 30, 2022 Respect your decision on the payment model although not one I personally will go for. Happy to further support Leadwerks on Steam however by purchasing the addons, can't wait to see what can be done with it seems a great editor as I couldn't really get on board with Godot and Unity etc. Link to comment Share on other sites More sharing options...
SpiderPig Posted December 30, 2022 Share Posted December 30, 2022 This was working last night. Now the program crashes without fail when parenting the camera to a pivot. #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0, 0, 1); camera->SetFov(70); camera->SetPosition(0, 2, -3); auto font = LoadFont("Fonts/arial.ttf"); auto ui = CreateInterface(world, font, framebuffer->size); ui->SetRenderLayers(RENDERLAYER_1); ui->root->SetColor(0, 0, 0, 0); auto terrain = CreateTerrain(world, 512, 512); auto player = CreateCylinder(world); player->SetMass(1.0f); player->SetPhysicsMode(PHYSICS_PLAYER); auto cam_pivot = CreatePivot(world); cam_pivot->SetParent(player); camera->SetParent(cam_pivot); auto light = CreateDirectionalLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); auto floor2 = CreateBox(world, 1000.0f, 0.1f, 1000.0f); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { float move = 0.0f, strafe = 0.0f; if (window->KeyDown(KEY_W) == true) { move = 1.0f; } else if (window->KeyDown(KEY_S) == true) { move = -1.0f; } if (window->KeyDown(KEY_A) == true) { strafe = -1.0f; } else if (window->KeyDown(KEY_D) == true) { strafe = 1.0f; } player->SetInput(0.0f, move, strafe); world->Update(); world->Render(framebuffer); } return 0; } Link to comment Share on other sites More sharing options...
Josh Posted December 30, 2022 Author Share Posted December 30, 2022 21 minutes ago, toonmad said: Respect your decision on the payment model although not one I personally will go for. Happy to further support Leadwerks on Steam however by purchasing the addons, can't wait to see what can be done with it seems a great editor as I couldn't really get on board with Godot and Unity etc. That's fine. What I cannot do is sell you a game engine that will be abandoned in six months, which is what would happen if I sold Ultra under the one-time purchase model, because sales would completely stop after the first month. 1 1 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 December 30, 2022 Author Share Posted December 30, 2022 3 minutes ago, SpiderPig said: This was working last night. Now the program crashes without fail when parenting the camera to any entity. Works fine for me? 1 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 December 30, 2022 Author Share Posted December 30, 2022 With a fresh project: 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...
SpiderPig Posted December 30, 2022 Share Posted December 30, 2022 Okay I thought it was any entity but it's just a pivot. I've updated the example. Link to comment Share on other sites More sharing options...
Josh Posted December 30, 2022 Author Share Posted December 30, 2022 51 minutes ago, SpiderPig said: Okay I thought it was any entity but it's just a pivot. I've updated the example. Fixed! 1 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...
SpiderPig Posted December 30, 2022 Share Posted December 30, 2022 This example throws an error saying lua51.dll is missing. #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0, 0, 1); camera->SetFov(70); camera->SetPosition(0, 2, -3); auto box = CreateBox(world); box->SetField("MyVar", "Hello"); auto what_is_it = box->GetValue<String>("MyVar"); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Link to comment Share on other sites More sharing options...
reepblue Posted December 31, 2022 Share Posted December 31, 2022 That's because GetValue is a function that read script values. I don't think Josh shipped the dll as it's not 100% supported yet. Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted December 31, 2022 Author Share Posted December 31, 2022 Added lua51.dll. 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...
reepblue Posted December 31, 2022 Share Posted December 31, 2022 24 minutes ago, Josh said: Added lua51.dll. Does this mean lua scripts will work upon loading Leadwerks maps? I remember you told me you disabled that. Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
SpiderPig Posted December 31, 2022 Share Posted December 31, 2022 1 hour ago, Josh said: Added lua51.dll. Thank you. The same example now gives this error. Link to comment Share on other sites More sharing options...
Josh Posted December 31, 2022 Author Share Posted December 31, 2022 Lua is not ready for use and I would not use these commands yet. 1 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...
SpiderPig Posted December 31, 2022 Share Posted December 31, 2022 I wonder if you would consider adding back the user data member for entities like in Leadwerks? I find that quite useful, more so than the setting of fields and it wouldn't use lua. Something like this perhaps? Just a thought. shared_ptr<Object> object; void SetObject(shared_ptr<Object> object) { this->object = object; } shared_ptr<Object> GetObject() { return object; } Link to comment Share on other sites More sharing options...
Josh Posted December 31, 2022 Author Share Posted December 31, 2022 It's in there, there's just a member called "extra" you can get and set as you wish. 1 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...
SpiderPig Posted December 31, 2022 Share Posted December 31, 2022 So there is Link to comment Share on other sites More sharing options...
reepblue Posted December 31, 2022 Share Posted December 31, 2022 This makes me so happy. Going to start redoing the UI layer. I want my panels to act like windows and I think I can make it work. 3 Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
reepblue Posted December 31, 2022 Share Posted December 31, 2022 Something else I was playing with last night was loading in additional search paths, so I didn't have to copy and paste assets to test. First I added the following to my Ultra.json file to look like this. { "project": { "name": "Sample App", "templates": [ "C++", "Common" ], "validationLayers": { "debug": [ "VK_LAYER_KHRONOS_validation" ], "release": [] }, "packages": [ "../core/core_shaders.zip" ] } } This worked for packages, because I used FullPath when loading the package entry. Now I'm wondering if we could load an unpackaged directory the same way. I want it so I only have to update my core directory with the client and have all my projects load all those files. LoadDir only indexes the contents of the directory and not load it within the virtual filesystem. Would it be possible to make a plugin that does this? Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted December 31, 2022 Author Share Posted December 31, 2022 I was thinking about doing something like this, for adding mod folders. I want to be cautious with the file system though. 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...
reepblue Posted December 31, 2022 Share Posted December 31, 2022 Yeah, I can understand that there might be confusion. The current system prioritizes packages before raw contents on the disk. If you have 2 files integrated with the same paths on the same file structure, which file does it actually load? Should the contents of the mod folder take priority over the in-game files? As an experiment, I implemented my own with custom load wrappers. Right now, I'm more worried about loading files that aren't there vs overriding my game files. This doesn't affect engine loading calls. If you added mod folder support, it would fix my dilemma. const UltraEngine::WString GetGlobalFile(const UltraEngine::WString& pszFilePath) { UltraEngine::WString path = pszFilePath; if (!path.empty()) { // If we've found it within the game directory, return this path. if (UltraEngine::FileType(UltraEngine::CasedPath(path)) != 0 and UltraEngine::FileSize(UltraEngine::CasedPath(path)) != 0) return path; // File isn't located where we thougnt it was. Check addional search paths.. for (const auto& p : m_vSearchPaths) { auto trypath = UltraEngine::CasedPath(p + L"/" + pszFilePath); if (UltraEngine::FileType(trypath) != 0 and UltraEngine::FileSize(trypath) != 0) { // This is good, break the loop.. path = trypath; break; } } } return path; } Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
SpiderPig Posted December 31, 2022 Share Posted December 31, 2022 Just thought I'd mention that very rarely I get errors thrown from the thread manager. They aren't random, they occur seemingly for stupid reasons - for instance this works fine... Vec3 offset = Vec3(10.0f, 1.0f, 5.0f); float scale = 2.0f; vector<shared_ptr<Entity>> entities; for (int z = 0; z < 10; z++) { for (int x = 0; x < 10; x++) { auto e = CreateSphere(world); e->SetColor(Random(), Random(), Random()); e->SetPosition(Vec3((float)x * scale, 0.0f, (float)z * scale) + offset, true); e->SetMass(1.0f); entities.push_back(e); } } But if I change to this, it crashes in the thread manager... e->SetPosition(Vec3((float)x * scale + Random() - 0.5f, 0.0f, (float)z * scale + Random() - 0.5f) + offset, true); The same code works fine in a new project and in some other projects. I've had similar cases pop up here an there in my larger projects. When and If I can pinpoint it further I'll make an example for you Josh. Right now I'd thought I'd just mention it to see if anyone else has seen something similar yet. And now after a few more changes elsewhere the loop works again! Link to comment Share on other sites More sharing options...
Josh Posted December 31, 2022 Author Share Posted December 31, 2022 Are you calling any engine commands on a separate thread? 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