Jump to content

Dreikblack

Members
  • Posts

    323
  • Joined

  • Last visited

Everything posted by Dreikblack

  1. Style should make UI looks brown (to check if it's loaded correctly) Also file name is looks wrong if it's not Latin symbolsData.zip #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto package = LoadPackage("Data.zip"); if (package == nullptr) { Notify("No Package Found"); } package->FileType(""); auto plugin = LoadPlugin("Plugin\\FITextureLoader"); if (!plugin) Notify("No plugin Found"); else Notify("Plugin Found"); auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 500, 500, displays[0], WINDOW_DEFAULT); auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, font, framebuffer->GetSize()); ui->SetRenderLayers(2); auto uiCamera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); uiCamera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); uiCamera->SetRenderLayers(2); uiCamera->SetClearMode(CLEAR_DEPTH); ui->LoadColorScheme("Style.json"); auto btn = CreateButton("TEST", 10, 10, 100, 100, ui->root); auto dir = LoadDir("Ru"); for (WString localFile : dir) { btn->SetText(localFile); Print(localFile); } //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
  2. Still not working after latest update
  3. 1. Applied trigger mat to a box brush 2. Fixed UV with face tool (right brush) 3. Saved as prefab 4. Dragged prefab into scene - it look like below. After dragging it's changing UV again and may become as at left After reopening map UV changes again and looks like at bottom one.
  4. After VS update i managed to build a projects
  5. I'm using VS 2022 17.6.4. Created a new project - same error.
  6. "Il mismatch between 'P1' version '20230904' and 'P2' version '20221215'"
  7. Error: Failed to load texture "progs/s_explod.spr" rerelase pak0.pak Quad model loads without errors in a console in this example #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, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create framebuffer auto framebuffer = CreateFramebuffer(window); auto plg = LoadPlugin("Plugins/FITextureLoader"); auto quakeLoaderPlugin = LoadPlugin("Plugins/QuakeLoader"); WString path = AppDir(); auto pak = LoadPackage(path + "/PAK0.PAK"); //Create world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetPosition(0, 0, -4); //Create a light auto light = CreateBoxLight(world); light->SetRotation(45, 35, 0); light->SetRange(-10, 10); light->SetColor(2); auto box = CreateBox(world, 1); auto pixmap = CreatePixmap(100, 100); pixmap->Fill(Vec4(0.5f, 0.5f, 0.5f, 1.0f)); auto texture = LoadTexture("progs/s_explod.spr"); auto model = LoadModel(world, "progs/quaddama.mdl"); auto material = CreateMaterial(); material->SetTexture(texture); material->SetShadow(false); material->SetTransparent(true); //Create sprite auto sprite = CreateSprite(world, 10, 10); sprite->SetPosition(0, 0, 0); sprite->SetMaterial(material); box->SetMaterial(material); //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
  8. #include "UltraEngine.h" using namespace UltraEngine; shared_ptr<Window> window; shared_ptr<Framebuffer> framebuffer; shared_ptr<World> world; shared_ptr<Interface> ui; shared_ptr<Camera> uiCamera; shared_ptr<Widget> label; static bool EventCallback(const Event& e, shared_ptr<Object> extra) { Print("Callback"); return true; } void initGui() { auto default_font = LoadFont("Fonts\\arial.ttf"); ui = CreateInterface(world, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 1.0f); uiCamera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); uiCamera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); uiCamera->SetRenderLayers(2); uiCamera->SetClearMode(CLEAR_DEPTH); label = CreateLabel("Btn", 20, 20, 100, 100, ui->root); } int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window window = CreateWindow("Ultra Engine", 0, 0, 300, 300, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world world = CreateWorld(); //Create a framebuffer framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0, 0, 0); initGui(); ListenEvent(EVENT_DATA, NULL, EventCallback, label); auto color = Vec4(0.5, 0, 1, 0.5f); label->SetColor(color); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyDown(KEY_SPACE)) { label->SetText("New Text"); float fonstScale = 14.0 / (float)13; label->SetFontScale(0.9); } world->Update(); world->Render(framebuffer); } return 0; }
  9. 1. At start.ultra map copy a player. 2. Change a value in copied entity's ThirPersonControls. 3. First entity have same value now
  10. Also application seems to crash if package has same file as in usual folder which nakes harder to test game distribution with packing flies
  11. Most visible changes since the last video: Loading screen Icons from Quake for ammo in inventory Ammo is now spent while shooting, and its quantity is displayed in the inventory and weapons bar Ammo can be splitted in inventory Action dialog hides movement squares and shows which targets are visible with yellow lines Added sounds for the interface from Quake (when you hover over buttons, press them, etc.) Added sounds to enemies when they are moving and player target them Added credits, where I list a bunch of studios related to Quake Rerelease and Quake sounds Added a difficulty selection, which determines the AI and the number of enemies on the map for tests Reworked the AI of bots. I took GOAP as a basis, but simplified it to a choice of tactics, which choose a next action, and after the action is completed, the tactic is selected again. On hard, bots choose a target with the smallest health and armor and on which the most damage can be dealt, flank targets, retreat a bit after the attack and turn towards the player’s units. On the easy, they simply attack the one closest to them; if there are several at the same distance, then choose the one with the larger health and armor. On normal difficulty, the bot logic is the most plausible without try harding, but also without giveaways. Before choosing a tactic, bots take the targets that they see or smell and remember the tiles on which the targets are located. I'll add the hearing later. I will improve memory further so that bots remember the enemies they see outside of their turn.
  12. My tetsts of Ultra benchmarks 2023 and compiled sources with beta 0.9.5 (RTX 4080): Old/new FPS Unique Geometry ~7500 / 6400-6800 Lighting 2500 / 2100 Instanced Geometry 1700-2100 / 3600 Animation 3000 / 3400
  13. 3200-3500 in debug for me, 3800 fps in release mode
  14. Another world render before a loop causing a problem #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create world auto world = CreateWorld(); auto world2 = CreateWorld(); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0.125); world2->Render(framebuffer); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { auto ev = WaitEvent(); if (ev.id == EVENT_STARTRENDERER) { if (ev.data == 0) { Print("Renderer failed to start"); Notify("Renderer failed to initialize.", "Error", true); return 0; } } } world->Update(); world->Render(framebuffer); } return 0; }
  15. Yeah, camera supposed to be in loading world, just a typo from copy pasting ig. Still "Renderer failed to initialize". I wonder if it can be related to few screens somehow since idk what else can it be if it works for you on amd and nvidia cards,
  16. I meant Vulkan is gone just like issue and vice versa
  17. It's not fully resolved but probably it's ok as it is for now
  18. Ah, extra 1 is because it's root have it. Maybe it's not big problem as i thought.
  19. Tried to do clearing - still does not look right. Not increasing now every time but still to many extra uses. #include "UltraEngine.h" using namespace UltraEngine; shared_ptr<Window> window; shared_ptr<Framebuffer> framebuffer; shared_ptr<World> world; shared_ptr<Interface> ui; shared_ptr<Camera> uiCamera; shared_ptr<Widget> btn; static bool EventCallback(const Event& e, shared_ptr<Object> extra) { Print("In callback:" + WString(btn.use_count())); return true; } void initGui() { auto default_font = LoadFont("Fonts\\arial.ttf"); ui = CreateInterface(world, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); uiCamera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); uiCamera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); uiCamera->SetRenderLayers(2); uiCamera->SetClearMode(CLEAR_DEPTH); btn = CreateButton("Btn", 20, 20, 100, 100, ui->root); } int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window window = CreateWindow("Ultra Engine", 0, 0, 300, 300, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world world = CreateWorld(); //Create a framebuffer framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0, 0, 0); initGui(); ListenEvent(EVENT_DATA, NULL, EventCallback, btn); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) WaitEvent();// Clears event queue if (window->KeyHit(KEY_SPACE)) { Print("Before:" + WString(btn.use_count())); EmitEvent(EVENT_DATA, btn); Print("After:" + WString(btn.use_count())); } world->Update(); world->Render(framebuffer); } return 0; }
  20. Should not ListenEvent clear event then? Also i would prefer events to keep weak_ptr. I have PeekEvent and WaitEvent in main project and still had some problems with extra shared_ptr held by events. I will investigate again what exact problems i had with it later to make new example in case if it can't be fixed with current engine build.
  21. Problem is a same with full GUI recreation when display changes including camera with code from another thread So probably Ultra takes DPI from first created window?
×
×
  • Create New...