Better for performance - actives with alpha channel or using alpha blending coefficient?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I am making a game where the player and enemies are leaving footprints in the ground. I am thinking of either using a solid black objects for the footprints that have an alpha blending coefficient set to them to be semi transparent or just use a semi transparent sprite without any effect. These are then pasted into the background as the characters walk around.

    Do anyone have an inclination on which option is better for performance?

    A future problem I am thinking about also is that if a lot of footprints overlap they could become more and more visible since they "stack". I assume there is no easy solution for this?

    Steam games: Please login to see this link.

  • First thing is,alpha channel and alpha blrnding coeffident aren't for the same purpose.Alpha channel is for the transparent parts of the graphic of the object.Alpha blend coeffident is the amount of transparency of the entire graphic of the object.I'm not sure it's doing anything with the performance but It's up to you to use them for their purpose.

  • A future problem I am thinking about also is that if a lot of footprints overlap they could become more and more visible since they "stack". I assume there is no easy solution for this?

    You could paste the new footprint onto another one, and set the alpha blend accordingly, so that it is no so visible - that is, so they do not "stack". You may check the current alpha blend of the already present footprint, and set that value so that the new footprint is less visible than the previous one.

    Another thing, you could let the footprints slowly dissolve. This helps to reduce the total number of objects in the application. If you consistently add footprints, they may slow down the game somewhen.

  • Make the footprints solid, and create them on a dedicated layer. Give this layer a blending coefficient, and the footprints will all be faded together, without overlapping or stacking.

    As for performance, just create 5000 footprints using each of the different methods, and see which one slows the game down the most. My guess is that they would all be pretty lightweight, and it wouldn't really matter either way.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Fusion has a separate bitmap for alpha channel, so depending on the implementation, if changed alpha channel is cached then the performance should be the same in software mode.

    Besides, IIRC there shouldn't be different under D3D, anyway, you can benchmark it.

  • Make the footprints solid, and create them on a dedicated layer. Give this layer a blending coefficient, and the footprints will all be faded together, without overlapping or stacking.

    As for performance, just create 5000 footprints using each of the different methods, and see which one slows the game down the most. My guess is that they would all be pretty lightweight, and it wouldn't really matter either way.

    Wow thanks that is a really clever and great idea! :D

    Another thing, you could let the footprints slowly dissolve. This helps to reduce the total number of objects in the application. If you consistently add footprints, they may slow down the game somewhen.

    Would not pasting the footprints into the background and destroying the actives of the footprints prevent the "object count" to slow the game down? Even after I have pasted in 1000 footprints the frame still have 0 "total objects".

    I am not sure exactly how objects pasted into the background work in practice though?

    Steam games: Please login to see this link.

  • Would not pasting the footprints into the background and destroying the actives of the footprints prevent the "object count" to slow the game down? Even after I have pasted in 1000 footprints the frame still have 0 "total objects".

    I am not sure exactly how objects pasted into the background work in practice though?

    I think you are just right, pasting on the background would suffice, and since you delete the active(s), it should not impact on the performance and on the object count.

    Good idea :thumbup:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!