Jump to content

Josh

Staff
  • Posts

    23,126
  • Joined

  • Last visited

Everything posted by Josh

  1. Update Adjusted depth settings when early z-pass is disabled.
  2. Here is a simpler example that demonstrates 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 framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Create a ortho camera auto camera2D = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera2D->SetClearColor(0, 0, 1); camera2D->SetPosition((float)framebuffer->size.x * 0.5f, (float)framebuffer->size.y * 0.5f, 0); //Create sprite auto sprite = CreateSprite(world, 400, 400); auto mtl = CreateMaterial(); sprite->SetMaterial(mtl); auto sprite2 = CreateSprite(world, 400, 400); sprite2->SetColor(1, 0, 0); sprite2->SetPosition(500, 0, 0); //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { camera2D->SetDepthPrepass(window->KeyDown(KEY_SPACE)); world->Update(); world->Render(framebuffer); } return 0; }
  3. The render layers are a bitwise flag. You can assign multiple layers to the drawn object or the camera, and if they have a value in common then the camera draws that entity.
  4. I think the API is stable, but it is possible there could be some small changes.
  5. Update Adjusted depth settings in transparency pass UTF-8 string conversion back to wide string no longer supported because it's unreliable
  6. Wow, there is a lot of stuff going on in your game. This is all with Lua?
  7. Update Fixed package stream path error Fixed z-sorting
  8. Update Added package support. Zip archive support is built-in. Zlib was alreday included in the engine in FreeImage, and I couldn't figure out any way to pass a password to a DLL plugin without it being easily intercepted, so I made it native. You must add the following search header path to your existing projects: "$(UltraEnginePath)\Include\Libraries\zlib"
  9. Custom shaders is not something Ultra is good at right now. The shaders are MASSIVE and Vulkan is extremely strict when linking shader modules. Eventually, I envision a node-based shader editor that outputs an entire shader family.
  10. Try this: Update your graphics driver Delete the file "Documents/Leadwerks/setting.cfg" Install OpenAL: https://www.openal.org/downloads/ Install the VC redistributable: https://aka.ms/vs/17/release/vc_redist.x64.exe
  11. Josh

    Strategy

    I came across this discussion when searching for "Ultra Engine": https://www.reddit.com/r/gamedev/comments/zo4dm1/easiest_game_engine_for_high_performance/ This is extremely interesting. The author asks a valid question, but everyone makes excuses, or they attack him since he obviously is not worthy of having his game run fast. I have no idea who this person is, but this is why I found the thread: I would not have thought to frame this in terms of ease-of-use, but that is a serious consideration. There has always been this attitude that only a good developer can "optimize" a game the right way. I even mentioned this in my talk at I/ITSEC. But when I visited NASA, I found they had the same exact problem as beginners...they just wanted their unoptimized 3D models to run fast, they did not want to spend tons of time coaxing the engine to run right. So there is a focused message that is going out, it resonates with people, and they are putting it into their own words and spreading the news. Very very interesting. This is the most interesting thing I have seen in my entire tech career.
  12. I do not know yet. In any case, the components are included into the source by the precompiler, so it's not hard to change the location if needed. I think the precompiler will search subfolders of "Components" as well.
  13. I don't know what that means?
  14. Update Fixed spotlight culling error Fixed Leadwerks texture cubemap loading error Fixed BC2 texture format loading in Leadwerks TEX format
  15. I think any wallet that lets you send to an address will work, but let me look into it more. I also need to make sure its legal for me to sell in you region. I think all these companies are "voluntarily" enforcing their own sanctions. I don't think it's my place to make up fake laws, I will just follow what the actual legal requirement is.
  16. I don't have any way to integrate Xsolla right now, but it is possible for me to enable crypto payments.
  17. There was a big problem with profile spam on this site. Accounts were being created that never posted any content, but just added some irrelevant links to their profile "About Me" section, I guess to try to hack the SEO of their clients. From now on, only accounts that have an Ultra subscription can edit their "About Me" section. I don't have the ability to easily control which groups have that info appear, but I do have the ability to toggle which groups can edit it. Therefore, I was not able to save the existing information on accounts, but rather I had to just create a new field to display. Bottom line is, those in the "Developer" group can now edit their profile "About" section, and all the profile spam on this site was successfully nuked. All accounts can now delete your own attachments without editing the content they appear in: https://www.ultraengine.com/community/attachments/?sortby=attach_filesize&sortdirection=desc You can use this to manage your space if you need to. Developer accounts now also have the ability to hide, delete, and lock their own posts / content. You can also moderate comments on your own blogs.
  18. Done, I just had to include the Vulkan memory allocator library as a C++ header, instead of placing it in an extern "C" block. Will include in the next update.
  19. Here is an example of a derived class. I create a panel for the area of the interface this is creating, and add all the widgets it uses. For any widgets it uses, I call Listen() so those events will get evaluated by ProcessEvent(), where they are all handled: AboutWindow.h #pragma once #include "UltraEngine.h" #include "../Editor.h" class AboutWindow : public UIElement { public: shared_ptr<Window> window; shared_ptr<Widget> closebutton; virtual bool Initialize(shared_ptr<Window> parent); virtual bool ProcessEvent(const Event& e); }; AboutWindow.cpp #pragma once #include "UltraEngine.h" #include "../Editor.h" bool AboutWindow::Initialize(shared_ptr<Window> parent) { int statusheight = 40; iVec2 size = iVec2(600,380); window = CreateWindow("",0,0,size.x,size.y,parent,WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_HIDDEN); auto ui = CreateInterface(window); //ui->root->SetColor(0, 0, 0, 1); auto panel = CreatePanel(0,0,ui->root->size.x,ui->root->size.y-statusheight,ui->root, PANEL_BORDER); panel->SetColor(panel->color[WIDGETCOLOR_SUNKEN]); panel->SetLayout(1, 1, 1, 1); WString apptitle, appversion; apptitle = JSONGetString(editor->config["appTitle"]); appversion = JSONGetString(editor->config["appVersion"]); auto label = CreateLabel(apptitle + " " + appversion + "\nCopyright Ultra Software 2021", 4, 0 + ui->root->ClientSize().y - statusheight, panel->ClientSize().x, statusheight, ui->root, LABEL_MIDDLE); label->SetLayout(1, 0, 0, 1); label->SetFontScale(editor->smallfontscale); label->SetColor(editor->smallfontcolor, WIDGETCOLOR_FOREGROUND); auto logopanel = CreatePanel(0, panel->size.y / 2 - 40, panel->size.x*0.6, 60, panel); auto logo = LoadIcon("Icons/UltraEngine.svg"); auto logop = logo->Rasterize(0.4); logopanel->SetPixmap(logop); auto splash = LoadPixmap("splashscreen.dds",0,0,LOAD_QUIET); panel->SetPixmap(splash,PIXMAP_COVER); logopanel->SetColor(1, 1, 1, 0); auto link = CreateHyperlink(JSONGetString(editor->config["url"]), ui->root->size.x - 150 - 4, ui->root->size.y - statusheight, 150, statusheight, ui->root, LABEL_MIDDLE | LABEL_RIGHT); link->SetLayout(0, 1, 0, 1); link->SetFontScale(editor->smallfontscale); link->SetColor(editor->smallfontcolor, WIDGETCOLOR_FOREGROUND); closebutton = CreateButton("Close",-200,-200,100,100,ui->root,BUTTON_CANCEL); //Listen for events Listen(EVENT_WIDGETACTION, closebutton); Listen(EVENT_WINDOWCLOSE, window); //Rescale interface if (parent->display->scale != 1.0f) { size.x = window->size.x * parent->display->scale; size.y = window->size.y * parent->display->scale; window->SetShape((parent->display->size.x - size.x)/2, (parent->display->size.y - size.y)/2,size.x,size.y); ui->SetScale(parent->display->scale); } return true; } bool AboutWindow::ProcessEvent(const Event& e) { switch (e.id) { case EVENT_WIDGETACTION: if (e.source == closebutton) { EmitEvent(EVENT_WINDOWCLOSE, window); } break; case EVENT_WINDOWCLOSE: if (e.source == window) { window->GetParent()->Activate(); window->SetHidden(true); } break; } return true; }
  20. Update Fixes a texture loading error. The reason for this problem is I got more strict to prevent mipmaps with dimensions less than 4x4 from being used when a compressed format is in use. Lua initialization will no longer be triggered by loading Leadwerks map files.
  21. Update Fixed terrain bug when flat terrain's height is modified Updated preprocessor
  22. I use this as my base class and make derived classes for each major part of a program, usually a window or some panel with a lot of controls on it. You can listen for a specific widget and evaluate everything that happens in ProcessEvent(): UIElement.hUIElement.cpp
  23. Thank you. I will be very curious to hear your thoughts once you have had some time.
  24. @SpiderPigThanks for the example, that was an easy fix. Update is available now. The reason this was kind of tricky to get right is because Ultra does not draw 2D graphics in the order they are supposed to appear. It uses the depth buffer to determine which object should be in front of another, just like the rasterizer does in regular 3D rendering. That means it does not have to switch materials when drawing a batch, and makes it really fast with complicated interfaces.
×
×
  • Create New...