-
Posts
24,629 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Josh
-
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.
-
I thought about doing something similar with navigation meshes, to do something like spherical pac-man.
-
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.
- 1 reply
-
- 1
-
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.
-
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.
-
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; }
-
Why would your menu world need to call World::Update()?
-
Maybe? I don't recommend it!
-
Right you are. I needed to make the last updated world a static variable.
-
This is probably solved, please let me know if any problem continues.
-
Widget flashes purple while changing an icon or pixmap
Josh replied to Dreikblack's topic in Bug Reports
This is probably solved, please let me know if any problem continues. -
Merging reports since they are describing the same issue.
-
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:
-
The widget blocks to sprite system needs fine tuning. Once I do that then all the widgets should just automatically work right. Stay tuned...
-
1.0.3 Updated library with all recent bug fixes.
-
Fixed in next build...
-
Fixed for next build...
-
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; }
-
Pixmap not updates visually in UI in real time rendering
Josh replied to Dreikblack's topic in Bug Reports
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); } -
Widget flashes purple while changing an icon or pixmap
Josh replied to Dreikblack's topic in Bug Reports
This may be fixed already in the incoming build. I could not produce the described error on my end. -
Fixed, this will work correctly in the next build of the library...
-
1.0.3 Added some missing settings in the options window, renamed and made some things lower-case. You might lose some settings.
-
Awaiting response...
-
1.0.3 Fixed incorrect placement and disappearance of "Add Component" button. Other small fixes.
-
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.)