AuthorTopic: special effects animation  (Read 6947 times)

Offline sir-knight

  • 0001
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile

special effects animation

on: July 11, 2007, 02:01:03 pm
Hey guys, I was wondering how you guys treat transparent effects when there is no 256 channel alphablending? In the world of cellphone games, we don't have the luxury of translucency in colors, transparency is either on or off. This makes it difficult to antialias and do glowing effects that aren't integrated into each specific asset. In the case of special effects such as sparks and electricity, or lighting glows, there is really no such thing as transparency blending on mobile games. So I'm curious as to how others handle it.

Offline ndchristie

  • 0100
  • ***
  • Posts: 2426
  • Karma: +2/-0
    • View Profile

Re: special effects animation

Reply #1 on: July 11, 2007, 02:27:42 pm
most pixel art is done with extremes such as these, so yes, it's a common difficultly.

I find a very good way to operate (inspired by that speaker scene from "This Is Spinal Tap") is to make everything slightly darker, not using any white, but substituting a pale gray (10% for characters, 20% for background) for white instead, and adjusting everything else accordingly.  In rooms meant to be dimly lit (caves, subways, sewers, buildings without power, space) you are able to darken even further (around 30% for character, 60% backgrounds looks nice), for an even fuller effect of this method.  The slight boost in the character color realms gives then just a little more pop.  When you do this, if the slightly darkened things are the only things on screen, you do not notice that you are begin short-changed in the brightness department.

When you go to do special effects then, you have a lot more leeway, because your range for lights extends to what the player's eye will think that 90% brightness is 100%, so when you add in things that are *actually* 100% brightness, it will consider it to be 111.11% brightness.  You can have better flashes and shines that are still brighter than anything else on screen without fancy blending, and actually, this is a good trick even for games using fancy blending, because it still "goes to eleven."

another good way to do things is to mix in dark elements, like black smoke or flying rock for explosions, a dark fireplace around a bright fire, a black lantern case around a bright lantern, so that even a dim effect will look bright because it will be surrounded by even darker things.
A mistake is a mistake.
The same mistake twice is a bad habit.
The same mistake three or more times is a motif.

Offline bengo

  • 0011
  • **
  • Posts: 599
  • Karma: +0/-0
    • https://pixeljoint.com/p/5787.htm
    • View Profile

Re: special effects animation

Reply #2 on: July 11, 2007, 02:49:01 pm
I'm wondering, what are the things the majority of cellphones today can't and can do(Graphically, obviously)?
« Last Edit: July 11, 2007, 03:00:27 pm by bengoshia »

Offline ndchristie

  • 0100
  • ***
  • Posts: 2426
  • Karma: +2/-0
    • View Profile

Re: special effects animation

Reply #3 on: July 11, 2007, 04:25:30 pm
most have great color choices, but harsh restrictions on number of sprites/tiles, number of colors per sprite/tile, and size of sprites/tile, not to mention of course that the screens are often very few pixels.  There is often no alpha, like he said.  ATM the typical phone is capable of something along the lines of a very short/small GBA or SNES game.

someone who works a bit more with phones can tell you better, i haven't done anything with them for a while and they might be a lot better than i remember.
A mistake is a mistake.
The same mistake twice is a bad habit.
The same mistake three or more times is a motif.

Offline am_pm

  • 0001
  • *
  • Posts: 94
  • Karma: +0/-0
  • Lurker supreme
    • View Profile

Re: special effects animation

Reply #4 on: July 11, 2007, 05:07:29 pm
To tell you the truth, not to undermine anyone who works in the industry, I never thought of cell phones as an adequate gaming medium. I imagine that it will become greater in the near future but right now things are a little stale.

Offline sir-knight

  • 0001
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile

Re: special effects animation

Reply #5 on: July 11, 2007, 06:19:48 pm
there are certain types of games that work well on cellphones, mostly casual arcade style or card games. You can't do anything too immersive or involved because of the short playtime windows people typically play in. (5 minutes here and there)

anyways, The issue with transparency is not with newer phones. A lot of new phones have the ability or option to have a few levels of alpha, but the problem is that we need to design for portability to as wide a range of phones as possible, especially for smaller companies who don't have money and resources to throw a huge porting team together.

Typically a phone can support 12-24 bit palettes no problem, it's the alpha that is an issue. Some phones have the capacity to run a ton of art assets and load them into memory at no loss of framerate, while other phones can only load maybe at best 2 of it's screen size in total art assets. The other restrictive factor is that the majority of phones out there run on a java platform. Java in itself is a very resource demanding language... why it was chosen to be the programming language for cellphones is beyond me, but I'm am but a mere, humble artist.


Adarias, thanks for your comments, I'm not quite sure if that's what I was looking for. If you have a visual example that would be great. I think I know what you're saying, I'm not quite sure how it applies to what I need.  I was looking for more along the lines of how to treat the edges, shines and fading effects more than color/brightness selection. Right now I'm presented with the task of creating glow and sparkle effects that normally would be pretty easy to do with more conventional mediums, I have to figure out a way to make these look good with limited framerate and next to no alpha, graphical examples would be most helpful :D

Offline Helm

  • Moderator
  • 0110
  • *
  • Posts: 5159
  • Karma: +0/-0
    • View Profile
    • Asides-Bsides

Re: special effects animation

Reply #6 on: July 11, 2007, 06:27:29 pm
Quote
anyways, The issue with transparency is not with newer phones. A lot of new phones have the ability or option to have a few levels of alpha, but the problem is that we need to design for portability to as wide a range of phones as possible, especially for smaller companies who don't have money and resources to throw a huge porting team together.

speaking on behalf of anyone that has ever upscaled or downscaled art for different phones, please come up with a common spec and structure (like PCs) for phones already! Common architecture! Please! Oh god please I beg you!

Offline AdamAtomic

  • 0100
  • ***
  • Posts: 1188
  • Karma: +0/-0
  • natural born medic
    • View Profile
    • Adam Atomic

Re: special effects animation

Reply #7 on: July 11, 2007, 08:55:22 pm
There are only 2 things you have to remember when it comes to cell phone games:

1 - No dedicated graphics hardware

This means things that are common in SNES-era games and forward, such as alpha blending, rotation, scaling, mosaic, flipping and other special effects are extremely slow and memory intensive.  Also, it means anything you can do to limit the fill rate is a big boost, since drawing is done of course in software.  This means using solid colors instead of tiles in some places, etc.

2 - No chorded button input

This means that the phone only recognizes a single key at a time.  Sucks, right?

And yeah, the mixed resolution platform sucks donkey dick, pardon my english.  At a larger size it'd be fine, you could use vectors to compensate, but decent display at say 100x150 is nearly impossible without very careful pixel art.  If you can, design you game to scale WITHOUT needing to scale the actual assets!!

Offline robalan

  • 0010
  • *
  • Posts: 337
  • Karma: +0/-0
    • View Profile

Re: special effects animation

Reply #8 on: July 12, 2007, 12:16:23 pm
To address your actual question and not continue ranting about cell phone hardware, the only way I can think of to get fading/transparency effects without alpha is using dithering in the areas you want to be transparent.  This may or may not work terribly well, depending on what the background looks like, what the effect is, and other factors.  I'm sure some of the more experienced artists on here could give you better pointers than that.  As an example: in this post, the latest update on the firebreathing animation uses 50% dithering on the edges to blend it into the background.  Hope that helps.
Always remember: a preposition is not something you should end a sentence with.

Offline ndchristie

  • 0100
  • ***
  • Posts: 2426
  • Karma: +2/-0
    • View Profile

Re: special effects animation

Reply #9 on: July 12, 2007, 02:10:11 pm
because the background is darker you are able to use darker colors in your explosion which will still appear lighter, allowing you to blend from white to red or blue or yellow or green without getting dark jaggies.  It gives you much more of a range to work with and you may include the AA on the image successfully.


50% dither works great in some places (very high res screens or very blurry old ones), but the overly crisp low-res screen of a cellphone tends to make dither look like shit i find.

actually when i followed that like, i realized that you meant for him to use it rather sparingly (i was imagining you meant large fields of 50% dither).  Used just a little, it can give you a nice softer edge.
A mistake is a mistake.
The same mistake twice is a bad habit.
The same mistake three or more times is a motif.

Offline huZba

  • 0010
  • *
  • Posts: 409
  • Karma: +1/-0
    • MekaSkull
    • http://pixeljoint.com/p/19396.htm
    • huzba
    • View Profile

Re: special effects animation

Reply #10 on: July 12, 2007, 02:44:47 pm

2 - No chorded button input

This means that the phone only recognizes a single key at a time.  Sucks, right?

And yeah, the mixed resolution platform sucks donkey dick, pardon my english.  At a larger size it'd be fine, you could use vectors to compensate, but decent display at say 100x150 is nearly impossible without very careful pixel art.  If you can, design you game to scale WITHOUT needing to scale the actual assets!!

I've never come across a phone that didn't allow you to press multiple buttons at the same time, but i have seen a lot of games that don't allow more than one button to be pressed. As far as i can tell, most nokia and sony-ericsson phones don't have the problem, so it might be the ones that are more popular in the states, if there is any, some siemens phones maybe. Then again it might be some special hax by our coders that they somehow got around it.

As for scaling stuff..... a lot of times i wish i had trained monkeys to do that for me. I've attempted once to do game graphics that fit for all phone sizes without giving gameplay advantage to any of the phones and ended up in something that people like in smaller screens since the sprites are relatively big in them, so go figure. Good thing we can start to fade out and drop support for the smallest screensizes in a year or two.

For other mobile gimmicks, from what i can tell, using big sprite sheets with one global palette for all graphics isn't necessary. Like instead of having global 16 colors for one sheet that has all the graphics can be slower than having each sprite separatelly with their own palettes, since phones don't have that much restrictions for actual palettes. Also having a little program and a tiling system that automatically replaces large flat color areas with code-drawn rectangles is really handy.

I once thought about having flickering transparency, but that doesn't work cause some phones tend to have really low framerate, even for the simplest games, like pong.

@helm
There are some upcoming hardware systems that should ease making games for future phones. Graphics acceleration chips/software that with luck will be available with more than one manufacturer. The coolest things i've seen easily surpass systems like the PSP for example.
The current standards are horrible and ancient, so here's hoping that all the phone manufacturers jump in a bandwagon and start using the same architecture.

Offline sir-knight

  • 0001
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile

Re: special effects animation

Reply #11 on: July 12, 2007, 02:48:22 pm
that's an awesome example, wish there were more :D

I think I'm going to have to resort to more digging through some old nes games to see how it was approached, and maybe a few early snes games before they figured that they could do alpha blending. It will be tricky to do any hardcore effects because I'm limited to whatever framerate the lowest end phone is capable of, so maybe a 100 ms frame delay when I need around 40-80 ms to do fast action effects. It'll be quite a challenge. Sadly though, because of the terms of my work contract I can't post anything up as an example as to how I'll be developing the effects.

Offline sir-knight

  • 0001
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile

Re: special effects animation

Reply #12 on: July 12, 2007, 02:57:34 pm

I've never come across a phone that didn't allow you to press multiple buttons at the same time, but i have seen a lot of games that don't allow more than one button to be pressed. As far as i can tell, most nokia and sony-ericsson phones don't have the problem, so it might be the ones that are more popular in the states, if there is any, some siemens phones maybe. Then again it might be some special hax by our coders that they somehow got around it.


You have to understand that even though if some phones were to be able to support chorded input, that you can't design a game with gameplay elements that use that input if you want to preserve portability. If 10 phones support the feature, you can't justify a 4 month development time for a team of 4 people to support only 10 phones. You need to design the game so that it will be portable to 100 phones in the 4 months you have to maximize cash flow, otherwise you will not make enough  money to pay your guys who made that game for only 10 phones which only 1 of 5 or 6 people might have, and only a few know that there are even games available on phones.

It sucks having to be designing for the lowest common denominator, because there is huge potential in emerging technologies. some phones out there have screens the resolution of TVs, with the same aspect ratios. Those are the platforms that are tasty to develop on, not to mention quaalcom's brew phones that run variants of C++ On a game we recently released for BREW phones, we tried to crash or bog down a motorola e815 with about 20 spritesheets at 250-200 px and 15 tilesets at 256x256 in a stress test, amazingly the thing ran at full speed with little optimization.

Of course, after optimizing the hell out of the java port, we got the full version of the game to run on the ericsson w810 and a few of the newer blackberries, so things are moving towards more freedom in art development. I just wish we had palette swapping and bit flipping like on a GBA so we wouldn't need east/west sprites and multiple spritesheets for color variant elements.

Alpha blending is just a tip of my wish list  ;D

Offline huZba

  • 0010
  • *
  • Posts: 409
  • Karma: +1/-0
    • MekaSkull
    • http://pixeljoint.com/p/19396.htm
    • huzba
    • View Profile

Re: special effects animation

Reply #13 on: July 12, 2007, 03:15:06 pm
To me it seems like the phones with one button input are a minority and can be completely neglected in the near future, though one button gameplay is good for mobile games in general. It might be different in the states, where the general phone population is more dated than in europe. Though majority of the phones here as well are oooooold.. damn people, buy new phones   :P

Most fun are the phones that are really fast on paper, like 233mhz processors and whatnot, but lack proper java integration so they run everything ridicilously slow anyway. Sooo, the one reliable test software is the spmark which gives solid numbers http://www.futuremark.com/

Offline ndchristie

  • 0100
  • ***
  • Posts: 2426
  • Karma: +2/-0
    • View Profile

Re: special effects animation

Reply #14 on: July 12, 2007, 06:09:42 pm
every phone i've ever used could only take a single button push at a time; at most they would input one command, then the other.  But yeah, i am in a technologically poor part of the states (southern new england, RI in specific, does everything it can to avoid real technology it seems.  My father's house is still a neighborhood that cannot get cable or highspeed internet!)
A mistake is a mistake.
The same mistake twice is a bad habit.
The same mistake three or more times is a motif.

Offline robotacon

  • 0010
  • *
  • Posts: 222
  • Karma: +0/-0
    • robotacon
    • View Profile
    • It Got Dark

Re: special effects animation

Reply #15 on: July 12, 2007, 06:43:23 pm
My phone runs Flash Lite and got WiFi, nuff said.  >:D