Jump to content

reepblue

Developers
  • Posts

    2,484
  • Joined

  • Last visited

Everything posted by reepblue

  1. Color is the most important but I can check the others.
  2. I still see DDS as the engine's native texture format as you don't need a plugin to load such textures.
  3. I assumed it was DDS for traditional games, basis for simulations, and ktx for if Ultra runs on something like the quest. The question I've ran into is what is the best modeling format since gltf is technically 3 formats.
  4. This map demonstrates the crash. lighttest.zip
  5. I'm playing around with the editor and noticed when I set a light (Such as a point light) to static, my app crashes as soon as it renders in the camera. I'm noticing this from the editor, but I think this example will reproduce the results when pressing space. #include "UltraEngine.h" #include "Components/Motion/Mover.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Plugin for texture loading auto plugin = LoadPlugin("Plugins/FITextureLoader"); //Get display auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); world->SetAmbientLight(0.1); world->RecordStats(true); //Create camera auto camera = CreateCamera(world); camera->SetClearColor(0.25); camera->SetPosition(0, 2, 0); camera->Move(0, 0, -5); //Build scene auto tunnel = LoadModel(world, "https://github.com/UltraEngine/Documentation/raw/master/Assets/Models/Underground/tunnel_t.glb"); tunnel->SetRotation(0, 180, 0); tunnel->Staticize(); auto cage = LoadModel(world, "https://github.com/UltraEngine/Documentation/raw/master/Assets/Models/Underground/fancage.glb"); cage->Staticize(); auto fan = LoadModel(world, "https://github.com/UltraEngine/Documentation/raw/master/Assets/Models/Underground/fanblades.glb"); fan->SetPosition(0, 2, 0); auto mover = fan->AddComponent<Mover>(); mover->rotation.z = 300; auto light = CreatePointLight(world); light->SetColor(2, 2, 2); light->SetRange(10); light->SetPosition(0, 2, 2); light->SetColor(4.0); //Display text auto orthocam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); orthocam->SetClearMode(CLEAR_DEPTH); orthocam->SetRenderLayers(128); orthocam->SetPosition(float(framebuffer->size.x) * 0.5, float(framebuffer->size.y) * 0.5f); auto font = LoadFont("Fonts/arial.ttf"); auto text = CreateSprite(world, font, "Shadow polygons: 0", 14.0 * displays[0]->scale); text->SetPosition(2, framebuffer->size.y - 16.0f * displays[0]->scale); text->SetRenderLayers(128); auto text2 = CreateSprite(world, font, "Press space to make the light static.", 14.0 * displays[0]->scale); text2->SetPosition(2, framebuffer->size.y - 16.0f * 2.0f * displays[0]->scale); text2->SetRenderLayers(128); //Main loop while (!window->KeyHit(KEY_ESCAPE) and !window->Closed()) { world->Update(); world->Render(framebuffer); if (window->KeyHit(KEY_SPACE)) { light->Staticize(); text2->SetHidden(true); } text->SetText("Shadow polygons: " + String(world->renderstats.shadowpolygons)); } return 0; }
  6. 1. Place a probe in the map 2. Build GI. 3. Edit the Probe's appearance (Like Color). 4. Rebuild GI. 5 Notice the Probes go back to how they were.
  7. FYI, don't do this, The window didn't draw correctly at 100% scaling. #include "UltraEngine.h" #include "Components/Motion/Mover.hpp" #include "Components/Player/CameraControls.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto cl = ParseCommandLine(argc, argv); RegisterComponent<Mover>(); RegisterComponent<CameraControls>(); //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * 2, 720 * 2, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load the map WString mapname = "Maps/start.ultra"; if (cl["map"].is_string()) mapname = std::string(cl["map"]); auto scene = LoadMap(world, mapname); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Do something like this. #include "UltraEngine.h" #include "Components/Motion/Mover.hpp" #include "Components/Player/CameraControls.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto cl = ParseCommandLine(argc, argv); RegisterComponent<Mover>(); RegisterComponent<CameraControls>(); //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * (int)displays[0]->GetScale(), 720 * (int)displays[0]->GetScale(), displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load the map WString mapname = "Maps/start.ultra"; if (cl["map"].is_string()) mapname = std::string(cl["map"]); auto scene = LoadMap(world, mapname); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Only thing is that you need to cast the float to an int which might cause problems.
  8. Maybe have the asset browser also prompt for a name change when the user saves other Leadwerks assets.
  9. I mean that it wasn't a big deal when the environment settings didn't save in the map files, but now that bug was fixed, the multiple dialog boxes became more annoying as there was a reason to apply skyboxes and such. 🤣 I haven't tried Ultra since Sunday, I probably should boot up my PC after work and check everything out.
  10. I think the names of plugins should have a universal prefix so people know what to actually load.
  11. I ran into this but forgot about it since the feature didn't work anyway. Now that it should be fixed, this is pretty annoying.
  12. I mean, it was the same thing in Leadwerks and although confusing at first, I understood how it worked after a while. I think the map should store the fog/post effect information and then the end user should be able to apply them in the load function of their component. It might be too much, but that's just a quick idea I had.
  13. 1. Create a json component file with these contents. { "component": { "properties": [ { "name": "filter", "label": "Filter", "value": "" }, { "name": "size", "label": "Size", "value": [0.0, 0.0, 0.0] } ] } } 2. Create an entity and attach the component script to it. 3. Change both values to anything. 4. Create a new entity, attach the same component. You should see that "Size" is back to 0,0,0, but the "Filter" property got carried over from the first entity.
  14. As I mentioned here, a lot of scene properties don't get saved from the editor. Not sure if this carries over to user saves. But can't wait to try this. I've been very conservative about making components because I couldn't test reloading them.
  15. If I had a dollar for every time I forgot to register my components, I would have enough money to quit my job to play with Ultra Engine all day. You're correct, that example alone does not do anything (Minus make the ground darker for some reason). Registering the component that's used in the map should cause the crash. #include "UltraEngine.h" using namespace UltraEngine; #include "Components/Player/CameraControls.hpp" int main(int argc, const char* argv[]) { RegisterComponent<CameraControls>(); //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(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load scene auto scene = LoadMap(world, "Maps/savetest2.ultra"); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_F5)) { //Save the starting scene to a file scene->Save("game.sav"); } //Reload the starting scene when space key is pressed if (window->KeyHit(KEY_F6)) { scene->Reload("game.sav"); } world->Update(); world->Render(framebuffer); } return 0; }
  16. An awful bug I discovered when I wanted something to stop spinning when the speaker was done playing a 30 second clip. #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 world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); camera->Listen(); //Create a light auto light = CreateBoxLight(world); light->SetRotation(35, 45, 0); light->SetRange(-10, 10); //Create a box auto box = CreateBox(world); box->SetColor(0, 0, 1); //Sound bool hasplayed = false; auto sound = LoadSound("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Sound/notification.wav"); auto speaker = CreateSpeaker(sound); //speaker->SetLooping(true); speaker->SetPosition(box->GetPosition(true)); speaker->SetRange(10); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { //Play when space key is pressed if (window->KeyHit(KEY_SPACE)) { speaker->Play(); } if (speaker->GetState() == SPEAKER_STOPPED && hasplayed) { hasplayed = false; Print("THE SPEAKER HAS STOPPED!!"); } else if (speaker->GetState() == SPEAKER_PLAYING) { Print("playing"); hasplayed = true; } //Move and turn with the arrow keys - best experienced with headphones if (window->KeyDown(KEY_UP)) camera->Move(0, 0, 0.1); if (window->KeyDown(KEY_DOWN)) camera->Move(0, 0, -0.1); if (window->KeyDown(KEY_LEFT)) camera->Turn(0, -1, 0); if (window->KeyDown(KEY_RIGHT)) camera->Turn(0, 1, -0); world->Update(); world->Render(framebuffer); } return 0; }
  17. Yep, first brought it up here.
  18. Yep, this happened to me too a few times.
  19. FYI, your example actually is another example of this bug. You have 2 crawlers at the same location!
  20. This happens on both Nvidia and AMD GPUs.
  21. Similar issue to this but with models. "model": { "isLimb": false, "path": "D:/Projects/UltraGame/Models/Cyclone/Developer/commentary_node.mdl" },
  22. This example causes my issue. #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 world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Load scene auto scene = LoadMap(world, "Maps/savetest2.ultra"); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyHit(KEY_F5)) { //Save the starting scene to a file scene->Save("game.sav"); } //Reload the starting scene when space key is pressed if (window->KeyHit(KEY_F6)) { scene->Reload("game.sav"); } world->Update(); world->Render(framebuffer); } return 0; } savetest2.zip
  23. Should all work. I expect everything to work on my RX480 as well.
×
×
  • Create New...