Molehill 2D Tilemap Demo

July 30th, 2011

Adobe just released a beta version of Flash Player 11! This version includes hardware acceleration for 3D graphics with support for shaders. Of course, 3D technology can also be very useful for 2D games.

Here is a haXe demo of parallax scrolling layers made using Molehill. Haxe now includes an easy way to write shaders using hxsl (haXe Shader Language).

The graphics were “evolved” using the Random Art Evolver. The map is generated from Perlin noise.

Try the demo here (requires Flash Player 11 beta!):

  • Molehill Tilemap Demo (press F11 for full screen, arrow keys to move and Space to change background color)

    There is no preloader so be patient, it may take 5-10 seconds to generate the textures and build the maps!

  • TilemapDemo.zip (haXe source code)

Getting started writing games in haXe

August 7th, 2008

This weekend (August 9-10, 2008) there is another Ludum Dare competition and I’m planning to participate. These are fun contests where you create a game in 48 hours based on a given theme. These games must be made from scratch, however some libraries are allowed and you’re allowed to use your own custom library if it doesn’t contain game logic code and if you release it before the competition starts.

[kml_flashembed movie="http://www.wieringsoftware.eu/wp-content/scroll.swf" width="320" height="240"/]

I’m releasing some base code here for haXe which I’m planning to use during the competition. This might also be useful for anyone who wants to start creating Flash games in haXe. Basically, the code is pretty much the same as the scroll demo I made earlier, but now ported to AS3 (for Flash player 9), which is a lot faster. The main thing the code does is make it easy to use graphics and maps created in Tile Studio together with haXe.

(click and use arrow keys)

This is a little demo, included in the package to show how to use the library. There is a readme.txt file which has step-by-step instructions on how to install everything (haXe, swfmill, Tile Studio, FlashDevelop) and get it working.

Using haXe for Platform Games

January 30th, 2007

In the past weeks I’ve been experimenting a lot with haXe, a new programming language that can compile to Flash SWF files. Last summer, I already played around with haXe for a while and made a little flash scroll demo. Recently, I’ve been trying out different methods of drawing tiles, in order to find the fastest method.

At first, the difference in speed appeared to be huge, but those were rather the result of other optimizations I did in the meantime. All these methods work at roughly the same speed if you’re using large tiles. But when you have small tiles (which I normally use for games) and you have hundreds of them on screen all the time, handling all those tiles seems to become far slower than rendering them.

Here are three methods I tried:

  1. The first is the method used in the scroll demo. Every tile is represented by a separate MovieClip, the total number of MovieClips stays constant, when a tile goes off-screen, its MovieClip is reused for the tile that appears on the other side. Using this method makes it very easy to add animated tiles, since they are handled by flash.
  2. The second method is the same method as above, but with only one MovieClip with a BitmapData attached to it (as the screen surface) and just “blitting” all the tiles to it using copyPixels. Here you need to implement tile animations yourself.
  3. For the third method (demonstrated below), each layer has its own BitmapData object as a surface (size of the screen + 2 tiles), which scrolls along with the layer. That way, you only need to redraw the tiles that actually change (at the edges and animating tiles). When you start to scroll, you’ll run out of space on the surface, but it wraps around to the other side. So normally, the screen will be divided in to sections horizontally and vertically. To get all those back together, there are 4 MovieClips per layer and the BitmapData is attached to all 4 of them. By placing them next to each other, you get the entire screen in the middle. The Mario example only scrolls horizontally, so it only uses 2 of those surfaces (per layer).




(click to play)

This little demo is based on my Mario clone for DOS, there are no enemies and the only thing you can do is collect coins. If you are using FireFox, click on the game first. Use the arrow keys to walk and space to jump. Enjoy!

New Training Levels in Charlie II

December 29th, 2006

3.jpg 8.jpg

Wiering Software has just released Charlie II version 3.10, which now includes two free training levels, meant for first-time players and young kids who have trouble getting through the first regular level. In fact, the first level can be completed by only holding down the right arrow key (be sure to set the difficulty to easy if you try that, or you won’t survive!).

To download, visit to the Charlie II website.

Coltris

December 23rd, 2006

coltris1.jpg coltris3.jpg coltris2.jpg

Coltris is a small casual game I wrote a long time ago. It’s a match-3 game in which you must try to line up at least three blocks of the same color to remove them. During the game, more and more colors appear, making it harder. This game was originally for DOS, but I recently ported it to Windows / DirectX. This game is freeware.
Download: DOS version | Windows version

Welcome!

December 6th, 2006

Welcome to the Wiering Software blog! I’ve just registered WieringSoftware.eu and I’m setting things up now. If you are interested in game development, be sure to bookmark this site and come back later, there will be lots of interesting articles here!