Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Morgana retro Dungeon Crawler (uses Tilengine)
#57
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 Smile

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:

  1. Only one custom function can be active (you cannot define several at the same time)
  2. 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.
That is, changing the blend mode with TLN_SetSpriteBlendMode() is free -including BLEND_CUSTOM-, but changing the custom function is not. Do you think it can serve you for what you want to achieve? Let me know!

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.
Reply


Messages In This Thread
WOW!!! - by PerspexSphinx - 11-19-2019, 07:39 AM
Morgana game (uses Tilengine) - by JaumeAlcazo - 01-02-2020, 04:23 AM
RE: Morgana retro Dungeon Crawler (uses Tilengine) - by megamarc - 02-11-2022, 04:22 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)