02-11-2022, 04:22 AM
Hi Jaume!
I'm glad to hear from you, cheer up with the confinement, I hope it passes soon and you are all well. For my part I can't complain, thank you
I see that the progress of the game is advancing, it looks better and better, congratulations!
There is no direct way to blend two blend modes together, but you can create a custom blend function by using the TLN_SetCustomBlendFunction() function and then passing the BLEND_CUSTOM value to TLN_SetSpriteBlendMode() . This function takes as input the intensity values (0-255) of the existing image, the one that is overlaid, and returns a new intensity value resulting from applying the calculation that you want to the two original values. This method is flexible but has 2 limitations:
The next feature of Tilengine that I will publish -of which you already saw a preview- is the compatibility with html5 and browsers, to be able to export the games made in C to a web browser. Later directly in javascript via binding.
I'm glad to hear from you, cheer up with the confinement, I hope it passes soon and you are all well. For my part I can't complain, thank you

I see that the progress of the game is advancing, it looks better and better, congratulations!
There is no direct way to blend two blend modes together, but you can create a custom blend function by using the TLN_SetCustomBlendFunction() function and then passing the BLEND_CUSTOM value to TLN_SetSpriteBlendMode() . This function takes as input the intensity values (0-255) of the existing image, the one that is overlaid, and returns a new intensity value resulting from applying the calculation that you want to the two original values. This method is flexible but has 2 limitations:
- Only one custom function can be active (you cannot define several at the same time)
- Every time you set a custom function with TLN_SetCustomBlendFunction(), a LUT of 65536 entries is precomputed. This has a small performance cost, so it is not intended to be changed continuously.
The next feature of Tilengine that I will publish -of which you already saw a preview- is the compatibility with html5 and browsers, to be able to export the games made in C to a web browser. Later directly in javascript via binding.