Not logged inOpenClonk Forum
Up Topic General / General / [Bug/Idea] Digging effect
- - By AlteredARMOR [ua] Date 2010-02-06 20:59
Thought that I might add this consideration later somehow, but then thought that, probably, the earlier it will be fixed/implemented the better.
Currently there is this cute dust effect that happens when you dig earth (realy like it - something CR didn't have). But the problem is that the same "earth" effect happens when you dig, for example ice (see picture below - this looks really weird).
Naturally there have to be different effects for different type of "soil".
(Maybe, there is no big deal to add other graphics for ice/sulphur/coal later but I thought that at least it is time to think it over (since this "dust cloud" feature is ALREADY implemented and it works not the way it should)).
Reply
Parent - - By B_E [de] Date 2010-02-06 21:03
Maybe one could color it depending on a RGB-section in the Material.txt?
Parent - - By AlteredARMOR [ua] Date 2010-02-06 21:07 Edited 2010-02-06 21:09
I remember someone discussed a function to check what material is placed in the specified X,Y coordinates. Probably it would help to deal with this issue
Reply
Parent - - By Clonk-Karl [de] Date 2010-02-06 21:19
That's possible already. You can use GetMaterial() to query the material at a certain position. I am not sure how to obtain it's color though, I think this mainly depends on the texture applied. There is also GetTexture(), but you still can't get color values from it.
Reply
Parent - - By Ringwaul [ca] Date 2010-02-06 22:01
I noticed this a while ago while testing my clouds, and mentioned it to Newton; I think he mentioned something about a GetMaterialColour() function, or something like that, but it had been removed. D:
Reply
Parent - - By Newton [de] Date 2010-02-07 13:56
A little comment about this whole dust effect thing. Right now this is only used for the shovel but I think this should be put generally into the DigFree/BlastFree functions. Of course, lastest then we need GetMaterialColour.
Parent - By Atomclonk [de] Date 2010-02-07 15:17
Yeah, I've noticed it, when I was holding a shovel in my right and another in my left hand. I've pressed both buttons, so I've got the double amount of dust...
Reply
Parent - - By AlteredARMOR [ua] Date 2010-02-06 22:52
I do not think we need to get color actually. GetMaterial should probably be enough. Depending on that value the cloud can be be dusty brown (as it is) for earth, snowy blue for ice, poisonous yellow for sulphur etc.
Reply
Parent - - By Ringwaul [ca] Date 2010-02-06 23:09
Yes, that would be very doable with the current script. However, you would have to make an 'if statement' for every single material that can be dug.

ie:
var matcolour;

if(GetMaterial()==Material("Earth")) matcolour=RGB(124,78,31);
if(GetMaterial()==Material("Ice")) matcolour=RGB(169,210,224);
if(GetMaterial()==Material("Sand)) matcolour=RGB(228,225,165);
etc. etc.

It would be much better to have:

if(GetMaterialVal("DigFree", etc.) matcolour=GetMaterialColour();


Also, with the first method, custom materials wouldn't show a proper colour.
Reply
Parent - - By MimmoO Date 2010-02-06 23:17
i think so. by the way, when you crash ice, you dont get blue dust, its white.
Parent - By Ringwaul [ca] Date 2010-02-06 23:35
Yeah, but I was too lazy to think logically. :p
Reply
Parent - - By AlteredARMOR [ua] Date 2010-02-06 23:45
My bad. By "snowy blue" I meant... white with... maybe... a bit of cyan (oh... never dug ice with a showel so do not know how it should look like).
Reply
Parent - - By MimmoO Date 2010-02-06 23:57
its pretty hard to dig ice with a shovel. i wonder why it was possible in earlier games. its hard work to get through ice, and its also hard to get through frozen earth. furthermore, you can dig faster through snow and sand than through earth, but i dont think diggingspeed should be changed
Parent - - By Ringwaul [ca] Date 2010-02-07 00:39
One would have to try incredibly hard to dig through ice with a shovel (swing shovel like axe, maybe, and that would only create a small dent chip). I think if ice was only blast-free, it would make more sense.
Reply
Parent - - By AlteredARMOR [ua] Date 2010-02-07 10:14
Guys, you won't believe it! This is exactly what I thought about this morning.
At first I thought that ice is not suppoused to be dug with a showel that's why you will probably have to blast it with explosives. Then I remembered about the discussion about implementing a pickaxe (maybe here and here) so the ice should be only "mined" using this tool (or even better: it would evaporate if you try to blast it with explosives).
Then I thought that this approach would add unnesecary  complexity to the game (because the same "not dugable with showel" rule has to apply to sulphur and probably coal as well). Do we really need this?
So I ended up with thinking about applying some sort of "digging speed": digging through ice or sulphur should be slightly slower than through earth or snow.
Reply
Parent - - By Asmageddon [pl] Date 2010-02-07 12:33
Well, digging speed is great idea. Strange, that I haven't come up with it... however digging trough ice is not same as digging trough earth maybe we could have differet animations for digging trough various materials? Well, that would not be really usefull, as there would be 'normal' animation and 'ice' one, maybe a bit different for sand/snow, but its still only 3 uses. IMO its worth it only if it is no more than 20 minutes of coding and creating these animations.
Reply
Parent - By Randrian [de] Date 2010-02-07 12:53
Well what exactly should be the difference between these animations? Well Ice could be some hacking the ice with the shovel, but I don't know if this would look good. And Sand Snow? How do you dig sand other than earth? If you can provide good templates, I could give it a try.
Reply
Parent - By mixi [de] Date 2010-03-13 19:05 Edited 2010-03-13 21:32
Just one idea I had while reading this discussion: The border of a tunnel through ice should not be as even as the one of one through earth.
Parent - By Ringwaul [ca] Date 2010-02-07 00:37

>never dug ice with a showel so do not know how it should look like


Well, ice is just frozen water, and snow is frozen water in a particulate form, so digging ice would look exactly the same as digging snow.
Reply
Parent - By Asmageddon [pl] Date 2010-02-07 12:34
But white-cyan will look better(probably), and very few people will notice, that its strange. And btw. there is not much of this 'dust' when you dig ice, and it does not form 'clouds'...
Reply
Parent - - By Luchs [de] Date 2010-02-07 12:03
What about the color that is defined in the .c4m? It can be read with GetMaterialVal.
Parent - - By Clonk-Karl [de] Date 2010-02-07 12:07
The Color field does not exist anymore. The documentation is out of date. Material color is completely determined by its texture.
Reply
Parent - By Luchs [de] Date 2010-02-07 12:10
Okay, I've already expected something like that ;)
Parent - - By Newton [de] Date 2010-02-07 13:58
As the field is needed after all, we could back out the revision where it was removed. Unfortunately, it seems to have happened before the import to HG. So someone needs to reimplement the field into the engine. Shouldn't be that hard, though. *bugtrackdr*
Parent - By Clonk-Karl [de] Date 2010-02-07 14:13 Edited 2010-02-07 14:17
Why is it needed? [Edit:] As proposed in the bugtracker I think we should deduce an average color from the texture. Reintroducing the Color field brings back unwanted redundancy and a possible error source (when copying a material and forgetting to adapt its Color). Also this makes it hard to use different textures for the same material.
Reply
Parent - - By Günther [de] Date 2010-02-07 15:00
I simply replaced all occurrences in the engine with the color of the top-left edge of the texture. Not particularly elegant, but iirc the only real use was the color for the palette of the landscape.bmp, so computing an average would have been overkill. I'm not even sure an average would be better for this use - if the color of the top left edge doesn't satisfy, one can simply move the texture around, and possibly get an even better color than the average.
Reply
Parent - By Sven2 [de] Date 2010-02-07 15:08
For some textures (e.g. wall textures) you can't just shift around.
Parent - By Asmageddon [pl] Date 2010-02-08 11:41
Well, is making a function return pre-set color for each texture such a problem? ^^'
Reply
Parent - By Ringwaul [ca] Date 2010-02-08 19:19
This seems to be just a different method of defining the colour of a material, except that it could affect the actual material graphic. :/
Reply
Parent - - By B_E [de] Date 2010-02-07 10:28
By the way: I'd find something like that effect nice for the FlatUp-Animation, just a bit smaller.
Parent - - By PeterW [de] Date 2010-02-07 13:12
Hm, or around the feet when wading through water?
Parent - By B_E [de] Date 2010-02-07 14:01
Yes, something like that would be nice to.
Up Topic General / General / [Bug/Idea] Digging effect

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill