-
Posts
24,629 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Josh
-
Fixed!
- 1 reply
-
- 1
-
How to debug a multiplayer game with Steamworks?
Josh replied to Atmosaero's topic in General Discussion
I believe by default you are already joined. You can use this to make sure: https://www.ultraengine.com/learn/Steamworks_GetLobbyMembers -
Yes, that is correct. glTF file require PNG or JPEG images. DDS is supported as an extension, but to remain compatible with other loads a copy of the image is included in PNG format: https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/MSFT_texture_dds/README.md One of the goals of Ultra is to make sure all your models can always be loaded back into your modeling program and edited. Models are never locked / destroyed / finalized. When your game is distributed you will probably just want to not include the PNG files.
-
Texture slots need to be defined in the shader family file: { "shaderfamily": { "textures": [ "Diffuse", "Normal", "Metal/Rough", "Displacement", "Emission", "Occlusion" ], "root":"Shaders/PBR.fam", "static": { "float": { "opaque": { "default": { "base": { }, "depthPass": { } } } } } } } I took a look at maybe inheriting the texture slots from the root file, but that would overwrite any texture slots in the derived file, and I think the current behavior is best.
- 1 reply
-
- 1
-
Directory Wrong in Asset Editor's Browse for Material
Josh replied to SpiderPig's topic in Bug Reports
Fixed. -
Directory Wrong in Asset Editor's Browse for Material
Josh replied to SpiderPig's topic in Bug Reports
-
Browsing for Material copies rather than references?
Josh replied to SpiderPig's topic in Bug Reports
As discussed, glTF files use embedded materials and this was the intended behavior. I have also agreed to add a feature that allows materials to be externally referenced but currently this is not a bug.- 1 reply
-
- 1
-
I found the error and fixed it. This was caused because I recently made a change that allowed better-defined geometry in mesh colliders, like mixing quads and triangles (or any polygons). This can prevent objects from getting caught on invisible edges on the seam between two triangles, for example.
-
The collider file format is just JSON with some binary data appended to the end if needed. If I open this in a text editor I can see that the binary data is missing: { "collider": { "optimized": false, "parts": [ { "data": 0, "faces": 0, "shape": "MESH" } ] } } Investigating now...
-
Joints now store a weak pointer to entities Added Joint::GetParent and Joint::GetChild Added Entity::RemoveComponent<T>() Added Entity::ClearComponents() Added shift + drag to copy, in translate tool only Numerous bug fixes
-
LoadMap bug when shared_ptr in entitys are set as variables
Josh replied to Andy90's topic in Bug Reports
I have made the required change to the Joint class and it will be included in the next update. The other issues were reportedly caused by circular reference in user-created components, so I will close this issue now. -
LoadMap bug when shared_ptr in entitys are set as variables
Josh replied to Andy90's topic in Bug Reports
I can confirm joints do hold the entity in memory. With a component design, I am not sure how to approach this, since the component needs to keep the joint in memory as well. #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; void main(const char* args, const int argc) { RegisterComponents(); //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * displays[0]->scale, 720 * displays[0]->scale, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); auto camera = CreateCamera(world); camera->Move(0, 0, -3); camera->SetClearColor(0.125f); auto box = CreateBox(world); box->SetMass(10); auto joint = CreateHingeJoint(Vec3(0), Vec3(0, 0, 1), nullptr, box); //joint = nullptr; box->AddTorque(0, 0, 1000); //Main loop while (!window->Closed() and !window->KeyHit(KEY_ESCAPE)) { if (window->KeyHit(KEY_SPACE)) { //joint = nullptr; box = nullptr; } //Update world world->Update(); //Render world world->Render(framebuffer, true); } } -
LoadMap bug when shared_ptr in entitys are set as variables
Josh replied to Andy90's topic in Bug Reports
I am testing with a simple map. The mover component does not seem to have any problem, but the door component does, so that make me think this is an issue with joints creating a circular reference. start.zip #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; void main(const char* args, const int argc) { RegisterComponents(); //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * displays[0]->scale, 720 * displays[0]->scale, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); auto camera = CreateCamera(world); camera->Move(0, 0, -3); camera->SetClearColor(0.125f); auto scene = LoadMap(world, "Maps/start.ultra"); Assert(not scene->entities[0]->components.empty()); //Main loop while (!window->Closed() and !window->KeyHit(KEY_ESCAPE)) { if (window->KeyHit(KEY_SPACE)) { scene = nullptr; } //Update world world->Update(); //Render world world->Render(framebuffer, true); } } -
LoadMap bug when shared_ptr in entitys are set as variables
Josh replied to Andy90's topic in Bug Reports
Nothing is being loaded in a new scene, it's just failing to be deleted. Probably a circular reference is being created by the engine in the component system, where the entity and component reference each other and keep each other in memory. This is all C++, right? -
What can I help you with?
-
I think program.asseteditors is a table you can iterate through, and get the asset for each one. Keep in mind some might be hidden and not have an asset. void InitEditorLuaBindings(sol::state* L) { //L->set_function("WriteFile", &lua_WriteFile); //L->set_function("OpenFile", &lua_OpenFile); //L->set_function("RequestFile", &lua_RequestFile); #ifdef _WIN32 L->set_function("CreateWindow", sol::overload( //sol::resolve<shared_ptr<Window>(shared_ptr<Display>, const WString&, const int, const int, const int, const int, const WindowStyles, shared_ptr<Window>)>(&CreateWindow), [](std::string title, const int x, const int y, const int width, const int height, shared_ptr<Window> parent, const WindowStyles style) { auto w = CreateWindow(title, x, y, width, height, parent, style); SetDarkMode(w); return w; }, [](std::string title, const int x, const int y, const int width, const int height, shared_ptr<Display> display, const WindowStyles style) { auto w = CreateWindow(title, x, y, width, height, display, style); SetDarkMode(w); return w; }, [](std::string title, const int x, const int y, const int width, const int height, shared_ptr<Window> parent) { auto w = CreateWindow(title, x, y, width, height, parent); SetDarkMode(w); return w; }, [](std::string title, const int x, const int y, const int width, const int height, shared_ptr<Display> display) { auto w = CreateWindow(title, x, y, width, height, display); SetDarkMode(w); return w; } //[](string& title, const int x, const int y, const int width, const int height) { return CreateWindow(title, x, y, width, height); } )); #endif L->new_usertype<UltraEngine::Editor::Console> ( "Console", sol::base_classes, sol::bases<Widget>(), "log", &UltraEngine::Editor::Console::log, "errorlog", &UltraEngine::Editor::Console::errorlog, "warninglog", &UltraEngine::Editor::Console::warninglog, "inputfield", &UltraEngine::Editor::Console::entry ); L->new_usertype<UltraEngine::Editor::TextureInfo> ( "TextureInfoClass", sol::base_classes, sol::bases<UltraEngine::Object>(), "mipchain", &TextureInfo::mipchain ); L->set_function("TextureInfo", [](Object* o) { std::shared_ptr<TextureInfo> i; if (o) i = o->As<TextureInfo>(); return i; }); L->new_usertype<UltraEngine::Editor::TerrainEditor> ( "TerrainEditorClass", sol::base_classes, sol::bases<UltraEngine::Object>(), "panel", &TerrainEditor::panel, "materiallist", &TerrainEditor::materiallist ); L->set_function("TerrainEditor", [](shared_ptr<UltraEngine::Object> o) { return o->As<UltraEngine::Editor::TerrainEditor>(); }); L->new_usertype<UltraEngine::Editor::AssetEditor> ( "AssetEditorClass", sol::base_classes, sol::bases<UltraEngine::Object>(), "texturemenu", &AssetEditor::texturemenu, "materialmenu", &AssetEditor::materialmenu, "modelmenu", &AssetEditor::modelmenu, "asset", &AssetEditor::asset, "window", &AssetEditor::window, "Modify", &AssetEditor::Modify, "texturepanel", &AssetEditor::texturepanel, "UpdateTexturePanel", &AssetEditor::UpdateTexturePanel ); L->set_function("AssetEditor", [](shared_ptr<UltraEngine::Object> o) { return o->As<UltraEngine::Editor::AssetEditor>(); }); L->new_usertype<UltraEngine::Editor::FilePath> ( "FilePathClass", sol::base_classes, sol::bases<UltraEngine::Object>(), "path", sol::property([](UltraEngine::Editor::FilePath& p) { return std::string(p.path.ToUtf8String()); }), "package", sol::property([](UltraEngine::Editor::FilePath& p) { return p.package; }) ); L->new_usertype<UltraEngine::Editor::AssetBrowser> ( "AssetBrowserClass", sol::base_classes, sol::bases<UltraEngine::Object>(), "SelectFile", sol::overload( [](AssetBrowser& a, std::string f) { return a.SelectFile(f); } ), "addpopupmenu", &AssetBrowser::addpopupmenu, "selectedfile", &AssetBrowser::selectedasset, "filepopupmenu", &AssetBrowser::filepopupmenu, "folderpopupmenu", &AssetBrowser::folderpopupmenu, "SelectFolder", sol::overload( [](AssetBrowser& a, std::string f) { return a.SelectFolder(f, nullptr); }, [](AssetBrowser& a, std::string f, shared_ptr<Package> p) { return a.SelectFolder(f, p); } ), "treeview", &AssetBrowser::treeview ); L->new_usertype<UltraEngine::Editor::SceneBrowser> ( "SceneBrowserClass", sol::base_classes, sol::bases<UltraEngine::Object>(), "treeview", &SceneBrowser::treeview, "addpopupmenu", &SceneBrowser::addpopupmenu ); //L->set("GetAuthToken", []() { if (not UserData["authenticationToken"].is_string()) return ""; return std::string(UserData["authenticationToken"]; } ); /*L->new_usertype<UltraEngine::PropertyGroup> ( "PropertyGroupClass", sol::base_classes, sol::bases<Widget>(), "AddProperty", sol::overload( [](PropertyGroup& p, std::string s, PropertyType t) { return p.AddProperty(s, t); } ) );*/ L->new_usertype<UltraEngine::Editor::PropertyGrid> ( "PropertyGridClass", sol::base_classes, sol::bases<Widget>(), "AddGroup", sol::overload( [](PropertyGrid& p, std::string s) { return p.AddGroup(s); }, [](PropertyGrid& p, std::string s, shared_ptr<Icon> i) { return p.AddGroup(s, i); } ) ); /*L->new_usertype<UltraEngine::Editor::AssetFile> ( "AssetFileClass", sol::base_classes, sol::bases<Object>(), "tabber", &UltraEngine::Editor::AssetFile::tabber, "asset", &UltraEngine::Editor::AssetFile::asset, "model", &UltraEngine::Editor::AssetFile::model, "propertygrid", &UltraEngine::Editor::AssetFile::propertygrid ); L->new_usertype<UltraEngine::Editor::AssetEditor> ( "AssetEditorClass", sol::base_classes, sol::bases<Object>(), "window", &UltraEngine::Editor::AssetEditor::window, "closebutton", &UltraEngine::Editor::AssetEditor::closebutton, "files", &UltraEngine::Editor::AssetEditor::files, "Close", &UltraEngine::Editor::AssetEditor::Close );*/ L->new_usertype<SceneObject> ( "GameObjectClass", sol::base_classes, sol::bases<Object>(), "GetParent", &SceneObject::GetParent, "SetName", [](SceneObject& o, std::string n) { o.SetName(n); }, "SetSelected", sol::overload( [](SceneObject& o, bool s) { o.SetSelected(s); }, [](SceneObject& o, bool s, bool r) { o.SetSelected(s, r); } ), "entity", &SceneObject::entity ); L->set("CreateGameObject", sol::overload( &CreateSceneObject, [](shared_ptr<UltraEngine::Entity> e) {return CreateSceneObject(e); }, [](shared_ptr<UltraEngine::Model> e, bool r) {return CreateSceneObject(e, r); }, [](shared_ptr<UltraEngine::Model> e) {return CreateSceneObject(e); }, [](shared_ptr<UltraEngine::Brush> e, bool r) {return CreateSceneObject(e, r); }, [](shared_ptr<UltraEngine::Brush> e) {return CreateSceneObject(e); } )); L->new_usertype<UltraEngine::Editor::OptionsWindow> ( "OptionsWindowClass", sol::base_classes, sol::bases<Object>(), "window", &UltraEngine::Editor::OptionsWindow::window, "AddSetting", [](OptionsWindow& w, std::string g, std::string n, PropertyType p) { return w.AddSetting(g, n, p); } ); L->new_usertype<UltraEngine::Editor::Project> ( "ProjectClass", sol::base_classes, sol::bases<Object>(), "name", sol::property([](UltraEngine::Editor::Project& p) { return std::string(p.name.ToUtf8String()); }), "path", sol::property([](UltraEngine::Editor::Project& p) { return std::string(p.path.ToUtf8String()); }), "properties", sol::property( [](const Project& e) { return tableplusplus::tablewrapper(e.properties); }, [](Project& e, const sol::table& t) { e.properties = t; } ), "Save", &Editor::Project::Save ); L->set("PROPERTY_BOOLEAN", PROPERTY_BOOLEAN); L->set("PROPERTY_OPTION", PROPERTY_OPTION); L->set("PROPERTY_STRING", PROPERTY_STRING); L->new_usertype<UltraEngine::Editor::Program>( "ProgramClass", "GetSelection", &UltraEngine::Editor::Program::GetSelection, "BuildGI", [](UltraEngine::Editor::Program& p) { BuildGI(); }, "AddConverter", & UltraEngine::Editor::Program::AddConverter, "title", sol::property([](UltraEngine::Editor::Program& p) { return std::string(p.apptitle.ToUtf8String()); }), //"commandline", &Editor::Program::commandline, "mainsplitter", & UltraEngine::Editor::Program::mainsplitter, "SelectNone", &UltraEngine::Editor::Program::SelectNone, "subsplitter", & UltraEngine::Editor::Program::secondsplitter, "sidepanel", sol::property([](UltraEngine::Editor::Program& p) { return p.sidepanel; }), "console", & UltraEngine::Editor::Program::console, "asseteditors", &UltraEngine::Editor::Program::asseteditors, "assetbrowser", &UltraEngine::Editor::Program::assetbrowser, "scenebrowser", &UltraEngine::Editor::Program::scenebrowser, "terraineditor", & UltraEngine::Editor::Program::terrainpanel, //"asseteditor", sol::property([](UltraEngine::Editor::Program& p) { return p.GetAssetEditor(); }), "optionsdialog", sol::property([](UltraEngine::Editor::Program& p) { return p.GetOptionsDialog(); }), "path", sol::property([](UltraEngine::Editor::Program& p) { return std::string(AppDir().ToUtf8String()); }), "window", &UltraEngine::Editor::Program::mainwindow, "ui", &UltraEngine::Editor::Program::mainui, "menu", &UltraEngine::Editor::Program::mainmenu, "world", &UltraEngine::Editor::Program::mainworld, "Quit", &UltraEngine::Editor::Program::Shutdown, "OpenAsset", sol::overload( &UltraEngine::Editor::Program::OpenAsset, [](UltraEngine::Editor::Program& p, std::string s) { return p.assetbrowser->OpenAsset(s, nullptr); }, [](UltraEngine::Editor::Program& p, std::string s, Package* ppak) { shared_ptr<Package> pak; if (ppak) pak = ppak->As<Package>(); return p.assetbrowser->OpenAsset(s, pak); } ), "ResetLayout", &UltraEngine::Editor::Program::ResetLayout, //"SetThumbnail", sol::overload( // [](shared_ptr<Widget> w, int item, std::string path) { editor->thumbmanager->SetThumbnail(w, -1, path); }, // [](shared_ptr<Widget> w, int item, std::string path, shared_ptr<Package> package) { editor->thumbmanager->SetThumbnail(w, -1, path, package); }, // [](shared_ptr<Widget> w, int item, std::string path, shared_ptr<Package> package, bool priority) { editor->thumbmanager->SetThumbnail(w, -1, path, package, priority); } //), //"settings", sol::property([](Program& p) {return tablewrapper(&p.settings); }), "settings", sol::property( [](const Program& e) { return tableplusplus::tablewrapper(e.settings); }, [](Program& e, const sol::table& t) { e.settings = t; } ), "project", &Editor::Program::project, "UpdateLayout", & UltraEngine::Editor::Program::UpdateLayout, "ClearThumbnailCache", &UltraEngine::Editor::Program::ClearThumbnailCache ); L->set("program", editor); // Custom event IDs L->set("EVENT_PROGRAMSTART", EVENT_PROGRAMSTART); L->set("EVENT_OPENASSETPREVIEW", EVENT_OPENASSETPREVIEW); L->set("EVENT_CLOSEASSETPREVIEW", EVENT_CLOSEASSETPREVIEW); L->set("EVENT_OPENASSETEDITOR", EVENT_OPENASSETEDITOR); L->set("EVENT_INITASSETEDITOR", EVENT_INITASSETEDITOR); L->set("EVENT_OPENASSET", EVENT_OPENASSET); L->set("EVENT_OPENPROJECT", EVENT_OPENPROJECT); //String formatting functions L->set_function("FormatTime", [](double s) { return std::string(FormatTime(Round(s))); }); L->set_function("FormatDate", [](double s) { return std::string(FormatDate(Round(s))); }); L->set_function("FormatBytes", [](double s) { return std::string(FormatBytes(Round(s))); });
- 1 reply
-
- 1
-
https://platform.openai.com/api-keys
-
If you open up the file "Scripts/Start/Extensions" you will see the OpenAI Lua script. You can probably open that up and create a request you can paste into your browser to make sure your key is working. Maybe just add a line that prints the request string before it gets called in the script, then you can copy and paste it from the program console.
-
0.9.4 First build with support for prefabs in the editor. Right-click on a node in the scene browser and select the "Save as Prefab" menu to save any entity as a prefab. Prefabs can be opened in the asset editor, like a model. Prefabs can be saved from the asset editor. No thumbnail renders will appear for prefabs yet.
-
Lua DLL modules need to be placed in the /Modules folder. Lua code file modules should be placed in /Source. Enet is nice to use but it doesn't support NAT punch-through, so it might not be very useful for modern networked games. The P2P system is pretty nice because when the lobby owner leaves, ownership gets transferred to another player. This acts like a dedicated server without needing to program and maintain one.
-
Occasionally I have seen their server fail: https://serverfault.com/questions/606135/curl-35-ssl-connect-error They are probably just overloaded right now. Whenever I had errors like this they went away on their own a few minutes later.
-
0.9.4 Added toolbar buttons to toggle scene / flowgraph view, flowgraph editor is now embedded in main window. Although there are a few UX issues like menus not being disabled when flowgraph is active, I am most concerned with the usability of this design. Please try it out and tell me your experience.
-
Installed a new GPU now seems to be an account issue
Josh replied to nelsoncs's topic in General Discussion
Everything looks good on your account, is this still happening?