[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Energy / Shield Walls  XML
Forum Index -> Druids RPG Go to Page: 1, 2 Next 
Author Message
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

Szlat wrote:
As far as sentinels go,........ I am after something different.

A thought occurs to me that we could do some shield wall type ones. From where your trans is, go sideways x feet until you hit a wall, and spawn a vertical "sentinel" at each wall. Then each sentinel on start-up "links" to nearby sentinels of the same type. This would allow a laser wall doing damage, or a shield wall killing projectile, or a spider-web that things stick to, or an elastic wall that bounces projectiles or opponents back, or even a solid wall. I think I like the options this route gives, so I will chase it up further. 
So, I thought I would start looking at the concept of an energy wall or shield wall. This is a commentary on progress so far. See the picture below:

The simple concept for this prototype one is:
  • When you spawn the wall, it positions two posts against the walls (within a certain max distance), and then spawns a red haze between the posts
  • Any opponent entering the red gets hits for 40 damage. This can be tweaked in all sorts of ways. See the second problem below
  • There is a slight chance that the monster will attack the wall instead of continuing through to the player. Currently this is set to 1 in 30 chance, but see second problem report below
  • Projectiles. Since the monster has to be able to attack the wall, the wall has to stop projectiles. This means I have to set the bProjTarget=true which stops all projectiles. The alternative is to trap the touch of the projectile on the server and determine if it is friendly or not before exploding. However, this decision will not get back to the client, so it will be like the defense sentinel where you do not know which projectiles are live and which aren't. So all projectiles get stopped, friendly ones do no damage.
  • When you get a brute firing at an energy wall, it takes a lot of damage. Which seems a bit unfair as there isn't really anything solid there. So hits on the field part of the wall do reduced damage - currently set to 10%, but may need to be lower. Damage to the posts gets applied in full.
  • xp for the kills goes to the spawner, and the Energy Wall kills appear on the F3 stats
  • You can heal the wall with the link gun

    Ok, so what are the problems:
  • The biggest problem I have is replication. Spawning the posts at the right positions is easy, but the red haze is proving difficult. The problem is the resizing of the wall to fit the gap it always draws it at the default size on the client. My intention was to use DrawScale3D to stretch the wall horizontally, but this is not replicated. So I might need to create the wall in lots of vertical strips, and just add however many I need, but this will not look as effective. Or I might be able to get the client side one to resize itself in a Tick. I will continue investigating, but it is like banging my head against a ....
  • For the contact I am trapping the touch event. However, when a monster walks into the wall, we sometimes get multiple touches as it enters. Which means we hit it say 5 times, for 5 times the damage. It makes it more difficult to balance the damage done if sometimes it will get hit once, and sometimes 5 times. Likewise, the monster almost always ends up attacking the wall due to the multiple touches. I might need to trap a different event or keep a list of what monsters I have hit when, so i don't hit them too frequently. The alternative would be to kick off a timer on a touch, and hit all encroaching monsters every time the timer goes, killing the timer when there are no monsters touching. This will also get around the problem where the monster stands in the wall, not raising touch events as it is not "untouching".
  • Most monsters have some sort of death animation. These death throws keep touching/untouching the wall as it spasms. Will need to put code in to do as little processing as possible for these touches - fixed
  • Minor bug at the moment in that the wall is not getting destroyed properly when killed. I just need to trace the code through and find what extra flag I am not setting correctly - fixed
  • Minor bug, not showing the health bar at the top of the wall - fixed

    Future enhancements - may put a lightning effect on the wall where the monster touches it.

    So that's where I am at the moment. Still quite a bit of work to do.
  • Wail

    Rampage

    Joined: 09/20/2007 21:14:41
    Messages: 183
    Offline

    Not exactly the same thing, but you may want to take a look at the mod UTXMP (a total conversion of Unreal 2's XMP gameplay), in particular check out the deployable force-field walls. IIRC they handle the visual effect via emitter, so there is no problem with scaling a mesh.
    RoadKill v3.4

    Wicked Sick!
    [Avatar]

    Joined: 06/03/2007 18:43:42
    Messages: 1085
    Location: Resurrection Hub orbiting Canada searching for More Beer
    Offline

    Wow looks awesome
    but sounds like an ulcer forming lots of de-bugging

    http://www.unrealcentral.com/download.php?view.167 < -- Click for my skin/model
    Szlat

    Wicked Sick!

    Joined: 05/18/2005 18:32:41
    Messages: 2124
    Location: UK
    Offline

    Szlat wrote:
    ..From where your trans is, go sideways x feet until you hit a wall, and spawn a vertical "sentinel" at each wall. Then each sentinel on start-up "links" to nearby sentinels of the same type. 
    I am still not sure about which way to spawn it
  • from a trans in the centre of the gap. Go sideways and put a post on each surface you hit and put a wall between. So each spawn generates one wall
  • spawn a post where the trans is. The post then creates it's type of wall to any adjacent posts. So the number of walls is based on the number of adjacent posts
  • the quoted option which is a bit of both - two posts both of which link to adjacent posts

    The first option gives us exactly one wall per summon.
    The second option gives no wall for the first post, one wall for the second post, one or two walls for the third post, one/two/three walls for the fourth post etc.
    The second option would be better for building long chains, but would be quite chaotic if lots of engineers all put posts close to each other.
    The third option would be good at chains and corridors, but would get extremely messy with lots of engineers. Because of course if you have 6 engineers in a room, they will not restrain themselves from spawning 6 energy walls at the entrance, giving us 12 posts. First spawn gives one wall. Second spawn gives one main wall, plus 4 extra crossing walls so 6 in total. Next spawn gives one main wall, then each post links to 4 other posts, so we have 15 in total. Fourth spawn gives one main wall, then each post links to 6 other posts, giving 28 walls in total .... so 6 engineers would end up with 66 walls in the entrance. Lag nightmare.

    So I think I will stick with the simpler first option. Unless I put a limit on a post so it can only have two walls attached?
  • ECHO

    Wicked Sick!
    [Avatar]

    Joined: 09/03/2006 23:12:48
    Messages: 1335
    Location: orange county
    Offline

    Is it safe to assume that fellow teammates will be able to safely walk through the haze?

    You can never have too much precision in your soup.

    "I don't think it's fair for me to be on the jury because I'm a hologram..." - Liz Lemon

    turtle power!

    Skin packs!
    [Email] [Yahoo!] aim icon
    Szlat

    Wicked Sick!

    Joined: 05/18/2005 18:32:41
    Messages: 2124
    Location: UK
    Offline

    ECHO wrote:
    Is it safe to assume that fellow teammates will be able to safely walk through the haze? 
    Yes
    Trooper

    Godlike
    [Avatar]

    Joined: 05/17/2008 15:32:06
    Messages: 367
    Location: t3h interwebz
    Offline

    I know one reason engis stack walls even though there is a wall there is because people die.... if I am the only one with a wall up protecting the base and I die... no base, everyone dies. so they stack it so just in case 1 person dies, there is still a wall
    [Email] [Yahoo!] aim icon [MSN]
    tgroombr

    Dominating
    [Avatar]

    Joined: 11/26/2006 15:05:26
    Messages: 211
    Location: The Invasion Vault
    Offline

    How about spawning the wall by using the two posts with the translocator. Simply by choosing where to spawn the posts in case you would want a diagonal wall. If the second post is too far away from the first one, then the player would get a message saying:

    The first post is too far away from the spawn location.

    Or if that there is an object of some sort directly between the two posts, you would get:

    There is an object between the first post and the spawn location.

    Therefore the player would not be able to spawn the posts like these, while maintaining likeable control over the position of the wall.

    TonyTheSlayer - Medic
    TonyTheSlayaneer - Engineer ( Of Course )
    TonyTheAssassin - Weapons Master
    TonyTheSlaughter - Junkie

    Watch out for Rage Rocks Of Infinity +2865196826982165 (No Self-Damage) *

    My Skin: http://skincity.beyondunreal.com/?section=models&action=show_infos&id=487
    Elite

    Godlike
    [Avatar]

    Joined: 10/21/2007 13:24:50
    Messages: 417
    Offline

    Whoa Im gone for a bit and you guys start inserting shield walls? how come no one ever thought of that before... nice job though

    WM: 383 Elite_Guard(AI)
    AM: 381 Elite_Junkie(AI)
    MM: 382 Elite_Medic(AI)
    EN: 384 Elite_Engine(AI)

    My skin: Elite(AI)


    Most rocket launcher kills: 459
    tgroombr

    Dominating
    [Avatar]

    Joined: 11/26/2006 15:05:26
    Messages: 211
    Location: The Invasion Vault
    Offline

    Elite wrote:
    Whoa Im gone for a bit and you guys start inserting shield walls? how come no one ever thought of that before... nice job though  


    Probably because most ideas (even ones that I think of) are easily rejected. Sometimes I wonder if someone like Szlat was the first person to come up with the idea, then it would be accepted automatically.

    TonyTheSlayer - Medic
    TonyTheSlayaneer - Engineer ( Of Course )
    TonyTheAssassin - Weapons Master
    TonyTheSlaughter - Junkie

    Watch out for Rage Rocks Of Infinity +2865196826982165 (No Self-Damage) *

    My Skin: http://skincity.beyondunreal.com/?section=models&action=show_infos&id=487
    greg11

    Wicked Sick!

    Joined: 02/10/2008 20:00:40
    Messages: 526
    Location: Hood River, OR
    Offline

    Will friendly fire be able to pass through?

    What about using knockback to reduce the number of times the monster takes damage.
    Szlat

    Wicked Sick!

    Joined: 05/18/2005 18:32:41
    Messages: 2124
    Location: UK
    Offline

    tgroombr wrote:
    ..... then it would be accepted automatically.  
    The only ideas accepted are those that Druid decides to incorporate. He may decide to include shield walls, he may not. I think its a nice idea, so I am putting the effort into developing it. But it may never get used.
    Szlat

    Wicked Sick!

    Joined: 05/18/2005 18:32:41
    Messages: 2124
    Location: UK
    Offline

    greg11 wrote:
    Will friendly fire be able to pass through? 
    I would prefer that, but I can't see a way of making it so that enemy fire gets stopped but friendly fire gets through. If the server has to decide, then you end up with effects like the defense sentinel where the enemy projectiles are dead but still visible - and I didn't want that. So to kill them clientside, I have to set the bProjTarget flag, which explodes all projectiles.
    However, it is quite easy to lob flak shells over the wall, or to crouch and hit the monsters legs under the wall.

    greg11 wrote:
    What about using knockback to reduce the number of times the monster takes damage. 
    Possible, but that would mean the monster has to come back again into the wall again and again, rather than being able to get through it. So, if we want a wall that stops monsters, this is fine. But if that is the case, the monsters would need to target the wall a lot more frequently, and then the wall wouldn't last long, and wouldn't do much damage as the monsters would stand back and fire at it.
    Szlat

    Wicked Sick!

    Joined: 05/18/2005 18:32:41
    Messages: 2124
    Location: UK
    Offline

    Szlat wrote:
    The biggest problem I have is replication. Spawning the posts at the right positions is easy, but the red haze is proving difficult. The problem is the resizing of the wall to fit the gap it always draws it at the default size on the client. My intention was to use DrawScale3D to stretch the wall horizontally, but this is not replicated. So I might need to create the wall in lots of vertical strips, and just add however many I need, but this will not look as effective. Or I might be able to get the client side one to resize itself in a Tick. I will continue investigating, but it is like banging my head against a ..... 
    Finally, after many many many hours got it sorted. Managed to get the wall redrawing itself ok at the client fairly quickly, but it wasn't stopping projectiles. So it looked like all the skaarj fire etc was just going straight through it - even though on the server the wall was stopping it. Tried all sorts of changes, different replication calls, different spawning techniques - all failed. Finally tracked it down. I was making the wall quite thin, and the replication of the vector rounded the wall thickness down to zero. By some obscure weirdness, you could still see it with zero depth, but it wasn't stopping projectiles - even though it should have
    So now we have a wall the correct size, and that stops projectiles.

    Or though for some reason the emitter from the ice krall projectiles seems to not get destroyed. I will need to check what I have forgotten to set with them.
    tgroombr

    Dominating
    [Avatar]

    Joined: 11/26/2006 15:05:26
    Messages: 211
    Location: The Invasion Vault
    Offline

    Is it also possible to make defense sentinels destroy projectiles instead of changing their damage and momentumtransfer variables? This both saves file size and confusion on the server. I often get scared when titan rocks come into the base without knowing if they can kill or not.

    TonyTheSlayer - Medic
    TonyTheSlayaneer - Engineer ( Of Course )
    TonyTheAssassin - Weapons Master
    TonyTheSlaughter - Junkie

    Watch out for Rage Rocks Of Infinity +2865196826982165 (No Self-Damage) *

    My Skin: http://skincity.beyondunreal.com/?section=models&action=show_infos&id=487
     
    Forum Index -> Druids RPG Go to Page: 1, 2 Next 
    Go to: