Jump to content

Josh

Staff
  • Posts

    23,257
  • Joined

  • Last visited

Everything posted by Josh

  1. I have the skeleton issue solved, I think. Unrelated, it looks like textures are not being properly deallocated, so it runs out of slots after loading the scene a few times...stay tuned...
  2. I am pretty sure this has something to do with the management of skeleton IDs.
  3. Apparently a copy of a skeleton works fine, but a copy of a copy does not...
  4. And if you manually set the skeleton it fixes the problem... #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -4); camera->SetClearColor(0, 0, 1); auto actor = CreateActor(camera); actor->AddComponent<CameraControls>(); auto model = LoadModel(world, "Models/props/energycatcher.mdl"); shared_ptr<Entity> inst; auto skel = model->skeleton; while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE)) { inst = LoadModel(world, "Models/props/energycatcher.mdl");; inst->SetPosition(0, 0, 2); model->SetSkeleton(skel); inst->As<Model>()->SetSkeleton(skel); } world->Update(); world->Render(framebuffer); } return 0; }
  5. In fact, just creating an instance of the model is enough to destroy the original. It must be a problem with the skeleton... #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -4); camera->SetClearColor(0, 0, 1); auto actor = CreateActor(camera); actor->AddComponent<CameraControls>(); auto model = LoadModel(world, "Models/props/energycatcher.mdl"); shared_ptr<Entity> inst; while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE)) { inst = model->Instantiate(world); inst->SetPosition(0, 0, 2); } world->Update(); world->Render(framebuffer); } return 0; }
  6. It's a lot easier just to test the one model like this: #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -4); camera->SetClearColor(0, 0, 1); auto actor = CreateActor(camera); actor->AddComponent<CameraControls>(); auto box = CreateBox(world); box->SetPosition(0, -1, 0); auto model = LoadModel(world, "Models/props/energycatcher.mdl"); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE)) { model = LoadModel(world, "Models/props/energycatcher.mdl"); } world->Update(); world->Render(framebuffer); } return 0; }
  7. Oh, I was looking at the emitter device. The catcher does indeed fail to load:
  8. I'm not able to see any errors with the code below: got it! #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -4); camera->SetClearColor(0, 0, 1); auto actor = CreateActor(camera); actor->AddComponent<CameraControls>(); auto scene = LoadScene(world, "maps/lvl8.map"); auto box = CreateBox(world); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_SPACE)) { scene = NULL;// works with or without this line scene = LoadScene(world, "maps/lvl8.map"); } world->Update(); world->Render(framebuffer); } return 0; } Fog isn't supported yet. I can't see any other apparent problems in level 8. This should be solved, but since it is a fairly simple cosmetic issue I'd like to try to focus on other things first.
  9. There are two different systems. DLCs are official add-ons. The Workshop consists of user-created content, some of which is free and some of which is paid.
  10. Hi, yes this is the best place to get help with Leadwerks. 😃 This message indicates that Leadwerks is not able to retrieve file information in the Steam user-generated content system. However, I don't think this will affect the DLC nistallation. When the DLC files have been installed in your project, you will find the Zone map in the maps folder, and a lot of models and materials in their folders as well in your project. Have these files been added to your project?
  11. My mistake, it is using the x position, not the z position...update is available now.
  12. Update Modifying a widgetblock texture will now work correctly Removed a lot of unimplemented camera methods, including fog commands There is a "z'" member of the widget class now that stores the Z-position of the first widget block's sprite. This is a temporary hack and it will eventually go away
  13. This is because the system doesn't see that anything it is looking for has changed. The system uses currently pixmaps, not textures, although I can certainly see the usefulness for textures in 3D interfaces. I will need to think about this.
  14. The default pixmap position mode is PIXMAP_CENTER. This places the image in the center of the widget, but does not stretch or squeeze the image to fill the widget. There are other options that can be used to change the size the image is displayed at. However, if you were to fit the image into a panel half its size, the one-pixel border on the edges would likely not be visible. When the panel is sized to the same size as the image, the image border is visible. This example also shows that the panel on the left, which uses the PANEL_BORDER style, has an error in its drawing, as the border is one pixel off where it should be. However, these small artifacts are the lowest priority to solve right now.
  15. You just need to send events to the interface, since it is not created on a window, and it will work fine: while (PeekEvent()) { auto ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETACTION: Print("Widget action: " + String(ev.data)); break; case EVENT_WINDOWCLOSE: return 0; break; } ui->ProcessEvent(ev); } You probably want to change the widget background color because right now your draw method creates white text on a white background.
  16. I notice the signs have a strange error in their cubemap reflections. If I recall correctly, this is caused by texture assignment in a custom shader...there's a texture being used for a normal map that isn't a normal map, something like that.
  17. @reepblue I'm not sure what I am looking for. Everything looks okay if I use this code to load a map: #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -4); camera->SetClearColor(0,0,1); auto actor = CreateActor(camera); actor->AddComponent<CameraControls>(); auto scene = LoadScene(world, "maps/lvl6.map"); auto box = CreateBox(world); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
  18. I was actually looking at this recently. I used spreadshirt for the hoodies, which I feel were very nice. Unfortunately they “streamlined” their system so you cannot sell items made with the design tool. You can only upload a single logo and it just automatically applies it everywhere. The hoodies looked awesome because they had print on the front, back, and down one sleeve. there are some other sites that do the same thing but I have not looked into it thoroughly yet.
  19. Why indeed? I am looking into this. Stay tuned for more fun tomorrow...
  20. Ah, you have discovered why I keep talking about consistency. I was trying to figure out why none of the sprite creation code was getting called, and finally realized you created the interface on a window. So naturally, a Vulkan texture would not appear. auto ui = CreateInterface(window);
  21. Thank you. I updated the example here: https://github.com/UltraEngine/Documentation/blob/master/CPP/CustomWidgets.md It will take 24 hours for the documentation cache to refresh, so just copy it from Github.
  22. Is the child always in the way, and doesn't get used for anything? Is it just decorative? If that is the case, you can call child->SetInteractive(false) and it will be ignored by events. Any mouse events will occur on the parent, and the child will be considered just visual. This is how I made the icon and text labels appear on the project buttons in the client app.
  23. Does this only happen when fog is enabled, or all the time?
  24. Moved here so I don't lose track of this...
  25. Update Fixed zip file slow loading speed Zip packages are now detected by examining the file header instead of checking the file extension, so you can name them anything you want and they will still work
×
×
  • Create New...