Random projects shots

Working on better UI sample.
It’s very basic, but it automatically works with mouse, keyboad and controller, which is very important for me. Also it has UI sounds but you can’t hear them from GIF xD

7 Likes

Looks nice .
I browsed the code a little bit , should be fairly easy to integrate into Urho3D .
Several questions :

  • What are the benefits of using RmlUI compared to other UI solutions (besides using HTML/CSS for UI creation)
  • How do you create and verify the UI (which tools , hot reload ? ) , specifically in this case AdvancedUI.rml.
  • How is the performance in case of more complex UI layouts (hundreds or thousands of UI elements)
  • Lottie and SVG plugins were not integrated , is there a reason ?

So far I used the Urho3D native UI (with my own extensions) , I even used it in my fully fledged .NET 6 Unity like Game editor , it works quite well even for big scenes with 20000 nodes and more but I am always on the search to adopt new UI solutions

I genuinely cannot find any good open-source UI solutions. RmlUI just sucks the least.
There is no solution on par of e.g. NoesisGUI and other propietary UIs.
For me it is important to have built-in animations, decent extensibility, mobile support and DPI-agnostic layouting.
RmlUI does all these things.

RmlUI repors errors and it has “visual debugger” to inspect DOM.
We also have hot reload for it. So I basically had it opened side by side, code and UI, and edited the layout in VSCode.

Below average. HTML/CSS renderer is heavy, so UI elements have big memory and CPU footprint.
Hundreds of elements will do, thousands will take noticeable chunk of RAM and CPU, especially in Debug builds.

For me it’s reasonable trade-off. I would rather render small UI with good quality and little code (animations and styles) rather than huge and bland UI.

RmlUI is obviously not for Editor or any kind of tooling, it’s just too much of an overkill. But it’s quite a good fit for game UI.

Nope, we just didn’t bother.

1 Like

Yep ,
So far I didn’t find a good open source solution neither .
I guess I am “stuck” with Urho3D native UI (it’s not so bad actually)

What kind of extensions? Also, how much of your UI ends up data-driven, and how much requires code written?
I have several fundamental issues with Urho UI, I wonder how you deal with them.

I added NanoVG support (SVG) , so basically I use it in conjunction with the native Urho UI
SliderZ (https://play.google.com/store/apps/details?id=com.elix22.sliderz)
is a good example of Native Urho3D UI + SVG UI

I always like to create UI programmatically (it’s my personal taste)
One of the drawbacks of the Urho UI is that the size is defined in pixels , so basically I adjust the size of UI elements programmatically when they are created based upon the Graphics size (Graphics.Height , Graphics.Width).
I also subclass/derive Native UI elements on the application side in order to add or modify some
behaviour.

In addition in case of My Game Editor I also play with UI.Scale , (I modify it with Ctrl ‘+’ and Ctrl ‘-’)
Will do some Youtube Demo video of my Editor once I will finish my vacation

Some UI samples

I have also implemented a fully working Avalonia UI solution inside Urho.Net context.
This framework is using a Microsoft style of UI creation (XAML) , but it’s not my cup of tea , I like to code my UI.

1 Like

Very happy with the progress I’ve made on this. Two connected peers (via steam lobby). Earlier post has more on the lobby. Added chatting, ready status, countdown, etc. This gif is after the game has started. Tested with one steam account on one pc on mobile tether internet and the other steam account on another pc on home wifi. No noticeable delay at all. Next step, characters, guns, fun stuff.
ezgif.com-gif-maker(1)

Steamworks p2p online multiplayer. Uses steams servers as relay, no nat punchthrough needed. Using a discontinued steamworks ffi lua wrapper (the guy actually removed the github/docs, no idea why, luckily I saved his documentation and the webpages first). Needed to adapt the wrapper to add more functionality though.

5 Likes

I started implementing ECS on top of Urho3D’s library (not modifying the source code: I need more experience) and I decided to tackle the Chracter Demo project.

Still a work in progress, but the collision events, nodes, animation ,and even inputs are being handled by the ECS

Sounds interesting. Is the goal just to lean ECS or are you attempting to improve performance? If so, how does that work when the underlying structure hasn’t changed?

The goal is to learn ECS and make a game with it as I go.

The attempt is to not improve performance but learning the other advantages of ECS that I heard of such is being more extendible and flexible in the long term as the project scope increases.

When it comes to performance there are tradeoffs, since there is conversion between entities and Nodes in some systems (such as physics, animation, creation, destruction) you do in more steps what the Urho3d standard can do, which means more code being executed. However, you also get gains in separating data from the Urho3D world as your game data is more agnostic. Thus, you can use the Job system to execute many things on separate threads (AI, state machines, movement without physics, etc).

Will the gains be better than the losses? I think it depends on the game.

The goal will be in the future to implement ECS inside Urho as an alternative and separate from the typical node system we have

1 Like

You are working on interesting task that I investigated at some point before.

Once, I tried to move entire Urho Scene-Component model to EnTT ECS, which turned out to be bad idea. ECS is great for ingame database, but it’s very inconvinient to have it in the engine. For example, I can easily use custom Component types from DLL in the Editor and they work just as well as builtin components, but it would be extremely hard to do this for ECS flat structures of EnTT. In general, ECS adds a lot of requirements and limitations on what Scene could be, compared to “fat components”. Moreover, Urho component design (with inheritance) just doesn’t map well on ECS design (composition).

Now I think that these two systems will have to coexist. How to make them coexist well is a big question, because synchroninzing two complex data structures is quite hard.
I wonder if you can share the code of your ECS integration, it would be interesting to know how exactly you sync Urho Scene and ECS.

My Editor has customizable asset transformers which are primarily used to automatically import GLTF/FBX/Blend files to native Urho format, but they can be used for everything.
Here I have created sample transformer that automatically creates pixel art from images in folder.

5 Likes

So far the approach that is helping me a lot is that I created an EcsLogicComponentcomponent for the urho Scene. it becomes the main hub for ECS using EnTT. It helps a lot because all the update events that we can subscribe to in this component can be sent to all the systems that will process the ECS (without having a LogicComponent become a system), and it can also be the only receiver for node collision events and pass that to a any system that will handle the collision accordingly (like physics for example).

at first I considered a component with a Node pointer, but it proved to have issues. So I have a map where if an entity has a node or a node corresponds to an entity I can move between worlds; and it helps when I have a node collision event, I know which entity corresponds to.

Another thing is that not all entities/nodes conversions need to be updated all the time. I use tags(empty structs) to determine if they need to be updated every frame (Like the rigidbody of the character you control) or use an “update once” tag to perform the conversion once and done (Like spawning a big rock). Also, I use the Update/FixedUpdate to update from ECS to Node and PostUpdate/PostFixedUpdate to update ECS from Node (maybe on EndFrame would work better, I don’t know).

When it comes to systems, so far I have the system that updates Nodes <=>ECS to be the last system, after physics, inputs, animations, etc. The good thing about EnTT is that it works wonderfully with Urho3D’s Job System for multi-threading, so I plan to have the system that can operate using work queues first.

I am still making changes to my implementation. but as I am learning and testing, I am happy with what I have found so far. For example, I found that I can implement a system that can handle btDynamicCharacterController without creating a character controller logic component. I will post an update once I have it working

1 Like

First test using btDynamicCharacterController on ECS. Needs some tweaks

I also noticed something peculiar when you are climbing a slope that you should not climb using the edge between triangles… Reminds me of climbing mountains in Skyrim

2d rpg with world generation. Here it makes some maps of 1,048,576 square meters. But it can easily do ten times that. No physics engine used, and the game dynamically loads so frame rate is generally 1700fps in game no matter the map size. I’m going to make an option for the map to be unlimited, so it’ll just keep extending beyond the boundaries of the preview forever (using the same procedural perlin noise seed).

For now, I just made some cool waves. I always liked the idea (but not implementation) of dwarf fortress adventure mode so this is kind of inspired from that. I’ll make some spawned enemy crabs or something next.

ezgif.com-gif-maker(3)
ezgif.com-gif-maker(2)

7 Likes
4 Likes

First rendered take / scene of the trailer of my game 18seconds.

Rendered with self programmed Urho3D - Renderer / Pointcloud Particle Emitter.
Millions of Particles and small Planemeshes. One frame rendered in ~50 seconds.

Its just a Prototype (very very early version of that take) and will be improved and overworked with filters, better dragonfire and more love :wink:

Music from a friend of mine.

Lady / Dragon scream from https://www.zapsplat.com

6 Likes

Still working on better IK.
Now I have to do something with spine and arms…
I’m unsure if I will manage true “full body IK” tho.

4 Likes