Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Arnaud Carré, posted on April 14, 2002

Image Description, by Arnaud Carré

As all programer, I like to write unusefull things... Some time ago I decide to write a DirectX8 library called "TinyD3D8". Tiny because the challenge was to produce EXE as small as possible.

I hear some of you saying : "Today computers have so many disk space, so many memory that's stupid to spent effort writing little programs !". And I totally agree : that's stupid for a commercial product. But, many of us in the industry are about to forget an important programming rule: the fun ! Yes, that's just fun to try to push the software limit ! On the other hand, you have to learn many techniques to build little DX programs: we learn about the compiler, the linker, the FPU and so on.

To test my library I write some various funny programs. All these programs runs under windows platform, directX8 (or better :-)). Here is a brief description of the "image of the day" picture, left to right, up to down...

Knot: EXE size: 5.5Kb
Knot is a nice program computing and displaying random knot. Every 3 seconds appair a new generated knot with random geometry and random colors.

Physics: EXE size: 6Kb
A true real-time rigid body physic program. You can rotate the cube or invert the gravity field in order to see the pink tetrahedron moving and bouncing around :-) I write it after reading a really nice article by "Thomas Jakobsen". Use Verlet integration for stability.

Mandelbrot: EXE size: 5.5Kb
Real time "deep" mandelbrot zoomer. Zoom with a factor of 2^55, ( ~1e16, so that's the range between you and the universe !). Use recursive optimized mandelbrot computing routine (Avoid to compute large flat area). Do you ever imagine a simple formula "z' = z^2 + c" can generate such colored lands ? :-)

OldSkool: EXE size: 24Kb
Whaoo 24Kb ?? that's too big !! :-) This is the first eavy use of my TinyLib. There is some graphical resource packed in the EXE (textures and music). This is an "oldskool" animation as you can see on AMIGA or ATARI 12 years ago :-) Please note the music use a YM2149 sound chip emulator. Pump up the volume all of you nostalgic freaks ! :-)

You can download all that unusefull stuff here:

Please don't ask me for the TinyLib source code for the moment, maybe I'll post it a day. (have to make it clean :-)).

Have a nice day !
Arnaud Carré

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

April 14, 2002, 03:30 PM

Nice work.


Headless Chicken

April 14, 2002, 03:38 PM

Wow, thats pretty nice work. It's nice to see somebody focus on efficiency rather then take today's massive hard drives for granted.


April 14, 2002, 03:45 PM

Hows abouts the source to your physics demo (sans tinylib)?


April 14, 2002, 03:46 PM

Sweet, gonna download the demos right away :)


April 14, 2002, 04:02 PM

How did you succeed in keeping the size down? For me, just including the standard DX libraries inflates the executable far beyond what you have! Don't tell me you code all windows stuff in assembler :)


April 14, 2002, 04:02 PM

actually, its not stupid to minimize the size and memory footprint of things these days. its the "everybodys got mass ram and hdd space" mentality of developers these days that keeps bloating games

keep up the good work :D


April 14, 2002, 04:07 PM

Hey I am a fan of anything anti-bloatware, anything that is small is good - saves time. Add up all the apps people have running in the background - I think it is disgusting..... spyware is often the worsed - anyone with sense will run adaware or keep track whats taking memory. I remember seeing one app taking up 20meg, that is a crime!

So don't just do it for fun!


zed zeek

April 14, 2002, 04:28 PM

death to bloat, bloats killed a lot of the internet experience for me, the 3 last major games ive downloaded are .. , serious sam , quake3arena test (mid 1999) ie im averaging about one download a year cause 50+mb are not fun on dialup.
then again theres only so much u can do with fractals texture wise


April 14, 2002, 04:30 PM

great.. demos i can download realtime with my 56k modem;)

they look cooooooooooooool..

Ron Bakker

April 14, 2002, 04:36 PM

Really cool. Also liked your ST-sound and the work on Saint. It brings back some memories.

The torus demo would be nice to have as a screensaver. Idea?!

Nice ideas on that physics demo. You could release the code without your DX8 lib. I would like to see that!!

- Ron


April 14, 2002, 05:33 PM

Absolutely amazing. Especially the mandelbrot.


April 14, 2002, 05:35 PM

very cool... verycool.... very cool..... cant stop....

Ron Bakker

April 14, 2002, 05:44 PM

I've tried it myself to create a small executable.
Ignore the default libraries (/nodefaultlib), create an alternative entry-point (/entry:"StartUp"), for example:

#include <windows.h>
void StartUp()

The call to ExitProcess requires you to link with kernel32.lib (let's be nice :~)
And finally compress your executable with UPX:, et voila 2Kb.


April 14, 2002, 06:03 PM


I love those u~useful little things like minimum executable size, fitting into 64 kb etc ...
We all love every kind of sport. I think it is special kind of sport ... And totally u~useful.

I not only turned on my PC, but even installed dx8 ;p
Howere mandelbrot refused to run ... obviously some legacy instruction was executed ..

Knot however was nice ;p and very fast
tiny was not so impressive but executed newer instructions, so it decided to run.

guess that you should not wait DX9 ... finish it faster, because microsoft will not wait for you ..


April 14, 2002, 06:05 PM

Congrats, that's the tiniest and most unuseful program possible ! You should make special iotd for that..


April 14, 2002, 06:59 PM

He's back!


April 14, 2002, 09:51 PM

"Congrats, that's the tiniest and most unuseful program possible ! You should make special iotd for that.."

Kurt, cant u ban him from flipcode? no one wants to read his useless comments


April 14, 2002, 10:17 PM

hehehe... New DirectX SDK's are the worst I've had to suffer through on a dialup. Every time I go to MSDN there's people complaining "Took me two hours on my T1... It's too slow!". Bah I say! It takes a day to DL the SDK on a 56k dialup, but it's still quicker than ordering the CD, and it's free.


April 14, 2002, 10:20 PM

Apparently the culprit for bloating D3D8 progs is D3DX. My old landscape demo takes up something like 30mb, which is obsene for such a simple program. When I have the time to get back into D3D programming, you can be sure I'll be avoiding D3DX if at all possible. Ofcourse, by then DX9 will be released publicly and I'll have to start all over anyway ;)

Tim Baker

April 15, 2002, 02:05 AM

Very nice stuff!


April 15, 2002, 02:31 AM

this is so funny, only programmers have 56k still, and every construction worker and nurse have broadband and gf4 and are sucking down 200MB demos daily.


April 15, 2002, 02:52 AM

@Arrnaud Carre
More people like you should work at microsoft and get that beast called windows smaller and faster.
It seems that with increasing RAM and CPU speed the response time of each new windows is getting higher, looks like there are too many visual basic programmer at MS ;)


April 15, 2002, 02:58 AM

Very neat. I esp. like the TinyKnot.
But both Tiny and TinyKnot look too

Using an ATI XPERT98 and an LCD-Panel.


April 15, 2002, 03:14 AM

is it me or are you guys THAT stupid? these executables can be a lot smaller.. but that would require you to actually know how things stick together, which seems to be too much for the average flipcode visitor =)

imho it's pretty stupid to post a few executables that are still pretty large for what they offer, claiming that they're small.


April 15, 2002, 03:26 AM

While I have no doubt you are probly correct they could be smaller I would like to see you show us all how its done with your l33t sk1llz. Such a trivial task you must already have planned out should take no more then say 10 mins.


April 15, 2002, 03:30 AM

I wouldn't want to see MC BAXTON to go, he is fun to have around, don't you think? :D

Ron Bakker

April 15, 2002, 03:34 AM

Sure they can be smaller. If I coded it all in assembly, nothing would remain, probably.

Let us show what YOU have in mind superplek...


April 15, 2002, 03:36 AM

now now... this one wasn't even a flame. If someone else where to say this, you would have thought it funny... I'm sure he didn't mean 'unuseful' in a very nasty way this time. :)


April 15, 2002, 03:48 AM

Leonard, WOW, Awesome

It's really nice...

Voilà, c'est tout :)


April 15, 2002, 03:56 AM

"put up, or shut up"

This thread contains 62 messages.
First Previous ( To view more messages, select a page: 0 1 2 ... out of 2) Next Last
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.