Announcement

Collapse
No announcement yet.

[Fog Of War] Question & Idea

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Fog Of War] Question & Idea

    Hi everyone

    I want to prototype a small multiplayer Fog of War system using Blueprint. I have a particular setup in mind and while I think it should work, I'd like to gather some opinions around here to know if it looks good performance-wise.

    Here is the setup I'm thinking of:

    - Creating a CollisionBoxActor called "FogOfWarVolume", it should cover the entirety of my map
    - Creating a CollisionBoxActor called "FogOfWarBox", size 50*50
    - Creating an empty BlueprintActor called "FogOfWarManager" (or the Game Mode, whatever)
    - Creating a PlayerCharacter with a variable Float "SightRange" of 800

    - OnEventBeginPlay of the FogOfWarManager I get the X and Y size of the FogOfWarVolume, divide both by 50 and I get the number of Columns and Rows in my level
    - For each Row, I get each Column and create a FogOfWarBox at position X (50*index - 50) and position Y (50*index - 50)
    - Whenever a PlayerCharacter overlaps a FogOfWarBox I get every PlayerCharacter in the game and check the distance separating them with the Overlapping Character. If they are in SightRange I perform a Raycast between them (using a well setup visibility channel), if the Raycast is blocked by the targets in SightRange I tag both them as Visible for each other (this last visibility part of the system doesnt seem to be a problem multiplayer-wise).

    We could imagine having between 6 and 14 players split into 2 different teams (shared vision). Maybe up to 30 different units with their own line of sight (I do realize that every unit added is another ActorInRange to check at each Box Overlapping).

    The level is fully revealed, there is no "black mask", I only want to deal with the Fog Of War and vision toggling.

    If I build the FogOfWarBox as 50*50*Maximum height difference in the map I might even be able to build some verticality in the level.

    So here it is.

    I hope some more experienced fellow blueprint developers around here will take the time to look at this

    In the meantime, have a good day !
    Last edited by Yun-Kun; 09-08-2015, 05:40 PM.
    [Released] Multiplayer Combat Editor
    A-RPG Sacred Swords
    Auto-Chess Live Development
    Youtube Tutorials

    #2
    The good thing about Blueprint is that it is very easy and quick to iterate new ideas with. So my advice is to just go ahead and make your idea and see how it goes, you might be surprised how it turns out and better yet you will probably find more efficient ways to do things through development.
    Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

    Comment

    Working...
    X