Jump to content

aiaf

Members
  • Posts

    720
  • Joined

  • Last visited

Everything posted by aiaf

  1. Guess any of that would do for intro. What i recommend is to make sure it uses the Opengl 3 api , dont think is any point to learn opengl2 this days. And then you can go for a book. like the Opengl Superbible , i think it always gets updated with the latest developments.
  2. aiaf

    glTF Export

    Ok sounds good we can convert to glb + ktx in final stages of a game. Ktx format will be coming to blender soon enough most likely.
  3. aiaf

    Real-time Scripting in Editor

    There is a configuration to switch to just one rendering viewport ? instead of 4
  4. Seems 2022 was released 8 november. It should work but better just test, microsoft usually take great care of backward compatibility.
  5. No idea if can be used for your purpose but here are some links: https://docs.unity3d.com/Manual/NativePlugins.html https://github.com/Unity-Technologies/NativeRenderingPlugin https://docs.unity3d.com/Manual/NativePluginInterface.html
  6. Yes search and have at least some simple globbing patterns like grass*.gltf, ????.tex
  7. UAK color theme is just cool period! I prefer we have just 1 engine/editor that is actually getting support and fixes.
  8. aiaf

    Distributing a Mac App

    Hmm i got my hands on a m1 mac , and built an arm64 binary for the Stacky Desktop Edition (it uses UAK). Its runs just fine on the machine. But if i try to run it from steam , it crashes with error steamloader lib no matching architecture. I noticed your app has a libsteam_api.dylib, tried to include that but didnt work.Any idea ?
  9. Works well I went up and visited the mars base
  10. Class with several widgets declared in it that are somehow related in the functionality. So you can put that to a separate file. class RocketControlWidgetGroup { std::shared_ptr<UltraEngine::Widget> ignitionButton; std::shared_ptr<UltraEngine::Widget> selfDestruct; std::shared_ptr<UltraEngine::Widget> selfTest; etc }; The usual object oriented example is a Car with different objects in it Engine,Wheels, Doors etc
  11. Just a few ideas can be done in many ways 1. I just use functions in different files , like handlers for simple projects. some_button_handle_action(button type, etc) I pass the widget to the function and thats it. You could also have an array of pointers to functions. 2. Derive from the UAK widgets and add your own handling. 3. Composition, you have a panel with several widgets and you create a class (file) that initialize all those widgets, and handles the interaction. 4. Some kind of finite state machine. Have a look at this article: https://gameprogrammingpatterns.com/state.html
  12. Probably they made sure appstore is the only way to sell stuff on their platform. Seem you can get the opensource tools (and more) with https://brew.sh/ It has gcc etc, if i get my usual linux environment i could use macos
  13. Steam UAK libs on windows (Beta 1.1.) are old ... yesterday was ok , i created a new project and now i have the old bugs that were fixed for 1.1. Also would like to have the latest UAK release when not using betas on steam. Beta None should give the latest non beta version (1.1 at the moment) , at the moment it doesnt start the project launcher.
  14. I tried with my original code. Looking good, i think can be closed
  15. Here is simplified code to reproduce the problem: #include "UltraEngine.h" #include <time.h> using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Test", 0, 0, 470, 600, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); auto ui = CreateInterface(window); vector<std::shared_ptr<UltraEngine::Widget>> left_stack_items; vector<std::shared_ptr<UltraEngine::Widget>> right_stack_items; auto sz = ui->root->GetSize(); auto tabber = CreateTabber(10, 10, sz.x - 20, sz.y - 20, ui->root); tabber->AddItem("Main", true); array<shared_ptr<Widget>, 4> panels; sz = tabber->ClientSize(); panels[0] = CreatePanel(0, 0, sz.x, sz.y, tabber); //Main panel //panels //left auto panel0 = CreatePanel(10, 40, sz.x / 2 - 15, sz.y - 150 - 10, panels[0]); panel0->SetColor(0.3, 0.3, 0.3, 1); panel0->SetLayout(1, 1, 1, 1); auto panel0sz = panel0->GetSize(); for (int i = 0; i < 10; i++) { left_stack_items.push_back(CreateLabel("0", 5, panel0sz.y - i * 30, 197, 25, panel0, LABEL_BORDER | LABEL_CENTER | LABEL_MIDDLE)); left_stack_items[i]->Hide(); } for (int i = 0; i < 10; i++) { left_stack_items[i]->SetText(i); left_stack_items[i]->Show(); } CreateLabel("Working", 0, 0, panel0sz.x, 25, panel0, LABEL_CENTER | LABEL_MIDDLE); //right auto panel1 = CreatePanel(sz.x / 2 + 5, 40, sz.x / 2 - 15, sz.y - 150 - 10, panels[0]); panel1->SetColor(0.3, 0.3, 0.3, 1); panel1->SetLayout(1, 1, 1, 1); auto panel1sz = panel1->GetSize(); CreateLabel("Target", 0, 0, panel1sz.x, 25, panel1, LABEL_CENTER | LABEL_MIDDLE); //1 op auto plus_btn = CreateButton("DUP", 5, sz.y - 110, 50, 50, panels[0]); plus_btn->SetLayout(1, 1, 1, 1); auto minus_btn = CreateButton("DROP", 60, sz.y - 110, 50, 50, panels[0]); minus_btn->SetLayout(1, 1, 1, 1); auto over_btn = CreateButton("OVER", 115, sz.y - 110, 50, 50, panels[0]); over_btn->SetLayout(1, 1, 1, 1); auto swap_btn = CreateButton("SWAP", 170, sz.y - 110, 50, 50, panels[0]); swap_btn->SetLayout(1, 1, 1, 1); auto nip_btn = CreateButton("NIP", 225, sz.y - 110, 50, 50, panels[0]); nip_btn->SetLayout(1, 1, 1, 1); auto tuck_btn = CreateButton("TUCK", 280, sz.y - 110, 50, 50, panels[0]); tuck_btn->SetLayout(1, 1, 1, 1); auto rot_btn = CreateButton("ROT", 335, sz.y - 110, 50, 50, panels[0]); rot_btn->SetLayout(1, 1, 1, 1); auto minusrot_btn = CreateButton("-ROT", 390, sz.y - 110, 50, 50, panels[0]); minusrot_btn->SetLayout(1, 1, 1, 1); //2 ops auto plus2_btn = CreateButton("2DUP", 5, sz.y - 55, 50, 50, panels[0]); plus2_btn->SetLayout(1, 0, 0, 1); auto minus2_btn = CreateButton("2DROP", 60, sz.y - 55, 50, 50, panels[0]); minus2_btn->SetLayout(1, 0, 0, 1); auto over2_btn = CreateButton("2OVER", 115, sz.y - 55, 50, 50, panels[0]); over2_btn->SetLayout(1, 0, 0, 1); auto swap2_btn = CreateButton("2SWAP", 170, sz.y - 55, 50, 50, panels[0]); swap2_btn->SetLayout(1, 0, 0, 1); auto nip2_btn = CreateButton("2NIP", 225, sz.y - 55, 50, 50, panels[0]); nip2_btn->SetLayout(1, 0, 0, 1); auto tuck2_btn = CreateButton("2TUCK", 280, sz.y - 55, 50, 50, panels[0]); tuck2_btn->SetLayout(1, 0, 0, 1); auto rot2_btn = CreateButton("2ROT", 335, sz.y - 55, 50, 50, panels[0]); rot2_btn->SetLayout(1, 0, 0, 1); auto minusrot2_btn = CreateButton("2-ROT", 390, sz.y - 55, 50, 50, panels[0]); minusrot2_btn->SetLayout(1, 0, 0, 1); float scale = displays[0]->scale; window->SetShape(0, 0, 470 * scale, 600 * scale); ui->SetScale(scale); while (true) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETACTION: break; case EVENT_WIDGETSELECT: break; case EVENT_QUIT: case EVENT_WINDOWCLOSE: return 0; break; default: break; } } return 0; }
  16. Same code has different results on windows and linux. Can be seen , the last buttons (-ROT and 2-ROT) are not shown completely on windows. On linux we can see the proper result with no issues. Here windows is running in a VM , but i tested on native windows it looks the same. Below just on windows with 150% scale, the issue can be seen clearer:
  17. I created a fresh UAK project on windows. And added some util i always use Configuration.h Configuration.cpp: in main: #include "UltraEngine.h" #include "Configuration.h" using namespace UltraEngine; int main(int argc, const char* argv[]) Configuration.h: #pragma once #include <string> #include <iostream> #include <fstream> #include "Libraries/nlohmann_json/single_include/nlohmann/json.hpp" using json = nlohmann::json; class Configuration I get this error, no matter how i include it, and can be seen the UltraEngine is included first in the main. Severity Code Description Project File Line Suppression State Error C1010 unexpected end of file while looking for precompiled header. Did you forget to add '#include "UltraEngine.h"' to your source? Mega C:\Users\alex\Documents\Ultra Engine\Projects\Mega\Source\Configuration.cpp 50 I read about precompiled headers and what they are used for, i even tried to deactivate them but doesnt work. https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1010?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(C1010)%26rd%3Dtrue&view=msvc-160 For sure im missing something ... anyone can help ?
  18. aiaf

    fstream C2065

    This is pretty bad from user experience point of view. Really don't want to deal with this kind of things, the standard headers should work out of the box. Having same problem with UAK.
  19. Haha , my internet filtering skills got triggered by this , and i almost stopped reading after the second paragraph lol but was good info after.
  20. button->SetText("updated"); Notify("Button updated"); Button text only updates after you press ok, but its called first. And in my original case i didnt see the last state of the game because of this. I did my thing in another way using widgets #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("ZKonquest", 0, 0, 800, 600, displays[0]); //Create User Interface auto ui = CreateInterface(window); //Create widget auto sz = ui->root->ClientSize(); auto tabber = CreateTabber(10, 10, sz.x - 20, sz.y - 20, ui->root); tabber->AddItem("Main", true); tabber->AddItem("Item 2"); tabber->AddItem("Item 3"); array<shared_ptr<Widget>, 3> panels; sz = tabber->ClientSize(); panels[0] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[1] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[2] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[1]->Hide(); panels[2]->Hide(); auto button = CreateButton("Button", 0, 0, 120, 30, panels[0]); float scale = displays[0]->scale; window->SetShape(0,0,470 * scale, 600 * scale); ui->SetScale(scale); while (true) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETACTION: if (ev.source == button) { button->SetText("updated"); Notify("Button updated"); } break; case EVENT_WIDGETSELECT: if (ev.source == tabber) { for (int n = 0; n < tabber->items.size(); ++n) { if (n == ev.data) { panels[n]->Show(); } else { panels[n]->Hide(); } } } break; case EVENT_WINDOWCLOSE: return 0; break; } } return 0; }
  21. for(int i=sgen->GetInitial().size()-1; i<12; i++) { left_stack_items[i]->Hide(); } for(int i=0; i< sgen->GetInitial().size(); i++) { left_stack_items[i]->SetText(sgen->GetInitial()[i]); if(left_stack_items[i]->Hidden()) { left_stack_items[i]->Show(); } } Notify("Win!"); https://www.ultraengine.com/learn/CPP/Notify I click a button i modify some widgets in gui then i call notify. The gui does not get refreshed , there is a way to make my code above Notify to take effect ? I notice when the Notify is open , the button that triggerd this is in selected mode with blue rectangle on it. Im on ubuntu didnt try on windows.
  22. 2 suggestions here: to have tooltips for some of the widgets (buttons etc). example of string internationalization with UAK (some foreign alphabet + fonts)
  23. @Erwin Saavedra just need to make it cross platform: IF(UNIX) ELSE (WIN32) ENDIF (UNIX) set(CMAKE_BUILD_TYPE Debug) @reepblue you have cmake generator CodeLite - Unix Makefiles For me im switched to Visual Code on linux, far better then anything else.
  24. In Visual Code to be able to use Go To Definitions and intellisense Ctrl Shift P select C/C++ Edit configurations Add to the includePath "/home/your user here/.steam/debian-installation/steamapps/common/UltraAppKit/Include/**" A json file (c_cpp_properties.json) will be created in your .vscode. Think they have some bugs, i had to add the UltraEngine.h to forcedInclude and after all started to work. https://code.visualstudio.com/docs/cpp/customize-default-settings-cpp
  25. aiaf

    ComboBox demo

    Coudnt find breaking behavior. Just one small thing: Your screen shot is a good example, you can see the last item being shown just in half. If you hover it , will properly show it and make the top item of the combo box show in half. This depends on position of screen, i can create case where a another item exist at end and not shown until you hover bottom side I suppose its just detail, if is the same on windows should be ok.
×
×
  • Create New...