Wednesday, April 3, 2013

99 – GUI guy

I've been away from town from Friday to Tuesday for a small family reunion and I barely managed to edit and upload this video:

Since the video is so commented I think I don't need to repeat everything in the blog too. Some small enhancements are still to be made (like a file selection dialog), but this is the base of the material editor. Another editor will be used to modify the meshes, assign materials and physics to them and preview them in a small 3D view. A third editor will manage the item lists, defining in game items and assigning meshes and other properties to them.

So let's talk about something else. In the past I used Ruminate for GUI. It is feature poor, slightly buggy and at places ill designed, but small and does the job. Still, a ton of work would be needed to bring this up to par. So I tried Neoforce. Neoforce has itself a ton of problems and I think that fixing them will take just as much time as fixing Ruminate, but Neoforce is much more feature rich. Imagine that you are trying to create a complex and distinct good looking GUI on top of an existing system. You could base it on Windows 3.1 or on Windows Vista. It is not guaranteed, but there is a better chance of getting a better result if you base your widgets on Windows Vista than on 3.1. This is a purely metaphorical example, but you get the idea.

So some problems with Neoforce:
  • It is no longer maintained, neither for XNA 3 or 4.
  • Getting it to run is a lot harder than necessary. Look at any forum thread and you will see that people have problems getting the damn skins to work. I can't make the skins work on the sample projects included, but I did manage to get them to work in my project.
  • There are some problems with making the GUI active/inactive. I am using an imperfect workaround for this right now, but a perfect solution must be found.
  • There are issues with focusing. Imagine that you execute two actions with side effects, A and B. If you execute them in this order, B will have a deterministic secondary side effect: a focus change. Now if you add a third action between A and B that touches GUI active state, so A > action > B, A and B will execute their side effect, but the focus change of B is no longer deterministic.
  • The event chain order for focus loosing is wrong. If you want to create complex GUI you need to create more events than button presses. Things like actions being taken on edit and focus change are a must. Unfortunately the order Neoforce tigers these in a stupid order, making it impossible to do this.
  • Calling Init on all widgets is awkward and stupid.
  • There are strange things going on when making widgets larger than their parent.
  • Porting this to SharpDX or something will be quite some work.
This is just from the top of my head not having touched Neoforce since Thursday. I'm sure there were more.

As you may know, I am a huge GUI nazi. I worked with GUIs all my life, designing both GUIs and GUI toolkits. I am one of those pretentious assholes who say things like "GUIs are art" and "nyeaaahh". So finding a GUI that satisfies my requirements is pretty hard. If I had time I'd love to fork and fix Neoforce.

No comments:

Post a Comment