Pagina's

Thursday 13 June 2019

Selecting units

It's been quite busy lately and I have not been able to get a lot of work done after the gathering mechanics that I made this week. Because it's been four days ago, here's an update.

The thing I'm working on right now is the GUI for objects being selected. I already had some of it, but that was always intended to be replaced by the thing that I am making right now. It is supposed to be a lot more flexible and reusable.

Take a look at the screen like it is right now:


We're talking about the panel at the bottom of the screen. It shows images of the nine first selected units plus an indication that there are more. Nothing is interactive. It's just an array of sprites that shows up when the number of selected units is greater than 1.

Now what am I going to do? First, I'll have another panel showing the same kind of thing and I'll replace the current one as soon as the new one works. The new panel will have five different ways to show stuff. I'll have to find out how to get that to work technically,  but that'll be ok.

There is:
  • One object is selected: the sprite for the object will be quite large and there will be information on the selected object. Clicking the image will deselect the object. On the right of the panel, there will be buttons for actions that the object might be able to perform,  like building. This will give full access to the object.
  • Between 2 and 10 of the same object are selected. Like in the above example,  only green guys are selected, but just maximum 10. The panel will show small images like in the screenshot. To the right, there's a bit of info and possibly buttons for actions that would make sense to perform as a group. 
  • More than 10 of the same type. The first 9 will be shown, plus an indication that there's more. Clicking the indication willshow a details screen with the complete selection.  The rest of the screen will be like the above way.
  • More than one unit of 2 to 10 different types.  Those will be grouped by type. There's one sprite plus a number for how many of the units are selected. So if you select one worker and two warriors, you will get a worker symbol with '1' below it and a warrior symbol with '2'.
  • When there are more than 10 different  types selected,  heaven forbid, the first nine will be shown, plus a more-button to a details screen.
It's all going to a lot of work and testing should be vital, because this looks like asking for bugs,  but when it's finished,  it should be nice.

Last thing, because the bus is almost at the destination, I'll start with just the viewing of the info and possibly selection. Actions will be implemented as we implement the actions themselves. 


No comments:

Post a Comment