MiniMap control and other fun items

MiniMap control and other fun items

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

MiniMap control and other fun items

Post by trepan »

I've just committed to r2543, which adds the following:
- minimap controls (2 different modes)
- 4 new wait commands (time, squad size, death, and gather)
- a new attack selection mode
- dynamic queue mode inversion
- a centroid indicator for formation commands
- a new rendering method for area selections
- animated line stipple for command queue rendering
(looks best when SmoothLines is enabled)

Thanks to Tobi's excellent automatic cross-compiling build
setup, you can already find a copy to test here:

http://www.osrts.info/~tvo/spring/installer/
http://www.osrts.info/~tvo/spring/

NOTE
The cursors for the new commands are only available to mods
that link with the otacontent.sdz file (AA, XTA, EE, etc... but not
NanoBlobs). They can be added locally to make them available
for mods that do not link with otacontent.sdz.


Code: Select all

Bindings to help test:

  /bind numpad0 gathermode
  /bind numpad. gatherwait
  /bind numpad7 timewait
  /bind numpad8 timewait 10
  /bind numpad9 timewait 10 queued
  /bind numpad4 squadwait
  /bind numpad5 squadwait 8 queued
  /bind numpad6 deathwait
  /bind numpad1 invqueuekey

  * The invqueuekey action is definitely worth trying out


Config variables (registry settings)

  MiniMapFullProxy
    0: simple mode, right button sets view position
    1: full mode, middle button sets view position

  MiniMapCursorScale
    negative:  draw the minimap cursor at the end of the normal cursor
    positive:  just draw the cursor scaled down when in the minimap

  MiniMapMarker
    a silly minimap-to-viewport cursor (enable with 1)

  InvertQueueKey
    initial setting for the invqueuekey command

  StencilBufferBits
    0    :  disable stencil usage
    >= 1 :  enable the new stencilled volume rendering for area
            selection (including the new attack selection mode)

CTRLPANEL.TXT

  NewAttackMode
    set to 1 to try the new rectangular selection mode
    (note that it only selects enemies when select by rectangle)

  XORselect
    if you have stencil rendering enabled, this will allow you to
    use a different type of volume display when using the new area
    select rectangles


CMDCOLORS.TXT

  StipplePattern
    A 16 bit stipple pattern to use when drawing the commands queues
    A value of 0x0000 or 0xFFFF will disable line stippling

  StippleFactor
    Let's you stretch out the stippling

  StippleSpeed
    Controls stipple animation speed

  AlwaysDrawQueue
    Command queues are always drawn (not just when shift is held down)

  BuildBoxesOnShift
    Always show build boxes (for non-selected units), when the shift key
    is held down. The default is to only show them while a build command
    is being assigned

  DeathWait
    The color used to show linkage for the watchers and targets of a
    deathwait command (these are only shown when a single unit is   
    selected, but I do plan on changing that)
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Minimap controls you say? Does that mean queueing things up on the minimap? That would be sweet! :-)
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Some hints on the new wait commands:

GatherWait:
- use it after a movement command of some sort (move / fight)
- units will wait until all members of the GatherWait command
have arrived at their destinations before continuing
- if you have "gathermode" enabled, a gatherwait command is
automatically added after every move and fight command (the
default move cursor will be changed to the gather cursor to
indicate that you are in gathermode)

SquadWait:
- usually used with factories (but does work on groups without a factory)
- pick a factory, and give it a rallypoint, then add a squadwait
command with the number of units you want in your squads. units will
wait at the initial rally point until enough of them have arrived to make
up a squad, then they'll continue along their queue.

DeathWait:
- units will not wait on themselves
- one possible use is to have a group of aircraft wait for an enemy's
anti-aircraft defenses to crumble before passing over their ruins to
attack.

TimeWait:
- pretty straight forward, no hint
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

trepan wrote:GatherWait:
::snip::
<3 <3 <3
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Finally, these will be very useful within AI development, I just hope there function will be somewhat more obvious to people who havent read this thread.......
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

NewAttackMode
set to 1 to try the new rectangular selection mode
(note that it only selects enemies when select by rectangle)
Win.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

The jpeg format smeared it a bit...

Image
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

GPG might start freaking out pretty soon. This stuff looks good, and probably plays sweet.

Great layout.
Now all we need to someone to clean up the button's look a little bit, the beveled texture feels really cheap. Maybe a button with a brushed steel type of look might have something going for it, speaking of, how customizable is.

If you look at how the resource bar is just a bunch of simple tones, and how the description bar in the same way, if you construct the icon bars with just a simple solid grey stroke (outline), rather than a textured bevel, you'll get a much more uniform look to the entire interface.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Make the description bar height a multiple of the icon size and pull the command buttons down to rest ontop of it, and make it overall feel more like a bar than a group of panels....
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Re: MiniMap control and other fun items

Post by Gabba »

trepan wrote:I've just committed to r2543, which adds the following:
- minimap controls (2 different modes)
- 4 new wait commands (time, squad size, death, and gather)
- a new attack selection mode
- dynamic queue mode inversion
- a centroid indicator for formation commands
- a new rendering method for area selections
- animated line stipple for command queue rendering
(looks best when SmoothLines is enabled)

Thanks to Tobi's excellent automatic cross-compiling build
setup, you can already find a copy to test here:

http://www.osrts.info/~tvo/spring/installer/
http://www.osrts.info/~tvo/spring/
Awesome. I'm trying it as soon as possible. Minimap controls? Does that mean we can give orders on the minimap at last?

All those new commands are sweet, and I especially like the squad size and gather ones. That'll save a few units from horrible and pointless deaths. Hopefully at some point we can integrate these nice new commands in the existing UI (along with other undocumented ones), in a way that makes them somewhat intuitive for newbies to learn (with a good tutorial).

In the meanwhile, you could document them in the wiki, just on time for the next release of Spring? :-)

And if you need an extra idea, here's currently my most wanted feature: a Copy Orders button/key. It would mean "do the same thing as these other guys", so you could add more planes to a patrol, more constructors to an area reclaim, all without using the guard order which messes things up when the guarded unit dies.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

A copy command would be very useful for ai development too, not to mention allowing you to setup a taskforce then tell it to copy a lead unit, then FPS that lead unit.
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

How does that queue inversion work, and where in the code is it?
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

Technically, wouldn't the command options would be most beneficial on one side and the build menues on the opposing side, in order to make it easy to hit the correct boxes quickly?
Post Reply

Return to “Engine”