project-navigation
Personal tools

Author Topic: Idea for visibility, black blocks  (Read 31157 times)

madrsihands

  • Guest
Idea for visibility, black blocks
« on: March 09, 2015, 06:07:26 am »
I have an idea to reuse existing code to implement a visibility system.  I'm thinking about using the smoke animation and replacing it with a black block slightly bigger than a tile.  Then depending on where the solder looks and their sight range, these blocks are removed.  For the sight detection, I'm thinking of some how hobbling together code related to enemy detection and line of fire.  Where would be some places in the code to tweak these things, particularly the smoke animation?  Is there any reason why trying to implement this is a bad idea.  Are there already better ideas in the pipeline for implementing a visibility system?

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Idea for visibility, black blocks
« Reply #1 on: March 09, 2015, 09:15:07 am »
Implementing a visibility system is much more complex than that IMHO. Here is the official "design":

http://ufoai.org/wiki/Gameplay_Proposals/Visibility

-geever

madrsihands

  • Guest
Re: Idea for visibility, black blocks
« Reply #2 on: March 16, 2015, 12:33:07 am »
Under the Mark I design, what is meant by using "a green circle displayed on each visible tile when the player clicks a button"?  I noticed I pressed a shortcut key one time in-game and it gave a very minimalist display of troop position as green circles and enemies as red circles.  Is this related to that?  Or is this related to the green circles I see when in-game I ask for an outline of the dropship's rescue zone?  Also it wasn't clear, but how much of this documentation refers to the Artificial Intelligence's ability to detect the player versus the actual rendering of poor visibility?  Is the Mark I implementation an idea where only a select range of tiles are shown in the solder's field of view, or are their problems masking individual tile pieces?  Do you have separate maps for the night and day version because of this reason?  Or do you have conditions in place that indicate to the map how to adjust the lighting, but it can only be done at the beginning of the battle-scape render?

I noticed the game is able to remove the tiles above the current floor from the camera's view.  Is their a way to do that for individual tile on or below the player's current floor?

Offline ShipIt

  • Project Artist
  • Captain
  • ***
  • Posts: 906
    • View Profile
Re: Idea for visibility, black blocks
« Reply #3 on: March 16, 2015, 08:06:11 am »
Under the Mark I design, what is meant by using "a green circle displayed on each visible tile when the player clicks a button"?
In that case, it is the proposed way to provide the player feedback about the area the actor currently watches.

I noticed I pressed a shortcut key one time in-game and it gave a very minimalist display of troop position as green circles and enemies as red circles.  Is this related to that?
I think you are talking about battlescape radar. So the answer is no.

Or is this related to the green circles I see when in-game I ask for an outline of the dropship's rescue zone? 
When the proposal about the visibility system was written, there was no rescue zone. But the way to indicate the rescue zone definitely meets the requirements of Mark I.

Is the Mark I implementation an idea where only a select range of tiles are shown in the solder's field of view,
No.


madrsihands

  • Guest
Re: Idea for visibility, black blocks
« Reply #4 on: April 28, 2015, 03:06:45 am »
It seems I'm in over my head.  Could I implement a system where the map is covered with the smoke screen like that typically deployed with the smoke grenade?  Then implement a system where depending on which way a solder is facing, smoke clouds are eliminated from the player's view?  Of course I'll have to disable the new paralysis mechanism you have with smoke grenades now.

I've also noticed when a plasma pistol fires, the map goes slightly dark and you can actually see the plasma fire illuminate the ground as it travels to the target.  Is this like an animation or is it a persistent effect where the map can remain illuminated in places? 

What are the main roadblock for implementing a graphic visibility system?  Is it within the game engine itself that limits a visibility system, or is it difficult to implement in a Quake game?  I've seen Quake games where weapon fire illuminates the surroundings, but come to think of it I've never seen a Quake game where you can shine a flashlight around (unless its the modern engine).

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Idea for visibility, black blocks
« Reply #5 on: May 07, 2015, 02:09:13 am »
Covered with smoke screen? No way, you can't even throw two or so smoke (Or fire, gas or any combination of them) grenades without some smoke particles failing to be spawned — there is a limit to the number of particles that can be spawned in game (plus some people have reported a big performance hit when there's a lot of smoke or fire on screen)

Offline Sandro

  • Squad Leader
  • ****
  • Posts: 240
  • Maintenance guy for UFO:AI 3D engine
    • View Profile
Re: Idea for visibility, black blocks
« Reply #6 on: November 05, 2016, 05:25:56 pm »
What are the main roadblock for implementing a graphic visibility system?  Is it within the game engine itself that limits a visibility system, or is it difficult to implement in a Quake game?  I've seen Quake games where weapon fire illuminates the surroundings, but come to think of it I've never seen a Quake game where you can shine a flashlight around (unless its the modern engine).

That case is complicated. And flashlight and visibility system are two different things. For example, flashlight was implemented in a Half-Life, but it used a hack (virtual spot light). Doom III uses a true flashlight, and it is still based on the similar engine architecture.
Visibilty is the other thing, engine already does it for many things, but rendering of it is not supported by the current engine, and WILL requre a somewhat different rendering approach. To be exact, a some sort of "visibility shadow" should be calculated, and the engine (currently) does not have any provisions for that. Alas :(