🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Allegro and transparency
I was wondering how you can set a certain color as transparent when using the allegro graphics library. I''m makina a platform game and i want the background to show through my sprites. What should I do?
If you''re using 8 bit mode, you''ll need to make the transparent areas filled with the color 0 (this is 0 as in palette index). If you''re using true color modes, you''ll need to make the transparent areas bright pink (r = 255, g = 0, b = 255).
instead of using blit, you''ll need to use draw_sprite.
Hope that helps.
instead of using blit, you''ll need to use draw_sprite.
Hope that helps.
I''ll just add that you can use masked_blit() instead of draw_sprite(), if you want.
==================
/* todo: insert cool sig */
Martee
Magnum Games.NET
==================
/* todo: insert cool sig */
Martee
Magnum Games.NET
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement