-
Posts
2,600 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by reepblue
-
It seems the player's physics doesn't get sync'd when Map::Reload is called. I pushed the example to the XFORM project. See bugreport_saveload.ultra. The IO is set up so KEY_D5 saves the map, and KEY_D6 reloads the file via the flowgraph.
-
I would like to have the publisher to be an extension or an open-source application. If it's an application separate from the editor, people can make builds of their games without launching the editor by running it through a command line. Different people have different needs. I recommend making a generic packager and allowing end-users to modify if needed. One thing I'm liking about Ultra Engine over Leadwerks is that the editor is more configurable. Please keep going with this!
-
You can already set the surface property in a material file as described here! The issue is how the physics system works in Ultra. Due to the brushes being a convex hull, getting the face is harder/not possible to do. We've had many discussions about this but it sounds like Josh doesn't want to touch the physics engine unless he has to.
-
This works great, thank you! local extension = {} function extension:RunLuac(file) local luac = AppDir().."/Tools/luac.exe" local o = " -o " .. "\"" .. StripExt(file)..".luac\" " local f = "\"" .. file .. "\"" if FileType(luac) == 0 then Print("Error: Failed to locate luac!") return end local command = "\"" .. luac .."\"" .. o .. f command = Replace(command, "/", "\\") Print(command) Command(command) end function ExecuteDir(path) local dir = LoadDir(path) for _, file in ipairs(dir) do local filepath = path .. "/" .. file; local t = FileType(filepath) if t == 1 then if ExtractExt(file) == "lua" then extension:RunLuac(filepath) end elseif t == 2 then ExecuteDir(filepath) end end end function extension.hook(event, extension) if event.id == EVENT_WIDGETACTION then ExecuteDir(CurrentDir().."/Source") ExecuteDir(CurrentDir().."/Scripts") end end -------------------------------------------------------------------- -- Add menu item -------------------------------------------------------------------- local menu = program.menu:FindChild("Scripting", false) if menu ~= nil then local submenu = menu:FindChild("Utilities", false) if submenu == nil then submenu = CreateMenu("Utilities", menu) end extension.menuitem = CreateMenu("Compile Lua Scripts", submenu) ListenEvent(EVENT_WIDGETACTION, extension.menuitem, extension.hook, extension) end
-
This replaces the "Open in VSCode" batch file and makes it into a menu item for all projects. local extension = {} function extension.hook(event, extension) if event.id == EVENT_WIDGETACTION then Command("code . ") end end -------------------------------------------------------------------- -- Add menu item -------------------------------------------------------------------- local menu = program.menu:FindChild("Scripting", false) if menu ~= nil then extension.menuitem = CreateMenu("Open in Visual Studio Code", menu) end ListenEvent(EVENT_WIDGETACTION, extension.menuitem, extension.hook, extension)
-
WebM might be a good format. The WebM Project | Welcome to the WebM Project
-
This was very helpful, thank you. One change I added was this function that will preference the .luac version of the script if present. I replace all my RunScript calls with this. bool RunCompiledScript(const WString& path) { auto p = StripExt(path); // If there is a .luac version of this file, run it instead. if (FileType(p + ".luac") != 0) return RunFile(p + ".luac"); return RunScript(path); }
-
The source for the Lua app seems to be out of date. Not only it still references the scripts are located under a script folder, but my main issue is that the function "CommandLine()" isn't valid in my application while I was thinking it was part of the engine's API. Can I get the source for this, or can this actually be in the engine so I can recreate the Lua application myself? I want my application to use Lua but have my C++ systems integrated and exposed using sol.
-
This is what I did in Cyclone. There's that 0.001% chance were the doors might snap open/close though.
-
If for example you create 2 pivots and parent them together, and then go into the scene tree, select the child, you cannot move it on the left and back viewports. But you can move it on the top.
-
Found it! 1) Make a map, build the GI, save it and close in the editor. 2) Reopen the editor with the map, add a pivot or something, save, and close the editor. 3) Reopen the editor and map and the reflection should be missing. I'll send you a video over discord.
-
It's been happening for a bit but I'll keep you posted. I have a strong hunch it's git when commits are being made.
-
I tried it with OBS recording but obviously didn't trigger. Only other thing I can think of is maybe after an update. I would try reloading that map you've tested another time. Maybe it can also be related to git and how the line ending changes. Every project I have is sync'd with git.
-
Oh wow, I ended up finding a bug!
-
I tried that too as mentioned in the opening post but nothing seemed to happen. Tried CreateProcess and it's still not outputting the luac files. I'll probably have better luck using a batch file. It's possible that UAC is getting in the way. local extension = {} function extension:RunLuac(file) local luac = AppDir().."/Tools/luac.exe" local o = " -o " .. "\"" .. StripExt(file)..".luac\" " local f = "\"" .. file .. "\"" if FileType(luac) == 0 then Print("Error: Failed to locate luac!") return end Print(luac .. o .. f) --Command("cd " .. CurrentDir()) CreateProcess("\"" .. luac .."\" " .. o .. f) --local exitcode = proc:Wait() --Print("Process ended (" .. tostring(exitcode) .. ")") --if RunFile("\"" .. luac .. "\"" .. o .. f ) ~= 0 then -- Print("Success!") --end end function ExecuteDir(path) local dir = LoadDir(path) for _, file in ipairs(dir) do local filepath = path .. "/" .. file; local t = FileType(filepath) if t == 1 then if ExtractExt(file) == "lua" then extension:RunLuac(filepath) end elseif t == 2 then ExecuteDir(filepath) end end end function extension.hook(event, extension) if event.id == EVENT_WIDGETACTION then ExecuteDir(CurrentDir().."/Source") ExecuteDir(CurrentDir().."/Scripts") end end -------------------------------------------------------------------- -- Add menu item -------------------------------------------------------------------- local menu = program.menu:FindChild("Scripting", false) if menu ~= nil then local submenu = menu:FindChild("Utilities", false) if submenu == nil then submenu = CreateMenu("Utilities", menu) end extension.menuitem = CreateMenu("Compile Lua Scripts", submenu) ListenEvent(EVENT_WIDGETACTION, extension.menuitem, extension.hook, extension) end
-
I've been noticing that every time I restart the editor and load a map with global illumination already built, I see the default cubemap in the reflections. A great map to test this is the Maps/testroom.ultra in XFORM. It seems like I have to rebuild the reflections every time the map changes or I restart the editor!
-
Maybe CreateProcess() is what I wanted.
-
I've tried to make an extension that'll compile all lua code in the project, but the Command/Run File doesn't seem to work. The printed command line looks fine and returns true when finished. local extension = {} function extension:RunLuac(file) local luac = AppDir().."/Tools/luac.exe" local o = " -o " .. "\"" .. StripExt(file)..".luac\" " local f = "\"" .. file .. "\"" if FileType(luac) == 0 then Print("Error: Failed to locate luac!") return end Print(luac .. o .. f) --Command("cd " .. CurrentDir()) if RunFile("\"" .. luac .. "\"" .. o .. f ) ~= 0 then Print("Success!") end end function ExecuteDir(path) local dir = LoadDir(path) for _, file in ipairs(dir) do local filepath = path .. "/" .. file; local t = FileType(filepath) if t == 1 then if ExtractExt(file) == "lua" then extension:RunLuac(filepath) end elseif t == 2 then ExecuteDir(filepath) end end end function extension.hook(event, extension) if event.id == EVENT_WIDGETACTION then ExecuteDir(CurrentDir().."/Source") end end -------------------------------------------------------------------- -- Add menu item -------------------------------------------------------------------- local menu = program.menu:FindChild("Scripting", false) if menu ~= nil then local submenu = menu:FindChild("Utilities", false) if submenu == nil then submenu = CreateMenu("Utilities", menu) end extension.menuitem = CreateMenu("Compile Lua Scripts", submenu) ListenEvent(EVENT_WIDGETACTION, extension.menuitem, extension.hook, extension) end
-
This is what it looks like at 100% dpi at 1080p. The window size isn't tall enough, and the alpha box is too close to the edge. A little upset that drag and drop does not work, and the previews don't display some 4k images, but that could be the formatting,
-
I think you fixed this months ago. I haven't had a problem since but I haven't been mapping as much lately.
-
I know we discussed having it be a feature, but I don't think this was intended. Just add mass to an object and hold down the right mouse button in the viewport. https://cdn.discordapp.com/attachments/1175951843612954786/1259252137985052853/2024-07-06_16-57-39.mp4?ex=668b0171&is=6689aff1&hm=e05802c3d7ae7bfe5ae31592ca4f90af7a5a1386eb8ed92bbea2c5beb1369997&
-
I'm able to teleport my player around fine in my project. Did you try entity->Sync()? Ultra Engine - Best game engine for VR optimized for fastest virtual reality 3D performance You might also want to try disabling the physics before the swap and then resetting it after. The idea is that you want the physics and rendering thread to catch up. Maybe this can be done internally? // Disable Physics entity->SetPhysicsMode(PHYSICS_DISABLED); // Swap the positions entity->SetPosition(0,0,0); entity->Sync(); // Renable Physics entity->SetPhysicsMode(PHYSICS_PLAYER);
-
This is in the XFORM project currently. If you use multiple cameras for rendering and load in a map with post effects, this will be the result. This is how I'm creating the camera. void FPSWeapon::AttachToPlayer(std::shared_ptr<Component> playercomponent) { // Set up the camera for the viewmodel. Start(); auto entity = GetEntity(); auto world = entity->GetWorld(); auto player = playercomponent->As<FirstPersonControls>(); if (player) { auto playercam = player->GetCamera(); if (playercam != NULL) { if (drawonlayer) { viewmodelcam = CreateCamera(world); viewmodelcam->SetClearColor(0, 0, 0, 0); viewmodelcam->SetClearMode(CLEAR_DEPTH); viewmodelcam->SetMatrix(playercam->GetMatrix(true), true); viewmodelcam->SetFov(viewmodelfov); viewmodelcam->SetRange(0.001f, playercam->GetRange().y); viewmodelcam->SetOrder(RENDERLAYER_VIEWMODEL); viewmodelcam->SetRenderLayers(RENDERLAYER_VIEWMODEL); viewmodelcam->SetParent(playercam); entity->SetParent(viewmodelcam); entity->SetRenderLayers(RENDERLAYER_VIEWMODEL); viewmodel.lock()->SetRenderLayers(RENDERLAYER_VIEWMODEL); } else { playercam->SetRange(0.001f, playercam->GetRange().y); entity->SetParent(playercam); } } playerentity = player->GetEntity(); } } Full code here: XFORM/Source/Components/Weapons/FPSWeapon.cpp at main · UltraEngine/XFORM (github.com)