[Kde-games-devel] mahjongg tiles...

Matthew Woehlke mw_triad at users.sourceforge.net
Tue Jan 20 00:57:30 CET 2009


Inspired by Frederik's thread...

Part of the problem with rotating graphics is that the lighting gets 
messed up. Unfortunately, I don't know an easy way to fix this besides 
having four complete versions of each glyph... but there's another problem.

I started working on a 3D mahjongg a while back (haven't really gotten 
further than the basic tile drawing, due to not having time to work on 
it and being distracted by other things). The "best" way to get this 
working right, assuming that the light direction is view-relative and 
does not move around when the view is rotated is to break the glyphs 
into two images - color and bump - and use a shader to do fake 
displacement mapping (or at least an emboss effect), along with the 
requisite lighting.

As a fallback, this should probably have a method that can make 'fake' 
bumpmapped textures in case shader support is missing... but this could 
also be used for 2D implementations; tilesets would then only need the 
two sets of glyphs (one, if they don't mind being flat), and lighting 
could be done in a library. (And, let's be honest, shadows should be 
done in a library, also; what we have right now is half broken.)

Thoughts?

Even ignoring the possibility of 3D mahjongg, doing the 2D bits would 
fix the shadow issues, fix the kmj problems, and allow for changing the 
lighting angle in our existing games without needing multiple versions 
of the artwork to do it. (And being able to ignore embossing/shadows 
might be easier on artists, too.)

-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
morphir: so much confusion :S kmake, kdemake, qmake make cmake etc.
logixoul: you forgot cmakekde :)
morphir: and bakemeacake



More information about the kde-games-devel mailing list