Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Proof of Concept: Streamlined, mouse-controlled UI  (Read 6021 times)

Jiri Petru

  • Bay Watcher
    • View Profile
Proof of Concept: Streamlined, mouse-controlled UI
« on: July 14, 2014, 01:31:10 pm »

I believe we are at a point where, using DF Hack and the power of overlays, we can redesign DF's user interface to something sensible and make the game actually playable for normal people. To kickstart the discussion, I'm posting my thoughts on UI and the following slightly modified version of DF 34.11. The purpose of the thread is simply to give some spotlight to fascinating possibilities and tools that have shamefully been mostly overlooked. Please note none of it is my work, I'm not a coder. And none of it is new - it's just a combination of tools that have been available for quite some time, namely falconne's DFhack plugins and the Mouse Fortress tool.

DOWNLOAD HERE

To run it, open Dwarf Fortress and then run the file /mouse/launch.exe.



What you can do:

Camera Controls
- Use mouse wheel to change Z-levels (zoom has been remapped to F1 and F2). To move the map, use either the traditional arrow keys, or left-click and move the cursor.

Viewing and Selecting
- Hover cursor on anything and it will tell you what it is in the right menu.
- Left-click on anything you want to select, be it a building, dwarf, animal, statue, whatever. If there's more things on top of each other, simply click more times. ONE CLICK TO RULE THEM ALL. Falconne has thus eliminated the single worst feature of Dwarf Fortress, the infamous LKVQT five-different-modes-of-selection system.

Building
- Ignore the game's cluttered main menu. Simply right-click and choose what you want to build. Click where to place it. Things have been regrouped to be more logical.

Other Tasks
- The right-click menu has all functionality of the original game's main menu. (Not much thought has been given to its organisation yet)

Labour Assignment
- Don't assign jobs to your dwarves. Just ignore it. The "autolabor" plugin handles everything, turning labours on and off as needed. The whole supercomplicated feature, which required the use of external slightly less complicated tools such as Dwarf Therapist, is thus eliminated from the game. You won't miss it. (Experimental).


Read below for my thoughts on what more could easily be possible.



So that was just a demonstration, very weak and not very useful yet. But I'm fairly certain we could build proper UI overlays, bypassing DF's native UI for the most part. The power comes from two things:
- DFHack can manipulate the game directly.
- Programs like Mouse Fortress can send keypresses to the game, allowing you to e.g. build anything through their menus. More importantly, they can send commands to DFHack, meaning anything DFHack can do can be put into a graphical interface. And DFHack can do an awful lot of things.

Mouse Fortress isn't super useful simply because the right-click pop-up menu isn't very pleasant to use. But a coder shouldn't have any trouble creating a proper menu (with graphics and buttons and texts of various sizes and colours) in a separate windows that would overlay Dwarf Fortress. Players could then control most of the game by clicking on menus and buttons, just like in any other game. This is already technically possible, it's just that noone has done it.

Once we have proper menus with integrated DFHack controls, we can focus on the development of plugins that would bypass the game's most blatant UI problems. Falconne has alread done an amazing job, and I have no doubt more can be done. To kickstart the discussion, I would like to ask the DFHack crowd if the following can be done?


(1) Can we bypass zones?

A huge problem of Dwarf Fortress is that is has too many ways to build things. The distintion between workshops, furniture-designed rooms, zones etc. is horribly confusing. Ideally, the inner workings of the game should be hidden to the user who should be able to simply click "Build > Bedroom", "Build > Farm Plot", "Build > Hospital" and then click to plop them on the map. Zones are the great troublemaker here, because you need to build them first and then set their properties, which is counterintuitive like hell. Can we somehow bypass them?

By that I mean, can we create a "Build a hospital" command that would allow the user to designate a specific area, and then feed this data to DFHack which would tell the game something to the effect: "Build a zone in these squares, then turn on the Hospital toggle". I have high hopes that this would be possible.


(2) Can we bypass furniture placement?

The same issue - you can't "Build a bedroom", you must place a bed and then designate a bedroom from it. Horrible. So can we somehow via DFHack magic create bedrooms (and offices, and barracks etc.) without any furniture? The player would then place furniture in those empty rooms as needed. Basically just turn the process around. Who knows Prison Architect knows what I'm talking about.

This might be more problematic because things like bedrooms might be tied to furniture in the game's code. I don't know. But if we cannot build empty unfurnished rooms, can we at least use DFHack to "Build bedroom" in a certain area, upon which DFHack would order a bed to be brought up (or created), place it somewhere in the chosen area, then automatically turn the bedroom option on and flow it to the previously specified size?

If we can get everything to work according to the "Build > ROOM NAME" schematic, the game will instantly be 100 % more playable.


(3) Better Stairs

When I build up stairs, can you designate down stairs on the square above automatically? And vice versa? I want to build stars just with one click.

Leave the Up/Down Stair command untouched for people who like stair shafts. They will have to overwrite the automated second designation, but seeing as it's the same amount of clicks as designating stairs on an empty square, no harm done.

====

Another venue for exploration is automation. We can develop plugins like autolabor to completely automate some features and eliminate them from the user experience (I love autolabor). In a similar fashion, we could considerably streamline and simplify the military system, the burrows and alerts etc.

For example: have the game automatically and without the user's input designate a "Safe Zone" burrow according to some easy criteria - like the burrow automatically contains all meeting areas. Create an "Panic!" button that will automatically activate all military and send the civilians to the safe zones. Put it in the main menu. Voilą! Players can now call emergency shutdowns without having to learn and understand the burrow system.

The military can be redesigned to resemble the old system where a dwarf was either a civilian, or a soldier. Full Stop. No need to fuck around with schedules and activations. Just have a "Put this guy in/out of the military" button and forget about everything else. DFHack can place dwarf in squads automatically. In the background, use some predefined schedule that would have these guys train normally. Use predefined, sensible uniforms. The player has a couple of buttons like "Draft this guy > Make into Melee Soldier", "Draft this guy > Make into archer", and that's it, everything else is handled automatically.

For some reason, most if not all tool development has been focused on making the game even more complex and giving the already overloaded player more and more options. We can instead limit the player's options, cut feature bloat, simplify... streamline. Because I believe that if you cut half of the options from the UI and automate them instead, Dwarf Fortress will be a much better game.

I know this is will sound problematic to expert players - but don't forget that superusers will always have the option to use the vanilla's keyboard interface to do whatever they want. We can create a simplified, automated UI for more casual players and beginners. It's not mutually exclusive.

As I've said, the purpose of this thread is to inspire discussion and hopefully the development of new UI-focused tools that will finally make Dwarf Fortess into a game a normal, non-autist person can play. Especially when you combine these with the current graphic improvements and overlays. Unfortunately I can't code so these won't be coming from me. I can only try to come up with ideas.

I hope this has given you some food for thought.


EDIT: There's already an old interface thread that has about 20 pages of thoughts: Total Interface Overhaul. But only now have we actually the technical power to implement it.
EDIT2: Sorry for spelling mistakes. Written in a hurry. Will fix once I have more time.
« Last Edit: July 15, 2014, 06:02:38 am by Jiri Petru »
Logged
Yours,
Markus Cz. Clasplashes

Extreme Boyheat

  • Bay Watcher
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #2 on: July 14, 2014, 09:10:26 pm »

Yea neat.
Logged

Mathig

  • Bay Watcher
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #3 on: July 15, 2014, 12:06:25 am »

YAY, THIS IS AWESOME!
I am a programmer, but not familiar with this code specifically.
However, from what I can see, (1), and (3) should be easily do-able. Just make the macro of key-presses bigger, it shouldn't be much more complicated than that. Well, that depends on whether Mouse Fortress lets you send key presses to Dwarf Fortress, or DFHack only. The problem with (2) is that I don't know if you can create a bedroom without a bed. You could have a weird set of macros that waits until the bed is built, then converts it into a bedroom, but what size should the bedroom be? Or, where should the bed be, in your bedroom? Both are decisions that might be best made by the player, but that's just my opinion. All of this is from my knowledge of macro programs similar to (but not) Mouse Fortress.

One big question I have, where is the code for Mouse Fortress(if it is open source)? (I don't know how to open a lot of stuff) Um never-mind... I think I found it. I'll have to take it for a little spin to be sure.
This is SO EXCITING! I'm going to try Jiri Petru 's 8th page GUI. All I need to do is find out how to display the buttons. I feel like either Space Core from Portal, in Space, or the spaceship guy from The Lego Movie building a space ship.

ROFL I've used AutoHotkey before.
« Last Edit: July 15, 2014, 12:47:28 am by Mathig »
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #4 on: July 15, 2014, 12:21:39 am »

When I first saw the original thread about Mouse Fortress, I thought it was great idea. But then I tried to play some "modern" DF-like game with mouse control... No, this doesn't work.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #5 on: July 15, 2014, 12:23:25 am »

This is cool. I'll probably never use it, but it's still cool.

+1 supports
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Mathig

  • Bay Watcher
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #6 on: July 15, 2014, 12:32:19 am »

When I first saw the original thread about Mouse Fortress, I thought it was great idea. But then I tried to play some "modern" DF-like game with mouse control... No, this doesn't work.

Part of the point is mouse control is going to be a plus for some people, not all.

The other part, is Mouse Fortress has a command that effectively enables new variants of GUI like there is no tomorrow. Sure, Mouse control may not be that awesome, but picture redoing all of the menus in Dwarf Fortress to make them intuitive, clean, and awesome looking. :D.
Logged

Jiri Petru

  • Bay Watcher
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #7 on: July 15, 2014, 01:34:09 am »

Yeah, if we can build a mouse controllable menu, the same goes for keyboard-controllable menu. This isn't about mousecklicks, it's about the fact that we have tools to build our own menus and send kepresses to DF and DF Hack (it does both).

Right now, we have two main avenues for possible development, independent of each other:


(1) Developing an UI Overlay

Creating the actual app that would create windows with menus and buttons and pictures and whatnot and overlay them above Dwarf Fortress. Mouse Fortress already does this in a way, but the menu is only pop-up, you can't use any graphics or buttons in it, and your only mode of customisation is changing the vertical sorting order of things.


(2) Developing DFHack plugins

...for better automation or to bypass some UI issues. This can be done optionally and separately from (1). We can add new DFhack plugins into the UI as they come.



Mathig, Mouse Fortress is open source, the code being here in Github. I know you've said you've maybe found it, just making sure...
Logged
Yours,
Markus Cz. Clasplashes

Draugo

  • Escaped Lunatic
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #8 on: July 15, 2014, 01:43:39 am »

I don't cherish the thought of mouse ui for roguelikes in general since they are and always will be faster to play with all keyboard commands for me. On the other hand there are things that could be done to the traditional UI to make it better (definitely the selection system is one of them). For example I have never ever understood why doesn't dig tell you what is under your cursor as you designate but instead you have to move to k-command to separate with different rocks that have the same color (never bothered to submit this to improvements forum because I'm lazy and I'm sure there's a DFHack thing for it already or if not then someone will do it at some point).
Number 2 on your list is an interesting point though. The game already has a concept of rooms and what they contain in the sense that nobles require certain furniture in their rooms. Now it would be awesome to be able to just "build" a general room, designate it to certain dwarfs and then place furniture inside it and have the furniture give meaning to the room (bed makes it to a bedroom for that dwarf, table and throne do their thing etc.) with room functions being opt out instead of opt in.
Now considering what kind of spaghetti the codebase most likely is and how much optimization there is for the current concept of rooms the gain from this would most likely be miniscule compared to the amount of work Toady would have to do to make it happen but who knows what we can do with DFHack in the future.
Logged

Zeranamu

  • Bay Watcher
  • I am Z
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #9 on: July 15, 2014, 01:50:37 am »

Even if I didn't use something like this (rather use the keyboard even if I *could* use the mouse), I think this is a great idea and would be something that'd make the game more accessible to a wider of variety of people who just may prefer that, or have problems navigating the menus via keystrokes.
Logged

KillzEmAllGod

  • Bay Watcher
  • Searching for the other sock.
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #10 on: July 15, 2014, 05:19:35 am »

I would just use it for dig vein, I think its really just a matter of giving what people want out of it rather then everything at once.
Logged

hermes

  • Bay Watcher
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #11 on: July 15, 2014, 05:21:03 am »

PTW
Logged
We can only guess at the longing of the creator. Someone who would need to create one such as you. - A Computer
I've been working on this type of thing...

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #12 on: July 15, 2014, 06:57:38 am »

Wow this is good.  I dropped Mouse Fortress when Mousequery was released, and it never occurred to me to combine it with DFHack.  PTW!

How do you deal with the duplication between the mouse tools?  When I was using both it always jittered a little, and odd things would activate both to usually annoying effect. 

In terms of the implementation of this interface programme, I think the best avenue is likely to be modular and done through Stonesense (depending on how the process of transferring the overlay to a separate program goes).  Note that there's now a version that works with TwbT and has accurate mouse-to-tile correspondence - this is already pretty close if combined with your system!
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Jiri Petru

  • Bay Watcher
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #13 on: July 15, 2014, 07:35:43 am »

I didn't deal with the jitteryness, I've just turned off screen scrolling in Mouse Fortress - because both tools tried to move the screen at the same time, resulting in jitter.
On the other hand, Mouse Fortress had better screen scrolling which worked always but was too fast, whereas mousequery only moves the screen when you click and place the cursor, which pauses the game and is hardly ideal. It's a dirty hack since I'm not a coder unfortunately.

I suppose if StoneSense already does something similar, we can drop Mouse Fortress entirely. It doesn't matter which code we use, does it? As long as we have a tool able to create menus which can feed both keypresses and dfhack commands to the game.

I haven't yet experimented with which DFHack scripts I can put into the menu, but the possibilities are boundless.
Logged
Yours,
Markus Cz. Clasplashes

Japa

  • Bay Watcher
  • Spoopy time!
    • View Profile
Re: Proof of Concept: Streamlined, mouse-controlled UI
« Reply #14 on: July 15, 2014, 07:38:20 am »

This... I like this.
Logged
Pages: [1] 2 3