I have found a great tutorial series on creating a simple 2D side scroller, Super Mario Brothers, in this case, and I believe I can adapt it fairly well to create a Megaman clone(something I am quite familiar with so that I can focus on learning the code and not necessarily the mechanics).
What has been challenging me is how to swap colors on Megaman when the chosen weapon is changed. I've found a few options, but I am unsure which one is viable.
- Having each color as a separate sprite sheet
- PRO:
- simplest implementation I believe
- CON:
- increased footprint size of overall app
- PRO:
- Converting the texture to a Pixmap, changing the colors I want, convert back to a texture and render as normal?
- PRO:
- no increase in app size
- CON:
- Is this done on reach render cycle or can I change it once and forget about it until a new weapon change?
- PRO:
- Shaders
- PRO:
- ??
- CON:
- From what I am reading, it sounds like they can only change on color at a time? Do I use 2 shaders?
- They can only be applied wholly to the render and not per sprite?
- PRO:
Thanks.