Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / SolidMask definition in separate file
- - By Sven2 [de] Date 2014-01-06 23:51
I thought about reworking SolidMask definitions to come from their own graphics file instesad of checking transparency on the main graphics as it is done now.

This would have some inherent advantages:
* The engine would not need to lock definition graphics surfaces during game execution. Recently, this has caused SolidMask failure in editor mode when no viewport was open (since there was no valid OpenGL context set)
* Dedicated servers would no longer need to load graphics
* No unnecessery collision masks stored in video memory

And one disadvantage:
* Would break compatibility with old player content that is using SolidMasks. Only the EarthBrick in AngryShovels comes to my mind at the moment.

Related to bugs #300, #590 and 1007.

What do you think about this change?
Parent - By Clonkonaut [de] Date 2014-01-07 10:11

> What do you think about this change?


In favour.
Reply
Parent - By Zapper [de] Date 2014-01-07 11:12
Go ahead!
Parent - By Maikel Date 2014-01-07 14:26
Do it!

While you are looking at solidmasks you might also want to look into moving solidmasks and clonks standing on them, moving with non-integer speeds (in pixel / seconds). Then objects tend to fall off...
Parent - - By Armin [de] Date 2014-01-07 15:14
Do you plan to define the area in such a Solidmask.png Ringwaul described or where?
Parent - By Sven2 Date 2014-01-07 15:23
The defcore and script interface should stay the same, so you can still define source and target area for SolidMasks at runtime. I would just read the pixel data from another surface.

Just loading a different surface would be a trivial change. But I think I should also refactor the code a bit so it won't keep a duplicate of the buffer in every object.
Parent - By Sven2 [de] Date 2014-01-08 01:57
Up Topic Development / Developer's Corner / SolidMask definition in separate file

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill