twitter linkedin

Minecraft Map Viewer

17 Oct

I have to admit, I’m a big fan of Minecraft for a while now, and I love the way the creators, Markus and Jens, are very open about working on this game. When Minecraft 1.3 came out it had a new way of saving the huge and worlds. If you take a quick look at the wiki you’ll notice that there’s a lot of information for developers to work with the Minecraft data format. I was very curious about what I could do with the level data. A few weeks ago I created a small tool in Java that works with the level format, and learned quite a lot about the way Minecraft stores the world.

But since I love to work with ActionScript, I was wondering if I could do something with the level files in Flash or Air. I thought that with the ByteArray and BitmapData class available, I should be able to do fun things. So I started working on a simple map renderer. As far as I know, Flash doesn’t support reading directories, so I Air was my platform of choise.

I ported the JNBT library to ActionScript to read the binary format of the ‘chunks’ (16 x 16 x 128 blocks) that Minecraft uses to store the world in. The rest of the code is rather quick and dirty. Pretty much everything was hardcoded into a few loops to render the blocks to individual BitmapData objects. This is the result:

Minecraft Map Viewer

If you want to give it a spin, you can download the .air file here!

Edit: I got a few requests for the sourcecode. So with no further ado: here it is! You’ll need to compileMapRendererMain as an Air application. Included is my ActionScript port of the JNBT library, found in org.asnbt. You can use this library to read and write NBT files. The most important classes besides the JNBT library are the ‘SimpleRegionFile’ class and the ‘RegionBitmapData’ class. Feel free to fool around and let me know what you think!

Comments to this post

Professionals 3: Comfort Crisis

18 Aug

Although it’s been a while since I quit my job at Ranj Serious Games, I am still proud to present the project that I have been working on for about half a year. It is a game called ‘Professionals 3 – Comfort Crisis’: a free, online, real-time multiplayer puzzle game, commissioned by OTIB. Kids from 10 to 14 years old can play with 5 different characters to bring back the long lost comfort in an ruinously city. The game features a large set of puzzles, spread out over many large, challenging and beautiful levels. Comfort crisis was built using PushButton Engine, and the isometric engine created by the Ranj team itself.

Comments to this post

Flash ‘Molehill’ is finally here!

28 Feb

I was wondering when Adobe would add full 3D support to the Flash player, so I was not very surprised to see the first demo videos of Flash ‘Molehill‘ a little while ago. Needless to say, I’m impressed. Especially the fact that many 3D engines already support Molehill is rather interesting. Looks like Adobe worked pretty closely with the 3D engine developers.

On the other hand I must say it was about time that Adobe released this version of Flash. There are many nice WebGL demos out there and the JavaScript 3D scene seems to be growing every day. I think it was a good move to start the Incubator system. It gives developers the chance to preview the latest version of Flash.

Personally, I can’t wait to get my hands on this new version and start experimenting a little bit. I am a little bit afraid the low-level programming might scare me off, but we’ll see. In the meanwhile, have a look at the impressive demo from the Away3D team:

Comments to this post

And off we go!

27 Feb

Hello everybody!

It’s done! I’ve got a website again. Maybe I can be one of the big guys now. After a couple of years of inactivity around my site I can finally announce that I’ll try to start blogging again. This time I’m focused on writing about things I do for fun and for a living. Most of the stuff you’ll find here is about my work as a (Flash) programmer. I’ll try to share my knowledge with you as I hope to find interesting solutions, build cool games or just mess around with Flash.

this.example = true;
trace("A nice piece of code I've written to test the syntax highlighter");
}

Comments to this post

Search

Archives

Meta

Blog RSS