Jump to content

Search the Community

Showing results for tags 'ultra engine'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Blogs

  • Development Blog
  • Canardian's Blog
  • Beyond Civilization Blog Ext
  • Tyler's Blog
  • macklebee's Blog
  • B-Byrnes' Blog
  • Marleys Ghost's Blog
  • omid3098's Blog
  • Richardsimpo123456's Blog
  • DJDD's Blog
  • Rick's Blog
  • --
  • xtreampb's Blog
  • Economically Disadvantaged
  • klepto2's Blog
  • Old Blog
  • Chris Paulson's Blog
  • Davaris' Blog
  • nil
  • Rekindled Phoenix's Blog
  • Flexman's Blog
  • Kattemaksu Online
  • Marcousik's Creations Blog
  • EVE LBS Studio
  • Rendering puzzles
  • Screen Size Utility
  • Niosop's Blog
  • 1299 RTS Game Project
  • Blitzbat's Blog
  • gordonramp's Blog
  • Andy Gilbert's Blog
  • Marcus' Blog
  • JornAggror Blog
  • diedir's Blog
  • wayneg's Blog
  • Masterxilo's Blog
  • Dave Lee's Blog
  • peubuy's blog
  • OD Arts -Leadwerks Blog
  • The progression......
  • Ultra Software Company Blog
  • The Progression
  • Pancake's Blog
  • Test Blog
  • BLaBZ Blog
  • Pure³d's Blog
  • dreamhead Blog
  • RVL's Blog
  • DB's Blog
  • Toxin Games Development Blog
  • CombatHelo Blog (RSS Import)
  • Foolish's Blog
  • ZioRed's Corner
  • Toxin Games Twitter
  • Shard - Third Initiative
  • Shard's Blog
  • Soamp's Blog
  • Soamp's Blog
  • Laurens' Blog
  • JT`s warehouse district
  • Kennar's Blog
  • KiteFuchs' Blog
  • KiteFuchs' Blog
  • Rachel's Dev-Blog
  • Eagle's Blog
  • zaphos' Blog
  • please delete this blog
  • Afke's Blog
  • Richard Simpson
  • knowledgegranted's Blog
  • EdzUp(GD)'s Blog
  • aGameLife's Kelasel MMORPG Blog
  • tournamentdan's Blog
  • Beyond Civilization Blog
  • smashthewindow
  • AnniXa's Blog
  • AnniXa's Blog
  • Elemental Development
  • DigitalHax Blog
  • Aria's Blog
  • Strogg76's Blog
  • Clackdor's Blog
  • Leadwerks Project Status
  • simpleprogrammer's Blog
  • Pathfinding in LE.2.x
  • Naughty Alien's Blog
  • smashthewindow's Blog
  • Ali Salehi's Blog
  • Jardar's Blog
  • Chris Vossen's Development Blog
  • Scarlet Thread Studios' Blog
  • Kronos' Blog
  • Benton's Blog
  • ChrisV's Blog
  • tjheldna's Blog
  • shadmar's Blog
  • 3D Masons, LLC
  • Andy Gilbert's Enviro Models
  • ParaToxic's Blog
  • NarkLord's Blog
  • ChrisMAN's Blog
  • ChrisMAN's Blog
  • CGMan's Blog
  • The Game
  • Chris Tutorials
  • Leadwerks 3 Experience
  • An Alien Saga
  • klepto2 & Leadwerks 3
  • Inside the mind of eternal insomniac
  • josk's Blog
  • Shader Development in Leadwerks 3.1
  • 3D Coat : Column game making of
  • Einlander's Blog
  • Ginger George's Blog
  • I have a problem
  • Michael_J's Blog
  • nasamydifol's Blog
  • Digman's Blog
  • noesisGUI
  • SavageDogg38's Blog
  • Built from Ruins
  • Remaining Days
  • test_external_blog
  • The Hunt For Food Blog
  • Crazy Minnow Studio
  • CrazyMinnowStudio
  • Guppy's Blog
  • Playing Online
  • Evayr's Blog
  • DerRidda's Blog
  • Karl's Blog
  • whiterabbit's Blog
  • Tinyboss Games
  • abendkleider's Blog
  • sacguccireplica's Blog
  • Arena
  • Imchasinyou's Blog
  • xtom's Blog
  • Lua is better than you think.
  • mdgunn's Blog
  • Crime Closer
  • lxFirebal69xl's Blog
  • Wedmer's Blog
  • Lockdown, going forward.
  • Pump-Action Captain
  • Igor's Blog
  • Dead Anyway
  • Runenrise and more
  • reepblue's Blog
  • Slippy's Corner
  • LUA Musings
  • severjack's Blog
  • mikeporter's Blog
  • miko93's Blog
  • Megalocerous' Blog
  • lxFirebal69xl's Blog
  • aiaf's Blog
  • Lostghbear's Blog
  • echo $BLOG_NAME > blog_title.tmpl
  • johnadam111's Blog
  • Dwarf Beard
  • burgelkat's Blog
  • Charrua's Blog
  • peterpaul's Blog
  • joshmathews' Blog
  • Martin Kearl's Blog
  • Brutile's blog
  • tipforeveryone's Blog
  • Glushchenko Blog
  • Express Lab Games Blog
  • Blueapples' Blog
  • DooMAGE's Blog
  • Structura devblog
  • UltraEngine - Experiences, add-ons and other Stuff
  • martyj's Blog
  • Dragonfreak's Blog
  • Brutile's Blog
  • assigmenthelp
  • Case Study Assignment Help
  • How to deal with bad grade ?
  • How to deal with bad grade ?
  • GameDev Blog
  • devcjohnson's Blog
  • devcjohnson's Blog
  • THE WHAT? Blog
  • The Demurian Scribe
  • GUI Editor
  • GUI Tutorial
  • noob_shaders
  • The Seventh World
  • Phodex Games Blog
  • Leadwerks VS Source 2
  • Work in Progress - Scifi PBR Media
  • [C++] First Player game start
  • The Blog of Yue
  • Snowboarding Development Blog
  • Ocean: Rendering in Leadwerks 4
  • Game Ready Maps
  • Ultra App Kit (Advanced Custom Widgets)
  • Poking around
  • Blender tutorials
  • Usefull Scripts & Components
  • Thirsty Panther
  • Ultimate Action Game Controller

Forums

  • Software
    • General Discussion
    • Programming
    • Game Artwork
    • Showcase
    • Suggestion Box
    • Bug Reports
  • Addons
    • Extensions & Plugins
    • Components
    • Addon Development
  • Platforms
    • Windows
    • Linux
    • macOS

Categories

  • Streams and Events
  • Tutorials
  • Games
  • Work in Progress

Categories

  • Components
  • Effects
  • Extensions
  • Materials
    • Asphalt
    • Brick
    • Concrete
    • Debris
    • Effects
    • Fabric
    • Ground
    • Marble
    • Metal
    • Organic
    • Plaster
    • Rock
    • Roof
    • Sand
    • Snow
    • Surface Imperfections
    • Tile
    • Wood
  • Models
    • Animals & Creatures
    • Architecture
    • Food
    • Machinery
    • Plants and Vegetation
    • Props
    • Vehicles
  • Scenes
  • Skyboxes
  • Tools

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location

Found 21 results

  1. khotan

    bunny

    imported from bunny model (stanford)
  2. Hello I have just got Ultra Engine and have not got it to compile yet. I added missing ATL modules inside visual studio installer, made a new c++ project multiple times and set the optimization to disabled in the project settings. Need help at fixing these errors. The Project is called StereoWindow and i have the exact same problem with another project.
  3. I feel like a noob. How do I import a 3D asset (Glib) into Ultra Engine? I'm just testing the engine now that I installed it. Everything is running nicely, but after converting a simple asset to Glib, I cannot find a way to import it. Is there a batch import feature? I seem to remember Leadwerks being able to do that. I have tons of assets and importing them one-by-one would be a pain. Thank you. Mike
  4. In full 2D works fine but in 3D it's a black background in Pixmap area where should be transparent pixels. Probably Vulkan things this time too? Just want to be sure if it will be fixed later in Ultra or i'm missing something. #include "UltraEngine.h" using namespace UltraEngine; void drawPixel(shared_ptr<Pixmap> pixmap, const int x, const int y, unsigned int color) { if (pixmap && x >= 0 && x < pixmap->size.width && y >= 0 && y < pixmap->size.height) { pixmap->WritePixel(x, y, color); } } void drawCircle(shared_ptr<Pixmap> pixmap, const int centerX, const int centerY, const int radius, unsigned int color) { int x = 0; int y = radius; int delta = 1 - 2 * radius; int error = 0; while (y >= 0) { drawPixel(pixmap, centerX + x, centerY + y, color); drawPixel(pixmap, centerX + x, centerY - y, color); drawPixel(pixmap, centerX - x, centerY + y, color); drawPixel(pixmap, centerX - x, centerY - y, color); error = 2 * (delta + y) - 1; if (delta < 0 && error <= 0) { ++x; delta += 2 * x + 1; continue; } error = 2 * (delta - x) - 1; if (delta > 0 && error > 0) { --y; delta += 1 - 2 * y; continue; } ++x; delta += 2 * (x - y); --y; } } int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); ui_camera->SetRenderLayers(2); ui_camera->SetClearMode(CLEAR_DEPTH); auto panel = CreatePanel(0, 0, 200, 200, ui->root); auto pixmap = UltraEngine::CreatePixmap(100, 100); drawCircle(pixmap, 50, 50, 25, Rgba(100, 50, 150, 255)); panel->SetPixmap(pixmap); panel->SetColor(0.1f, 0.15f, 0.1f, 1); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { auto ev = WaitEvent(); ui->ProcessEvent(ev); } world->Update(); world->Render(framebuffer); } return 0; }
  5. Painting working only before first Render() #include "UltraEngine.h" using namespace UltraEngine; shared_ptr<Window> window; shared_ptr<Framebuffer> framebuffer; shared_ptr<World> menuWold; shared_ptr<Interface> ui; shared_ptr<Camera> uiCamera; shared_ptr<Widget> drawPanel; shared_ptr<Widget> btn; shared_ptr<Pixmap> px; int progress = 0; void paint() { progress++; for (int x = 0; x < progress * 10; x++) { for (int y = 0; y < 200; y++) { px->WritePixel(x, y, Rgba (20, 250, 10)); } } } void initGui() { auto default_font = LoadFont("Fonts\\arial.ttf"); ui = CreateInterface(menuWold, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); uiCamera = CreateCamera(menuWold, PROJECTION_ORTHOGRAPHIC); uiCamera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); uiCamera->SetRenderLayers(2); uiCamera->SetClearMode(CLEAR_DEPTH); drawPanel = CreatePanel(0, 50, 200, 200 , ui->root, PANEL_DEFAULT); drawPanel->SetColor(1, 0, 0); px = CreatePixmap(200, 200); drawPanel->SetPixmap(px); btn = CreateButton("Progress", 0, 0, 100, 20, ui->root); //works for (int i = 0; i < 5; i++) { paint(); } } int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window window = CreateWindow("Ultra Engine", 0, 0, 1000, 1000, displays[0], WINDOW_DEFAULT); //Create a world menuWold = CreateWorld(); //Create a framebuffer framebuffer = CreateFramebuffer(window); //Create light auto light = CreateBoxLight(menuWold); light->SetRange(-10, 10); light->SetRotation(15, 15, 0); light->SetColor(2); //Create camera auto camera = CreateCamera(menuWold); camera->SetClearColor(0.125); camera->SetPosition(0, 0, -3); camera->SetFov(70); //Create scenery auto box = CreateBox(menuWold); initGui(); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { const Event ev = WaitEvent(); if (ev.source == btn && ev.id == EVENT_WIDGETACTION) { //pixmap not changes paint(); } ui->ProcessEvent(ev); } menuWold->Update(); menuWold->Render(framebuffer); } return 0; }
  6. This works in 2D UI but in 3D widget became not interactive but visible. Maybe where is another way to delete widgets in 3D UI? #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); ui_camera->SetRenderLayers(2); ui_camera->SetClearMode(CLEAR_DEPTH); auto button = CreateButton("Button", 10, 10, 120, 30, ui->root); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { const Event ev = WaitEvent(); if (ev.source == button && ev.id == EVENT_WIDGETACTION) { button->SetParent(NULL); } ui->ProcessEvent(ev); } world->Update(); world->Render(framebuffer); } return 0; }
  7. NavMesh can't be seen (with setDebuggint(true)) or used if you use brushes as a scene instead of models. #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 a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetFov(70); camera->SetClearColor(0.125); camera->SetPosition(0, 3, -6); camera->SetRotation(35, 0, 0); //Create light auto light = CreateBoxLight(world); light->SetRange(-20, 20); light->SetArea(20, 20); light->SetRotation(35, 35, 0); light->SetColor(3); //Create scene //auto ground = CreateBox(world, 10, 1, 10); //ground->SetPosition(0, -0.5, 0); //ground->SetColor(0, 1, 0); //auto wall = CreateBox(world, 1, 2, 4); float w = 10, h = 1, d = 10; auto brush = CreateBrush(world); //Add brush vertices brush->AddVertex(w * 0.5, 0, d * 0.5); brush->AddVertex(-w * 0.5, 0, d * 0.5); brush->AddVertex(-w * 0.5, 0, -d * 0.5); brush->AddVertex(w * 0.5, 0, -d * 0.5); brush->AddVertex(w * 0.5, -h, d * 0.5); brush->AddVertex(-w * 0.5, -h, d * 0.5); brush->AddVertex(-w * 0.5, -h, -d * 0.5); brush->AddVertex(w * 0.5, -h, -d * 0.5); //Add faces auto face = brush->AddFace(); face->AddIndice(0); face->AddIndice(1); face->AddIndice(2); face->AddIndice(3); face = brush->AddFace(); face->AddIndice(4); face->AddIndice(5); face->AddIndice(6); face->AddIndice(7); face = brush->AddFace(); face->AddIndice(0); face->AddIndice(1); face->AddIndice(5); face->AddIndice(4); face = brush->AddFace(); face->AddIndice(2); face->AddIndice(3); face->AddIndice(7); face->AddIndice(6); face = brush->AddFace(); face->AddIndice(1); face->AddIndice(2); face->AddIndice(6); face->AddIndice(5); face = brush->AddFace(); face->AddIndice(0); face->AddIndice(3); face->AddIndice(7); face->AddIndice(4); brush->Build(); //Create navmesh auto navmesh = CreateNavMesh(world, 10, 5, 10, 4, 4); navmesh->SetDebugging(true); navmesh->Build(); //Create player auto player = CreateCylinder(world, 0.4, 1.8); player->SetColor(0, 0, 1); auto agent = CreateNavAgent(navmesh); player->Attach(agent); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->MouseHit(MOUSE_LEFT)) { auto mousepos = window->GetMousePosition(); auto rayinfo = camera->Pick(framebuffer, mousepos.x, mousepos.y); if (rayinfo.success) { agent->Navigate(rayinfo.position); } } world->Update(); world->Render(framebuffer); } return 0; }
  8. #include "UltraEngine.h" #include "Components/Mover.hpp" using namespace UltraEngine; shared_ptr<Window> window; shared_ptr<Framebuffer> framebuffer; shared_ptr<World> menuWold; shared_ptr<Interface> ui; shared_ptr<Camera> uiCamera; shared_ptr<Widget> btn; shared_ptr<Scene> scene; void initGui() { auto default_font = LoadFont("Fonts\\arial.ttf"); ui = CreateInterface(menuWold, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); uiCamera = CreateCamera(menuWold, 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("Delete", 0, 0, 100, 20, ui->root); //Create scenery auto box = CreateBox(menuWold); box->AddComponent<Mover>(); scene->AddEntity(box); } int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window window = CreateWindow("Ultra Engine", 0, 0, 1000, 1000, displays[0], WINDOW_DEFAULT); //Create a world menuWold = CreateWorld(); //Create a framebuffer framebuffer = CreateFramebuffer(window); //Create light auto light = CreateBoxLight(menuWold); light->SetRange(-10, 10); light->SetRotation(15, 15, 0); light->SetColor(2); //Create camera auto camera = CreateCamera(menuWold); camera->SetClearColor(0.125); camera->SetPosition(0, 0, -3); camera->SetFov(70); scene = CreateScene(); initGui(); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { const Event ev = WaitEvent(); if (ev.source == btn && ev.id == EVENT_WIDGETACTION) { scene->entities.clear(); } ui->ProcessEvent(ev); } menuWold->Update(); menuWold->Render(framebuffer); } return 0; }
  9. #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, 1280, 720, displays[0]); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface auto ui = CreateInterface(world, font, framebuffer->size); //Create widget iVec2 sz = ui->root->ClientSize(); auto button = CreateButton("Button", sz.x / 2 - 75, sz.y / 2 - 15, 150, 30, ui->root); auto plg = LoadPlugin("Plugins/FITextureLoader"); auto quakeLoaderPlugin = LoadPlugin("Plugins/QuakeLoader"); //Load model WString path = AppDir(); auto pak = LoadPackage(path + "/PAK0.PAK"); ChangeDir(path); auto pixmap = LoadPixmap("gfx/bigbox.lmp"); button->SetPixmap(pixmap); //Create camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2, 0); while (true) { while (PeekEvent()) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: if (ev.source == window) { return 0; } break; default: ui->ProcessEvent(ev); break; } } world->Update(); world->Render(framebuffer); } return 0; }
  10. I think block.SetPixmap work fine if a pixmap as member set in but with if it's another pixmap (to make few different icons for different blocks) i have an exception at Render(). An example: #include "UltraEngine.h" using namespace UltraEngine; class NewWidget : public Widget { protected: virtual void Draw(const int x, const int y, const int width, const int height) { for (int i = 0; i < 4; i++) { blocks[i].hidden = false; blocks[i].position = iVec2(i * 64, 0); blocks[i].size = iVec2(64, 64); blocks[i].filter = pixmapfilter; blocks[i].color = Vec4(1); auto px = LoadPixmap("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/dirt01.dds"); blocks[i].SetPixmap(px); } } public: static shared_ptr<NewWidget> create(const int x, const int y, const int width, const int height, shared_ptr<Widget> parent, const int style = 0) { struct Struct : public NewWidget { }; auto instance = std::make_shared<Struct>(); instance->Initialize("", x, y, width, height, parent, style); return instance; } NewWidget() { blocks.resize(4); } }; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1920, 1080, 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->SetClearColor(0.6); camera->SetFov(90); camera->SetRotation(54.736f, 45, 0); camera->SetPosition(0, 4, 0); auto sz = framebuffer->GetSize(); // Load a font auto font = LoadFont("Fonts/arial.ttf"); // Create user interface auto ui = CreateInterface(world, font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); // Create ui camera 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); auto widget = NewWidget::create(0, 0, 64 * 4, 64, ui->root, 0); //Create light auto light = CreateBoxLight(world); light->SetRange(-100, 100); light->SetArea(100, 100); light->SetRotation(35, 35, 0); light->SetColor(2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer, false); } return 0; }
  11. Happens on mesh->AddPrimitive(1, 2, 4, 3); (54 line) Trying to remake tetrahedron as a model here. #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 a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a world auto world = CreateWorld(); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.8); camera->Turn(35, 0, 0); camera->Move(0, 0, -2); //Create light auto light = CreateBoxLight(world); light->SetRange(-20, 20); light->SetArea(20, 20); light->SetRotation(35, 35, 0); auto unlitMaterial = CreateMaterial(); auto unlitShader = LoadShaderFamily("Shaders/Unlit.json"); unlitMaterial->SetShaderFamily(unlitShader); int width = 4, height = 2, length = 6; auto model = CreateModel(world); auto mesh = model->AddMesh(); mesh->AddVertex(0, 0, 0); //S mesh->AddVertex(-width * 0.5, -height * 0.5, length);//NW mesh->AddVertex(width * 0.5, -height * 0.5, length);//NE mesh->AddPrimitive(0, 1, 2);//S , NW, NE mesh->AddVertex(-width * 0.5, height * 0.5, length);//NW h mesh->AddVertex(width * 0.5, height * 0.5, length);//NE h mesh->AddPrimitive(0, 3, 4);//S , NW h, NE h mesh->AddPrimitive(0, 1, 3);//left mesh->AddPrimitive(1, 2); //"face" mesh->AddPrimitive(2, 4); //"face" mesh->AddPrimitive(4, 3); //"face" mesh->AddPrimitive(1, 3); //"face" mesh->AddPrimitive(2, 4, 0); //"right" model->SetColor(0.5f, 0.8f, 0, 0.25f); auto& mat = unlitMaterial; mat->SetTransparent(true); model->SetMaterial(mat); auto collider = CreateConvexHullCollider(model); model->SetCollider(collider); auto modelLine = CreateModel(world); auto meshLine = modelLine->AddMesh(MESH_LINES); meshLine->AddVertex(0, 0, 0); //S meshLine->AddVertex(-width * 0.5, -height * 0.5, length);//NW meshLine->AddVertex(width * 0.5, -height * 0.5, length);//NE meshLine->AddPrimitive(0, 1, 2);//S , NW, NE meshLine->AddVertex(-width * 0.5, height * 0.5, length);//NW h meshLine->AddVertex(width * 0.5, height * 0.5, length);//NE h meshLine->AddPrimitive(0, 3);//S , NW h, NE h meshLine->AddPrimitive(3, 4);//S , NW h, NE h meshLine->AddPrimitive(0, 4);//S , NW h, NE h meshLine->AddPrimitive(0, 1);//left meshLine->AddPrimitive(1, 3);//left meshLine->AddPrimitive(0, 3);//left meshLine->AddPrimitive(1, 2); //"face" meshLine->AddPrimitive(2, 4); //"face" meshLine->AddPrimitive(4, 3); //"face" meshLine->AddPrimitive(1, 3); //"face" meshLine->AddPrimitive(2, 4, 0); //"right" //Finalize the brush modelLine->SetColor(0.5f, 0.8f, 0, 0.25f); auto matLine = unlitMaterial; matLine->SetLineStipple(LINE_STIPPLE_DASHED); modelLine->SetMaterial(matLine); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
  12. 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, 1920, 1080, 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->SetClearColor(0.6); camera->SetFov(90); camera->SetRotation(54.736f, 45, 0); camera->SetPosition(0, 4, 0); auto sz = framebuffer->GetSize(); // Load a font auto font = LoadFont("Fonts/arial.ttf"); // Create user interface auto ui = CreateInterface(world, font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); // Create ui camera 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); //Create light auto light = CreateBoxLight(world); light->SetRange(-100, 100); light->SetArea(100, 100); light->SetRotation(35, 35, 0); light->SetColor(2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer, false); } return 0; }
  13. Last update installed, no such problem in 1.02. Can be reproduced in Learn example by pressing any keyboard key in app window. https://www.ultraengine.com/learn/Interface_ProcessEvent?lang=cpp #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, 1280, 720, displays[0]); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface auto ui = CreateInterface(world, font, framebuffer->size); //Create widget iVec2 sz = ui->root->ClientSize(); auto button = CreateButton("Button", sz.x / 2 - 75, sz.y / 2 - 15, 150, 30, ui->root); //Create camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2, 0); while (true) { while (PeekEvent()) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: if (ev.source == window) { return 0; } break; default: ui->ProcessEvent(ev); break; } } world->Update(); world->Render(framebuffer); } return 0; }
  14. No problem with models but LoadSound returns null (and works for sounds outside an archive). In the asset editor sounds can be loaded. #include "UltraEngine.h" #include "Components/CameraControls.hpp" 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 world auto world = CreateWorld(); world->SetAmbientLight(0); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load FreeImage plugin auto plg = LoadPlugin("Plugins/FITextureLoader"); auto quakeLoaderPlugin = LoadPlugin("Plugins/QuakeLoader"); //Load model WString path = AppDir(); auto pak = LoadPackage(path + "/PAK0.PAK"); ChangeDir(path); auto model = LoadModel(world, "progs/quaddama.mdl"); model->Turn(0, 180, 0, true); auto soundPath = WString("sound/misc/water2.waw"); auto sound = LoadSound(soundPath); sound->Play(); //Environment maps auto specmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/specular.dds"); auto diffmap = LoadTexture("https://github.com/UltraEngine/Assets/raw/main/Materials/Environment/footprint_court/diffuse.dds"); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_BACKGROUND); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0, 0, 1); camera->SetPosition(model->GetBounds().center); camera->Move(0, 0, -0.3); camera->SetRange(0.01, 100); camera->SetFov(70); camera->AddPostEffect(LoadPostEffect("Shaders/PostEffects/FXAA.json")); //Create light auto light = CreateBoxLight(world); light->SetRange(-10, 10); light->SetArea(15, 15); light->SetRotation(45, 35, 0); light->SetColor(1.2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
  15. Exception thrown at 0x00007FF72DFF37B3 in Test Project_d.exe: 0xC0000005: Access violation reading location 0x0000000000000000. https://www.ultraengine.com/learn/CreateTerrain?lang=cpp Actually CreateTerrain() seems to return null and exception happens lower in code due that.
  16. I changed CameraControls component to be tactical/isometric and noticed it's ignoring my new class member and in debug i found out it have vars that has been deleted and no my var there at all. My code Update() works fine tho except member issue. Tried to rebuild solution - nothing changes. Is there a proper way to recompile a component or maybe i should create new component instead of repurposing old one?
  17. idk if there is another proper way to change a resolution of window. This way works in 2D UI. #include "UltraEngine.h" using namespace UltraEngine; bool EventCallback(const Event& ev, shared_ptr<Object> extra) { auto window = extra->As<Window>(); window->SetSize(1024, 768); return true; } int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); ui_camera->SetRenderLayers(2); ui_camera->SetClearMode(CLEAR_DEPTH); auto btn = CreateButton("change res", 0, 0, 100, 30, ui->root); ListenEvent(EVENT_WIDGETACTION, btn, EventCallback, window); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { auto ev = WaitEvent(); ui->ProcessEvent(ev); } world->Update(); world->Render(framebuffer); } return 0; }
  18. Works fine in usual interface but throws an exception in case of UI in 3D rendering viewport. #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]); // Create a world auto world = CreateWorld(); // Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create ui camera 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); //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface auto ui = CreateInterface(world, font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); //Create widget auto sz = ui->root->ClientSize(); auto combobox = CreateComboBox((sz.x - 300) / 2, (sz.y - 30) / 2, 300, 30, ui->root); for (int n = 0; n < 20; ++n) { combobox->AddItem("Item " + String(n), n == 0); } while (true) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETSELECT: Print("Item " + String(ev.data) + " selected"); break; case EVENT_WINDOWCLOSE: return 0; break; } } }
  19. Works as intended in full 2D but if UI over 3D a text is not centerd vertically. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); ui_camera->SetRenderLayers(2); ui_camera->SetClearMode(CLEAR_DEPTH); auto button = CreateButton("Button", 10, 10, 120, 30, ui->root); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { auto ev = WaitEvent(); ui->ProcessEvent(ev); } world->Update(); world->Render(framebuffer); } return 0; } Same even if i'm using in custom widget textAlignment = TEXT_CENTER | TEXT_MIDDLE but text higher than center. Probably i'm missing something and cameras or something else should be configured differently in code.
  20. I started using Ultra Engine on 2023-01-18. Learning to use the engine has been really easy. The documentation is very clear and I can search for keywords I want to learn about. Each command has a fully working example, so I can quickly copy-paste and try the code. The installer is also amazingly fast and automatic, and updating to the latest engine is just a click away. Updating my projects to use the latest version is also fully automatic by clicking on the yellow sign. The support from the Ultra team is very professional and fast, usually I got a solution and/or bug fix or new feature within minutes. Creating a new game project is just one click away, and when I organize my projects by moving them to other subfolders, importing them back is also a click away. Now I'm writing an actual game, and while doing so, I'm building classes to implement the game logic. I already made a model in Blender, and it worked directly in my game, using the glTF save option in Blender. Also the physics for the model worked directly. This weekend I'm unboxing my Ryzen 9 + Radeon RX6800 laptop, and setting everything up for art, music and game production. My tools are: - GIMP, for textures - Blender, for models - WavePad, for editing .flac audio files - Reaper, for composing music and saving as .flac - Ultra Engine, for making the game using the above assets The game will use physics for triggering game logic, for example: if a certain collision occurs, a new set of physics objects will be spawned. Some models will have animated color gradients, to simulate dream-like experiences, but who can tell if dreams are real when scientists say it is very probable that the universe is a simulation, made by Ultra Engine ;D Today I thought about binaural 3D sounds, they will occur when different physics materials collide. I will also implement sound occlusion, so that when a sound is played behind a wall, it will sound dampened. I even thought of sound reflection, so it would bounce off walls, possibly using an invisible gravityless physics ball or raytracing, but I can probably use reverb/echo effects instead. Finally, the scene will be streamed from a database, perhaps using SQLite3, and I found a nice trick how to remove far-away models using a C++ list. One thing I really like about the engine too, is that it takes only 4 seconds to compile changes in the game using Visual Studio 2022 Community Edition, and I can even speed that up using game logic libraries and loading parameters from a file.
  21. I need first person character for Ultra Engine. But I don't know how to do it.
×
×
  • Create New...