Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
First Person Shooters (Games) Entertainment Games

First Person Shooter - Under 100KBs of Code 741

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)."
This discussion has been archived. No new comments can be posted.

First Person Shooter - Under 100KBs of Code

Comments Filter:
  • by Anonymous Coward on Thursday April 15, 2004 @09:59AM (#8868435)
    that's awesome!
  • 2K raytracer (Score:5, Interesting)

    by ggambett ( 611421 ) on Thursday April 15, 2004 @10:00AM (#8868444) Homepage
    Not as impressive, but there's a software raytracer with shadows and recursive reflection which generates .PBM images - in 2K of C source, with no libraries required.

    http://www.mrio-software.com/2k_raytracer.php [mrio-software.com]
  • awesome... now only if they'd do this for linux

    I would think that it might be kind of difficult to move this code across platforms if it's optimized that much, wouldn't it? ------didn't RTFA
  • No Directx 8.1? (Score:5, Interesting)

    by RichM ( 754883 ) on Thursday April 15, 2004 @10:02AM (#8868478) Homepage
    For those of you who don't have a GPU with pixelshaders, you can try the original which started the whole thing, the 64kb fr-08: http://www.theproduct.de/ [theproduct.de]
  • Amazing Screenshots (Score:3, Interesting)

    by william_lorenz ( 703263 ) on Thursday April 15, 2004 @10:03AM (#8868481) Homepage
    These screenshots are amazing. Does anyone know more about the fact that "textures are procedural" and how they're able to use this method to compact things down into such a little distribution?
  • by tcopeland ( 32225 ) * <tom&thomasleecopeland,com> on Thursday April 15, 2004 @10:03AM (#8868483) Homepage
    ...Infinite Game Universe: Mathematical Techniques [halfpricec...erbooks.ca] that talks a lot about how to have a varied game universe while keeping size requirements under control.

    One of the techniques he discusses is using a psuedorandom number generator to create game objects and attributes and such, and shipping the game with a couple of pregenerated seeds to start up the generators. He uses the game Elite a lot in his examples, and anyone who's played that game knows what a good job they did in that regard.

    It's an interesting approach, especially when contrasted with WAD files [rubyforge.org].
  • Great Compression (Score:4, Interesting)

    by DrugCheese ( 266151 ) on Thursday April 15, 2004 @10:04AM (#8868489)
    I remember a friend of mine showing me the winner of this compression contest, it was like an 24kb download and it was 12 minutes of good music and graphics scrolling around the screen. Blew my mind.

    Anyone know what I'm talking about? Cause I've searched and can't find it anymore.

  • by Jason Straight ( 58248 ) on Thursday April 15, 2004 @10:08AM (#8868556) Homepage
    I thought we were all nearly extinct from the Visual Armageddon!
  • Re:Amazing (Score:2, Interesting)

    by antime ( 739998 ) on Thursday April 15, 2004 @10:10AM (#8868576)
    It's a demoscene product, made by the group farbrausch [farb-rausch.com].
  • by PingKing ( 758573 ) on Thursday April 15, 2004 @10:12AM (#8868607)
    According to the readme, the texture-maps are generated in real-time:

    We do .not. have some kind of magical data compression machine that is able to squeeze hundreds of megabytes of mesh/texture and sound data into 96k. We merely store the individual steps employed by the artists to produce their textures and meshes, in a very compact way. This allows us to get .much. higher data density than is achievable with normal data compression techniques, at some expense in artistic freedom and loading times.

    The problem with this, of course, is that it requires major computational power, and you're limited with the type of textures you can produce. It's probably a case of this program specifying 'bumpy metallic texture' or 'smooth stone texture' on the fly.
    I remember the old flight-sim 'Strike Commander' would generate the game's maps during installation based on fractals. It used take AGES... this program generates many more megabytes of graphics on the fly... very impressive.
  • Re:64 Kb (Score:3, Interesting)

    by grub ( 11606 ) <slashdot@grub.net> on Thursday April 15, 2004 @10:14AM (#8868636) Homepage Journal

    Back in school we had a 6502 development kit. We had to flip a 8 switches (bits, this had a staggering 256 bytes of memory) to set the address and another 8 for the data then hit a button to load the data into RAM. Once it was all done we set the address toggles to the start point of the program and hit an execute button. The output was 2x 7 segment LEDs..

    I seriously almost bought one for home to tinker with but it was a few hundred dollars and I was a starving student..
  • by 3Suns ( 250606 ) on Thursday April 15, 2004 @10:16AM (#8868658) Homepage
    I believe it's a trick borrowed from the demo scene [everything2.com]. In extremely size-critical styles of demo, such as 64k intro [everything2.com], coders create textures, models, and even music at runtime, rather than storing these as bitmaps, vector lists, or midi/mp3. Usually they are created with some fractal-type function.

    I assume the models, levels, and sounds for this game are pregenerated and stored in some efficient format. Textures are pretty easy to generate with a fractal.

    What impresses me most about those screenshots are the really cool lighting effects. It appears they have implemented realtime shadows, luminance maps, and other really difficult techniques.
  • Re:2K raytracer (Score:2, Interesting)

    by Prothonotar ( 3324 ) on Thursday April 15, 2004 @10:23AM (#8868727) Homepage
    It compiled to 10310 bytes on my system. Dynamic library dependancies were as follows: libstdc++.so.5, libm.so.6, libgcc_s.so.1, /lib/libgcc_s.so.1, libc.so.6, /lib/ld-linux.so.2
  • Elegance (Score:3, Interesting)

    by PhotoGuy ( 189467 ) on Thursday April 15, 2004 @10:36AM (#8868853) Homepage
    Wow, flashback to when elegance in programming was far more common, and bloat was far less programming.

    I worry about newer generations of coders, never having known elegant, lean, efficient, and useful code, from the major bloat that comprises most software projects today.

    Items like this, are truly things of beauty, and only becoming more rare.

  • by rogabean ( 741411 ) on Thursday April 15, 2004 @10:40AM (#8868888)
    just thinking here.. but if it's DirectX 8 based then Wine should be capable of running this. Would most likely need a bit more in the way of system requirements, but might run. Will give me something to test out when I get home tonight.
  • Pfft (Score:2, Interesting)

    by l33t-gu3lph1t3 ( 567059 ) <arch_angel16 AT hotmail DOT com> on Thursday April 15, 2004 @10:44AM (#8868933) Homepage
    So, zipped, it's 96KB. Whoop-dee-doo-dah-day. Running, it consumed an obscene amount of system resources on my PC. How on earth does it require 512MB RAM and 128MB framebuffer? There seems to be an awful lot of duplication of texture, geometry, and code going on here...
  • by GigsVT ( 208848 ) on Thursday April 15, 2004 @10:47AM (#8869008) Journal
    Nethack et al do the same thing. It's cool that they are random from game to game, but once generated, they are persistant.

    Back in the day, Telengard for the commodore did this too, except it made the levels very huge, and the same from game to game, so that the level was always the same for everyone, but it was never stored anywhere, it was only generated from the "seed", which never changed.
  • Re:Libraries (Score:5, Interesting)

    by John Harrison ( 223649 ) <johnharrison@@@gmail...com> on Thursday April 15, 2004 @10:53AM (#8869118) Homepage Journal
    I did something similar using OpenGL. It is a 3D asteroids game in which the action occurs in 3d, not in a 2d plane. The zip file for it is about 102 kb, but most of that is because I included glut.dll so that people wouldn't have to hunt it down. Oh, and by using OpenGL I have been able to run it on Windows, MacOS, and Linux.
  • Doesn't work (Score:1, Interesting)

    by TeXMaster ( 593524 ) on Thursday April 15, 2004 @11:11AM (#8869430)
    Crashes on my Windows XP box. (BTW, when first writing this comment, Slashdot complained I was too fast ... looks I need some of those pills to last longer?)
  • by NotQuiteReal ( 608241 ) on Thursday April 15, 2004 @11:17AM (#8869528) Journal
    Maybe not this time, but it seemt to be just a matter of time before someone comes up with Linux "scum-ware", a la Gator (or whatever it is called now) and its ilk.

    1) get your cool geek game advertised on slashdot.
    2) lots of people download it and run it.
    3) bury some obfuscated language in a 30 page EULA [well, 30 pages that only show up 5 lines at a time in a tiny un-resizeable window]. The gist of the "I agree" button is that your machine will bootstrap into a nuke-and-pave Linux installation!

    Ok, this is tongue in cheek, but seriously, do the slashdot editors evaluate things like this for viruses or other mal-ware? Where's the checksum of the one they checked?

    Who downloads mysterious 100K executables and runs them on a live machine? [heh, especially from Germany, I mention this only because the last two unprotected Windows machines put on the net by some hapless aquaintences of mine were running German FTP sites so fast you'd think they were configured that way out of the box.]

  • Re:Libraries (Score:3, Interesting)

    by jon3k ( 691256 ) on Thursday April 15, 2004 @11:23AM (#8869615)
    Should we consider the size of the operating system in that too? What about the hardware drivers?

    So every application is the size of it + all dependent software?
  • by RenHoek ( 101570 ) on Thursday April 15, 2004 @11:23AM (#8869625) Homepage
    Seen this?

    http://www.the5k.org/description.asp/entry_id=946 [the5k.org]

    It's a winner of the 5K contest. A Wolfenstein in Javascript in just 5 kilobytes.. Now THAT is small ;)
  • Re:wow (Score:5, Interesting)

    by Chilliwilli ( 114962 ) <tom.rathbone@g m a i l.com> on Thursday April 15, 2004 @11:45AM (#8869949)
    No so much a compression algorithm as a way of procedurally generating textures. Theoretically using this technique a games company could ship a game and the user could decide at the other end what size and detail they want their textures to be. This would have benefits as the textures would be scalable to suit users hardware and only one set would need be distributed in a small vector/algorithm/macro form. If more game distribution was moved to online electronic form then this would certainly be something worthy of consideration by the developers.
  • by silicon not in the v ( 669585 ) on Thursday April 15, 2004 @12:00PM (#8870182) Journal
    I am totally with you about the darkness thing. (Forget the butterflies, though.) I'm not a big FPS gamer (mainly because I didn't want to shell out the money for the top-of-the-line video cards they need, and I don't have a lot of time to get good enough at them to play online.) I recently downloaded and played the demo of Half Life to see how it was since I heard so much about it. I could barely play it on a Saturday afternoon because even with the brightness settings in the game turned all the way up, the stinkin' hallways were still too dark to see very well in. I could play pretty well at night because there is dim stuff there to be seen if you are playing in the dark. I haven't played a lot of other ones, but Doom and Descent were decently lit. Is this an on going trend of games getting darker and darker? Pretty soon, every video card is going to have to be sold with a pair of night vision goggles to actually be able to see the games you play.
  • by AnwerB ( 255422 ) on Thursday April 15, 2004 @12:43PM (#8870926)
    There's a nice 23-page pdf of an (iterative fractal) procedural textures examples at:

    http://www.uno.edu/~SAGES/presentations/Riddleof th eSphinx.PDF (warning: huge 1.9MB pdf file).

    There's also an example in the file of fractal compression of topographic maps. Something like this could be used to provide any level of datail to a surface, as long as you knew the statistics of the texture, and defined some 'binding points'. So you just need to fill in the rough details of the mountain, not the actual matrix defining it:

    E.g. 1000m high at [55,-92], 0m at [444,17], 0m at [-90,200], Hausdorff dimension 2.3 (Alps), or 2.15 (Rockies).

    The file also list some example uses for the fractal texturing methods, such as background noise generation for missile tracking, stock market fluctuation simulations, expected word frequency in written text, lung destruction patterns from smoking, percolation, etc.

  • The point? (Score:5, Interesting)

    by SmallFurryCreature ( 593017 ) on Thursday April 15, 2004 @12:54PM (#8871130) Journal
    Well howabout that this thing took less time to load then any recent FPS I played?

    Also there may be a model for selling software online rather then on CD/DVD. Obviously this game would cost a bit less to host then say the 5CD farcry.

    Also don't forget more portable solutions. Laptops or PDA's and other gadgets. They got extremely limited storage but my old calculator could hold this one. Not run it but hold it :)

    Mostly however this is just a tech demo. Showing that you do not need a massive wad of textures just to make a nice looking game.

  • Re:You're right... (Score:2, Interesting)

    by Zangief ( 461457 ) on Thursday April 15, 2004 @01:16PM (#8871461) Homepage Journal
    Using SDL would still make sense if you are developing a windows-only game. The simplified API would lower your costs, both in time and money. Although you give up a little power in exchange for that, so it may only make sense if you are a indie developer.
  • by flatface ( 611167 ) on Thursday April 15, 2004 @01:19PM (#8871506)
    It uses DirectX. And Windows binaries are larger than Linux ones. Don't get me wrong, I use Linux almost exclusively-- I wouldn't mind an extra few kb bloat to run it, just as long as it runs. I've been drooling over Farb Rauch's stuff for a while now.. Only if they released their source.
  • Re:Explanations! (Score:2, Interesting)

    by WWWWolf ( 2428 ) <wwwwolf@iki.fi> on Thursday April 15, 2004 @01:23PM (#8871562) Homepage

    As I'm one of the guys responsible for this game, ...

    Tammo "kb" Hinrichs

    Oooo, it all suddenly makes sense. You were the one of the guys who ported Second Reality to C64, right? Can't stop amazing people with smaller and smaller things, eh? =) Great work!

  • by retro128 ( 318602 ) on Thursday April 15, 2004 @01:31PM (#8871662)
    I'm with you there. Well not necessarily regarding the butterflies and Bambi prancing happily though the meadow, but I'm talking about open environments. There is very, very, very little of that in games for some reason. Everyone still has Doom syndrome where they make you run though a maze for the entire game.

    It's probably why I liked Beyond Good & Evil and Giants so much.
  • Re:2K raytracer (Score:3, Interesting)

    by HoppQ ( 29469 ) on Thursday April 15, 2004 @01:56PM (#8872032)
    begin-base64 644 raytracer.ps
    JSFJT1BTQy0xOTkzICUlQ3JlYXRvcjogSEFZ QUtBV0EgVGFrYX NoaTx4eHh4
    eHh4eEB4eC54eHh4eHgueHgueHg+IAovQy9uZW cvZC9tdWwvUi 9ybGluZXRv
    L0UvZXhwL0h7e2N2eCBkZWZ9cmVwZWF0fWRlZi 9UL2R1cC9nL2 d0L3Ivcm9s
    bC9KL2lmZWxzZSA4CkgvQS9jb3B5KHomdjRRWC Y5M3I5QXhZUU 9ab21RYWx4
    UzJ3ISFPJnZNWWE0M2Q2cjkzck1ZdngyZGNhIU QmY2pTbmpTbm pqUzNvIXYm
    NkEKWCY1NVNBeE0xQ0Q3QWpZeFRUZDYycm14Q2 5UZFNTVDBnJj Eyd0VDU1Qh
    JiFKMGcmRDEhJnhNMCFKMGchbCY1NDRkQzJBYz k2cmEhbSYzQQ pGJiZ2R29H
    U25DVDBnJndEbWx2R29TOHdwbjZ3cFMyd1RDcF MxU2Q3b3Y3VW s3bzRRa2R3
    ISZNdmx4MVM3b1pFUzN3IUohSiFRJjcxODVkCl ombHgxQ1M5ZD luRTQhayZY
    Jk1ZNyEmMSFKIXgmamRuamRTM29kUyFOJm1teD FDMndFYyFHJj E1ME54NCFu
    JjJvIWomNDNyIVUmMDc3N2QKXSYyQVkyQTc3Nm RkVDRvUzNvU2 5NVkMwMFZW
    MFJSUjQ1RTQyMDYzck56JnY3VVgmVU96RiFGIU ohWyY0NEVUQ2 5WbiFhJjFD
    RE4hWSYwTQpWMWMmajJBWWRqbU1kampkIW8mMX IhTSl7KCApVC AwIDQgMyBy
    IHB1dCBUKC8pZ3tUKDkpZ3tjdm59e2N2aX1KfX soJClne1t9e1 19Sn1KCmN2
    eH1mb3JhbGwvbW92ZXRvL3AvZmxvb3Ivdy9kaX YvUy9hZGQgMj kgSFt7W3td
    c2V0Z3JheSBmaWxsfWZvciBZfWZvciBzaG93cG FnZQo=
    ====

    That's the same thing corrected (the original was mangled by slashcode) and base64-encoded, which doesn't care about extra spaces inserted by slashcode. Decode with uudecode(1) or something else.
  • Does Minux have X, OpenGL, and suitable other libraries? This game isn't a standalone work. It makes extensive use of DirectX, and you'd need some pretty heavy support code to make it run on something else. The main "coolness" is the procedurally generated textures. In most games, textures, sounds, and models take up the most space. Code isn't that big.
  • Another great game that used a lot of mathematical methods was Daggerfall. It had a world so big that it would take something like a week of real time for your character to walk across it (not using fast travel). All the wilderness parts were fractally generated, so everywhere looked unique without having to pregenerate the layout.
  • by Ayanami Rei ( 621112 ) * <rayanami&gmail,com> on Thursday April 15, 2004 @03:35PM (#8873452) Journal
    I would really have to argue that... clearly you've never programmed against ALSA or OpenGL in Linux with properly supported hardware (which is a good slice of stuff available today, if you're willing to support the occaisional binary driver). There really isn't a difference, just familiarity with the APIs.

    Hell, demoscene coders would have killed for something like ALSA 6 years ago. Thank god for Sahara Surfers, if you know what I mean.

    The demoscene loved the Amiga. Now they love the PC. TBL managed to get their demo engine working on Linux and Windows (which is quite impressive). So what evidence do you have to support your opinion?

    (and I'm not expecting that anyone write a 3d demo in Linux, especially if they want a wide audience of gawkers... but IMHO it's much easier to write a 64k demo (especially if it eschews 3d in an old school stylee) in linux with the simple APIs than it is with Windows and DirectX. I can see myself doing the former, but I'd struggle with the latter.)
  • Re:I'll sum up (Score:2, Interesting)

    by Anonymous Coward on Thursday April 15, 2004 @03:40PM (#8873507)
    I agree with you save the last paragraph.
    Linux is faster, and that includes 3D graphics. There are some issues with sound latency, dependent on configuration, but they might be over by now, I'm not running a late distro.
    Direct3D would not make 3D graphics any faster on linux, do you even know what you are talking about?
    Oh, IAAGP (I am a game programmer).
  • Re:wow (Score:3, Interesting)

    by Pxtl ( 151020 ) on Thursday April 15, 2004 @07:16PM (#8876229) Homepage
    Amen. Those shots just startled me. When I read the description, I was expecting something like Cube (wouter.fov120.com/cube). Cube was super-high efficiency - small engine, simple mapping system, simple networking. Cube used jpegs for textures - fsck quality, I like small games. It was a good idea. But this game is gorgeous. It shows how much graphical power DX comes with out-of-the-box.
  • More Wow! (Score:5, Interesting)

    by Ch_Omega ( 532549 ) on Thursday April 15, 2004 @08:50PM (#8876940) Journal
    For those interesting in something else from the same people, check out this 64k demo [theproduct.de] which among other things, includes detailed 3d-models of nude women. :)
  • Re:wow (Score:2, Interesting)

    by LoRdTAW ( 99712 ) on Thursday April 15, 2004 @10:24PM (#8877512)
    "Theoretically using this technique a games company could ship a game and the user could decide at the other end what size and detail they want their textures to be."

    This definatly would be an excellect idea. Think about it when you buy the game you could specify low rez 128x128 textures for a low end machine or 512x512 high rez or even bigger for cutting edge systems. and maybe throw a few variables in there to make shure the textures come out a little different for each person so the game is never the same on any two machines. And of course the first time the textures are generated they are written to disk as a cache so a user doesent have to wait hours to generate hundreds of textures or have gigabytes of ram. Could also apply this system to vary skin textures on models so all the in game characters never look the same. You could also generate more then one wood texture in a scene so the wooden floor in an old mansion will look totally different throughout the entire mansion and not just a repeat of the same texture over and over. would require allot of power but pc evolve so fast that in a few years we might be downloading games under 10 megs in size that generate all terrain, models and textures on the fly so the game never looks the same but always plays the same (maybe that can be dynamic too!).

Living on Earth may be expensive, but it includes an annual free trip around the Sun.

Working...