Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
FLARE [ARCHIVED]

Character alpha transparency?

Digital Shadow
Tuesday, May 22, 2012 - 23:42

Playing the game, I immediately noticed that the environment appears to use a full channel for transparency, but the characters only use 1 bit, leaving a pixely looking black edge around them and giving them opaque shadows.

I noticed in the art_src directory, you have fully transparent pngs, but in the game assets, you have magenta keyed pngs for the characters and items.  Why not use the nicer transparent versions?  Does that take up too much memory to store all the animation frames in memory with a full 32 bit ARGB color space?

Out of curiousity I played around and replaced some files with their transparent versions in the prebuilt v0.15 and the steel armor appeared to work and looked great in game, but nothing else lined up quite right (not that I really expected it to work).

Is this something planned for future development?

  • Log in or register to post comments
Clint Bellanger
joined 15 years 10 months ago
Wednesday, May 23, 2012 - 00:27
Clint Bellanger's picture

It's mostly weird limitations of SDL 1.2.

  • Can't merge two alpha transparency images in memory. The only options in vanilla SDL don't respect the alpha channel as expected. So e.g. merging the hero layers into one sprite sheet doesn't work as expected.
  • Alpha transparent images are all handled with software blitting in SDL 1.2. In other words, terribly awfully slow.

Options to fix these: 

  • Maybe there's an SDL addon library that fixes those issues.
  • Wait until the next major release of SDL, which has been in development for years
  • Switch to SDL + OpenGL for these and more features
  • Switch to SFML which uses OpenGL under the hood for 2D image handling

I've used SFML just a bit (for a game jam) and I think it could be a decent option. I know though that SDL is ported to more systems, and that would cause some fringe operating systems and devices to lose Flare. Long term undecided, but SFML is tempting.

  • Log in or register to post comments
Digital Shadow
joined 13 years 2 months ago
Wednesday, May 23, 2012 - 01:39

Interesting. I guess SDL is a little quirky.

Over the next few weeks (depending on my free time from work) I'm going to implement the characters and maps in XNA for my own prototyping purposes.  If it works out and there is enough interest, I'd be happy to post the relevant parts to Flare assets as a library on github.

I know most open source fans aren't particularly fond of C# (for many valid reasons), but IMHO you really can't beat it for rapid prototyping :)

  • Log in or register to post comments