aliens

Author Topic: Adjustable vision for day/night, human/alien. Also a variable for light radius.  (Read 6787 times)

Offline Xangi

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Pretty much what it says on the tin, UFO:ET Gold did this and it was really great. You could make it so that aliens and humans were on more... equal terms for night missions, or even make the game harder. Not sure entirely how NPC sight works right now, but if the radius can be adjusted they should probably also gain the same sight bonuses from flares that humans do.

Also, if we could get a variable in the electro-flare to adjust the light radius that would be great, or even some kind of item subsection that controls how much light it gives off. Further switches in this could allow for all kinds of neat devices, such as Night-vision goggles (some kind of undetectable light), glowing dropped items, etc.

Offline shinr

  • Colonel
  • ****
  • Posts: 106
    • View Profile
Speaking of vision, Ufopaedia says that Soldiers have a vision range of 20 tiles during the day and 9 tiles during the night, and no in-between for dusk/dawn, choosing either the 20 or 9 tile vision depending whatever is closer, the night or the day.

Is it possible to make a vision range of, say, 14/15 tiles for dusk/dawn missions? 

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
I agree there should be an option to define alien sight, preferably by unit type. Let me quote myself:

But back to topic: I guess this is worth bringing up again, as it concerns a vital gaming element. It's not just about vision, but about detection in general.
It appears to me that detection can be divided into several categories, which generally are in game anyway:
  • Sight. We all know how it works in RL and the game. Used by humans and most aliens. It can be sub-divided into two categories: day-light vision (used by humans, Ethereals and Reapers) and night vision (used by Sectoids, Floaters, Snakemen, Mutons and Chryssalids).
  • Movement detection. Used by the motion scanner and apparently nothing else. Naturally, it's not real-time, as it only detects movement done in opponent's last/your present turn.
  • Psionic scan. It works like a combination of both, as it's real-time, circular and not limited by either lighting or obstacles. Used by Ethereals, Sectoid leaders/commanders, and I think Silacoids and Celatids too.

I don't know what Cyberdiscs and Sectopods use, but I guess just sight (probably night vision).

Yeah, Mind Probe would be much more attractive if it could function similarly to a motion scanner. Naturally, it'd invalidate the motion scanner in most cases; however, robotic units (Cyberdiscs, Sectopods and HWPs) wouldn't show on the Probe.

And, yeah, lack of semi-darkness hurts.

Offline Sturm

  • Colonel
  • ****
  • Posts: 132
    • View Profile
Adjustable vision would be great. I'd love to be able to set day vision range to over the size of the map. To make the game more realistic and decrease vision-range related exploits.

Offline Sturm

  • Colonel
  • ****
  • Posts: 132
    • View Profile
I changed the vision range to 100m. Oh god, the lag D: .

Offline Muukalainen

  • Captain
  • ***
  • Posts: 94
    • View Profile
I changed the vision range to 100m. Oh god, the lag D: .

How did you change it? I dislike those daytime vision related exploits too. Would love to try more realistic style.

I think it would also be necessary for the indoor areas to be darker than outsides so you could hide and snipe from indoors.

And with 100m you mean 100 squares?

Offline Sturm

  • Colonel
  • ****
  • Posts: 132
    • View Profile
How did you change it? I dislike those daytime vision related exploits too. Would love to try more realistic style.
I changed MAX_VIEW_DISTANCE and MAX_DARKNESS_TO_SEE_UNITS in TileEngine.h and changed distance(currentUnit->getPosition(), tile->getPosition()) > 9 from 9 to desired number in TileEngine.cpp and recompiled the game.
Though the problem is that with such an increase of range of view there's a lag when units are walking. Still, I'm not going back to the 20m range of sight.

I think it would also be necessary for the indoor areas to be darker than outsides so you could hide and snipe from indoors.
I don't know where it's regulated, though.

And with 100m you mean 100 squares?
Yes. And I use 100 square areas for most of missions.

Offline Muukalainen

  • Captain
  • ***
  • Posts: 94
    • View Profile
I changed MAX_VIEW_DISTANCE and MAX_DARKNESS_TO_SEE_UNITS in TileEngine.h and changed distance(currentUnit->getPosition(), tile->getPosition()) > 9 from 9 to desired number in TileEngine.cpp and recompiled the game.
Though the problem is that with such an increase of range of view there's a lag when units are walking. Still, I'm not going back to the 20m range of sight.
I don't know where it's regulated, though.
Yes. And I use 100 square areas for most of missions.

This popped somehow back to my head today.

I started to think how did they do it with Laser Squad and on C-64. Then I realised that it has open non-hidden map. So it needs to calculate los only between the moving unit and opponent units. You could use this on daytime, you could say they have scanners, satellites and they just flew over the area with the skyranger so it is not so important to have hidden map on daytime. Remove the "shroud" and increase map size probably to many times bigger without lag.

And I still thought about, the thing that computers are very fast now and why does it lag. I have never coded los on any game, but when I think about it, the easiest solution is to just calculate all the tiles that are on the range of selected unit. And that is very inefficient way to code it, but would probably work with short vision range. Have you examined the code if it can be optimized?

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
+1 to be able to adjust sight levels per unit type.

Also, does OXC have Fog of war option yet???

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
+1 to be able to adjust sight levels per unit type.

Also, does OXC have Fog of war option yet???

Fog of War as in, the terrain becomes blackened again?

Why would you want such an option for a 100 x 100 m battlefield? The aliens disappear when unobserved, and I don't think your soldiers would forget that there was a barn near the landing zone.

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Fog of War as in, the terrain becomes blackened again?

Why would you want such an option for a 100 x 100 m battlefield? The aliens disappear when unobserved, and I don't think your soldiers would forget that there was a barn near the landing zone.
No fog of war as in solider "FRED" cant see any enemies that solider "James" can see

Its fine to know what terrain you have already explore but i shouldnt be able to use the tactic of setting up a stationery gunner and sendout spotters to find aliens.
« Last Edit: July 12, 2014, 02:16:33 am by luke83 »

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
No fog of war as in solider "FRED" cant see any enemies that solider "James" can see

Its fine to know what terrain you have already explore but i shouldnt be able to use the tactic of setting up a stationery gunner and sendout spotters to find aliens.

Frankly, I still don't understand. What's stopping you from shooting at a tile, regardless if you can see it or not?

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
hmmm true, what is to stop you shooting at a square.... I need to rethink this :)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
I always thought that the xcom soldiers have helmet cameras and HUDs, and they are being fed a composite image of the battlefield, with enemies projected into their HUD even if they can't see them - that's why they can try and auto-shoot an alien halfway across the map through hedges and walls.

this being the basis, I think there should be an accuracy penalty for shooting at enemies you cannot see yourself.
(( perhaps an accuracy penalty that can be reduced by special equipment and/or abilities... but that's for the future :D ))

Offline Mackus

  • Sergeant
  • **
  • Posts: 48
    • View Profile
Lets not forget to add in moon cycles. Because obviously you gonna have better visibility in full moon. ;)
And make it possible for certain armours to reduce penalty to light radius due to low light. My Power Suit better had build-in some futuristic alien nightvision. But I think someone already mentioned it.

As for Fog of War - something like in Warcraft 2? In fact exactly like in Warcraft 2. Uncovered territory stays uncovered, but if its not in line of sight of any unit, its darker, so player knows no one actually watches if there are aliens sneaking here.
« Last Edit: July 13, 2014, 01:18:13 am by Mackus »