Eightball examples

After flash8 is announced, the beta members are allowed to post their examples.
Unfortunatly I don’t have a lot of examples to publish, since they don’t work as expected yet. Anyway flash8 is a real milestone of flash itself, but in relation to performance, I’m furthermore disappointed. That includes the built-in native BitmapData methods and filters. But as in earlier versions, we might find workarounds to increase actionscript speed and rendering performance.

visit the 8ball lab

Some instructions:

– copypixels
To avoid the use of overloaded MovieClips I’ve built a Tilemapper with copyPixels. In this example, the screen is rendered every frame and after all it is fast. Just a short demo to brief myself in the copyPixels method. Tilesize 8px.

– water
A short application of the water study below. Needs a fast computer.

– fire
By the use of the ConvolutionFilter and the paletteMap method, its very easy to make some fire and/or flames. The bad site is the performance. Only 2 native functions are necessary for this effect and I forced the player only to apply the effect in the near enviroment. If you spread the flame over the screen, you can see, how the FPS decreases immediately.

– mode7
A demo to sample, if the DisplacementMapFilter can store perspective projection to apply textures fast on a static 3D camera view.

– rain/water
This one is nice, if you own a fast computer. About 80fps, the water effect is very realistic by using wave-map-sampling. I used the BitmapData class to reconstruct the algorithm in the article above. Even BitmapData can only store Integers as colorvalues, the effect works well, but it slows down your computer too much. So sad.

– mode7
The mode7 example demonstrates a very clean mode7 engine with different Camera heights, field-of-view and a faked roll displacement. By now it’s possible to place sprites on the plane. I’m trying to extend it to a tilemapper which provides endless planes in theory. Furthermore, I had a version with motion blur while flying over the plane. Needs some fixing though. Note that every slice is only one pixel high, so you have here the best resolution.
update: define a clip distance and apply fog

– texture mapping
An example to show linear texturemapping from uv-coordinates to a distorted polygon. This allows you to import 3d models (with of course only a few polygon) and render them with their textures. For a lot of models, that cannot come to close to the camera, the projection is well enough to provide a real 3d feeling.

– zBuffer
The zBuffer is normally a 2d Array with floats, used by 3d engines to proof visibility of rendered pixels. The z-coordiantes can be interpolated linear, so I started to draw the (z) gradients from the polygons. There are several uses of the zBuffer. In combination with the blendMode “lighten”, it should be possible to extract a mask for intersecting polygons.

More to come.

13 thoughts on “Eightball examples”

  1. any chance of a peak at the code that creates such rich and tasty goodness?

    The fire is really impressive – I had a project I was working on that had some great ideas but it didn’t quite work with flash mx 2004 – but with all the new stuff i will go back and do it again and it’ll be awesome.

  2. Woaw really impressive !
    Exellent work andre. I’m just waiting to see the source code if you agree to distribute it, and i’m waiting for other greats examples ;)


  3. Googled ‘flash 8 texture maps’ and found this. Mode7_1 is incredibly inspiring and a bit intimidating. Once you add tilemapping everything is here to create a 3d world. Texture mapped sprites (finally), 1 pixel slices (!), and it runs smooth on this P500mhz. Many people (me included) will be trying to emulate your work. Thanks for showing us what’s possible and what’s around the corner for Flash games.

  4. thank you all.

    @PopOpt: I have allready coded a tilemapping version, but I’m searching for some nice road-textures right now. I cannot believe, that you have smooth results on a 500Mhz PC. This is really cool!

  5. hello,andre
    i really like the water effect and i read the wave-map-sampling tutorail,but i wonder what is your algorithm? i feel the algorithm of tutorial cannot run in flash player almost. can you teach me a little, thanks


  6. Hmm, am I to assume the source will remain unavailable? I understand developers keping things to themselves (fire and water would be appearing everywhere otherwise) but I’m really keen to learn more about the maths and it’s implementation in flash so I’m going to put in a request for some code examples or tutorials or something from you, yes I appreciate you are busy, but if you don’t ask you don’t get so forgive me.

  7. Hi

    I did like your blog postings and comments. I am in big problem since many days. Any kind of help would be appeiciated.

    I want some help to enter data into mysql databasefrom a flash form using coldfusion components ?

    i’m using web services and simply want to pass data from my flash form to my cfc while staying in flash…

    any actionscript (or coldfusion code ‘cfc’) that anyone could provide or even links to other ressources on this specific topic would be awesome…

    if someone could help me with this process i would be greatful…..

    thank you in advance…

    Imran Hashmi

Comments are closed.