-
Posts
24,629 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Josh
-
Updated Lua executables with finished Lua API bindings. Lua docs are done.
-
Ultra uses PBR materials / lighting.
-
You can use Transform:Normal(0,0,1,entity,nil): https://www.leadwerks.com/learn?page=API-Reference_Object_Math_Transform_Normal
-
It looks like the Unity "forward" constant is just Vec3(0,0,1). What exactly are you trying to do? Maybe entity.move(0,0,1) is what you are looking for?
-
Leadworks as Game Engine for Commercial Projects ?
Josh replied to Andy90's topic in General Discussion
Leadwerks maps, models, materials, and textures will load in Ultra. Code needs to be updated, but the Ultra API is very similar to Leadwerks. -
Leadworks as Game Engine for Commercial Projects ?
Josh replied to Andy90's topic in General Discussion
Ultra Engine is going to be the successor to Leadwerks, and it's only a couple of weeks away from the first release. The license is about the same as Leadwerks but the performance in Ultra is very very fast, like 10x faster than Leadwerks or Unity. You can use just C++ if you like, and in Ultra the C++ support is better fleshed out, with an entity component system that works with C++. -
I come in house tonight. I pick good time
-
I come to your house and borrow
-
What GPU that be?
-
This demonstrates that you can call collectgarbage() every frame in Lua with no effect on the framerate: -- Define a function that performs intensive calculations and variable allocation function testGarbageCollection() local iterations = 1 -- Adjust the number of iterations as needed -- Perform calculations and variable allocation in a loop for i = 1, iterations do -- Intensive calculations (e.g., math operations) local result = math.sqrt(i) * math.sin(i) * math.cos(i) -- Allocate tables with random data local table1 = {} for j = 1, 10 do table1[j] = math.random() end -- Create temporary strings local str = "" for j = 1, 10 do str = str .. tostring(math.random()) end -- Let's intentionally create some cyclic references local cyclicTable = {} cyclicTable.circularRef = cyclicTable -- Simulate resource-intensive operations local resourceIntensiveData = {} for j = 1, 10 do resourceIntensiveData[j] = {} for k = 1, 10 do resourceIntensiveData[j][k] = math.random() end end end return "Test completed" -- Return a message when the test is done end -- Call the function to trigger the test print(testGarbageCollection()) --Get the displays local displays = GetDisplays() -- Create a window local window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[1], WINDOW_CENTER | WINDOW_TITLEBAR) -- Create a world local world = CreateWorld() -- Create a framebuffer local framebuffer = CreateFramebuffer(window) -- Create a camera local camera = CreateCamera(world) camera:SetClearColor(0.125) camera:SetPosition(0, 0, -4) -- Create a light local light = CreateBoxLight(world) light:SetRotation(45, 35, 0) light:SetRange(-10, 10) light:SetColor(2) -- Create a model local model = CreateBox(world) model:SetColor(0, 0, 1) -- Main loop while not window:Closed() and not window:KeyDown(KEY_ESCAPE) do model:Turn(0, 1, 0) world:Update() world:Render(framebuffer, false) testGarbageCollection() if window:KeyDown(KEY_SPACE) then collectgarbage() end end
-
My focus is locked into the Lua API and docs right now, but I will get to this afterwards...
-
Ah, check the Lua example...
-
It's ready now: https://www.ultraengine.com/learn/Framebuffer_Capture?lang=cpp
-
Updated Lua executables and C++ library. Added Framebuffer::GetCaptures Removed World::GetFrameCaptures All Lua documentation finished and working up through the "Graphics" category.
-
Working on docs: https://www.ultraengine.com/learn/Map_Reload?lang=cpp
-
Call Framebuffer::Capture to take the screenshot. The result will not be available immediately. In your main loop, call world->GetFrameCaptures() each loop, and handle any results it gives you there. In the next build this will be changed to Framebuffer::GetCaptures(), and it will return a resizable array of pixmaps.
-
I think this is fixed now.
-
I am looking into this. I fixed something in the event handlers that probably caused it.
-
As I suspected there is no perfect solution when the target rotation is 180 degrees opposite from the current rotation, because one degree of freedom is lost. I'm not sure at this point what should be done or if this is just the way things work.
-
Yeah, that's the idea. This appears to be working: auto p = CreatePivot(NULL); p->AddComponent<Mover>(); auto map = std::make_shared<Scene>(); map->AddEntity(p); map->Save("Maps/out.ultra"); Here is the output: { "scene": { "base": [], "entities": [ { "castShadows": false, "collisionType": 0, "extras": { "components": { "Mover": { "globalcoords": false, "movementspeed": [ 0, 0, 0 ], "rotationspeed": [ 0, 0, 0 ] } } }, "pickMode": 0, "reflection": true, "uuid": "ffe028a9-4abe-49de-ba7b-30c2373cf196" } ] } }
-
This method just creates a scene object and adds the world entities to it. However, the functionality to add all entities into a list of weak pointers was never added! The fastest fix is for me to just remove this method and the user can create a scene and add entities themselves.
-
The bug is the fact that the event constant is still in there. Use World:GetFrameCaptures() instead of this approach.
- 1 reply
-
- 1
-
Updated C++ library to fix GetEntity() returning NULL in Start method. Lua executables updated, support is finished for all classes in docs up through GamePad.
-
For the reason you pointed out, the raw pointer is removed and you should use GetEntity() instead.
-
Component GetEntity() is null within Start function.
Josh replied to reepblue's topic in Bug Reports
How is the component being added?