Slashdot Mirror


First Person Shooter - Under 100KBs of Code

Cariad Ilmara writes "For those of you old-timers who spent days & nights trying to get your code fit into 64Kb, here's the first beta of .the .produkkt's next FPS: .kkrieger. Moderately beautiful, what's impressive is it can fit inside the UT2004 readme. The demo is 96Kb zipped. All textures are procedural and generated at startup. Screenshots available here, here, here, here, and here. You still need a relatively recent computer (~1.4Ghz, 512MB RAM) and a DirectX8 GPU (Windows required)."

32 of 741 comments (clear)

  1. Anyone remember omniscent? by teejie · · Score: 5, Informative

    Omniscent, is the first level of Descent (you remember, the first 360degrees shooter) in 4kb (4096 bytes) with music and textures. Non-playable, but still really cool. It was released in 1997.

  2. Other 64Ko 3D demos by wolruf · · Score: 4, Informative

    here: http://sebaplus.free.fr/prog3d/demoscene.html
    Thi s one is especially impressive: http://sebaplus.free.fr/prog3d/fr08v101.exe

    --
    wolruf@gmail.com
  3. Re:zipped doesn't count for size by br0ck · · Score: 5, Informative

    Informative?? It unzips to exactly 96k.

  4. Re:Amazing Screenshots by eddy · · Score: 5, Informative

    Google 'Perlin Noise'. Read 'Procedural' as 'described mathematically'.

    --
    Belief is the currency of delusion.
  5. the.produkkt. by faxe · · Score: 3, Informative

    these guys are actually a part of the demoscene. They have done quite a lot of spectacular demos and intros. They can be found here. This was a release from the 96k game competition of this years breakpoint demoparty held last weekend in Bingen, Germany.

    --
    fx! kicking and screaming
  6. It crashes by gonvaled · · Score: 3, Informative

    The instruction at "0x00000000" referenced memory at "0x00000000". The memory could not be "read".

    In Windows 2000 Profesional

  7. Not as impressive as you think... by __aazuyo6398 · · Score: 4, Informative

    Ok, I'm not saying this isn't impressive, but since it's using everything included in DX8.0, it's not really fair to say it's that small. I mean, look at it another way...If you built a mod for UT2K4 that was 150k would you be jumping up and down? No, because it requires > 1GB worth of stuff to be downloaded first. In the end though, that's still some pretty tight programming

  8. Re:100KB, please by faxe · · Score: 5, Informative

    this guys ARE demo scene guys, also known as Farbrausch.

    --
    fx! kicking and screaming
  9. Procedural textures by raygundan · · Score: 4, Informative

    I don't know what generation procedures they used, but "the textures are procedural" means that there are no graphics files in there, and that an algorithm creates the textures at runtime. As a simple example, you could write an algorithm that made a checkerboard image in only a few lines of code. That code takes up only a handful of bytes, whereas the texture graphic itself would take up hundreds of kilobytes, even compressed. You could also look at it as the difference between an equation, and a graph of the equation.

    I'm curious to know if the maps are procedural, too.

  10. Re:awesome... now only if they'd do this for linux by S3D · · Score: 4, Informative

    Would be about the same if we are talking about graphics. There is no noticable difference in code size for DirectX and OpenGL with appropriate driver with all extensions. Both Nvidia and ATI are shipping OpenGL drivers with all extensions realized in hardware, giving OpenGL about the same functionality as Direct3D. But there is no sound in the OpenGL. Don't know what are standart sound library for Linux...

  11. Mirrors by dbloodnok · · Score: 5, Informative

    Trust slashdot to kill a website hosting a 96k file.

    try here and here or for a complete list here

    Farb-Rausch do some nice demos... worth checking out.

  12. Elite..? by Anonymous Coward · · Score: 3, Informative

    Are you serious?!

    Discover Elite now!! Check out this page, maintained by one of the original creators Ian Bell and this Elite resource

  13. Re:awesome... now only if they'd do this for linux by molarmass192 · · Score: 4, Informative

    Off the top of my head OpenAL, I know it's used by NWN and some of the old Loki games. Whether that makes it a standard or not is a whole other question.

    --

    Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws-Plato
  14. Re:Instant review by Eshock · · Score: 3, Informative

    I think they were referring to the fact that it requires a "directx 8 class" graphics card, ie one with a pixel shader.

  15. Re:Amazing Screenshots by Funk_dat69 · · Score: 4, Informative

    Um, I'm hoping you're not suggesting procedural textures originated in the demo scene.

    Ever heard of Ken Perlin?

    Programmer who actually won an Academy Award for basically inventing this?

    Anyone?

    --
    FUNK!
  16. Re:You're right... by misleb · · Score: 4, Informative

    Using SDL may be "absurd" if you want to write a Windows-only game, but it isn't absurd if you want to make it crossplatform. Whether you will admit it or not, SDL/OpenGL is a standard that many (good and fast) Linux games have been based on.

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  17. You would be correct... by ThePyro · · Score: 3, Informative

    On my 2.8 GHz machine, the demo took a full minute to load.

  18. It runs like ass..!? by Anonymous Coward · · Score: 3, Informative

    I am running an optimized XP Pro system with the latest patches, 2.4 GHz, 1 gig of ram, ATI Radeon 9700, and it runs like dogshit. It crashed my computer and I am not going to try it again.

  19. Shrug - Been there, done that. by superultra · · Score: 4, Informative

    So I guess this is impressive, especially if it's taken more as a contribution to the demoscene than to gaming. But what I think is far more impressive is that a game like Starflight which included hundreds of planets, dozens and dozens of hours of gameplay, an equal number of conversations and text and hundreds of objects, all fit into 2 5 1/4 disks (360K x 2). In 1986. And while exceptional, Starflight is merely representative of the amount of efficient coding that had to go into early game creation. Kkrieger, and more so older classics like Starflight, should serve as examples to modern developers who seem to be bloating their code.

    1. Re:Shrug - Been there, done that. by otis+wildflower · · Score: 3, Informative

      Elite.

  20. Re:Why are they all set in dark machine rooms? by aliens · · Score: 4, Informative

    The answer to that would be FarCry.

    It'll make your box beg for mercy though.

    --
    -- taking over the world, we are.
  21. Re:awesome... now only if they'd do this for linux by drinkypoo · · Score: 4, Informative

    The standard sound library for Linux 2.6 is ALSA. Games usually talk to it through OpenAL (see sibling) or SDL, the simple directmedia layer. SDL basically provides all the functionality of DirectX except Direct3D, whose functionality is provided on Linux via OpenGL (as you know.)

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  22. Two Words: by shachart · · Score: 3, Informative

    Serious Sam

    --
    Those who can, do. Those who can't, consult.
  23. OK by Christ-on-a-bike · · Score: 4, Informative

    America's Army
    Aliens vs. Predator
    Descent 3
    GLTron
    Heavy Metal
    Mutant Storm
    Neverwinter Nights
    Unreal Tournament
    Unreal Tournament 2003/2004
    Vega Strike

    These are all games that use both SDL and OpenGL. Many more use either one or the other.

  24. RTFR by Dachannien · · Score: 3, Informative

    Read the readme.txt, dude.

    "The concept of the texture/mesh generators was developed by fiver2. We do .not. want to claim that the techniques we used to develop .kkrieger are new inventions. Its rather a selection of useful operations and their parameters to optimise the results."

  25. Explanations! by kb · · Score: 5, Informative
    Hi...

    As I'm one of the guys responsible for this game, let me explain a few things.

    First, to all the people saying this is senseless etc.: Please watch every second story posted on /. - most of them are about people doing something nobody in their right mind would ever try. So come on ;)

    Then, a few clarifications:

    • Yes, we are the same guys who are responsible for FR-08: .the .product and all the follow-ups (which you can find at our home page, http://www.farb-rausch.de).
    • We don't use any hidden texture/sound or game generators in Windows. .kkrieger requires DirectX 9, but only to gain access to the graphics and sound hardware. OpenGL and whatever audio API would also work, we just chose to use DirectX. Maybe we will even release a Linux version in the future (which should be about the same size using X and ALSA), but as all this is done in our spare time and none of us has a linux desktop PC, it's rather improbable. So, the only thing where we "cheated" and used ressources from Windows are the Arial and Times New Roman fonts which we use as base material for our fonts (heavily processed tho). This and all Windows DLLs that are essential for running. We don't even use any external libc.
    • All content, that is: the textures, the models, the map and part of the animations is generated procedurally. The basic concept is a modular graphics synthesizer which only stores the steps needed to opbain a certain image or mesh with their parameters. On www.theproduct.de you'll find a short explanation. .kkrieger uses the very same concepts, only in a really evolved and refined way.
    • Also the sound is created procedurally by a virtual-analog software synthesizer processing heavily compressed MIDI data. It runs in real-time (for the music) as well as as pre-processing step (for the sound effects). Actual sound output is done via simplest DirectSound programming.
    • The graphics engine is made for Doom3-style graphics, that means full Phong lighting model with various light sources and normal mapping everywhere, and of course stencil based shadows. It requires a PS1.3 level graphics card such as a GeForce4Ti or a Radeon8500 or better, though it's only fun on at least a Radeon 9600 or a GeforceFX 5700, we know.
    • We also know about the insane hardware and memory requirements and all the bugs as well as the mostly missing gameplay, but we worked on it (partly) for about two years and we definitely wanted to get it out at the Breakpoint party on Easter. This meant lots of things we had to cut, this meant lots of thigs we didn't test, and we know this beta is far from perfect. But expect a final version in a few months (we'll definitely take some rest now) which will be about 128k and not only feature less bugs, hangs and fsckups but only vastly more content and hopefully an improved engine capable of real vs/ps2.0 support for more speed and quality. Oh, and gameplay. And monsters that actually DIE instead of just being turned off :)


    Hope that clears up a few things...

    Tammo "kb" Hinrichs
    Farbrausch Consumer Consulting
    freelance audio programming guy for .kkrieger
    shocked that our server is still alive.
    1. Re:Explanations! by kb · · Score: 3, Informative

      The intro is supposed to be grey, for some unknown reason somebody here considered a postproc effect which uses the alpha blend unit to square (and thus solarize+half) the dest color good-looking ;)

      For the rest, well, a final will come ;)

  26. comments! by Grendel+Drago · · Score: 4, Informative

    Did you notice minrt_comments.cpp in the zip file? Same file, but with actual comments. Variable names are explained. The snipped you pasted becomes...

    int main (void)
    {
    char b[99];
    int W=GN,H=GN,i,n; // Read screen width and height
    nl=GN;ns=GN; // Read number of lights and spheres
    _f x,y;

    F(nl) // For each light
    RP(LI) // Read position

    F(ns) // For each sphere
    {
    RP(SI.c) // Center
    SI.r=GN; // Radius
    RP(SI.l) // Color
    SI.f=GN; // Reflection
    } // Allocate the frame buffer. Init to zero to perform antialiasing.
    char* s = new char[(n=W*H*3)];
    memset(s,0,n);


    Some weird macros are used:

    #define F(T) for(i=0;i<T;i++) // For
    #define FV(V,T) for(V=0;V<T;V++)

    #define SI sp[i] // i-th sphere
    #define LI lt[i] // i-th light

    #define GN atof(gets(b)) // Read a float from stdin

    #define RP(P) {P.x=GN;P.y=GN;P.z=GN;} // Read a point


    It's not really that bad.

    --grendel drago

    --
    Laws do not persuade just because they threaten. --Seneca
  27. Re:Why are they all set in dark machine rooms? by rpillala · · Score: 3, Informative

    Get Serious Sam. Also, read the interview at Old Man Murray: http://www.oldmanmurray.com/features/73.html

    Ravi
    --
    When the axe came to the forest, the trees said, "Look out - the handle was once one of us."
  28. Another interesting game by ynnaD · · Score: 5, Informative

    Noctis (http://anywherebb.com/noctis.html) is less than 1mb but lets the player explore a whole galaxy. It's an interesting game where you have total freedom to fly anywhere and do anything. No fighting, just exploration.

  29. Re:I would be more impressed... by null+etc. · · Score: 3, Informative

    I wonder if you're referring to an assembly program I wrote to generate Sierpinksi triangles in 76 bytes. But please note, those 76 bytes included calls to DOS interrupts, which is an API in the same fashion that DirectX is an API.