Cursors

Cursors

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

Post Reply
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Cursors

Post by Erom »

I see a lot of people still using the cursors I made a while ago, and since I'm currently on a mac, and can't map or mod really, I thought I would make some more cursors, so modders would have a few options. So first question - it's been a while and I haven't been following everything... anything new I should know about re:cursors? Second question- I'm working on a psuedo-military set, adapted from the APP-6a NATO map symbols (which was hard, since most of the symbols are for types of things, or places, and not for types of actions). Once I get done with that, any specific things people would like to see?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

1. New Animated Cursor Format:
http://spring.clan-sy.com/phpbb/viewtopic.php?t=8025
https://taspring.clan-sy.com/svn/spring ... ent/anims/

2. Cursor Image Types
Cursors can now use PNG or TGA instead of BMP. PNG and TGA are
the preferred formats as they can use real translucency instead of the
hardcoded color value for BMP transparency.

3. There are several new default cursors, and some can now be used as
backups. Here's the full list from SVN code:

Code: Select all

  AddMouseCursor("",             "cursornormal",     mTopLeft, false);
  AddMouseCursor("Area attack",  "cursorareaattack", mCenter,  false);
  AddMouseCursor("Area attack",  "cursorattack",     mCenter,  false); // backup
  AddMouseCursor("Attack",       "cursorattack",     mCenter,  false);
  AddMouseCursor("BuildBad",     "cursorbuildbad",   mCenter,  false);
  AddMouseCursor("BuildGood",    "cursorbuildgood",  mCenter,  false);
  AddMouseCursor("Capture",      "cursorcapture",    mCenter,  false);
  AddMouseCursor("Centroid",     "cursorcentroid",   mCenter,  false);
  AddMouseCursor("DeathWait",    "cursordwatch",     mCenter,  false);
  AddMouseCursor("DeathWait",    "cursorwait",       mCenter,  false); // backup
  AddMouseCursor("DGun",         "cursordgun",       mCenter,  false);
  AddMouseCursor("DGun",         "cursorattack",     mCenter,  false); // backup
  AddMouseCursor("Fight",        "cursorfight",      mCenter,  false);
  AddMouseCursor("Fight",        "cursorattack",     mCenter,  false); // backup
  AddMouseCursor("GatherWait",   "cursorgather",     mCenter,  false);
  AddMouseCursor("GatherWait",   "cursorwait",       mCenter,  false); // backup
  AddMouseCursor("Guard",        "cursordefend",     mCenter,  false);
  AddMouseCursor("Load units",   "cursorpickup",     mCenter,  false);
  AddMouseCursor("Move",         "cursormove",       mCenter,  false);
  AddMouseCursor("Patrol",       "cursorpatrol",     mCenter,  false);
  AddMouseCursor("Reclaim",      "cursorreclamate",  mCenter,  false);
  AddMouseCursor("Repair",       "cursorrepair",     mCenter,  false);
  AddMouseCursor("Resurrect",    "cursorrevive",     mCenter,  false);
  AddMouseCursor("Resurrect",    "cursorrepair",     mCenter,  false); // backup
  AddMouseCursor("Restore",      "cursorrestore",    mCenter,  false);          
  AddMouseCursor("Restore",      "cursorrepair",     mCenter,  false); // backup
  AddMouseCursor("SelfD",        "cursorselfd",      mCenter,  false);          
  AddMouseCursor("SquadWait",    "cursornumber",     mCenter,  false);
  AddMouseCursor("SquadWait",    "cursorwait",       mCenter,  false); // backup
  AddMouseCursor("TimeWait",     "cursortime",       mCenter,  false);
  AddMouseCursor("TimeWait",     "cursorwait",       mCenter,  false); // backup
  AddMouseCursor("Unload units", "cursorunload",     mCenter,  false);
  AddMouseCursor("Wait",         "cursorwait",       mCenter,  false);
Last edited by trepan on 17 Apr 2007, 03:14, edited 1 time in total.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

So the complete list is:

cursorareaattack
cursorattack
cursorbuildbad (used in the minimap)
cursorbuildgood (used in the minimap)
cursorcapture
cursorcentroid (used during formation moves)
cursordefend
cursordgun
cursordwatch
cursorfight
cursorgather
cursormove
cursornormal (default cursor)
cursornumber
cursorpatrol
cursorpickup
cursorreclamate
cursorrepair
cursorrestore
cursorrevive
cursorselfd
cursortime
cursorunload
cursorwait
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Can we make cursornormal centered somehow? Even for pointers that use the lower right it's kinda restrictive since you may have at least parts crossing over in other quadrants, especially if you render your cursors out as that's usually less precise with pixel positions.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Yes, it's already possible, but you probably don't want to hear how ;-)
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

I've just added the "hotspot" control word to the *.txt animated cursor format.
If it isn't specified, then the Spring defaults are used. The only valid values are
"topleft" and "center".

ex: hotspot topleft

P.S. Lua can add and change cursors in-game (including the hotspot)
... that was the lame quip in the previous post.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Something I forgot to mention, the new spec file format (using a *.txt file),
avoids the problem of having mixed numbered images from different sources.
This could happen if the mod provides cursornormal_[0 - 10].png and the
default archive provides cursornormal[0 - 20].png. The mod images will override
the default ones, so you'll end up with a mixed bag.
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post by Erom »

Wow, lots of fun new stuff. One question- to use the hotspot command, would it look something like this (as a random example):

Code: Select all

frame  anims/cursordwatch_0.png  0.100
frame  anims/cursordwatch_1.png  0.100 hotspot topleft
frame  anims/cursordwatch_2.png  0.100
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

trepan wrote:I've just added the "hotspot" control word to the *.txt animated cursor format.
If it isn't specified, then the Spring defaults are used. The only valid values are
"topleft" and "center".

ex: hotspot topleft

P.S. Lua can add and change cursors in-game (including the hotspot)
... that was the lame quip in the previous post.
Would it be difficult to include a hotspot map? The map is a 2 bit black/white image with the same measurements as the cursor images. It's entirely black and you determine where the hot spot is with a single white pixel.

Anway fancy cursors here I come... :)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I think a pair of floats would work better than an entire texture just for one dot.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Hm indeed. But they're integers then, there are no half pixels.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Erom:
The "hotspot" command affects the whole pointer, and not an individual frame.
The format could be improved to allow atlasing, texcoord, offsets coords, etc...
but it probably isn't worth the time. You'd probably get little savings from using
non-uniform texture sizes.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

rattle wrote:Hm indeed. But they're integers then, there are no half pixels.
0.0-1.0 to make it independent of the pointer's resolution.
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post by Erom »

Got it, thanks. I aggree that topleft and center are probably "good enough". If we need really tricky things, after all, we can use LUA for it.
Post Reply

Return to “Art & Modelling”