Jump to content

Fog of War for Terrain


Philippe

Recommended Posts

Since less than lucid thoughts are becoming one of my specialties, I couldn't resist asking this question:

Would it be possible to code terrain types as units for a special terrain existance sighting check without bringing the game to a screeching halt?

I have a very strong suspicion that the answer is no, so my feelings won't be hurt if you start laughing at me.

The idea is that from time to time during a turn the system would figure out what each player's borgs could see that they hadn't seen before, and add that to the terrain map. A terrain tile with trees in it would be like a spottable unit.

This would make some demands on the system, but you wouldn't need to do it constantly throughout a turn: three or four times per minute would be enough.

Something like this is already being done with fortifications in CMx1, though doing it with everything is going to use up some resources.

Perhaps if the game maintained a parallel map with pre-calculated lines of site, and a notation that if a unit appears in quadrant x, it can see a, b, c, and d in addition to x and whatever else it has already seen.

The effect would be that if a designer didn't predesignate terrain quadrants as having already been seen, you could be maneuvering against a very blank map (hills only, no trees, roads, or buildings or rivers). This would make the use of a pre-game sketch map of the battlefield very important. The sketch map wouldn't change over the course of the game (and if the designer were really evil it would include mistakes likes fords and bridges that didn't exist), but the terrain that a player would see every time he entered an orders phase would get more and more detailed.

By segregating the map check from the LOS crunch, and by not doing it very often, might it be possible to slip this in without burning through all the user's computer resources?

Link to comment
Share on other sites

I've given this some more thought, and suspect that as long as you don't need to reveal terrain a millimeter at a time, terrain FOW might not be as computer-resource intensive as I had at first thought. Which is very interesting, I think, because it would add a lot to the immersion and realism of the situations, especially on a large map.

And just for the record, I don't pretend that this is the way to actually do it. I'm sure if the good folks at BFC turn their minds to it, they'll come up with a simpler and more elegant solution.

Terrain as I understand it is going to be represented by tiles 8 meters x 8 meters. This suggests that the entire game map could be defined as a grid with squares of these dimensions. At the very start of the game the computer takes an extra minute to compile a master list of which tiles can see which tiles. It only has to do this once, and will never have to repeat the process again.

The list will essentially be a series of grid co-ordinates, with a list of all the co-ordinates visible from that tile. [Hey, I never said this would be elegant].

During the course of play, whenever a unit moves, if it enters a square other than the one it already occupies, this information is sent to a data dump.

The terrain crunch (as opposed to the terrain LOS check) only has to happen once per turn, either at the end of the turn or just before the next orders phase.

The crunch does not require any fancy programming: I think it can be done on an Excell spreadsheet, using a few simple logic functions. The program would look at the list of terrain entered by all units on a side during a turn, and if there were any new grid squares, these would simply be added to the list of what the player was allowed to see. What the player was not allowed to see, by the way, would probably just look like grass -- the hills would be visible, but nothing else (no rivers, trees, buildings, soft ground).

The spread sheet would run down the list of grid co-ordinates and add the new ones to the visible grid list. This list, which would keep getting bigger each turn, would determine what the player could see.

I don't think running a spreadsheet type program to track terrain would slow the game down much -- games like Europa Universalis II are lousy with spreadsheets (and bugs). I have no idea whether or not this would be compatible with the game engine or the mental quirks of the designers. And it's certainly more of a band-aid than a design. But if I can come up with something like that, imagine what Steve and Charles could come up with if they turned their attention to it for a moment. So what if it means they won't have time to program in an extra tank or two? Nobody will notice if Shermans are missing from the Normandy scenarios ...

Link to comment
Share on other sites

What you could do, is abstract the map that you can't see with a cartoon/handdrawn feel as you would have on a map for attack. Then open up in a variety of chunks when you come to viewing that area, but

I wouldn't like to see, just cause you have no view line of sight to certain areas you get lines of detail all over the place, it would make it unplayable.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...