Jump to content

Josh

Staff
  • Posts

    24,629
  • Joined

  • Last visited

Everything posted by Josh

  1. An update is available now that addresses some of these problems, though it probably is not completely finished. Sprite corner radius is no longer supported. It was done with geometry and was always going to display bad aliasing. I think it would be better to rasterize an image for all widget blocks that use curved corners, but I am not going to get into that yet. Rectangular sprites should be pixel-perfect. The clipping should be working right also. Text looks slightly off-center to me, I will take a closer look tomorrow.
  2. I thought about doing something similar with navigation meshes, to do something like spherical pac-man.
  3. I think I am going to try eliminating the radius parameter. I don't think this will ever work correctly, and even if it did it would still be extremely aliased. rasterizing an image for each rounded widget block could look a lot better.
  4. Not if these are moved each frame, but you are right the Component::Update call won't be made without it. You can initialize a world with no physics engine. There is an optional parameter in the CreateWorld() function for this.
  5. I guess the player collider is invisible. Well, it doesn't really use a regular collider, but I guess it would be nicer if it was shown anyways.
  6. OK: #include "UltraEngine.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, 640, 480, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Create camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0.125); camera->SetPosition(float(framebuffer->size.x) * 0.5f, float(framebuffer->size.y) * 0.5f, 0.0f); //Background auto sprite = CreateSprite(world, 100, 100); sprite->SetColor(0, 0, 1); sprite->SetPosition(10, framebuffer->size.y - sprite->size.y - 10); //Border auto sprite2 = CreateSprite(world, sprite->size.x - 2, sprite->size.y - 2, true); sprite2->SetPosition(sprite->position.x + 1.0f, sprite->position.y + 1.0f, -0.1f); //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } BUG: #include "UltraEngine.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, 640, 480, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Create camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0.125); camera->SetPosition(float(framebuffer->size.x) * 0.5f, float(framebuffer->size.y) * 0.5f, 0.0f); //Background auto sprite = CreateSprite(world, 100, 100, false, 5); sprite->SetColor(0, 0, 1); sprite->SetPosition(10, framebuffer->size.y - sprite->size.y - 10); //Border auto sprite2 = CreateSprite(world, sprite->size.x - 2, sprite->size.y - 2, true); sprite2->SetPosition(sprite->position.x + 1.0f, sprite->position.y + 1.0f, -0.1f); //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } BUG: #include "UltraEngine.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, 640, 480, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Create camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0.125); camera->SetPosition(float(framebuffer->size.x) * 0.5f, float(framebuffer->size.y) * 0.5f, 0.0f); //Background auto sprite = CreateSprite(world, 100, 100, false, 0); sprite->SetColor(0, 0, 1); sprite->SetPosition(10, framebuffer->size.y - sprite->size.y - 10); //Border auto sprite2 = CreateSprite(world, sprite->size.x - 2, sprite->size.y - 2, true, 5); sprite2->SetPosition(sprite->position.x + 1.0f, sprite->position.y + 1.0f, -0.1f); //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
  7. Why would your menu world need to call World::Update()?
  8. Right you are. I needed to make the last updated world a static variable.
  9. This is probably solved, please let me know if any problem continues.
  10. This is probably solved, please let me know if any problem continues.
  11. Merging reports since they are describing the same issue.
  12. There is a limited range between the camera far and near plane. The GUI system uses the depth buffer for ordering. This makes drawing very fast because it does not have to be done in order. I seem to remember trying a similar example and writing about this? Tabbers and buttons are not meant to emit mouse events. Yes, the widget block system needs some fine tuning here. Yes, the widget block system and clipping needs some fine tuning here. Summary:
  13. The widget blocks to sprite system needs fine tuning. Once I do that then all the widgets should just automatically work right. Stay tuned...
  14. 1.0.3 Updated library with all recent bug fixes.
  15. Fixed for next build...
  16. Simplifying this a bit... #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1440, 900, displays[0]); auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->size); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->size.x * 0.5f, (float)framebuffer->size.y * 0.5f, 0); auto text1 = CreateTextArea(10, 10, 512, 30, ui->root); auto text2 = CreateTextField(10, 50, 512, 30, ui->root); text1->SetText("Hello Ultra"); text2->SetText("Hello Ultra"); while (window->KeyHit(KEY_ESCAPE) == false && window->Closed() == false) { while (PeekEvent()) { ui->ProcessEvent(WaitEvent()); } world->Update(); world->Render(framebuffer); } return 0; }
  17. If you use this code, it will work in the next build. It is necessary to set the pixmap to NULL before resetting the original pixmap, in order to trigger a change. if (ev.source == btn && ev.id == EVENT_WIDGETACTION) { //pixmap not changes paint(); drawPanel->SetPixmap(nullptr); drawPanel->SetPixmap(px); }
  18. This may be fixed already in the incoming build. I could not produce the described error on my end.
  19. Fixed, this will work correctly in the next build of the library...
  20. 1.0.3 Added some missing settings in the options window, renamed and made some things lower-case. You might lose some settings.
  21. 1.0.3 Fixed incorrect placement and disappearance of "Add Component" button. Other small fixes.
  22. I am adding a check to throw an error if more than one world uses this command.. If I moved all the Newton collider code into the main thread, than multiple worlds updating simultaneously would probably work. Maybe in the future I will do this. (Assuming the recast pathfinding code is also thread-safe.)
×
×
  • Create New...