Preventing `Painting'

Discuss the future of Warzone 2100 with us.
Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40

Re: Preventing `Painting'

Post by Troman »

EvilGuru wrote: The problem with this method is that when you first start building a structure it will be very easy to destroy it. This could make building front-line defences very tricky.
It is done like this in the most games I have played. Basically we have two alternatives: painting or structures being easy to destroy at the beginning. A compromise would be to give a structure, say, 20% of hp at the beginnign (or some absolute value), and not 100% as it is the case now and then slowly increase it.
EvilGuru wrote: It is not so much decreasing HP as it is decreasing accrued power.
The problem of painting is all about hp though. When you get attacked you paint some structures at the spot where you are attacked, with time this spot becomes less and less important, because the front line can move in this time or the enemy can attack somewhere else, so I find the fact that a structure has 100% hp at the beginning more problematic than the fact that this painted structure stays unfinished.
Sign Up for Beta-Testing:
?topic=1617.0
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

Re: Preventing `Painting'

Post by EvilGuru »

Having all of your power locked up in an unfinished structure can't be doing you any favours.

I do have one other thing I need to check actually (an exploit with regards to partially built structures).

Regards, Freddie.
madman
Greenhorn
Posts: 12
Joined: 25 Mar 2008, 11:03

Re: Preventing `Painting'

Post by madman »

I use this idea against the AI sometimes when they are really hard. But i wouldn't mind if it automatically starts demolishing itself (like what a truck can do) and you would get that power back(or a bit of it).
User avatar
psychopompos
Trained
Trained
Posts: 470
Joined: 08 Nov 2007, 09:18
Location: UK

Re: Preventing `Painting'

Post by psychopompos »

in ta you got a % of the power back, sounds like a good idea to me.
but give an initial time delay (45 seconds) to get another truck to it.
MOTHERBOARD - MSI P7N PLATINUM¦-¦PROCESSOR - C2D E7300 @ 4.00GHZ
MEMORY - 4 Gig (2x2gig) ddr2 1066mhz¦-¦OPERATING SYSTEM - WINDOWS 7 (ULT)
GRAPHICS - BFG GTX 260 OCX (requires ForceWare drivers for good openGL)
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Preventing `Painting'

Post by kage »

iMac wrote: CONs to this are structures are weak when first built.
CONs to this are if you pull a truck off a structure(factory or otherwise) , or the truck gets destroyed(by ground or air units), then you will slowly lose that structure that did take TIME to build.
i don't see these as major cons. certainly one can expect that a construction operation should be vulnerable, and that abandoning it, or having its build-crew destroyed would make it forfeit. i would even go so far as to suggest that it wouldn't be a bad thing to allow an enemy to kill your truck, finish where you left off, and put their flag on it (all of these things just vary on the degree of vulnerability, not the kind -- war is war).

however, i do agree that half-builds, as i've always heard them called, are very unsportsmanlike... i felt it wise to considering again the way that structure building occurs in warzone -- the multistep process is as follows

1. gathering power for the structure (green bar). during this time, power is drained from your total power pool, but the structure gains no hp. after some testing, it appears that the structure full hp, and they're much harder to deal with at this point, since they are completely "flat" at this point, meaning that with the improved collision-detection system, they're almost impossible to deal with except for flamers and artillery.
2. doing the actual construction (yellow bar). during this time, the phyiscal height of the structure increases to it's "finished" size, and at the end of this stage, the structure becomes operational. just like before, it has full hp throughout this whole stage.

I propose two simple changes:
1. if a structure is abandoned (there are no trucks building it) during the "green" phase, the structure is removed, and all energy spent up to that point is returned to the player.
2. during the "yellow" phase, if a structure has at least one truck actively building it, during that time it has full hp. if there are no trucks actively building it, it will have the same percent of its max hp, as it is percent complete. thus a 200 hp building abandoned at being 5% complete will have 10 hp. as soon as a truck starts building it again, it will again have max hp, minus whatever it was damaged (the damage done to it during construction should always be present with starting or stopping the build process -- either converted to a percentage and back again, or using the raw damage.

this should make half-builds meaningless, since they will be very easily destroyed, and even though the truck didn't spend a lot of time, it did use the full amount of power for only a percent of the hp, and intentional use of half builds would disadvantage the one building them.

it also shouldn't require and logic additions to the code, since these conditions can be hooked into the existing start/stop construction code blocks for trucks, or however it works in the engine.
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

Re: Preventing `Painting'

Post by EvilGuru »

The first point has been implemented. However, the power drains at a fixed rate so long as a structure is abandoned. If the amount of power drops to 0 then the structure is removed.

Partially build structures are no harder to destroy than fully built ones. The collision detection does not take this into account.

The HP thing does need to be solved, however. I quite like your solution, will have to look into it further.

Regards, Freddie.
User avatar
psychopompos
Trained
Trained
Posts: 470
Joined: 08 Nov 2007, 09:18
Location: UK

Re: Preventing `Painting'

Post by psychopompos »

is there no way the collision detect(terminology?) could be changed to allow vehicles to drive over half builds?
realistically, driving over a foundation(as i imagine it) wouldnt be too stressing for any military vehicle.
especially one with tracks
MOTHERBOARD - MSI P7N PLATINUM¦-¦PROCESSOR - C2D E7300 @ 4.00GHZ
MEMORY - 4 Gig (2x2gig) ddr2 1066mhz¦-¦OPERATING SYSTEM - WINDOWS 7 (ULT)
GRAPHICS - BFG GTX 260 OCX (requires ForceWare drivers for good openGL)
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Preventing `Painting'

Post by kage »

psychopompos wrote: is there no way the collision detect(terminology?) could be changed to allow vehicles to drive over half builds?
realistically, driving over a foundation(as i imagine it) wouldnt be too stressing for any military vehicle.
especially one with tracks
well, it actually could be -- not in the short term, but in the long run it could mean a need for more maintainance. anyways, the problem i've always heard about half-builds is that player units favor attacking half-builds and other defensive structures over other enemy units in the area, or something like that.
EvilGuru wrote: Partially build structures are no harder to destroy than fully built ones. The collision detection does not take this into account.
are you sure? i tested it today, out of about a min of shooting, not a single cannon round hit a bunker abandoned in the green build stage, but it did occasionally hit one abandoned in the yellow stage.
User avatar
A4tech
Trained
Trained
Posts: 66
Joined: 18 Mar 2008, 09:43
Location: Europe

Re: Preventing `Painting'

Post by A4tech »

Problem solution:

1. When start building a structure game should take all power in one time (not draining it while constructing)
2. Lock truck to the construction
3. Make HP lose if don't finish construction and/or truck is out from job
4. Make AI ignore unfinished structures
5. Don't count unfinished structures in game (if structure not complete = structure no existing and not detecting in pathfinding)

Sorry for spelling  ;D
User avatar
Verminus
Trained
Trained
Posts: 121
Joined: 18 Feb 2008, 19:13
Location: Peterborough, England

Re: Preventing `Painting'

Post by Verminus »

A4tech wrote: Problem solution:

1. When start building a structure game should take all power in one time (not draining it while constructing)
2. Lock truck to the construction
3. Make HP lose if don't finish construction and/or truck is out from job
4. Make AI ignore unfinished structures
5. Don't count unfinished structures in game (if structure not complete = structure no existing and not detecting in pathfinding)

Sorry for spelling  ;D
1. Already does this, hence why building is a 2 stage process, first the power is assigned,(green stage, doesn't take too long) Then building is started.(yellow stage)

2. Don't think This is a good idea, what if you want to cancel the build? or you have several trucks building different structures but see enemies approaching so you want to re-assign some of the trucks to build your defenses faster?

3. See Below*

4. Maybe not ignore completely, but unfinished structures should certainly have a low target priority, but it should depend on what the structure is, some building, even if unbuilt should be higher priority targets than others.

5.NO. This is just asking for all sorts of problems IMHO. We have enough problems with pathfinding as it is, not to mention if unfinished structures don't count how do you enforce the build limits? if your implying that you should be able to drive over unfinished structures, how? yes they all start off flat, but they don't remain that way for long, especially the taller buildings, walls, hardpoints, guard towers, the lot. ( the only building that stay flat enough that a tracked vehicle could possiably drive over them are bunkers, and even thats pushing it.)

*Unfinished structures should slowly un-build (maybe at the same rate that a single truck builds?or 75%?), through both green and yellow stages, with power being returned to player in green stage, (maybe only 75% - 90% or total?).
HP for incomplete buildings should either be a fixed percentage of the finished structure (say 50%), or be related to the build progress, but 0% completed can't equal 0% health otherwise new structures would be too vulnerable.
Maybe they should start with 25% health and work up in a linear fashion, reaching 100% health at 100% completion.
Damage done to incomplete structures, either while building or unattended, should be absolute, not % based, eg 20 points of damage is 20 points of damage and stays as 20 points of damage even if/when the structure's max health changes. Building with 0 or less HP are destroyed

So the total health points of an incomplete structure would be worked out as:

( (25% of the finished structure's max health) +  (3/4 of the % built) ) - (Damage done)

I also agree with kage that whoever finishes the building should get to take ownership of it  ;D
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

Re: Preventing `Painting'

Post by EvilGuru »

kage wrote: are you sure? i tested it today, out of about a min of shooting, not a single cannon round hit a bunker abandoned in the green build stage, but it did occasionally hit one abandoned in the yellow stage.
I am. When I first implemented the code I though the exact same thing -- about them being harder to hit. So I looked over the projectile collision code and found all of the instances where we checked the height of the structure. We always use the final height of a model.

(I could find no reference to the completeness of a structure in the code.)

Regards, Freddie.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Preventing `Painting'

Post by cybersphinx »

There seems to be a bug in the current implementation. When a truck goes away in the middle of upgrading a building the whole building will disappear. (I haven't tested this myself, just saw it on the german board: http://board.warzone2100.de/index.php?t ... 30#msg9530.)
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA

Re: Preventing `Painting'

Post by Zarel »

cybersphinx wrote:There seems to be a bug in the current implementation. When a truck goes away in the middle of upgrading a building the whole building will disappear. (I haven't tested this myself, just saw it on the german board: http://board.warzone2100.de/index.php?t ... 30#msg9530.)
iirc, that was a very old bug that's been fixed for a long time.

After reading your link, it appears it still affects 2.1.2. Blame EvilGuru. https://gna.org/patch/?1030

I've ticketed it: http://developer.wz2100.net/ticket/330
User avatar
zoid
Trained
Trained
Posts: 125
Joined: 13 Jun 2009, 00:45

Re: Preventing `Painting'

Post by zoid »

HP should be relative to power drawn. So if you've drawn 20% power, the structure has 20% HP. I know someone's gonna say, "Well, what if the enemy destroys it just as your building it?" The answer is that you only lose a bit of power. If they destroy a 100% power drawn structure in the current version, you've wasted 100% of that power. So for 20% power loss they should only have to use 20% ammo and time.
If you see a fatal flaw in my idea let me know. :cool: