Jump to content

Ultra Engine testing


Josh
 Share

Recommended Posts

57 minutes ago, Josh said:

Was unable to see any problems loading scenes from a zip package, may be fixed.

I'll try my app again and get back to you. Also going to try clearing and reloading the map again. Thanks.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

 

Ok, if you package everything into one zip file, it'll work fine. However, if you split the contents across multiple zip files (which is what I was doing) then that's when you have the issue. Try compressing maps, materials, and models in their own zip packages and load each one by itself. 

6 hours ago, Josh said:

Fixed some problems with skinned models. Not completely sure if the bone starting positions are correct or not, but other than that it should be good.

I can confirm this isn't working correctly. After reloading bugcheck.map, the idle state is all messed up.

image.thumb.png.43dd17d682a656b980d59283cd2e7b39.png

(The button top is in the body of the switch)

 

image.thumb.png.f58d62696afe58cca2de62e6b25c1694.png

 

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

4 hours ago, reepblue said:

Try compressing maps, materials, and models in their own zip packages and load each one by itself. 

Maybe the folder is missing in the zip file? Does prefabs.zip contain a folder called Prefabs?

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Was that the cause of your problem?

Update

  • Prefabs will now be cached and instanced when loaded, instead of loading from the file each time. This is a little more efficient and you'll see fewer printed messages.
  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

1 hour ago, Josh said:

Was that the cause of your problem?

Not sure. All the contents were present and in the correct location, It's just that the package manager didn't like the files being split apart across multiple zip files. Leadwerks can do this with no problem.

I would like to be able to do this as it makes updates to steam a lot faster. This way you're not re uploading the entirety of the game like most Unity users do.

  • Upvote 1

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

Update

  • Fixed a problem with bone scale not being loaded from MDL files. The previous problem with bone positions in skinned models in Cyclone maps is solved. 
  • Fixed a problem with scale not being considered during animation.

 

Was able to load level 8 with no problems with several zip files:
image.thumb.png.ef472d1aa602ec33ad4177111a16b378.png

I have also noticed animated models are not causing spotlights to refresh their shadows.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

48 minutes ago, Josh said:

Was able to load level 8 with no problems with several zip files:

I assume this didn't include loading the zip file that had everything first? I'll try lvl8 over my bugcheck map next time. I may need to send you the zips I'm trying to load to make sure that it's not an issue with the zip file. I'll also try a simple program over my sample game app. Maybe I'm doing something wrong, but it's weird that some files load and others don't.

Do you have a suggested compression method/mode/level for making game packages?

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

Yeah, my zip files don't have any passwords on it. I'll try to narrow down my issue tonight/this weekend.

Asking because I'm making an application that autosplits my game packages for me and I didn't want to pack things that hurt load times. I'm worried if I use the maximum compression settings, it'll cause problems or slow downs.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

You can upload the Zips and I will try it, if you can reliably reproduce the problem.

Compression is an all-or-nothing thing. I doubt using max compression will make any difference.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Yeah, I'll definitely get back to you. I wanna try reproducing the issue with a simple app. Right now, my application loads packages that are listed in Ultra.json.

Who knows, maybe I'm doing something crazy that's causing the package manager to fail.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

Just a small problem here with changing textures of a widget.  Transparency stops working after it is changed.

#include "UltraEngine.h"

using namespace UltraEngine;

//Declare new style constants
enum CustomWidgetStyle
{
    CUSTOMWIDGET_DEFAULT = 0
};

//Declare new widget class
class CustomWidget : public Widget
{
    //Custom members
    bool hover;
    shared_ptr<Texture> t1, t2;

protected:

    virtual bool Initialize(const WString& text, const int x, const int y, const int width, const int height, shared_ptr<Widget> parent, const int style)
    {
        t1 = LoadTexture("pinkgrid.dds");
        t2 = LoadTexture("bluegrid.dds");
        return Widget::Initialize(text, x, y, width, height, parent, style);
    }

    //Called when the mouse moves if this widget has the focus
    virtual void MouseMove(const int x, const int y) {}

    //Called when the mouse cursor enters the widget bounds
    virtual void MouseEnter(const int x, const int y)
    {
        hover = true;
        Redraw();
    }

    //Called when the mouse cursor leaves the widget bounds
    virtual void MouseLeave(const int x, const int y)
    {
        hover = false;
        Redraw();
    }

    //Called when the mouse button is pressed
    virtual void MouseDown(const MouseButton button, const int x, const int y)
    {
        if (button == MOUSE_LEFT) EmitEvent(EVENT_WIDGETACTION, Self());
    }

    //Called when the mouse button is released
    virtual void MouseUp(const MouseButton button, const int x, const int y) {}

    //Called when another widget becomes selected
    virtual void LoseFocus() {}

    //Called when mouse double-click occurs
    virtual void DoubleClick(const MouseButton button, const int x, const int y) {}

    //Called when mouse triple-click occurs
    virtual void TripleClick(const MouseButton button, const int x, const int y) {}

    //Called when widget is selected
    virtual void GainFocus() {}

    //Called when key is pressed
    virtual void KeyDown(const KeyCode key) {}

    //Called when key is released
    virtual void KeyUp(const KeyCode key) {}

    //Called for each keydown event
    virtual void KeyChar(const int keychar) {}

    //Called when mouse wheel turns and mouse is hovered over this widget
    virtual void MouseWheel(const int delta, const int x, const int y) {}

    //Called each time the widget is redrawn
    virtual void Draw(const int x, const int y, const int width, const int height)
    {
        blocks.clear();

        //Background rectangle
        int b = AddBlock(iVec2(0), this->size, Vec4(1));
        blocks[b].texture = (hover ? t1 : t2);

        //Foreground text
       // AddBlock(text, iVec2(0), this->size, Vec4(1), TEXT_CENTER | TEXT_MIDDLE);
    }
public:

    //Constructor
    CustomWidget() : hover(false)
    {}

    friend shared_ptr<Widget> CreateCustomWidget(const WString&, const int, const int, const int, const int, shared_ptr<Widget>, const CustomWidgetStyle);
};

//Create function
shared_ptr<Widget> CreateCustomWidget(const WString& text, const int x, const int y, const int width, const int height, shared_ptr<Widget> parent, const CustomWidgetStyle style)
{
    auto widget = std::make_shared<CustomWidget>();
    widget->Initialize(text, x, y, width, height, parent, style);
    return widget;
}

int main(int argc, const char* argv[])
{
    auto displays = GetDisplays();
    auto window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[0]);
    auto framebuffer = CreateFramebuffer(window);
    auto world = CreateWorld();

    auto camera = CreateCamera(world);
    camera->Move(0, 0, -3);
    camera->SetClearColor(1, 0, 0);

    auto box = CreateBox(world);

    auto default_font = LoadFont("Fonts\\arial.ttf");
    auto ui = CreateInterface(world, default_font, framebuffer->size);
    ui->SetRenderLayers(2);
    ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f);

    auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC);
    ui_camera->SetPosition((float)framebuffer->size.x * 0.5f, (float)framebuffer->size.y * 0.5f, 0);
    ui_camera->SetRenderLayers(2);
    ui_camera->SetClearMode(CLEAR_DEPTH);

    //Create widget
    auto widget = CreateCustomWidget("Custom", 20, 20, 128, 128, ui->root, CUSTOMWIDGET_DEFAULT);

    while (true)
    {
        while (PeekEvent()) {
            auto ev = WaitEvent();
            ui->ProcessEvent(ev);
        }

        world->Update();
        world->Render(framebuffer);
    }
    return 0;
}

 

Textures.zip

Link to comment
Share on other sites

I'm also getting an "Unknown texture format 0"  error loading this specific texture but can't figure it out.  I've tried converting it a few times but it's still no good.

#include "UltraEngine.h"
#include "ComponentSystem.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    auto displays = GetDisplays();
    auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);
    auto world = CreateWorld();
    auto framebuffer = CreateFramebuffer(window);

    auto camera = CreateCamera(world);
    camera->SetClearColor(0.125);
    camera->SetFov(70);
    camera->SetPosition(0, 0, -3);
    
    auto texture = LoadTexture("Basket.dds");

    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
    {
        world->Update();
        world->Render(framebuffer);
    }
    return 0;
}

 

Basket.zip

Link to comment
Share on other sites

Although both DX and Vulkan do not support RGB or GBR texture formats, it appears the DDS file format can store these. So I added some code to convert this data to RGBA when it is encounterd.

image.thumb.jpeg.b7c4ae287f5b73b91490b74696a2c817.jpeg

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I have published a first version of the compilation class: 

https://github.com/klepto2/UltraEngineUtilities

the watcher class will come later.

#include "UltraEngine.h"
#include "ComponentSystem.h"

#include "include\Utilities.h"

using namespace UltraEngine;
using namespace UltraEngine::Utilities::Shader;

int main(int argc, const char* argv[])
{
    auto compiler = CreateShaderCompiler();
    auto result = compiler->Compile("Shaders/GUI/WidgetBlock.frag", "Shaders/GUI/WidgetBlock.frag.spv");
    if (result->IsSuccesfull())
    {
        Print("Shader compiled succesfully!");
        for (auto f : result->GetIncludedFiles())
        {
            Print("Shader includes: " + f);
        }
    }
    else
    {
        Print("Shader compilation failed!");
        Print(result->GetError());
    }
    ...
}

 

  • Upvote 1
  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

Cake is ready?

Hungry Cake GIF

Update

  • Like 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...