New project template


#1

I will continue the post started here: Urho3D from the scratch

A while ago I decided to start this repo: https://github.com/ArnisLielturks/Urho3D-Empty-Project
The main idea is to create some sort of template for any project that I might start in the future using Urho3D engine.It should contain all the basic functionality that is needed for almost every project - configuration file reading/saving, level management (switching between scenes etc.), UI window management, control mapping to allow players to set up the controls themselves, modding - adding new scripts to the game that engine picks up automatically and many other things.

It’s been more than a week since my last update, so here are the things that I was able to do in this time:

  • Replaced Urho3D UI with Nuklear UI (https://github.com/rokups/Urho3D-nuklear-ui)
    I have ported almost all of the existing views to Nuklear. Previously console could be opened by pressing F1, now it’s replaced with the NuklearUI console which can be opened by pressing F4. It still is missing some nice features but it’s usable.

  • Added spltiscreen sample which currently supports up to 4 players. To launch it just start the game. Additional players can be added either by adding new controllers before the game or while in it, it will adjust the viewport count automatically.

  • Settings window now contains joystick and mouse settings. Everything that you are able to change in the settings window will also be saved in the Data/Config/config.cfg file.
    All the settings (including mapped control keys) will be saved in the same file

  • Fixed a lot of different bugs related to new Subsystems like WindowManager, LevelManager. It should be a lot more stable now

  • I added CircleCI as a continuous integration tool to help testing out my changes on multiple platforms (currently Windows[MinGW] and Linux[GCC]). Config file for the build system can be found here: https://github.com/ArnisLielturks/Urho3D-Empty-Project/blob/master/.circleci/config.yml
    Config file actually is pretty readable for someone who want to build the project themselves since it contains all of the bash commands to do that.
    CircleCI uses docker container which was built with the following repo: https://github.com/ArnisLielturks/Urho3D-Docker-Container

@smellymumbler already gave some good ideas that I could add in the future and if you have any ideas how this can be improved even further, share them!


#2

Curious: Why the move to Nuklear? Is it faster? Does it have a better architecture?


#3

Wow you’re doing great, many thanks! keep it up please :smiley:


#4

I always thought that it looks kinda unpolished, it does it’s job good, but when you wan’t something a bit more different you end up rewriting the engine UI code just for this particular case. And of course you have to maintain it yourself when new engine version comes out. That’s why I started looking at other solutions. I looked at couple GUI libraries and ended up with Nuklear just because it was very easy to set up, thanks to rokups repo: https://github.com/rokups/Urho3D-nuklear-ui

Nuklear is not faster than Urho’s built in UI system, but it is much more powerful since it contains a lot of components already. Main difference in the architecture is that Urho uses event system to deal with UI interaction, Nuklear is not. At first I thought that it’s a bad thing but in the end I ended up writing less code and it was more readable.


#5

Update:

Had second thought in the past months regarding the Nuklear implementation. Stumbled upon a problem with Nuklear and CI which kinda broke the MinGW build process. I was feeling lazy and couldn’t figure out how to fix it and decided to move back to Urho3D UI system.
Besides moving back to Urho3D UI I’ve added a lot of small improvements like -

  • in-game settings menu,
  • control mapping updates,
  • config file saving structure,
  • multiline achievement texts,
  • additional video settings added.
  • LUA script mods are now supported

All the things that are planned for future are available here: https://github.com/ArnisLielturks/Urho3D-Empty-Project/wiki

Let me know if there is something else that you’d like to see in this repo.


#6

Whoa! Huge wave of amazing updates. Glad to know you opted for Urho’s UI instead! It makes for a perfect project, specially if in the future people consider adding this to the main repo.

Thanks a lot for your effort, dude. This is pure awesome.


#7

Not sure if this will ever be merged in the main repo since the sample is quite large but the good thing about this is that it gives me ideas how to further improve the engine. Also I’m happy if others might find this useful.

I myself will probably take this sample app for a spin for the upcomming game jam - GGJ.