-
Posts
543 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Posts posted by SlipperyBrick
-
-
Steps:
- Add NavMesh via editor:
1. Use Object panel to add Navigation Mesh to scene
2. Debug game
- Add NavMesh via code:
1. In main.cpp add following code after loading map:
auto navmesh = CreateNavMesh(world, 0, 8, 8); navmesh->Build();
2. Debug game
-
Adding a NavMesh object from the editor and then running the game shows no nav meshes in the scene.
Calling CreateNavMesh() to add a NavMesh object from code also doesn't show nav meshes in the scene either.
EDIT: Both m_navmeshes and navmeshes members in the `scene` object are 0 (love the m_ prefix, very old school) -
@Josh that worked! Cheers!
- 1
-
I've uninstalled both the client and editor and reinstalled, whenever I press launch from the client for my version of the editor I get the splash screen and then nothing after that. I've also tried to directly load the editor from where I've installed it and I get the same result.
I've checked my local app data folder and can't seem to find any lingering files/folders to remove.
-
Is UAK still receiving development? I swear I saw a comment somewhere on here that said UAK will only be available through UltraEngine.
Is this true?
If this is true, please reconsider.
Does UAK have the ability to add custom fonts yet? If it has this feature and is also left in a stable place for the standalone version then that's cool.
-
Hope this helps fellas. Good luck!
- 1
- 2
-
Ripped from an old thread I posted in ... back when I too pondered over the horrors of changing my applications icon.
On 3/24/2021 at 9:00 AM, SlipperyBrick said:What a painful experience. For anyone who is looking to do the same you need to follow this process:
- In Solution Explorer find the "Resource Files" folder (if you work in "Show all files" mode like I do you may need to switch to see the folder)
- Right click "Resource Files" folder and select Add > Resource...
- From the window dialog select "Icon" and choose "Import" (your icon must be .ico format)
With those steps complete, head over to wherever you have created your window and add the following code:
// Get device context HWND hwnd = m_Window->GetHandle(); HDC hdc = GetDC(hwnd); // Load the icon for window titlebar and taskbar HICON icon = LoadIconA(GetModuleHandle(NULL), (LPCSTR)IDI_ICON1); SendMessage(hwnd, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(icon));
I would recommend to clean up your projects directory by added a "res" folder and dragging in the files that were created when you added a resource to your project.
P.S. It should go without saying but whatever variable name you have provided for your window (mine is m_Window) replace that with your own.
All jokes aside it wasn't that difficult, the worst part was trawling through the Win32 API reference and hitting dozens of deprecated pages. @reepblue looking forward to the blog post ?
- 1
-
There is an easier solution I have found, which uses Lua. https://premake.github.io/
-
I have never compiled C++ code with any other compiler (I've never compiled C++ code on Linux either), I've never put a shirt on back to front, I've also never eaten cereal without milk (I'll stop with the never ever's).
I took a look at this for you and I gotta say, it made me feel sick, it shook me to my very core ?
All the years of technological advances in GUI's and fancy displays and we are back to the terminal window.
Anyway, from some reading and watching it didn't seem too bad to pick up. I will warn you though this is my first time but, this should hopefully give you a starting point and if this doesn't help then I'm sorry and I will be buying one of those Men in Black mind erasing pens and we will all cuddle in a circle waiting for that big flash.
From what I found, the general layout of these makefiles tend to follow a similar pattern, where they are made up of a set of rules:
targets: prerequisites command command command
- Targets are the files you want to output (similar to building an executable with Visual Studio, your target application type would be a .exe).
- Prerequisites are the files you would like to track, consider them dependencies that you need to use in order for any commands to work.
- Commands are the functions run to produce the output.
Lets say you have like 5 files, a main.cpp and two other .cpp and .h files (lets call them functions.cpp and functions.h and utilities.cpp and utilities.h). Those files when compiled make ".o" files (I'm pretty sure you are probably aware of this, me on the other hand ... I had no clue). If we extend this to the above pattern to achieve an automated build by calling the "make" command from your projects directory:
# output is our target that is built from our C/C++ source files, it depends on all other source files that are included within it output: main.o functions.o utilities.o g++ main.o functions.o utilities.o -o output # main.o is output only when main.cpp is changed (main.o depends on main.cpp), we run g++ -c main.cpp to produce main.o main.o: main.cpp g++ -c main.cpp # functions.o is output only when functions.cpp or functions.h is changed (functions.o depends on functions.cpp and functions.h), we run g++ -c functions.cpp to produce functions.o functions.o: functions.cpp functions.h g++ -c functions.cpp # utilities.o is output only when utilities.cpp or utilities.h is changed (utilities.o depends on utilities.cpp and utilities.h), we run g++ -c utilities.cpp to produce utilities.o utilities.o: utilties.cpp utilities.h g++ -c utilities.cpp # clean is a command that can be executed to remove all ".o" files (consider this to be very similar to running "Clean solution" in Visual Studio, you know ... when it removes all of your intermediary files and folders) clean: rm *.o output
There are some subtle syntax shenanigans at play here too, like you have to have 4 spaces before each command.
I found this for you which goes further than my explanation and there are some nice code examples too. Depending on how much time you really want to put into this I'm sure you could do some very complex automated build tasks (and it would certainly set you up in the long run). What I mentioned above though should get you by, although all those source files you have would be really tedious to have to type, you can do something called "pattern rules" which can form expressions to define more complex rules than the ones I wrote above.
Good luck!
-
On 4/30/2021 at 6:30 PM, takis76 said:
If this will be disabled what problem will cause?
Will it no support more than 1 monitors?
I believe the library wraps around the Win32 API. Of course Windows has had many features since Windows 7 and DPI scaling per monitors is one of them (which introduced other things such as dynamic scaling).
Also "disabling" this would break other things such as DPI awareness (which again Windows 7 doesn't support). I think you really only have one option, which is to upgrade to Windows 10.
Here is some further information regarding the efforts that went into DPI scaling for Windows 10
https://docs.microsoft.com/en-gb/archive/blogs/askcore/display-scaling-in-windows-10
-
Congrats on the release. Keep up the great work Josh!
I'm praying to GUI Jesus every night that we will get the ability for custom fonts in UAK. In return, I've promised a good deed. To stop my cat from s***ing in my neighbours garden.
- 2
-
On 4/7/2021 at 1:47 PM, Martin Harris said:
Dialogue Creation Editor
This is my long term project. D4Dialogue is an application specific editor for story and dialogue creation. In one application a game designer can target a gaming experience toward the player by directly integrating storyboard dialogue with game state functions. The flexibility of the D4d allows for branching, alternative endings and easter egg inclusion AT THE DEVELOPMENT STAGE of game design. Between this application and game code programming, story possibility can be fully explored, organised and exported into game engine code (JSON). By combining conditional code with story elements the writing process is simplified whilst also ensuring the writers intended storyline, timeline and character arc are fully referenced alongside the game play. Potential plot problems will be identified BEFORE game testing thereby releasing production time for other important design elements. The text editor allows the writer to focus on story telling and then quickly conditionalize the game elements visually from within the integrated editor. The main screen holds a highly interactive document binder (left of screen) to quickly navigate the story (nodes), character database (lower) and properties panel (right).
Features:
Player experience focus for story design
Character database with full character arc track and trace
Conditional programming interface which highlights ease of use through the GUI
Visual referencing of data and stats making summation with large projects a breeze.
This is what I have so far. Still working with buttons and looking in to the code for this, but is promising as I can access OpenGL in the centre window. Thanks Josh for the checkerboard code, this is the look I'm wanting to use.
The mock up shows what I am intending to do for a main display. Other items I whish to include are a text editor, a node editor for conditional variables, a time line window, and a fully functional properties panel accessible in main (shown on the right) where popular items can be set quickly and conveniently. The bottom panel holds the character database where individuals can thus be drag dropped into main and connected with action boards. These action boards are the main link into game state code and are the fulcrum by which events take place and outcomes are decided.
Looks like a good contender for articy:draft. Very cool idea and would certainly help formalise the game design/requirements gathering phase of a game project ?
-
Just now, m.yuneeb90 said:
I was thinking about using imgui for things like graph plotting and lines with in the UAK, the main editor would be build using UAK where as imgui only in a few renderable panels for quick out of the box ready widgets freely available online such as implot etc. But I am liking the customizable widgets demo that josh shared, playing with it at the moment. The only thing for me for now lacking in UAK is the ability to draw lines, bezier curves / shapes etc. Once those are in it will be a complete solution for me without any 3rd party library.
Nice man! I'd be interested in seeing your progress. I agree, shapes would be a welcomed addition (as well as custom fonts). I think UAK would be a complete solution then that would probably overtake IMGUI and other similar GUI libraries
- 1
-
I'm currently porting over my OpenGL renderer into my newest solution which is an application that will have a UAK GUI. I've not been able to completely focus on this at the moment as I have a bunch of University assignments I need to finish before start my masters research project. My end goal is to have an application that meets my current requirements for my research project (real-time neural supersampling, think NVIDIA DLSS but without NVIDIA hardware).
I'll write a short blog when I get back to working on it on how I managed to get modern OpenGL and UAK into my project (I've seen a few people ask about this in a couple of other posts).
On 4/4/2021 at 2:52 PM, m.yuneeb90 said:Yes at the moment I am thinking about combining app kit with imgui rendered in directx as directx is what I use mostly instead of opengl. Also I digged into widget blocks and tried to make them work with panel but couldnt get it working, so I will look forward to when you document it. Thanks.
Out of interest why would you want to use IMGUI with UAK? UAK pretty much does the same thing bar the fact that IMGUI is an immediate-mode GUI library. Personally I think UAK is actually better than IMGUI right now and offers so much more (GUI events, process handling, window creation and management, multi-threading) not to mention the whole library is wrapped in smart pointers ?
-
2 hours ago, Josh said:
I think you can do something similar by adding a lot of ListenEvent() callbacks, using EVENT_NONE and NULL so that all events pass through the callback. I tend to put different tools and windows of my application each in their own code file so the program gets compartmentalized pretty well.
One of the methods I use in my concrete classes (that derives from my Layer base class) is OnEvent(). With the event class UAK provides this gives some amazing flexibility, I pass an UltraEngine::Event as a reference to my OnEvent() methods and now I can iterate through all events in my applications layerstack.
Applications Run():
void Application::Run() { // Initialize applications GUI OnInit(); while (!m_Window->Closed()) { if (!m_Window->Minimized()) { // Update all the applications layers in the layer stack for (Layer* layer : m_LayerStack) { layer->OnUpdate(m_TimeStep); } // Check if any events exist in the event queue if (UltraEngine::PeekEvent()) { // Return the oldest event from the event queue UltraEngine::Event e = UltraEngine::WaitEvent(); // Process the event (s_Instance is the instance of the application) s_Instance->OnEvent(e); } } } }
Applications OnEvent():
void Application::OnEvent(UltraEngine::Event& e) { // Event callbacks go here UltraEngine::ListenEvent(e.id, s_Instance->GetWindow(), Application::OnWindowResize); // Traverse the applications layer stack to handle events for (auto it = m_LayerStack.end(); it != m_LayerStack.begin(); ) { (*--it)->OnEvent(e); } }
Callback OnWindowResize():
bool Application::OnWindowResize(const UltraEngine::Event& e, std::shared_ptr<UltraEngine::Object> o) { if (e.id == UltraEngine::EVENT_WINDOWSIZE) { ... } return true; }
Every layer in the layerstack has an OnEvent() which passes an Ultra Engine event. This allows me to call ListenEvent in each layers class and also allows me to implement the event callback in each layers class too.
void SmartexGUILayer::OnEvent(UltraEngine::Event& e) { UltraEngine::ListenEvent(e.id, Application::Get()->GetWindow(), SmartexGUILayer::OnSomeButtonThatIsPressed); }
GUI widget events I can handle now in my SmartexGUILayer class by calling ListenEvent in its OnEvent() and implementing the event callback in there too. UAK has made it real easy ?
-
On 3/31/2021 at 2:08 PM, Cromartie said:
Hello everyone. How can I fix the .ico display problem?
I would recommend to check out post build events in Visual Studio if you wish to add any kind of content that your application will use (that is if you are even using Visual Studio). Post build events allow you to run commands post build (yeah, pretty obvious haha). This gives you the opportunity to do things like copy directories over for resources you have used in your application, for example lets say you used some nice looking icons for your GUI you will want to make sure your release target directory has all the appropriate folders and files for those to be packaged in your final target directory.
Failing to do this will give you some nasty surprises (not really nasty surprises, its fairly obvious that any resources you use within your Visual Studio project won't be present in your built binary folder) when you run your application outside of the Visual Studio environment. If you are trying to change your applications default icon for some branding purposes then I did post an example a few pages from here in this thread
- 1
-
I've already started some designs on the backend of my application and I gotta say, UAK fits so well into all of this (I've not stumbled upon any limitations). There is so much room for code abstraction, it can pretty much conform to whatever design an application requires.
The pattern I tend to follow when making a robust system is to have an Application class that contains a list of layers. Layers are my abstraction for other components of my application. I have various interfaces for each layer and my concrete classes derive from those for their implementations. In my applications run loop I simply iterate over all layers in the applications layer stack to execute their code. Following good programming practices such as DRY and SOLID this gives a pretty extendable architecture to your codebase.
Thanks for the video tutorials for some of the code examples in the docs too, very welcomed stuff!
-
19 minutes ago, Josh said:
@comanchetrI also added documentation for AllocEventID():
https://www.ultraengine.com/learn/CPP/AllocEventIDYou can use it like this to make a new event ID for custom events:
const EventID EVENT_PROCESSCLOSE = AllocEventID();
Ah sick man! Thanks for this!
-
21 minutes ago, Josh said:
Not yet. The DPI scaling made this a little tricky. There is a command to change the font scale for a widget, and it will give consistent results no matter what DPI is in use.
Ok the "not yet" has me hopeful haha. Yeah I saw the SetFontScale(), I'll just hang in there for now and wait for further developments ?
- 1
-
Does UAK have any functionality for changing the font of your GUI? I've been perusing through the documentation and can't seem to find any hint of loading a new font. I saw freetype in the dependencies so I assume it can be done but maybe not through UAK ?
-
What a painful experience. For anyone who is looking to do the same you need to follow this process:
- In Solution Explorer find the "Resource Files" folder (if you work in "Show all files" mode like I do you may need to switch to see the folder)
- Right click "Resource Files" folder and select Add > Resource...
- From the window dialog select "Icon" and choose "Import" (your icon must be .ico format)
With those steps complete, head over to wherever you have created your window and add the following code:
// Get device context HWND hwnd = m_Window->GetHandle(); HDC hdc = GetDC(hwnd); // Load the icon for window titlebar and taskbar HICON icon = LoadIconA(GetModuleHandle(NULL), (LPCSTR)IDI_ICON1); SendMessage(hwnd, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(icon));
I would recommend to clean up your projects directory by added a "res" folder and dragging in the files that were created when you added a resource to your project.
P.S. It should go without saying but whatever variable name you have provided for your window (mine is m_Window) replace that with your own.
- 3
- 2
-
Ugh I hate Windows haha. How the heck do you change the titlebar default icon to one of your own. Stackoverflow and the Win32 documentation is sending me on a wild goose chase. I have added a resource and selected my .ico file but from there it seems a mystery to use the icon in the windows titlebar ?
-
6 minutes ago, Josh said:
@SlipperyBrickHow are you getting the dark titlebar in Windows?
That's my personalise settings in Windows 10. If you right-click your desktop and go to Personalise > Colours. Scroll to the bottom of the window and you'll see "Show the accent colour on the following surfaces". You can check "Title bars and window borders" from there. The colour I have is called Storm.
- 1
-
The start of my GUI with Ultra App Kit (the empty space underneath the 3D viewport will have a console for output). Such a friendly API though, really easy to work with and it really doesn't take much to get great results! ?
Josh you are a GUI fiend! Thanks for sharing this with us and not locking it away from the world ??
- 2
Multi-selection not working
in Bug Reports
Posted
When in the scene panel if you select multiple items in the hierarchy using CTRL + RMB or SHIFT + RMB you cannot drag those selected items for nesting under another item.