Tinkering with the feature set for a new game, i’m considering including a PVP gameplay mode. Nothing like NI after kicking the AI so smithereens :). iSomething only. Willing to restrict to modern devices.
One option I would consider to differentiate the characters for each player on the map would be to add ‘on the fly’ a 2-point outline of different colours to the characters of each player (others options exist, but have weight considerations for the resources).
I have not found on here (nor elsewhere for that matter) any very useful answers to this kind of requirement, nor am I an GL expert by a far cry. If any one of you could point me in the direction of some tutorials, I would greatly appreciate. TIA
I wasn’t recommending that you necessarily put the outlines into separate textures. What I was imagining was that you have a sprite with a region that is all
alpha = 1.0, surrounded by a transparent region ofalpha = 0.0.One idea could be to draw a couple pixel wide ring around the opaque region with something like
alpha = 0.5.If you then want to draw your sprites without a border, you can just alpha test for
alpha > 0.75, and the border will not appear. If you want to draw a border, you can alpha test foralpha > 0.25, and use a fragment shader to replace all pixels with0.4 < alpha < 0.6with a colored border of your choice.This becomes more difficult if your images use partial transparency, though in that case you could maybe block off the range from 0.0 to 0.1 for alpha metadata like the border.
This would not require any additional textures to be used or increase the size of any of the existing resources.