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)."
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)
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.
Vote for global prefs bug
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!
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.
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..
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
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."
Raytracing? What exactly have you smoked?
.kkrieger audio programmer .de
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,
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
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