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)."

17 of 741 comments (clear)

  1. wow by Anonymous Coward · · Score: 3, Insightful

    amazing

    1. Re:wow by Chilliwilli · · Score: 4, Insightful

      That is not the result of the procedures being stored procedurally but merely due to having a highly (size) optimised engine. If you look at the quality of the textures you will see that that aren't subpar.. the delights of procedurally stored textures as opposed to bitmap textures include smaller file sizes and when careful written, full scalability. It has parallels with vector graphics icon sets versus bitmap icon sets.

      --
      Cure cancer.. and stuff! www.team45.info
  2. Sure would be nice by Heem · · Score: 3, Insightful

    Sure would be nice if programmers around the world would at least follow this guys lead a little bit. I'm so sick of bloated software. For example - CD Writing software for windows. Does anyone need or even want all the dang crap that comes in those?

    --
    Don't Tread on Me
    1. Re:Sure would be nice by noselasd · · Score: 4, Insightful

      No.
      It pretty much depends on what the code does as well. If you have a
      really cool way of computing the normals of thousands of polygons in 10
      lines of code, that might be _alot_ slower than a great algorithm doing it in 100 lines.
      By your argument, the code in the story should run 100'ds of times faster than any of the recent commercial FPS games..

    2. Re:Sure would be nice by timeOday · · Score: 4, Insightful
      If it's a commercial game, it's going to ship on a CD-ROM, or more and more on DVD-ROM these days (like UT2k4).
      Or maybe it will download to a cellphone, or in a Flash game on the web.
    3. Re:Sure would be nice by bluesnowmonkey · · Score: 5, Insightful

      You should be more respectful. Making demoes or (MY GOD) a playable game of such incredible quality in so little code would require an intimate, masterful understanding of almost every aspect of computer science. These guys are VIRTUOSOS. I don't think they're trying to make a commercial game, anyway, so quit comparing it to that. They're trying to shame the rest of for our pathetic coding skills, and let me be the first to say, "Mission accomplished."

    4. Re:Sure would be nice by tprime · · Score: 3, Insightful

      More than anything this game serves to prove a point with the illegible vars and "cheating" by using directx. Games don't HAVE to be huge to be good. The games I have played recently come on 2 cds and often take up over 1.3GB for the installation.

      Will all games be this size? Do the games need to fit on a floppy? No, but a happy medium would be nice. It just seems odd that Microsoft bloated their OS with all this stuff that no one seems to fully utilize and developers, because they don't use the OS to its potential, bloat their software further.

      Maybe I am easily amused, but either way what these guys did was impressive

      --
      http://www.tomandemily.com
    5. Re:Sure would be nice by Knos · · Score: 4, Insightful

      Domain specifications, requirements and design methodologies are not computer science, but software engineering. Which is separate from the real science in computer science, which is what I would shorthand as the Art of Algorithms.

      --
      . . . . . . . .. . . . . . . .
      may u!sh 2 sm!le at dz!z bad nn.!m!tat!ion
  3. in that case by Anonymous Coward · · Score: 5, Insightful

    relying upon Mesa, the nv driver, and the linux kernel would be any better? It would still weigh in over a meg then.

    Do we only impress the critics when we write to bare metal?

    (of course not, because then you're criticized for having hardware lock-in. You just can't win)

    1. Re:in that case by RevDobbs · · Score: 3, Insightful

      No, you impress the critics when you write a kick-ass FPS that I can play on my pile of 486s.

      I mean, it's cool and everything that the program is small... I'm not going to knock anyone for doing something simply "because they can". But what's the point of making a program that fits on a floppy when most modern computers meeting the requirments don't even ship with floppy drives anymore?

  4. Re:awesome... now only if they'd do this for linux by kidgenius · · Score: 3, Insightful

    I know you are being funny, but this program seems fairly DirectX dependent. Maybe if it was OpenGL?

  5. 100KB, please by Repugnant_Shit · · Score: 4, Insightful

    This game is dynamically linked to DirectX, which is a large program library. 3D Winamp visualizations are also small, because they don't have much rendering code in them either, but they're also not optimized very well (like a *real* engine such as Quake 3 or UT2004). Just because *your* "hello, world" is statically linked to the C++ library and mine isn't, doesn't make mine better because it's smaller.

    And procedural textures? The demo scene guys have been doing this for ages.

    This has left me underwhelmed.

  6. Re:Libraries by Jad+LaFields · · Score: 5, Insightful

    True, but this still seems like something designers should try more often. In fact, this seems like a very good argument for DirectX -- since its pretty much required to play most modern Windows games, it is a Windows standard, and it comes with recent versions of the OS, you and I are most likely to already have it. This is in contrast to my admittedly minor attempts to get games going under Linux, as each game seems to use a different toolkit/library that needs to be dowloaded separately and which have names like dvsdl-1.62.78 (all right, I made that up). Don't want this to sound like anti-Linux flamebait, but there is something to be said for Microsoft's ability to force a single, simply-named and -numbered standard library.

    --
    [SIG] It's like putting a moose in the blender -- a recipe for disaster!
  7. Re:so, what does this really advance? by kauttapiste · · Score: 3, Insightful

    HD space is cheap right? So if this advancement increases development time and cost, it is a tech achievement, but... i guess... whats the point?

    The point is not the size, features or technological advance at all. It's just sort of a proof-of-concept, if you like. It doesn't do rendering on it's own, nor does it have support for various graphic chips (all that is provided by DirectX), but it does have its own engine and all the model data and textures (mind you, it still includes all the textures although they are procedural, it just means that they are in forms of functions). And that is impressive.

    Can't try it myself yet, but I'm already amazed. Btw, to those who wonder where's the source etc, these things are usually not handed out. Demo/intro scene is more about competing with each other and the secret's of the trade are not given away!

    People pointing out DirectX dependency are missing the point.

  8. Re:2K raytracer by Kombat · · Score: 5, Insightful

    Have you actually read the source code to that thing? I downloaded it out of curiousity, here's a tidbit of the main() function:


    int main (void) {
    char b[99];
    int W=GN,H=GN,i,n;
    nl=GN;ns=GN;
    _f x,y;
    F(nl) RP(LI)
    F(ns) {RP(SI.c) SI.r=GN; RP(SI.l) SI.f=GN;}
    char* s = new char[(n=W*H*3)];
    memset(s,0,n);
    PT p={0,0,CZ},q={0,0,0},c; ...


    Skipped the class on "meaningful variable names," did we?

    While a 2K raytracer is marginally impressive, a 5K raytracer with readable source code would be far MORE impressive, IMHO.

    --
    Like woodworking? Build your own picture frames.
  9. Re:I would be more impressed... by misleb · · Score: 5, Insightful
    What I find curious is why the executable is 96k when it depends on DirectX. I would imagine that a good game engine written in assembly could easily be fit into 16kB. I would be more impressed with this particular effort if they had built their own graphics engine (with lighting effects, etc...)



    That 96k contains all the scene data. It isn't just the engine. Why would you be impressed if they wrote their own graphic engine? How would you take advantage of hardware accelleration. Sheesh! Write a tight program that uses OpenGL/DirectX and you get criticized for not using assembly tuned to bare metal. Write aseembly tuned to bare metal and you get criticized for having a program that only runs on specific hardware (or doesn't take advantage of hardware acceleration).

    -matthew

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  10. Re:I would be more impressed... by kb · · Score: 5, Insightful

    Raytracing? What exactly have you smoked?

    I won't allow myself the time to dismiss your "arguments" on a detailed level, but:

    * Why is the game SO dependent on the graphics card then?
    * Why do you talk about missing lighting effects when there's a full phong lighting model with several light sources and stencil shadows everywhere?
    * Why do you think you know ANYTHING of the used algorithms? Did you already reverse engineer the whole game?
    * Timer interrupts? ON WINDOWS? Come on.

    Please. "I have no idea how this all works, but I hate them" would really have been less hassle to type

    kb / farbrausch .kkrieger audio programmer
    game programmer at Inverse Entertainment, .de