Jump to content
Sign in to follow this  
historic_bruno

===[TASK]=== Rubble

Recommended Posts

Ok folks, we now have rubble for destroyed structures as of r12718 :) The idea is rubble is spawned when a building is destroyed, it looks like burned/muddy ground and bits of wood/stone debris. It lasts for a predefined time (currently 10 seconds) before sinking slowly into the ground and disappearing.

But we're currently reusing foundation actors for this since we have no rubble models yet :( So let's work on that! You know you want to right?

  • Like 1

Share this post


Link to post
Share on other sites

Please remember to post in this topic which building (and for which civilization) you are working on so that everyone else knows not to work on that one :) Also, it might be a good idea to create some basic rubble objects/textures to use as a base before starting to create individual rubble objects. If nothing else so we don't have to add like a hundred rubble related texture files instead of a few :)

Share this post


Link to post
Share on other sites

Please remember to post in this topic which building (and for which civilization) you are working on so that everyone else knows not to work on that one :) Also, it might be a good idea to create some basic rubble objects/textures to use as a base before starting to create individual rubble objects. If nothing else so we don't have to add like a hundred rubble related texture files instead of a few :)

Do we want customized rubble actors for every structure? So far we have some generic templates for the different footprint sizes: http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/templates/rubble

Share this post


Link to post
Share on other sites

Can you can build on top of rubble (it doesn't have an obstruction)? And if so, does it make the entire rubble disappear or just the part you build over?

Share this post


Link to post
Share on other sites

Can you can build on top of rubble (it doesn't have an obstruction)? And if so, does it make the entire rubble disappear or just the part you build over?

I say let it be an obstruction while it remains. You can build over it only when it "cools down" a bit. And then only the rubble under the new building would be cleared immediately.

So obstruction for half the time it stays (so currently five seconds - which is too short BTW) and once the obstruction is lifted, it is removed immediately once new buildings are placed on it.

This seems really exciting :)

Share this post


Link to post
Share on other sites

Do we want customized rubble actors for every structure? So far we have some generic templates for the different footprint sizes: http://trac.wildfire...emplates/rubble

Hmm, maybe not =) But there are at least a fair number of different footprints, so they should each get different actors at least :) It might be cool to eventually have some more custom rubble actors for at least civ centers/fortresses/wonders, but that can be something that's kept low priority and that we can have as a good basic task to ask applicants to do as part of their evaluation process :)

Share this post


Link to post
Share on other sites

A big 'No' to customized rubble actors for every single building. The rubble actor only exists for 10 seconds, then sinks. There is absolutely no need for a customized rubble mesh if it only lasts for a few seconds. Best to do it like what is planned for scaffolding or how we did foundations--a mesh and actor for every footprint size. Simple;effective;works. Thanks for doing this, Ben. Good work, m8. (y)

EDIT:

I looked at the entity code and I think the way this was implemented is pretty crazy. I know Philip thought it best to use new entities with their own decay properties and such, but the element is named SpawnEntityOnDeath? Really? lol. This was all implemented very strangely. I suppose it doesn't matter, as long as it works, but the terminology doesn't seem to fit the ongoing convention.

Share this post


Link to post
Share on other sites

That would be great, if only for campaign use!

i agree. the player could come across a destroyed village where they decide to set up their base of operations, with the ruined buildings serving as an early source of stone. though depending on the actual costs of buildings, rubble should contain about that much stone (perhaps to make them more cost-productive, the amount of stone in a pile of rubble could be equivalent to the total cost of a building, e.g. the stone and wood cost of a building combined, for example). there could probably also be generic piles of rubbles and civ-specific ones

speaking of destroyed buildings, it would probably be a good idea if functioning "ruined" buildings were included, again for scenario design. suppose the player in a given scenario comes to the site of a now-extinct civilization which has most of its buildings still mostly intact, but visibly wrecked. the player can then capture those buildings and use them for themselves.

Share this post


Link to post
Share on other sites

There's already mineable temple ruins in the game, if I am not mistaken.

Regarding rubble, it might be nice if decals faded slowly instead of suddenly vanishing?

Edited by zoot

Share this post


Link to post
Share on other sites

I looked at the entity code and I think the way this was implemented is pretty crazy. I know Philip thought it best to use new entities with their own decay properties and such, but the element is named SpawnEntityOnDeath? Really? lol. This was all implemented very strangely. I suppose it doesn't matter, as long as it works, but the terminology doesn't seem to fit the ongoing convention.

Well the ongoing "convention" is pretty terrible, we use all kinds of arbitrary abbreviations and entity properties are often poorly named and confusing, so I don't see how you could argue this makes it worse :P I think "SpawnEntityOnDeath" is relatively clear as to what it does and anyway it's the best name I could think of that used reasonable English words. Properties that are actively named are easier to understand IMO.

It's much better to implement this as an entity. Just think, we can now leave arbitrary entities behind when another entity is destroyed and they don't even have to decay. They can have any of the components that entities are allowed to have including obstructions (though in that case we'd have to change the implementation slightly to not use local entities). We can make different sizes of rubble use different decay rates, etc. All the hacks using VisualActor are just that, they require hard coding behavior directly into the engine which is a pain. Note that this solution didn't even touch the engine code.

Share this post


Link to post
Share on other sites

Fair enough. Hmm, could this be used to simulate the "militia" behavior seen when Poseidon's buildings are destroyed in Age of Mythology? If you've never played, when a Greek Poseidon player's buildings were destroyed, a number of militiamen were left in the rubble and were controllable by the player. 1 or 2 for houses. 3 or 4 for barracks and so forth. This was one of Poseidon's major faction bonuses. I suppose then a new element would need to be introduced for this to happen to indicate the number of SpawnEntityOnDeath entities.

Share this post


Link to post
Share on other sites

That looks awesome Michael (y) I wasn't even thinking of having fire and smoke particles but it makes a huge difference.

I say let it be an obstruction while it remains. You can build over it only when it "cools down" a bit. And then only the rubble under the new building would be cleared immediately.

So obstruction for half the time it stays (so currently five seconds - which is too short BTW) and once the obstruction is lifted, it is removed immediately once new buildings are placed on it.

The decay time and rate can be changed fairly easily in the rubble entities. Not sure how I feel about obstructions though. I guess if everyone decides rubble should obstruct new foundations then we'll figure out a way to do it :)

Can we mine the rubble?WRDs6.png

Not yet. I should point out there is already a loot behavior when you destroy enemy buildings, you instantly get some resources from them. It's not as visual as having to mine the rubble, but it does happen.

Share this post


Link to post
Share on other sites

I'd rather just the rubble disappear when another building is placed over it. No mining (you already get loot, as Ben indicated).

I agree. I don't think there's much need for an obstruction to make you not build there after a building has been destroyed, after all, the units which destroyed it are likely to remain and could easily take out the new building. And yeah, I don't think there is any need to make something explicit (i.e. have the looting be literal in this case) unless it makes the game more interesting and fun. One could argue that having to mine the rubble to get the resources would be more realistic as both sides could benefit from the resources, but on the other hand that would make the owner of the building more likely to benefit from the resources as it's generally more likely for the enemy to have a longer distance to his dropsites. I think it's better to only have the opponent benefit from the destruction of a building as that both encourages more action and also forces the player to protect his buildings more :)

Share this post


Link to post
Share on other sites

aah, the Empire Earth method, then. that sounds best to me. though there should be relatively unique rubble piles for each size of building and each civilization, and a big cloud of dust should appear with each destruction to hide the instananeous appearance of the rubble

also, while mining rubble isn't gonna be included, i think there should be a provision for such a function in the game designs. for instance, in Empire Earth's official campaigns, there were two seperate instances where stone mines were spawned along with rubble from four particular enemy buildings as part of the scenario's plot; and in another campaign, destroying an ancient temple (in a near-future setting) triggered the option of mining stone from them. basically, when no other stone is readily available for the purpose of a scenario, destroying a few particular buildings allowed you to collect the rubble to use in different buildings

Share this post


Link to post
Share on other sites

As far as I understand it (note that I might have misunderstood some details, but I think not, if so Ben should correct me asap ;) ) it should be possible to just create a building that would have a "rubble pile with resources" object as the actor that is created after the building is destroyed. (Seeing as there exists a model of a destroyed Greek temple which you can mine it should even be possible to do just using content that comes with the game :) You need to create your own XML files to tie them together of course, but apart from that.)

Share this post


Link to post
Share on other sites

aah, the Empire Earth method, then.

Apart from the rubble permanently staying on the map if you don't build over it. It would be nice to have it disappear after a while.

Share this post


Link to post
Share on other sites

Apart from the rubble permanently staying on the map if you don't build over it. It would be nice to have it disappear after a while.

It already does disappear. It slowly sinks into the ground and then vanishes after about 10seconds.

Share this post


Link to post
Share on other sites

I personally think that rubble should not have obstruction boxes.

For example, you have just destroyed a portion of a wall, and you want to move your troops into the enemy base, but you'll have to wait 10 seconds until the rubble is gone... that doesn't sound funny

  • Like 2

Share this post


Link to post
Share on other sites

I like how it currently works at the moment. Right now the rubble sits there for about 10 seconds, then slowly sinks into the ground for about 10 seconds, leaving the decal for another 10 seconds. Just destroy a Greek house to see this in action with a placeholder rubble mesh.

Share this post


Link to post
Share on other sites

Taking a break from Mauryan structures to have fun destroying things... ^^

Maybe too messy? xD

post-13528-0-31477900-1349199399_thumb.j

Posting soon .blend file with props + texture for the community to make their own rubble for different sizes/variations:

post-13528-0-74736800-1349199409_thumb.j

Share this post


Link to post
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
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.

Sign in to follow this  

×
×
  • Create New...