Algorithmically designed textures.

Blitz3D Forums/Blitz3D Programming/Algorithmically designed textures.

CyberHeater(Posted 2004) [#1]
I've just played a games that looks really good. Plays okay.

Has high quality textures and music and weighs in at at whole 96kb download!!!

Let me repeat. A complete FPS game in 96kb. It's amazing.
This game could fit on a floopy drive 20 times over.

Checkout kkrieger @

http://www.theproduct.de/index.html

Here is an example of the kind of textures generate.












How do they do those textures. What algorythms do they use?

Could blitz do it and would that enable high quality textures to be used in worlds that
would enable shareware users the shortest download time possible.


Bot Builder(Posted 2004) [#2]
yeah. that was posted here http://www.blitzbasic.com/Community/posts.php?topic=32731 a couple months ago and this belongs in off topic anyway. They made everthing procedurally by having a custom editer inwhich you can edit order of actions/what actions, etc.

I also posted the tool they use to create demos but noone seemed interested http://www.blitzbasic.com/Community/posts.php?topic=35516

Um, Blitz3ds exes are 1.2 mb without using UPX you cant get lower than that

So, after UPX you might have 500 K and with added procedural stuff maybe 600-700, but if you are trying to do this with Blitz, make you own editer, etc. It's a waste of time, and you might as well be writing your engine in C for tiny exes as well


Gabriel(Posted 2004) [#3]
If you check their site, they've released the program they use in development, Werkkzeug. So you can have a play with that to see how it works. Personally I found the interface primitive and confusing and gave up with it, but I don't have a lot of patience for tools with a poor interface, so you may get more mileage than me.

I assume it's basically like an internal paint program which stores a history of commands used to create the texture. Something like Photoshop, so a texture might consist of:

Filter>Render>Clouds
Image>Inverse
Filter>Noise>Add Noise>55%
Image>Inverse
New Layer>Multiply>50% Opacity
Filter>Render>Clouds
Image>Flip Horizontal
Filter>Render>Difference Clouds


( I have no idea what that looks like in Photoshop, it's just an example. )

You would ( obviously ) convert the instructions to bytecode to reduce the size, and you would have to write all your own filters and manipulation routines. Much of it is probably not advanced algorithms, just simple stuff like checker patterns, eg :

Checker xtile,ytile,colr,colg,colb,col2r,col2g,col2b

Then you'd have fractal noise, blur, the usual Photoshop stuff. There's a great book out called "The Dark Side of Game Texturing" which shows you how textures are created and you very easily use those principles to see how a texture is created from very simple steps, repeated and used on various layers.

Yes, Blitz could do it, with a few caveats. Blitz is not as concise as C++ and nowhere near as concise as ASM. It's bulky code and unless you have a lot of textures, it might not offer a significant reduction. For a game like this demo with that many high quality textures, well it wouldn't be 96k, but it probably would be a good deal smaller.

Blitz is not the ideal tool for doing this superfast. You probably wouldn't want to uncrunch everything every time they run the game. I would suggest decompressing everything into real textures the first time the game is run and then using the uncompressed media in game.

This was discussed on Dexterity a while back, and many people were dismissive, but I think it's absolutely relevant to people distributing big games over the net. Of course users would be put off by a game which was as slow to start up as this, but if you did all the decompression/texture generation ahead once only, there's no way they'd object. It's just part of the installation process and enables them to get a big game quicker.

I believe it's not just textures that are done like this, BTW. I believe their meshes and sound effects are also generated in code.


CyberHeater(Posted 2004) [#4]
Good feedback. Thanks.

I suppose that the aim wouldn't be to reduce the exe down to that kind of size but maybe a halfway house.

I need to think about it a bit more. I'm sure it wouldn't take that much to build a simple texture designer in blitz and export the code in module format.

Mmmm. I need to think about it a little more.