Jump to content

StOneDOes

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by StOneDOes

  1. Yep the editor starts for me now with the latest update. Before it appeared to do nothing after showing the splash screen.
  2. Awesome; this was my next question about the editor, because I have a 6600 XT
  3. Since this was moved to bug reports, does this mean that you are aware of some issues already? Just wondering, because the reason I didn't create the thread here is because I'm not sure if there have just been changes and I'm now doing it all completely wrong. Thanks.
  4. Some 6-8 months ago I had successful navigation on terrain, but it seems that something has changed and has broken what I had working. I was originally working off what I had here in this thread: The first sign that something had changed was that Model::SetNavigationMode() no longer exists and had to remove it to make the program compile. So the issues I've found so far are: CreateNavMesh() has been changed and now seems to always create the same size mesh no matter the size parameter that I enter I have had to change around the order of positioning the model, nav agent, and attaching the nav agent to the model to make them not appear at pos (0,0,0) I have to position the objects above the terrain, and they appear to just hover, not actually sit on it like they used to Whether NavAgent::Navigate() returns true or false, the object does not appear to move at all Does anyone have a working sample of terrain navigation with the current release? Any help appreciated thanks.
  5. Dammit ... turns out its my McAfee virus scan being over protective again on Editor.exe. Although if anyone still has advice on upgrading project that would be nice thanks.
  6. Hi guys, I haven't been around too much for a while, and having trouble building my project. Apparently I'm missing preprocessor.exe, so I try removing that from pre build step because apparently it is not used anymore. After that the next issue is: F:\Ultra Engine Projects\SG23\Source\UltraEngine.cpp(1,10): fatal error C1083: Cannot open include file: 'UltraEngine.h': No such file or directory Rather than me trying to work all these issues out individually, is there a simple way to upgrade that does not involve creating a new project? And honestly I'm not I even sure that know how to create a new project anymore; when pressing new project all I get is a folder with just Ultra.json in it ... I'm real bad at remembering things.
  7. I can attest to that. I've got a few things I've either bought or been gifted and never installed/played.
  8. I have no doubt about that. Its just a nuisance for when I'm trying to see what certain effects look like, like my placement grid here:
  9. Interesting. But it seems like more work than just a simple const accessor function?
  10. Oh what!? I swear my visual studio is broken. Ctrl+F found once occurrence of "kids" the first time ... but now I can see it lol. Thanks.
  11. Perfect, thank you. Can you please add a function that returns the element count of Widget::m_kids ? Because that member is protected. There is a Widget::CountChildren() but it is commented out.
  12. StOneDOes

    2D Depth

    Is there a way to reorder the depth of UI widgets such that I can choose what should appear at the frontmost of the view? At the moment it seems that widgets render in the order they were created.
  13. This is really cool. Is it Leadwerks or Ultra?
  14. I haven't really looked too much into the component system. I thought components would be more relevant if I was creating a world using an editor, such that I could change values and whatnot. But most of my things ingame are created by the user I didn't think it necessary. Correct me if I'm wrong? Each playable unit that moves on the ground has a NavAgent, and clearly they all work nicely together. I'm not sure if I like units punching straight through a stationary crowd to get to their destination but I'm sure I can fine tune that. Beyond that I have a unit manager in which every playable object needs to be checked each frame in order to update positions on the minimap and to make sure they correctly come to a halt when they are close enough to their next destination, and of course to auto attack enemy units if they come close enough. I'm open to suggestions if there are better ways.
  15. Thanks heaps for the fast response. Its looking good now. And almost chose the exactly colour that I wanted
  16. Ok thanks for the explanation. But I can't get the sprite to show with the cameras present. Is there a trick to get this to work correctly?
  17. It seems when a widget is constantly resized, the UI does not appear to either sync or re-render correctly. Using the following sample of code, use the mouse left click to create and draw a rectangle. You can see the rectangle disappears for moments at a time. It doesn't seem to be too bad by itself, but it becomes extremely noticeable when you add the 3D camera and the terrain. This is mostly just the terrain sample and UI sample glued together. See attached video. video.zip Can anyone please confirm if this happens on your PC. ----------------------------------------------- CPU - AMD Ryzen 9 3900X 12 Core @3.8GHz GFX - AMD Radeon RX 6600 XT RAM - Corsair Vengeance RGB PRO 16GB DDR4 @3200MHz #include "UltraEngine.h" using namespace UltraEngine; #define MB_LEFT 1 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(); //Create a 3d camera auto camera = CreateCamera(world); camera->SetFov(70); camera->SetPosition(0, 50, 0); camera->SetRotation(45, 0, 0); camera->SetClearColor(0.125); //Sunlight auto light = CreateDirectionalLight(world); light->SetRotation(45, 35, 0); light->SetColor(2); //Create terrain auto terrain = CreateTerrain(world, 512); terrain->LoadHeightmap("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Terrain/512.r16"); terrain->SetScale(1, 100, 1); //Create base material auto ground = CreateMaterial(); auto diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_4k.dds"); auto normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_4k.dds"); ground->SetTexture(diffusemap, TEXTURE_DIFFUSE); ground->SetTexture(normalmap, TEXTURE_NORMAL); terrain->SetMaterial(ground); //Create paint material auto rocks = CreateMaterial(); diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds"); normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds"); auto dispmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds"); rocks->SetTexture(diffusemap, TEXTURE_DIFFUSE); rocks->SetTexture(normalmap, TEXTURE_NORMAL); rocks->SetTexture(dispmap, TEXTURE_DISPLACEMENT); //Apply material based on terrain slope for (int x = 0; x < terrain->resolution.x; ++x) { for (int y = 0; y < terrain->resolution.y; ++y) { float slope = terrain->GetSlope(x, y); if (slope > 15.0f) { float wt = Min((slope - 15.0f) / 10.0f, 1.0f); terrain->SetMaterial(x, y, rocks, wt); } } } //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface auto ui = CreateInterface(world, font, framebuffer->size); //Create camera auto uiCamera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); uiCamera->SetPosition(float(framebuffer->size.x) * 0.5f, float(framebuffer->size.y) * 0.5f, 0); uiCamera->SetClearMode( ClearMode::CLEAR_DEPTH ); auto rect = CreatePanel( 0, 0, 0, 0, ui->root, PANEL_BORDER ); rect->SetColor( Vec4( 0, 0.f, 0.f, 0.f ), WIDGETCOLOR_BACKGROUND ); rect->SetColor( Vec4( 255, 255, 255.f, 255.f ), WIDGETCOLOR_BORDER ); auto mouseDown = false; iVec2 clickPos; while (true) { while (PeekEvent()) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: { if (ev.source == window) { return 0; } break; } case EVENT_MOUSEDOWN: { const auto button = ev.data; if( !mouseDown && button == MB_LEFT ) { mouseDown = true; clickPos = { window->GetMousePosition().x, window->GetMousePosition().y }; } break; } case EVENT_MOUSEUP: { const auto button = ev.data; if( button == MB_LEFT ) { rect->SetShape( 0, 0, 0, 0 ); mouseDown = false; } break; } default: { ui->ProcessEvent(ev); break; } } } if( mouseDown ) { auto mousePosition = window->GetMousePosition(); rect->SetShape( Min( mousePosition.x, clickPos.x ), Min( mousePosition.y, clickPos.y ), Abs( clickPos.x - mousePosition.x ) + 1, Abs( clickPos.y - mousePosition.y ) + 1 ); } world->Update(); world->Render(framebuffer); } return 0; }
  18. One thing I have not really done before in game development is manage multiple screen resolutions. I understand that the viewport size changes so UI graphics don't actually change size in this case, but the positioning of UI elements has to be managed, right? I'm wondering for those of you who have done this before; what you did and what advice you have. Is it as simple as just using multiplication of the different ratios to reposition the UI, or store different positions per resolution? Its not overly important at the stage I'm at right now, but its still something to think about. Thanks.
  19. Okay thank you for posting all this, I'll take a look into this and get back to you when I can. I'll be looking more to fine tune movement a bit later I guess, for now I'm trying to get the basics of each aspect of my framework down
  20. Sadly updating did not fix my issue.
  21. When you say to update my project, is this an additional step to updating the software under the updates tab? Something interesting that I did notice that under the Projects tab, is that my project has a green tick on it, but then I clicked Update in the Updates tab (which oddly enough took only like 3 seconds), and now it shows a little yellow triangle on my project where the tick was. Does this mean anything? This is why I think it would be idea to display the exact version that the software is running eg. v1.01.123
  22. @Josh have we received any word from AMD on this yet?
  23. There are some members of the NavAgent class that are useful but protected such as m_velocity would be ideal to have exposed by public function along with destination member. Also the ability to control the rate of which an agent must rotate before fully accelerating should be controllable. A larger value would give the object a larger turning circle, wheras a lower value or 0 would indicate that no actual rotation is required, but instead the model immediately faces the direction of the new destination and starts accelerating. If I can think of anything else I'll let you know but thats all for now Thanks
  24. They will be, slightly, because you don't have the extra overhead. There isn't anything wrong with raw pointers so long as there is a clear memory management pattern, but may not work well amongst larger teams of developers. With smart pointers you won't have leaks, and generally it is the accepted practise. This has been taken out of context (a link to quoted source is ideal). What you're referring to is the 'auto' keyword used in C, not C++. It is just comparing static variable declaration vs non-static. In C++, the type where auto keyword is used is automatically deduced by the compiler at compile time, and has no impact on performance. Its true that static variables may be considered "faster" because your only initialzing them once, and destroying them once, but you'll often require logic to track their value. They have their purposes, but not overly common. That's not necessarily true. You'll find that the compiler will optimize this and the difference will likely not be measurable or even existent.
×
×
  • Create New...