Not logged inOpenClonk Forum
Up Topic Development / Art Workshop / [Request]Basement
- - By Maikel Date 2012-04-22 00:08
This is really important, we need basements, preferably scalable to any length, and somewhere around 8 pixels high.
Should not be that hard to make, but what do I know. This should really go into the 5.3 release imo, so if someone could do
this within the next few weeks, I and also some other people working on settlement would be grateful.
Parent - - By Newton [de] Date 2012-04-22 00:29
DrawMaterialRect?
Parent - - By Clonkonaut [ie] Date 2012-04-22 00:41
A more sturdy object might be a good idea.
Reply
Parent - - By Caesar [de] Date 2012-04-22 10:26
Compose it from parts, so you can blow it partially like in C4!
Parent - - By Clonkonaut [ie] Date 2012-04-22 13:04
I'd pretty much prefer something that cannot be destroyed. Meaning the basements delivers any damage to the building and the building is always destroyed before anything happens to the basement. Because then we need not to bother us with buildings falling down.
Reply
Parent - - By Newton [de] Date 2012-04-22 13:51
Why is this bad?
Parent - - By Clonkonaut [ie] Date 2012-04-22 14:06 Edited 2012-04-22 14:08
Because you have to cover this in the scripting. It's not particularly bad but extra work. Extra work we did not do so far. The two cases coming spontanously into my mind are:
Flagpoles. These have to redraw their radius once they stopped falling.
Elevators. A little twist in the elevator will look ridiculous because the rope ends somewhere in the air, also at some part the case should fall down.

You can only cover this by constantly checking all movement in buildings, so a timer with GetX() == old_x && GetY() == old_y

/e
One additional weirdness:

Gather some chopped trees below a sawmill, let the sawmill fall down, the sawmill will catch the trees will in mid-air. Cover this with a GetXDir() / GetYDir() check.
Reply
Parent - - By Caesar [de] Date 2012-04-22 14:08

>You can only cover this by constantly checking all movement in buildings, so a timer with GetX() == old_x && GetY() == old_y


That would really be worth an engine callback.
Parent - By Clonkonaut [ie] Date 2012-04-22 14:12
Yeah, it's more or less possible to check all corner cases. The question is, is it worth it? Just to have buildings that can fall down? Personally, I'd say 'no' and therefore rather have 'indestructible' (until the building is destroyed) basements.
Reply
Parent - By boni [at] Date 2012-04-22 16:40
On the other hand, why'd you want it? ;)
If you want your building to be able to fall down.. just don't give it a basement.
Parent - By boni [at] Date 2012-04-22 16:39
+1
Parent - - By Newton [de] Date 2012-04-22 11:23
If BlastToMaterial is not enough, I'd suggest to finally implement the often mentioned Hardness property for materials which changes an explosion's blast radius in that material. I know that there is at least one bugtracker entry assigned to Sven2 for that.
Parent - - By Newton [de] Date 2012-04-24 20:01
If partially blown up basements are not wished for but should be destroyed up together with the building, I have an idea that would require no extra graphics and objects, would blend well into the landscape and is absolutely dynamic regarding it's size:

Create a new indestructible material Basement (or better: use the indestructible bricks material). Then, on completion of the building, the basement is drawn as a material quad and on destruction, it is cleared again (replaced with earth or something).
Parent - - By Clonkonaut [de] Date 2012-04-24 20:08
The only advantage I see is that the landscape lighting is applied to that material.
Cutting a texture to a certain size is perfectly fine with an object (as long as basement length is < graphics length), cutting solid mask is fine and you don't have to bother with replacement because the material is not removed.
Also with your idea it's not possible to damage a building from below.

If it's just for the lightning we should rather see how we can apply this to an object.
Reply
Parent - - By Newton [de] Date 2012-04-24 22:34

>Also with your idea it's not possible to damage a building from below.


No? Wouldn't the explosion damage go through the bricks if the explosion radius exceeds it?
Parent - By Clonkonaut [de] Date 2012-04-25 00:30
Yes, if the explosion is big enough. I don't know though if the regular flint is strong enough. But you'd have significant difference between explosion from below and from above.
Reply
Parent - - By Zapper [de] Date 2012-04-25 08:47
Actually no. Not at the moment.
Livings in the radius are damaged, that is true. For buildings etc. only the mid-point of the explosion is relevant. That means you can make a Flint explode with a strength of 10000 directly in your base but it will only destroy the building it was in front.

At least that's how it worked in Clonk Rage. Would be worth changing, I guess. It was sooo annoying when trying to destroy drawbridges anyway :)
Parent - By PeterW [gb] Date 2012-04-25 18:11
A +1 on that. The whole damage system could use a bit of reworking.
Parent - - By Newton [de] Date 2012-04-25 16:53
Alright, so in my opinion we should change the Find_AtPoint to Find_AtRect (or how it is called) for explosions. Any explosion of a flint has a bigger radius than a basement, so the only contra point would be fixed.
Parent - - By boni [at] Date 2012-04-25 17:12
That would have the problem, that Find_AtRect or Find_Distance (which would be better here?) only find objects whose MIDDLE POINT (read: offset) lies inside the area. That'll never be the case here.
Parent - - By Clonkonaut [de] Date 2012-04-25 18:12
I think both, Find_InRect and Find_Distance use shapes rather than middle points.
Reply
Parent - By Zapper [de] Date 2012-04-25 19:58
I don't think so. But we could use Find_AtRect :)
Parent - - By PeterW [gb] Date 2012-04-26 12:58
Cheat sheet:

Find_InRect, Find_Distance -> middle point
Find_AtRect, Find_AtPoint -> shape
Parent - - By Newton [de] Date 2012-04-26 13:56
If we don't want our explosions to be rectangular, we need something like Find_AtDistance
Parent - - By Maikel Date 2012-04-26 14:18
Physics also dictates that the damage should go as 1/r, where r is the distance between the damaged object and the center of the explosion.
Parent - By Zapper [de] Date 2012-04-26 20:08
I thought about that too earlier today. But I came to the conclusion that I am not sure whether I like that :D
Just because it makes things more complicated for the player (hey, why did his building die in two flints and mine needed five?) and does not necessarily have any cool benefits
Parent - By PeterW [gb] Date 2012-04-26 14:41
I'd propose using AtRect and then do further filtering in script. That's basically what the engine would do as well, and the few corner-case objects are unlikely to be a performance concern.

While we're at it, one could do fun stuff here like what Maikel proposed - or try to calculate an overlap area between the explosion and the building, scaling damage accordingly.
Parent - - By Caesar [de] Date 2012-04-24 22:41
Lightning isn't applied to Vehicle? (Does Object-Material even still work that way?)
Parent - - By Clonkonaut [de] Date 2012-04-25 00:31
Vehicle is invisible like it was since ever, I think? ;)
Reply
Parent - - By Zapper [de] Date 2012-04-25 08:47
Vehicle wasn't invisible in CR :/
At least not when I drew it manually in developers' mode
Parent - - By Clonkonaut [de] Date 2012-04-25 11:31
Well, yes, but is manually drawing supported at all? If used as a solid mask, vehicle is invisible and a somewhat special case. But if drawn directly, it's some weird material that moves clonks(?) and most important overrides existing material. What is there to gain?
Reply
Parent - By Sven2 [de] Date 2012-04-25 11:35
Clonk movement has been gone for a long time. That was back then when Vehicle had three internal indices for left-moving/idle/right-moving solid masks (to keep Clonks on blimps and boats).
Parent - - By Sven2 [de] Date 2012-04-25 11:32
In CP, Vehicle had a brown-ish color. I think it turned invisible (i.e.: Sky color) at some point during GWE, so in CR it should already be transparent.
Parent - By Zapper [de] Date 2012-04-25 11:44
Oh, then those memories come from pre-CR/GWE
Parent - By Günther [de] Date 2012-04-25 17:04
In CR, solidmasks are temporarily removed from the landscape during the transfer to the GPU. OC has largely the same solidmask behaviour. Otherwise, Vehicle is a material like any other. (Though the engine does make some assumptions about the behavior of Vehicle. We should probably hardcode it in the engine to avoid having to fix crashbugs.)
Reply
Parent - - By PeterW [gb] Date 2012-04-25 18:20
I'm a bit confused as to what the current state of the discussion is (are we now talking about basements on all buildings again?), but in general I'd rather like if we had more options for generating materials into the landscape. You could have "basements kits" that for a price gives you a flat stable ground - sort of like a bridge segment.

I generally don't like the ideas of indestructible materials - getting Vehicle to work properly has already been a major pain.
Parent - - By Newton [de] Date 2012-04-26 13:59
Well, I was making a suggestion on how to implement basements for buildings.

In general, I am also in favor of more options for generating materials into the landscape, especially when thinking about castles..
Parent - - By PeterW [gb] Date 2012-04-26 14:47 Edited 2012-04-26 14:50
Hm. There's a number of things that come to mind here. Our current loam bridges don't really support doing straight bridges too well... Maybe we could "improve" this somehow? The current "drawing" mode has its charm, but I somehow can't bring myself to really like it. Maybe limit the angles the loam will go to multiples of 45?

Also a random idea: Could we enable the loam bridge to "reinforce" material? So if you have earth on the ground already and use a loam do build over it, this could give you "hardened earth" or something - which can't be dug anymore and might or might not be more resistant to explosions.
Parent - - By boni [at] Date 2012-04-26 15:26

>Our current loam bridges don't really support doing straight bridges too well... Maybe we could "improve" this somehow? The current "drawing" mode has its charm, but I somehow can't bring myself to really like it.


Same here. I've wondered if, maybe, we should draw straight if it's close enough to the line. Like, if mouse movement is minimal (position-change from the start of "drawing" is only a few pixels) we could draw it straight, instead of following the mouse exactly.
Parent - - By Maikel Date 2012-04-26 15:39
Limiting it to 45 or maybe even 30 or 15 degrees would make drawing straight lines already pretty easy I guess, and would still allow for fairly flexible use of loam.
Parent - By boni [at] Date 2012-04-26 19:57
I'd have taken the starting-direction with snapping to horizontal/vertical, but that'd work too I guess.
Parent - By Zapper [de] Date 2012-04-26 20:09

>Maybe limit the angles the loam ..


When I implemented my magic stuff, I also had the idea that being able to cast arbitrary force fields (basically drawing them) would be a cool feature.
It turned out that limiting that severely was a lot more playable.. :)
Parent - By Maikel Date 2012-04-28 08:38
So I implemented this with multiples of 30 degrees, please test it and see whether you like 30 or 45 more (just change some number in the loam script). In my opinion 30 is a little better, cause pushing lorries on 45 degree slope looks a little odd and you have a bit more freedom.
Parent - Date 2012-04-23 16:30
Up Topic Development / Art Workshop / [Request]Basement

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill