


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)."
wow (Score:3, Insightful)
More Wow! (Score:5, Interesting)
2K raytracer (Score:5, Interesting)
http://www.mrio-software.com/2k_raytracer.php [mrio-software.com]
Re:2K raytracer (Score:3, Informative)
Re:2K raytracer (Score:5, Insightful)
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.
comments! (Score:5, Informative)
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);
Some weird macros are used:
#define F(T) for(i=0;i<T;i++)
#define FV(V,T) for(V=0;V<T;V++)
#define SI sp[i]
#define LI lt[i]
#define GN atof(gets(b))
#define RP(P) {P.x=GN;P.y=GN;P.z=GN;}
It's not really that bad.
--grendel drago
Sure would be nice (Score:4, Insightful)
Re:Sure would be nice (Score:3)
Re:Sure would be nice (Score:5, Insightful)
Re:Sure would be nice (Score:5, Insightful)
Re:Sure would be nice (Score:4, Insightful)
Re:Sure would be nice (Score:4, Insightful)
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
Re:Sure would be nice (Score:5, Insightful)
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..
Windows only? (Score:5, Funny)
Re:Windows only? (Score:3, Informative)
A 1.5GHz Pentium3/Athlon or faster.
- 512MB of RAM (or more)
- A Geforce4Ti (or higher) or ATI Radeon8500 (or higher) graphics card
supporting pixel shaders 1.3, preferably with 128MB or more of VRAM.
- Some kind of sound hardware
- DirectX 9.0b
And I can assure you, a GF4Ti does _not_ cut it unless you call 2-5fps acceptable. *sigh*
Torrent file (Score:5, Funny)
Re:Torrent file (Score:3, Funny)
96k (Score:5, Funny)
No Directx 8.1? (Score:5, Interesting)
Amazing Screenshots (Score:3, Interesting)
Re:Amazing Screenshots (Score:5, Informative)
Google 'Perlin Noise'. Read 'Procedural' as 'described mathematically'.
Re:Amazing Screenshots (Score:3, Informative)
Jeroen
Procedural textures (Score:5, Informative)
I'm curious to know if the maps are procedural, too.
4-bit representation of checkerboard texture (Score:4, Funny)
01
You may have to scale and tile it a bit.
Re:Amazing Screenshots (Score:3, Interesting)
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
Re:Amazing Screenshots (Score:4, Informative)
Ever heard of Ken Perlin? [nyu.edu]
Programmer who actually won an Academy Award for basically inventing this?
Anyone?
There's a book by Guy-Lecky-Thompson... (Score:5, Interesting)
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].
Re:There's a book by Guy-Lecky-Thompson... (Score:4, Interesting)
Elite..? (Score:3, Informative)
Discover Elite now!! Check out this page, maintained by one of the original creators Ian Bell [clara.net] and this Elite resource [acornarcade.com]
Anyone remember omniscent? (Score:5, Informative)
Re:Anyone remember omniscent? (Score:4, Funny)
Actually, it was the first 4*PI steradian shooter.
Great Compression (Score:4, Interesting)
Anyone know what I'm talking about? Cause I've searched and can't find it anymore.
Re:Great Compression (Score:3, Funny)
Other 64Ko 3D demos (Score:5, Informative)
Th
Torrent anyone? (Score:4, Funny)
It's taking forever to download . . .
the.produkkt. (Score:3, Informative)
It crashes (Score:3, Informative)
In Windows 2000 Profesional
Not as impressive as you think... (Score:4, Informative)
Proof that real programmers do still exists (Score:3, Interesting)
100KB, please (Score:4, Insightful)
And procedural textures? The demo scene guys have been doing this for ages.
This has left me underwhelmed.
Re:100KB, please (Score:5, Informative)
RTFR (Score:4, Informative)
"The concept of the texture/mesh generators was developed by fiver2. We do
Real-time generated textures (Score:5, Interesting)
We do
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.
You would be correct... (Score:4, Informative)
Instant review (Score:5, Funny)
Re:Instant review (Score:3, Informative)
Re:Instant review (Score:4, Funny)
Yeah, but the baddies were just procedurally generated with the DirectEnemies module, and the whole thing uses the built-in functionality of DirectAI.
Mirrors (Score:5, Informative)
try here [rufusul.de] and here [secretly.de] or for a complete list here [untergrund.net]
Farb-Rausch do some nice demos... worth checking out.
Why are they all set in dark machine rooms? (Score:5, Funny)
I want a FPS game set in a sunlit mountain meadow with birds & butterflies flitting about.
So I can see the blood....
TDz.
Re:Why are they all set in dark machine rooms? (Score:5, Informative)
It'll make your box beg for mercy though.
Re:Why are they all set in dark machine rooms? (Score:4, Informative)
Get Serious Sam. Also, read the interview at Old Man Murray: http://www.oldmanmurray.com/features/73.html
RaviGame Requirements (Score:5, Funny)
1.4 GHz Processor
512 MB Ram
96 kb HD Space
Well at least my computer meets one of those requirements!
Wonder how big the VB/.Net version would be? (Score:3, Informative)
Elegance (Score:3, Interesting)
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.
It runs like ass..!? (Score:3, Informative)
Shrug - Been there, done that. (Score:5, Informative)
Bill was right all along! (Score:5, Funny)
Explanations! (Score:5, Informative)
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
Then, a few clarifications:
Hope that clears up a few things...
Tammo "kb" Hinrichs
Farbrausch Consumer Consulting
freelance audio programming guy for
shocked that our server is still alive.
Another interesting game (Score:5, Informative)
Re:awesome... now only if they'd do this for linux (Score:3, Interesting)
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
Re:awesome... now only if they'd do this for linux (Score:5, Funny)
Re:awesome... now only if they'd do this for linux (Score:3, Insightful)
Re:awesome... now only if they'd do this for linux (Score:5, Informative)
Re:awesome... now only if they'd do this for linux (Score:5, Informative)
Re:awesome... now only if they'd do this for linux (Score:5, Informative)
What if it *did* install Linux? (Score:5, Interesting)
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:awesome... now only if they'd do this for linux (Score:5, Funny)
Hell, It wouldn't be all that much code to port.
Really? Gonna port DirectX 9 to Linux during your lunck breaks, are ya?
in that case (Score:5, Insightful)
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)
Re:in that case (Score:4, Funny)
Re:in that case (Score:4, Funny)
LOL!
:-)
Re:in that case (Score:4, Funny)
(In theory, anyway).
Re:in that case (Score:5, Funny)
The statement "Nothing is certain or provable" disproves itself. If, in fact, it is true, then it is a certainty in itself. If it's not, then it leaves the door open for certainty and provability.
Re:in that case (Score:5, Funny)
Re:in that case (Score:5, Funny)
The point? (Score:5, Interesting)
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:Libraries (Score:5, Insightful)
Re:Libraries (Score:5, Interesting)
linky linky (Score:5, Informative)
Re:You're right... (Score:5, Informative)
OK (Score:5, Informative)
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.
Re:Libraries (Score:3, Insightful)
Re:I would be more impressed... (Score:5, Insightful)
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
Re:I would be more impressed... (Score:5, Insightful)
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
game programmer at Inverse Entertainment,
Re:I would be more impressed... (Score:5, Funny)
I totally agree with your post.
A couple of days ago I executed an MD5 hash and it was more functional than this.
Years ago I was thinking of writing a ray-tracer in 1 bit. But, I couldn't decide if I should write it in Java or C#.
Then I picked up my copy of "The Zen of Assembly Language", but unfortunately a little too swift so the dust cloud that that generated kept me from entering my parents basement for a couple of days.
"The Zen" is truly the a great piece of work, although I don't really know why we would need to use these new fangled 16-bit CPUs.
But back to the subject, let's walks through how this game could be done SOOOO much better:
A "basic" raytracing algorithm is very simple - you simply map a texture over a wireframe model and then scale the result by dividing the x and y dimensions by the z distance.
That's right. That's EXACTLY how a raytracer would work, if there ever was one. I think for this one we should also implement tracing the actual rays, to add to the effect. Btw, I've got a nice wireframe model sitting in my backyard that can be used for this. Again, I think this really can be done in 1 bit.
Basic FPS gameplay would involve loading your device handlers (mouse, keyboard, etc...), and writing a response loop.
I think we can safely say that with mouse, keyboard, speech synthesis, speech recognition and a couple of other run of the mill devices this could be done in 2 bits, give or take 1.
Asynchrous gameplay (i.e., enemy moves as you stand still) can likewise be handled by chaining the timer interrupt (18h? IIRC) to your "enemy movement" code.
What can be more simple than chaining an interrupt to the "enemy movement" code that appeared out of thin air? But because it deals with interrupts, maybe 2 bits??
I bet with a Z80 we could bring it down even more, but let's not get ahead of ourselves. It's better to keep the system requirements low. So far we can do this in a 74HCT04.
Collision detection, etc, could simply be brute-forced by plotting the vector of the expelled projectile until it collided with another object.
I have a question about this. Do you think we should also use radiosity on the projectiles? Because my plotter doesn't support that, and I'd hate to waste the ink. Well, let's round it off, say 3 bits. That gives us a target of 8 bits total.
There. We're practically done. What are these guys smoking. This can be done in 8 bits, on a 74HCT04.
[/sarcasm]
Sir, you are a fucktard. Your last experience with Assembler (yes I call it Assembler, not Assembly, sue me) seems to predate the invention of the 8086 CPU.
I actually write assember for a living, and I can tell you that what these guys do is amazing. They are squeezing the last drop out of the space. These are the people that _write_ books like the Zen of Assembly (which is in serious need of a predecessor).
Re:Libraries (Score:5, Funny)
It's much worse than that. I actually tried to install one of these things. Turns out the damn thing requires a computer, too! Lying bastards didn't tell me that I need space on my desk for a monitor, neither! I'll tell you this much. I never had any of these problems with my WebTV!!
Re:Amazing (Score:3, Funny)
Re:Amazing (Score:5, Funny)
Please be sure to stick to standard Slashdot etiquette. In making a joke about accidentally messing up your system, it is customary to truncate the last bit of the message and terminate with [NO CARRIER] or some sort of +AT code.
Applying to your situation would give us:
Do you see? That's instantly at least 1337% funnier. Remember this trick for next time.
Re:so, what does this really advance? (Score:5, Funny)
Re:so, what does this really advance? (Score:3, Insightful)
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 althoug
Re:so, what does this really advance? (Score:5, Funny)
Re:zipped doesn't count for size (Score:5, Informative)
Re:zipped doesn't count for size (Score:5, Funny)
Packed: 97,256
Unpacked: 97,280
It's quite obvious the original assertion is misleading since it's zipped and it's smaller!
Re:Wow (Score:3, Informative)
Re:64 Kb (Score:3, Interesting)
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..
Re:64 Kb (Score:5, Funny)
And you try and tell the young people of today that
Re:64 Kb (Score:5, Funny)
Wait a minute . . . what were we talking about?
Re:while I am impressed at the code size... (Score:3, Insightful)
(And yes, being a suspicious puppy, I did look at the network traffic while it was starting up just in case it was downloading on the fly...)
But 64K? Pah! There were more fun games in 16K - I mean, who can forget 3D Monster Maze [the-underdogs.org] and JetPac [worldofspectrum.org]?
Re:Very Cool But..... (Score:3, Informative)
Re:wow (Score:5, Interesting)
Re:wow (Score:5, Insightful)