Jump to content

reepblue

Developers
  • Posts

    2,491
  • Joined

  • Last visited

Posts posted by reepblue

  1. This lua script will generate a working VS project with Premake. Replace "Game" with the title of your project. I store premake5.exe and this script in a "Tools" folder where my preprocessor also sits. 

    I might make a git repo in the future depending how often this will change. 

    -- Define Ultra Engine Paths
    UltraEnginePath = os.getenv("ULTRAENGINE")
    if UltraEnginePath==nil then return end
    
    -- Define Game Directory (Relative to this premake script)
    GameDir = path.getabsolute("..")
    
    -- Define Root Source Directory
    SourceDir = GameDir .. "/Source"
    
    -- Define Soultion Directory
    SoultionDir = GameDir
    
    -- Define tools Directory
    ToolsPath = GameDir .."/Tools"
    
    -- Workspace
    workspace "Game"
        location "%{SoultionDir}"
        startproject "Game"
        configurations { "Debug", "Release"}
    
        filter {"system:windows", "configurations:*"}
            architecture "x64"
    
        project "Game"
            targetname ("Game")
            location "%{SoultionDir}"
            language "C++"
            cppdialect "C++17"
            staticruntime "off"
            editandcontinue "on"
            flags { "MultiProcessorCompile" }
            conformancemode (false)
    
            -- Game Location
            targetdir("%{GameDir}")
            debugdir ("%{GameDir}")
    
            -- OBJ Output Location
            objdir ("%{prj.location}/.vs/%{cfg.buildcfg}")
    
            -- Include Directories
            includedirs
            {
                -- Engine
                "%{UltraEnginePath}/Include",
                "%{UltraEnginePath}/Include/Libraries/zlib",
                "%{UltraEnginePath}/Include/Libraries/Box2D",
                "$(UniversalCRT_LibraryPath)",
                "%{UltraEnginePath}/Include/Libraries/freetype/include",
                "%{UltraEnginePath}/Include/Libraries/OpenAL/include",
                "%{UltraEnginePath}/Include/Libraries/RecastNavigation/RecastDemo/Include",
                "%{UltraEnginePath}/Include/Libraries/RecastNavigation/DetourCrowd/Include",
                "%{UltraEnginePath}/Include/Libraries/RecastNavigation/DetourTileCache/Include",
                "%{UltraEnginePath}/Include/Libraries/RecastNavigation/DebugUtils/Include",
                "%{UltraEnginePath}/Include/Libraries/RecastNavigation/Recast/Include",
                "%{UltraEnginePath}/Include/Libraries/RecastNavigation/Detour/Include",
                "%{UltraEnginePath}/Include/Libraries/sol3/include",
                "%{UltraEnginePath}/Include/Libraries/Lua/src",
                "%{UltraEnginePath}/Include/Libraries/enet/include",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dTinyxml",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dExtensions",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dlkSolver",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dJoints",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dModels/dVehicle",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dModels/dCharacter",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dModels",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dParticles",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dNewton",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dCore",
                "%{UltraEnginePath}/Include/Libraries/newton/sdk/dCollision",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dVehicle/dMultiBodyVehicle",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dVehicle",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dMath",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dgCore",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dgNewton",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dAnimation",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dgTimeTracker",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dContainers",
                "%{UltraEnginePath}/Include/Libraries/NewtonDynamics/sdk/dCustomJoints",
    
                -- Local Source Directory
                "%{SourceDir}"
            }
    
            files
            {
                "%{SourceDir}/**.h",
                "%{SourceDir}/**.hpp",
                "%{SourceDir}/**.cpp",
            }
    
            -- Global Defines:
            defines
            {
                "_NEWTON_STATIC_LIB",
                "_CUSTOM_JOINTS_STATIC_LIB",
            }
    
            -- Shared PCH
            pchheader "UltraEngine.h"
    
        ---------------------------------------------------------
        -- Visual Studio Exclusive
        ---------------------------------------------------------
        filter "action:vs*"
            systemversion "latest"
            entrypoint "mainCRTStartup"
            pchsource "%{SourceDir}/UltraEngine.cpp"
    
            files
            {
                "%{SourceDir}/**.ico",
                "%{SourceDir}/**.rc"
            }
    
            libdirs 
            { 
                "%{UltraEnginePath}/Library"
            }
                
            defines
            {
                "NOMINMAX",
                "_HAS_STD_BYTE=0",
            }
    
            linkoptions 
            {
                "/delayload:openvr_api.dll" 
            }    
    
            -- Preprocessor
            prebuildcommands
    		{
    			--"\"%{ToolsPath}/preprocessor.exe\" +path ../"
    		}
    
        filter {"system:windows", "configurations:Debug"}            
            links 
            {
                "UltraEngine_d.lib"
            }
    
        filter {"system:windows", "configurations:Release"}
            links 
            {
                "UltraEngine.lib"
            }            
    
        filter "configurations:Debug"
             defines
            {
                "DEBUG",
                "_DEBUG"
            }
    
            kind "WindowedApp"
            targetsuffix "_d"
            runtime "Debug"
            symbols "on"
        
        filter "configurations:Release"
            defines
            {
                "NDEBUG"
            }
    
            kind "WindowedApp"
            runtime "Release"
            symbols "off"
            optimize "off"
        ---------------------------------------------------------
        ---------------------------------------------------------

    My batch script:

    @echo off
    
    :: Check to see if Ultra Engine is installed and defined.
    if not exist "%ULTRAENGINE%" (
    	echo ERROR: Unable to find Ultra Engine installed on this PC! Try running the editor first!
    	pause
    	EXIT /B 999
    )
    
    echo Found Ultra Engine at: "%ULTRAENGINE%"
    
    :: Go into the Tools folder.
    pushd .
    cd Tools
    premake5.exe --file=premake5.lua vs2022
    popd
    
    pause

     

    • Like 2
  2. 4 hours ago, Josh said:

    Objects will no longer be created instantly when you release the mouse, but the outline will be visible. You can then press Enter to create or right-click the mouse and a single "Create" menu item will appear, which you can click to proceed with creation (how old-school Hammer does it). Object types that involve creation parameters (like cylinders) will then show a small window with the parameters you can adjust, and then press OK or hit enter again, or escape to cancel.

    If a point entity is selected as the current object type, the blue cross will appear immediately when you click the mouse, if the create object mouse tool is active. The blue cross can be adjusted in different viewports, and when you are ready you can either press enter to create the object or right-click and select the "Create" popup menu that appears.

    💙

  3. Posting this here so my thoughts have been heard before the weekend.

    I think the left sidebar should return with the following:

    • Object Selection/Edit Mode
    • Face Selection/Edit Mode
    • CSG Creation
    • Point Entity Creation (Lights, Pivots, Etc)
    • Volume Entity Creation (Probes, NavMesh, maybe even make a new entity that's just an empty volume for triggers so we don't have to make trigger brushes invisible in code anymore.) 
    • Terrain Tool (Sculpting Terrain only)
    • Paint Tool (Vertex/vegetation painting) 

    The Object tab would reflect what can be created in each mode. Something I never got used to was having what I can make split up in different categories. I should be able to see every point entity I can create in one menu. I also want to turn Instant Creation off. I also think the paint tool should be different from the terrain tool as I would like to see vertex painting on bushes to add more variety to walls and floors in the future. 

    Some of this can be optimized, but just some thoughts when it comes to the 3 creation points.

  4. Pushed an update adding a scroll bar to the settings window and deleted references/files that were part of some failed experiments. 

    I think I'm going to draw the line here for now. Any other thing I try to do feels like I'm intruding on the developer.  

  5. Josh and I were talking about effects that should be part of the default shaders. I'm making a list here.

    1. Simple UV manipulation:
      • Rotation - I should be able to simply spin a material from the center or a defined position in the UV.
      • Scrolling - For conveyer belts and such. I might also use this for my fizzler.
    2. Animation with a volume texture.
      • All texture sheets should cycle its frames unless the sheet doesn't have any additional frames.
      • If possible, maybe allow for each sheet to have its own animation speed defined in the material? If not, one speed value for the entire material is fine.
      • If no speed is defined, it should animate at 60fps automatically. 
    3. Emission Color Modification.
      • In Cyclone, I created a shader that piped the entity's color to the emission mask instead of the diffuse texture and it worked out really well. I just had to change the entity's color in code to make something glow a different color. I'd like to be able to do something like this in Ultra Engine.
      • Alternatively, if a model can have multiple material variants (i.e Skins), I can just swap the skin instead. In my opinion, implementing this would have much more use cases than allowing me to change the emission color but do what's best. Maybe both can exist? 
    4. UV Tiling on decals.
      • The Decal system hasn't been started but this was also another custom shader I had to do in Cyclone. I want decals to tile their UV's like the brushes. I need this for my indicator strips. 
    • Upvote 3
  6. 13 hours ago, kasool said:

    Ah nevermind, I see it's because I didn't choose a resolution, as it's not populated by default. However, yes, I also see now I don't have any components showing up in the editor.

    That's because no components are included in the template. I was writing a few myself, but I got cold feet as I felt like I was telling people how to make their game. 

    You can try this component in your project to ensure everything is working correctly.

    Also that was an odd bug with the Resolution Combo box but I do plan to overhaul the settings UI to have scrollbars and such. 

    • Like 1
  7. 1 hour ago, kasool said:

    The blank scene seems to load properly but I do get some warnings/errors:

    That's normal for a first boot. You can fix the warnings by launching the app with -Settings and save down the default settings/controls. The error message is from the engine itself. If you're not using Lua, don't worry about it. If it bugs you, just make a blank file in it's place.

    1 hour ago, kasool said:

    Btw I was able to install by running the Install Template.bat as an admin. Manually executing Preprocessor.exe as an admin didn't seem to do anything in my case. :)

    Running the Preprocessor as admin should tell Windows to trust it going forward. If you're having issues getting the application to auto generate your component list, let me know. It works for me because I compile the application which you can also do since I have the code for that linked in my signature. 

  8. This was something I was working on but I'm reconsidering going back to a mono-component workflow. The code shows how to handle mouse look for an FPS camera both for Relative and Raw mouse look. 

    This was made using the API systems found in my Game System and will simply work if you're using that. Otherwise, it needs modifications and stubbing of features.

    Sharing this as I know how awful it was for me to get this feeling right and it's nice seeing the system mostly isolated. Quick 180 turning, and zooming is also demonstrated, but there's a rendering bug with zooming atm. 

    FPSViewControls.zip

    • Like 1
  9. 7 hours ago, Alienhead said:
    • Valve Texture File Loading
    • Valve Package Loading
    • Quake 3 MD3 model loading
    • Skip to any time in sound
    • Up to 32x hardware multisample antialias

    I'm curious if the Valve stuff still works as it's been a long time since I've tried the plugins.

  10. Got it, here's a main.cpp example.

    I may want to consider revamping my settings panel since I now understand this. 

    #include "UltraEngine.h"
    #include "CustomWidgets/ScrollPanel.h"
    using namespace UltraEngine;
    
    int main(int argc, const char* argv[])
    {
        //Load plugins
        auto plugin_svg = LoadPlugin("Plugins/SVG.*");
    
        //Get the displays
        auto displays = GetDisplays();
    
        //Create a window
        auto window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_CLIENTCOORDS | WINDOW_RESIZABLE);
    
        //Create User Interface
        auto ui = CreateInterface(window);
        auto sz = ui->root->ClientSize();
    
        auto scrollpanel = CreateScrollPanel(0, 0, sz.x, sz.y, ui->root);
        scrollpanel->SetLayout(1, 1, 1, 1);
    
        //Parent your widgets to scrollpanel->subpanel.
        auto panel = CreatePanel(0, 0, sz.x - 100, sz.y - 100, scrollpanel->subpanel);
        panel->SetColor(0, 0, 0, 1);
    
        //Call SetArea to set the size of the entire subpanel.
        scrollpanel->SetArea(1000, 1000);
    
        while (true)
        {
            const Event ev = WaitEvent();
            switch (ev.id)
            {
            case EVENT_WINDOWCLOSE:
                return 0;
                break;
            }
        }
        return 0;
    }

     

  11. Push an update today fixing VR support. I also changed how you define if your app is a dedicated VR app. See the config.json file for details.

    Removed the ConsoleWindow and SettingsWindow and put all the code into a PanelUI class which can be used both in a window and within the Vulkan Renderer. Lastly, I refreshed the solution files to reflect the changes made to the ones shipped in the stock C++ template. 

  12. I'm having a hard time understanding the Scroll Panel widget found here. I tried parenting my custom panels to the subpanel pointer, but it doesn't draw the sliderbar.

    A main example would be appreciated as I need this for my settings panel.  

  13. 43 minutes ago, Josh said:

    A few years ago people were insisting that multiple components would allow things like this to be broken down into multiple reusable pieces, although I agree it seems convoluted to me.

    I've been making my components into separated parts now and I gotta say, it's nice to only focus on one part of the system at a time, but I miss the "Place an entity in the world, and attach a script to it approach".

    A good example would be with a portal system. You can have one component be for the rendering, one for the collision and another for teleportation. 

    I've been meaning to write about my experience, but I keep getting caught up in other things. I'm also waiting for bugs to get fixed and allowing other entities to be referenced in the component properties panel.

  14. Pushed a new build today with VR Intergration!

    You can easily enable VR in your project in one or two ways;

    • Use the -vr argument.
    • If your game is a dedicated VR application, you can force VR by making a new table in the config.json file. 
    "engine"
    {
    	"vr": true
    }

    You can also use the engine table to define the rest of the engine settings, but tread carefully! If you wish to temporarily disable VR, then use the -novr argument. 

    The Preprocessor was updated with the change today and I removed the GameObject class. I'm still playing with components so a future update will come eventually. 

    The solution doesn't include the System Environment edit or any recent changes. I'm going to be syncing the solution files at a later date.

×
×
  • Create New...