Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Fog of war  (Read 21228 times)

0 Members and 0 Guests are viewing this topic.

smacky

« on: 24, January 2012, 21:17:14 »
Remember this from B3 days? It is when bits of the map you have seen but now can't see (eg, you went round the corner or a door shut in your face) are still shown 'as you remember them' in a different colour (IIRC in B3 it was sort of midnight blue, here I was thinking to go for sepia tones, messed up, and now it's an unpleasant mud green) rather than just turning black as now.

So r6706 redoes fog of war. I really need feedback on this. The colour needs changing (when I can figure it out, this would be skin or player settable). Even so, I'm lukewarm to it now it's back. I'd make it an option at any rate (in 6706 it is always on to encourage discussion.

So?

EDIT: The colour was making me sick, so it's midnight blue in 6707.
« Last Edit: 24, January 2012, 22:29:03 by smacky »

clobber

« Reply #1 on: 24, January 2012, 23:15:53 »
So a sort of memory? What's wrong with RL memory?
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

_people_

« Reply #2 on: 25, January 2012, 05:50:12 »
Not everybody has that much mental capacity? :P

I'll check it out ASAP (busy for a few days).
-- _people_ :)

smacky

« Reply #3 on: 25, January 2012, 10:29:16 »
So a sort of memory? What's wrong with RL memory?

That sort of question is exactly why I'll make it optional.

However in its defence, it is sometimes nicer to have things represented graphically than to expect the player to 'make believe'.

ThePlaneskeeper

« Reply #4 on: 25, January 2012, 15:29:02 »
I have not looked at this, but it was always a feature i missed, when it went away.  Personally though, i would skip the color, and just greytone everything. (IE: much like putting on a helm of demoneyes)

michtoen

« Reply #5 on: 25, January 2012, 15:32:48 »
Its simple client sided magic - all what you have to do is, to store the map data client sided
in a buffer - if the server sends "not in sight" signal for a cell, you move in the grayed out cell
data from the buffer.

I disabled that in B4 because we got a slightly better map info, in fact in b4 you should be able to
create a better FoW as in B3.

vita est proelium

clobber

« Reply #6 on: 25, January 2012, 15:37:48 »
Excellent. What about b5? ;)
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

michtoen

« Reply #7 on: 25, January 2012, 16:07:30 »
*is thinking that the spanking skill is more important for daimonin as FoW*
vita est proelium

Torchwood

« Reply #8 on: 25, January 2012, 16:46:15 »

Anyway, back on-topic ... :)

I like it Smacky ... I agree it should be an option.  Would be nice if the 'draw style' was also an option (i.e. which colour you want, or maybe grey-scale).

That way no one can complain!

smacky

« Reply #9 on: 25, January 2012, 19:17:40 »
Done! :D

fog of war, infravision, and xrayvision (aka demon eyes) colours are now fully skinnable. It's explained briefly in skin.def, but basically the image is first colourscaled (or not, but if you make it so it can either be greyscaled or adjusted to sepia tones*). Then a mask is applied to the image (again you can specify 0 to not do this).

I might have got some numbers wrong somewhere because it doesn't always get the colours as I would expect. But as a concept it's there.

*: This is apparently Microsoft's concept of sepia which doesn't quite fit with mine. Still it is quite nice for 'magical vision' and beats the old greyscale for demon eyes anyway.

EDIT: Think I figured out where I got it wrong about an hour after I turned off my computer last night so I'll have a go at fixing it later (fow looks a bit weird -- I suggest you change the mask to 0x000080 in skin.def).

EDIT2: Yup, fixed in 6710.
« Last Edit: 26, January 2012, 15:11:54 by smacky »

clobber

« Reply #10 on: 26, January 2012, 15:48:09 »
I'm getting a small glitch in SG with the tree.

There's one. Then I walk into the apartments and it goes blue. Then I take a step foward and there are two trees visible - one real and one FoW. if you then move towards the portal, there are two normal trees.

I'm not sure if it's a wider issue, but I'll have a poke around.

EDIT: No can't see it elsewhere.
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

smacky

« Reply #11 on: 26, January 2012, 16:17:33 »
@All: Fow is now optional (default is on) -- under map options. Remember because older clients do not have this feature if you go back and forth between versions it will reset to the default when you come back to 10.6. Very slow machines may see a small performance boost with it off.

@Clobber: Ah, it's because it is multipart and from the apt window you can see part of it but the rest is out of view. So each time the map func draws the entire thing. I did wonder about this possibility. I'll need to think a bit.

smacky

« Reply #12 on: 26, January 2012, 22:27:48 »
6715 adds two more scale options for fow, infravision, and xrayvision:

Quote
# 'scale_fogofwar' is the colourscale which is first applied to images in the
# fog of war. It may be 0 for none (the image is used as it normally is), 1
# for greyscale, or 2 for sepia tones, 3 for negative greyscale or 4 for
# inverted colours.

As this isn't actually an image manipulation program, that's probably quite enough of that.

michtoen

« Reply #13 on: 26, January 2012, 23:57:44 »
good work!
vita est proelium

smacky

« Reply #14 on: 27, January 2012, 11:32:14 »
Thanks.

Just to be clear (I am sure MT already knows this, but players may not), nearly all visual effects (fow, infravision, the funny colours of xrayvision -- but not the ability to see through walls, variable light levels -- except total dark) are purely client-side illusions. This means that individual players can modify them, which is how skins work.

Before, the player would need to hack the client code itself to achieve this, which was out of reach for most players. Now of course you just need to alter settinigs/skin.def.

So you can basically change foo_scale and foo_mask to 0 to have these special visions appear more or less normal. In fact they will always ignore light settings, so demon eyes with scale 0 mask 0 is pretty good for seeing in dark dungeons.

But what if you like to use skins but want you preference of specific colours. Easy copy settings/skin.def to settings/master_skin.def in your user directory. Edit this file to only have the preferences you always want. From now on these will always override whatever prefs are set by a skin.

Tags:
 

Related Topics

  Subject / Started by Replies Last post
33 Replies
3828 Views
Last post 21, July 2005, 00:18:35
by Asuruga
7 Replies
1643 Views
Last post 04, July 2005, 19:23:18
by string
15 Replies
2242 Views
Last post 27, July 2005, 10:33:07
by Elephantey
19 Replies
2401 Views
Last post 08, September 2005, 21:49:19
by Elephantey
Fog

Started by evilasa Arches

1 Replies
119983 Views
Last post 17, October 2009, 12:43:05
by smacky