Josh Posted November 27, 2022 Author Share Posted November 27, 2022 I still don't see where you saw it. 🤪 What you bought was a dummy subscription plan I was using for testing. I refunded your purchase. I admire your determination! 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...
DigitalBoyz Posted November 27, 2022 Share Posted November 27, 2022 2 minutes ago, Josh said: I still don't see where you saw it. 🤪 What you bought was a dummy subscription plan I was using for testing. I refunded your purchase. I admire your determination! Seem subscription item are gone now, I can't find now.... Maybe I just purchase same time your team testing... 1 Link to comment Share on other sites More sharing options...
reepblue Posted November 27, 2022 Share Posted November 27, 2022 I still had a terrible time getting the component system to work. It still doesn't seem to work out of the box. First had to add a set of quotes around my path as it had a space in it. After deleting the Component files and doing a full rebuild, I got it to compile. I think the header out of the box should have blank definitions for the Actor and Component class. This way the first Component to be written is enjoyable with Intelisense. 2 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 November 27, 2022 Author Share Posted November 27, 2022 Update Entity::Control never really stuck for me, it's called Entity::SetInput now Gamepad API changed to be more consistent with the rest of the API, documentation is already updated Other small fixes here and there 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 November 27, 2022 Author Share Posted November 27, 2022 1 hour ago, reepblue said: I still had a terrible time getting the component system to work. It still doesn't seem to work out of the box. First had to add a set of quotes around my path as it had a space in it. After deleting the Component files and doing a full rebuild, I got it to compile. I think the header out of the box should have blank definitions for the Actor and Component class. This way the first Component to be written is enjoyable with Intelisense. I found that the class name must be exactly the same as the name of the component header file. Maybe the preprocessor can be made smarter here. I uploaded a dummy ComponentSystem.h file that declares the actor and component classes so at least intellisense sees those. The way I see this working eventually is the client app will monitor the project folder and run the precompiler whenever a file in Source/Components changes. That way intellisense will update when a file is saved instead of just on the builds. 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 November 28, 2022 Author Share Posted November 28, 2022 Update Added some stuff to the mesh class: https://www.ultraengine.com/learn/Mesh_Modify?lang=cpp https://www.ultraengine.com/learn/CreateMesh?lang=cpp 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 November 28, 2022 Share Posted November 28, 2022 Would it be possible to remove a mesh from a model? my_model->RemoveMesh(this_mesh) Instead of deleting and remaking a model to remove the meshes it might save some time. Link to comment Share on other sites More sharing options...
Josh Posted November 28, 2022 Author Share Posted November 28, 2022 There is a Model::Clear() method that will remove all meshes leaving a single empty Lod. You can do this and then add the meshes in that you want it to use. 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 November 28, 2022 Author Share Posted November 28, 2022 Update Added Model::SetLodDistance: https://www.ultraengine.com/learn/Model_SetLodDistance?lang=cpp I am doing Lods by distance, not screen size. I found the latter was unpredictable. You would have an object popping in and out just by rotating it, it makes no sense at all to do things that way. 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...
klepto2 Posted November 29, 2022 Share Posted November 29, 2022 With the latest version i get the following when a Terrain is in the scene: Program: ...s\Shadow\Documents\Ultra Engine\Environment\Environment_d.exe File: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\vector Line: 1748 Expression: vector subscript out of range > Environment_d.exe!std::vector<class UltraCull::CullingLOD,class std::allocator<class UltraCull::CullingLOD> >::operator[](unsigned __int64) Unbekannt Environment_d.exe!UltraCull::CullingModel::Draw(class std::shared_ptr<class UltraCull::CameraVisibilityList> &,class std::map<class std::shared_ptr<class UltraRender::RenderMesh>,class std::shared_ptr<class UltraCull::SurfaceBatch>,struct std::less<class std::shared_ptr<class UltraRender::RenderMesh> >,class std::allocator<struct std::pair<class std::shared_ptr<class UltraRender::RenderMesh> const ,class std::shared_ptr<class UltraCull::SurfaceBatch> > > > &,class std::shared_ptr<class UltraCull::CullingWorld>,class std::shared_ptr<class UltraCull::CullingBuffer>,class std::shared_ptr<class UltraCull::CullingCamera>,class std::shared_ptr<class UltraRender::RenderCamera>,bool,int) Unbekannt Environment_d.exe!UltraCull::CullingNode::Draw(class std::shared_ptr<class UltraCull::CameraVisibilityList> &,class std::map<class std::shared_ptr<class UltraRender::RenderMesh>,class std::shared_ptr<class UltraCull::SurfaceBatch>,struct std::less<class std::shared_ptr<class UltraRender::RenderMesh> >,class std::allocator<struct std::pair<class std::shared_ptr<class UltraRender::RenderMesh> const ,class std::shared_ptr<class UltraCull::SurfaceBatch> > > > &,class std::shared_ptr<class UltraCull::CullingWorld>,class std::shared_ptr<class UltraCull::CullingBuffer>,class std::shared_ptr<class UltraCull::CullingCamera>,class std::shared_ptr<class UltraRender::RenderCamera>,bool,int) Unbekannt Environment_d.exe!UltraCull::CullingTerrain::Draw(class std::shared_ptr<class UltraCull::CameraVisibilityList> &,class std::map<class std::shared_ptr<class UltraRender::RenderMesh>,class std::shared_ptr<class UltraCull::SurfaceBatch>,struct std::less<class std::shared_ptr<class UltraRender::RenderMesh> >,class std::allocator<struct std::pair<class std::shared_ptr<class UltraRender::RenderMesh> const ,class std::shared_ptr<class UltraCull::SurfaceBatch> > > > &,class std::shared_ptr<class UltraCull::CullingWorld>,class std::shared_ptr<class UltraCull::CullingBuffer>,class std::shared_ptr<class UltraCull::CullingCamera>,class std::shared_ptr<class UltraRender::RenderCamera>,bool,int) Unbekannt Environment_d.exe!UltraCull::CullingOctreeNode::DrawEntities(class std::shared_ptr<class UltraCull::CameraVisibilityList> &,class std::map<class std::shared_ptr<class UltraRender::RenderMesh>,class std::shared_ptr<class UltraCull::SurfaceBatch>,struct std::less<class std::shared_ptr<class UltraRender::RenderMesh> >,class std::allocator<struct std::pair<class std::shared_ptr<class UltraRender::RenderMesh> const ,class std::shared_ptr<class UltraCull::SurfaceBatch> > > > &,class std::shared_ptr<class UltraCull::CullingWorld>,class std::shared_ptr<class UltraCull::CullingBuffer>,class std::shared_ptr<class UltraCull::CullingCamera>,class std::shared_ptr<class UltraRender::RenderCamera>,class UltraEngine::Vec3 const &,int,int,bool,int) Unbekannt Environment_d.exe!UltraCull::CullingOctreeNode::Draw(class std::shared_ptr<class UltraCull::CameraVisibilityList> &,class std::map<class std::shared_ptr<class UltraRender::RenderMesh>,class std::shared_ptr<class UltraCull::SurfaceBatch>,struct std::less<class std::shared_ptr<class UltraRender::RenderMesh> >,class std::allocator<struct std::pair<class std::shared_ptr<class UltraRender::RenderMesh> const ,class std::shared_ptr<class UltraCull::SurfaceBatch> > > > &,class std::shared_ptr<class UltraCull::CullingWorld>,class std::shared_ptr<class UltraCull::CullingBuffer>,class std::shared_ptr<class UltraCull::CullingCamera>,class std::shared_ptr<class UltraRender::RenderCamera>,class UltraEngine::Vec3 const &,int,bool,bool,int) Unbekannt Environment_d.exe!UltraCull::CullingCamera::BuildVisibilityLists(class std::shared_ptr<class UltraCull::CullingWorld>,class std::shared_ptr<class UltraCull::CullingBuffer>,class std::shared_ptr<class UltraCull::VisibilityList>) Unbekannt Environment_d.exe!UltraCull::CullingWorld::BuildVisibilityLists(class std::shared_ptr<class UltraCull::CullingBuffer>,class std::shared_ptr<class UltraCull::CullingWorld>) Unbekannt Environment_d.exe!UltraCull::CullingThreadManager::Update(bool) Unbekannt Environment_d.exe!UltraCore::ThreadManager::EntryPoint(class std::shared_ptr<class UltraEngine::Object>) Unbekannt Environment_d.exe!UltraEngine::Thread::thread_function(void *) Unbekannt ucrtbased.dll!00007fffce663010() Unbekannt kernel32.dll!00007ff86b7374b4() Unbekannt ntdll.dll!00007ff86bde26a1() Unbekannt Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted November 29, 2022 Author Share Posted November 29, 2022 @klepto2 I fixed the glitch. 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 November 30, 2022 Author Share Posted November 30, 2022 Update Preprocessor and library updated so that actor/component load/save in scenes works. You can run this example to see it: https://www.ultraengine.com/learn/EntityComponentSystem This is very very impressive because it means if you just stick to some simple rules, all your games have automatic save state serialization. A game like Concealment would really benefit from this. 3 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...
klepto2 Posted December 1, 2022 Share Posted December 1, 2022 Small but simple addition to the CameraControls Component: class CameraControls : public Component { public: bool freelookstarted = false; float mousesmoothing = 0.0f; float mouselookspeed = 1.0f; float movespeed = 4.0f; Vec2 freelookmousepos; Vec3 freelookrotation; Vec2 lookchange; Vec2 multiplier = Vec2(10.0,0.25); KeyCode key_slowdown = KEY_CONTROL; KeyCode key_speedup = KEY_SHIFT; KeyCode key_up = KEY_E; KeyCode key_down = KEY_Q; KeyCode key_left = KEY_A; KeyCode key_right = KEY_D; KeyCode key_forward = KEY_W; KeyCode key_backward = KEY_S; bool freelookMode = true; virtual void Update() { auto window = ActiveWindow(); if (window == NULL) return; if (freelookMode) { if (!freelookstarted) { freelookstarted = true; freelookrotation = entity->GetRotation(true); freelookmousepos = window->GetMouseAxis(); } auto newmousepos = window->GetMouseAxis(); lookchange.x = lookchange.x * mousesmoothing + (newmousepos.y - freelookmousepos.y) * 100.0f * mouselookspeed * (1.0f - mousesmoothing); lookchange.y = lookchange.y * mousesmoothing + (newmousepos.x - freelookmousepos.x) * 100.0f * mouselookspeed * (1.0f - mousesmoothing); if (Abs(lookchange.x) < 0.001f) lookchange.x = 0.0f; if (Abs(lookchange.y) < 0.001f) lookchange.y = 0.0f; if (lookchange.x != 0.0f or lookchange.y != 0.0f) { freelookrotation.x += lookchange.x; freelookrotation.y += lookchange.y; entity->SetRotation(freelookrotation, true); } freelookmousepos = newmousepos; } float speed = movespeed / 60.0f; if (window->KeyDown(key_speedup)) { speed *= multiplier.x; } else if (window->KeyDown(key_slowdown)) { speed *= multiplier.y; } if (window->KeyDown(key_up)) entity->Translate(0, speed, 0); if (window->KeyDown(key_down)) entity->Translate(0, -speed, 0); if (window->KeyDown(key_right)) entity->Move(speed, 0, 0); if (window->KeyDown(key_left)) entity->Move(-speed, 0, 0); if (window->KeyDown(key_forward)) entity->Move(0, 0, speed); if (window->KeyDown(key_backward)) entity->Move(0, 0, -speed); } }; It let you configure the keys for moving, the speed factors for slowdown or speedup and lets you suspend the freelookmode. 1 Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
klepto2 Posted December 1, 2022 Share Posted December 1, 2022 Just a few things I encountered and currently evaluating how this could be solved. Background: I want to add a very basic ocean material (or water material) which first mimics the shallow water of Leadwerks Engine. Therefore, I have checked your animated texture blog post : https://www.ultraengine.com/community/blogs/entry/2715-animated-textures/ What i noticed: the current shaders don't support animations, and I guess this is due to the changes in the material pipeline. Artifacts of this are still in the "base.vert.glsl" and I was able to recreate them, but the "fragment.glsl" just uses 2d Texture lookups currently and the Texture_Animation Def is not passed to the fragment stage. If i understand it correctly the refraction is a deffered step, after everything is rendered, so technically it is a posteffect running before all other posteffects and takes the transparent objects as an input and calculates the refraction based on the material. So back to my thinking: Water or every other liquid doesn't have fixed alpha levels. so just setting the alpha of an object just works for very rare edgecases like a glass or the fluid in the glass (very thin layers of liquids). Maybe it would be possible to set some kind of function to the refraction-step: where the real transparency is based on the real thickness of the current medium (based on the view dependend ray from the surface to the underling depth). 1 Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
reepblue Posted December 1, 2022 Share Posted December 1, 2022 On 11/27/2022 at 1:51 PM, Josh said: Gamepad API changed to be more consistent with the rest of the API, documentation is already updated Does the gamepad emit events like the keyboard/mouse? I think it should for when the controller is connected, disconnected, each button press and events when each axis hits it's maximum value. 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 1, 2022 Author Share Posted December 1, 2022 I don't know if there is any type of event emitted in Windows when a gamepad is connected. Internally, the system works by querying the state. So I don't know if there is a way to make a gamepad "wake up" the machine when it is paused waiting for an event. https://learn.microsoft.com/en-us/windows/win32/api/xinput/nf-xinput-xinputgetstate 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 1, 2022 Author Share Posted December 1, 2022 The only thing I can find is for WindowsRT: https://learn.microsoft.com/pl-pl/uwp/api/windows.gaming.input.gamepad.gamepadadded?view=winrt-22621 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 1, 2022 Share Posted December 1, 2022 I mean like have the engine itself emit an event. From my research, there are is nothing in WinAPI for polling XInput. If you were to emit an engine event in the update function based on conditions, that would be helpful. Only issue is that you'd need to poll the update function somewhere else. This will make it easier to do things like have the game paused if a controller is disconnected. I also have an idea to port my existing input code to use the Ultra API which is why I'm asking. 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 1, 2022 Author Share Posted December 1, 2022 When you call WaitEvent(), the program goes to sleep until the system emits an event. There's no way to force it awake, so plugging in a controller would not do anything. 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 1, 2022 Author Share Posted December 1, 2022 Small fixes and one rather serious fix in the shaders. Previously, using multiple cameras could have crashed your graphics driver due to some shader errors. This example will now work safely: https://www.ultraengine.com/learn/Camera_SetClearMode 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 1, 2022 Author Share Posted December 1, 2022 @klepto2Yes, the transparency/refraction does a lot, but water could use some extra features. I believe all the components are present in the refraction shader so that a new shader could handle depth-based transparency and foam in shallow water. These would require that transparency refraction be turned on for that camera. 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 1, 2022 Author Share Posted December 1, 2022 This thread has over 75,000 views. 75000 * 7.99 = $599,250 / mo. Who wants a job? 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...
reepblue Posted December 1, 2022 Share Posted December 1, 2022 16 minutes ago, Josh said: Who wants a job? Sure. 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...
Thirsty Panther Posted December 1, 2022 Share Posted December 1, 2022 I already have a job, I just want a new Game Engine Link to comment Share on other sites More sharing options...
Josh Posted December 2, 2022 Author Share Posted December 2, 2022 Since Start() and Update() are both verbs, Component::Collision has been renamed to Collide: https://www.ultraengine.com/learn/Component_Collide?lang=cpp 2 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