The Forray @ Cardinal

Game Idea

by Cardin on Feb.02, 2010, under Projects

This is one of the things that usually gets lambasted. Game ideas i mean. They’re often too optimistic and ambitious.

My Game

  • It’s made in Flash.
  • 2 versions. One lightweight playable on the web, a heavier one with more content to download.
  • Plays on all OS. So as long as you can access Internet.
  • Bootable on Thumbdrive [due to Flash].
  • Turn-based strategy RPG.
  • Isometric with sloping terrain
  • Cel-shaded

Nothing special here. What I’m trying very hard to come up with though, is how to handle the lighting. Specifically, these lighting-related features:

  • Self-shadowing: Shadow on itself
  • Cloud shadows: Shadow of clouds flowing
  • Ambient Lighting: Blue Night, Red Dusk, Yellow Dawn, White Noon
  • Dynamic Lighting: Movable point lighting

Stuff I took out:

  • Ray Cast Shadows

Impossible. Image distortion/warping is hard enough on Flash as it is, not many can be casted at all. Moreover, we’re using Cel-Shading. Ray Cast will fail since it’s so artificial.

Self Shadowing

Ambient Lighting

This will be simple, and accomplishes two features at once. Basically, the sprites/tiles will have two images. One, the Color Map, will just be the sprite without any shadows. The another will be the Shadow Map, a grayscale representation of all the shadings on the sprite. The Shadow Map will be blended with the Color Map as necessary.

By varying the intensity of the Shadow Map and the Saturation of the resultant blend image, it’s possible to create:

  1. Bright Colourful colours with heavy shadows -> Noon
  2. Dark colours with non-visible shadows -> NightFall

Cloud Shadows

Haven’t thought this one up yet. It was rather similar to Raycast Shadows, but now … Because my game has slopes, projection techniques seem inevitable.

There seems to be a bit of problem if I project shadows onto slopes.

But the problem is less mathematically intensive [it seems] if i have flat terrain with shadow, then project the terrain onto a slope.

That would require all slopes to be dynamically projected at play-time. which might be another problem computationally and mathematically. To make things worst I have to account for terrain below sea-level, and those above.

Dynamic Lighting

I thought a few ways to tackle this, none of which seem very nice-looking or feasible.

  1. Separate the Shadow Map into different sides. Maybe top-side/bottom-side, or left-right-behind side. Each will have different treatment based on light direction.
  2. Use a Normal/Height map combined with the Shadow Map. 3 RGB values, 3 attributes. But this is insane computation, and Flash does not have multi-core or shader GPU.
  3. Use an elliptical soft shadow with an even softer circular halo. Probably sucks visually.

Apart from 3, the most realistic feasible and visual option is probably using the Shadow Map. Vary the intensity of ambient lighting slightly, based on distance from light.

A major problem is:

Tile based worlds are so componentized, that the lighting effect might be jarring. Unless I separate the lighting to post-screen effects [and thereby removing the chance to bind onto the tile slope projection], the lighting is gonna look very pixelised. There will be light texels the size of a tile. Not good at all.

There’s not much relevant information on the web regarding such lighting techniques. Not having access to shaders and thereby normal-mapping is tough. I’m constrained by the art-style [cel-shaded] and tile infrastructure [sloping terrain]. But I have time. Thinking is all i’ve been doing on projects of late.

:,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!