Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

only ~33k lines of code for everything in C/asm. yet today, it feels so strange that an equivalent game in our "much advanced languages" will probably end up about the same or larger. Are we really progressing?


The imperative game logic stuff would be about the same. If this happens, print this and that. If this key is pressed to these 5 things. You can't abstract those steps away.

However, video, audio, input handling, and loading resources would be a lot simpler.

E.g. take a look at the input manager:

https://github.com/keendreams/keen/blob/master/id_in.c

You also wouldn't have anything like this:

https://github.com/keendreams/keen/blob/master/id_ca.c

You'd put some resources in a list and that's all the caching you'd do.

You should be able to do a game like this in less than 10k lines of Dart/TS/JS (2D Canvas, Web Audio, Gamepad API). Without using any external libraries or engines, that is. It also would be a lot easier to write, because all of the low level parts are gone.


33k sounds like a lot. I should think a game like this today would be more like 3k, or maybe 10k at most + engine code + content.

Nowadays you see, it's wasteful to write an engine from scratch for a game like this. It was needed then, but it's a solved problem now. If you wrote 33k for a commander keen clone I'd wonder what you were doing.


In this case, the 33k loc includes the engine. I think that is the point.


This is a philosophical problem. What is the difference really between:

1. a prewritten engine, and

2. some hypothetical language

each where you write commander keen with 3k loc. Where the hypothetical language has all the same stuff as the engine, it's just locked away behind a level of abstraction.

if you could write commander keen in 3k of javascript (with the aid of all the stuff that's in a browser) How is that different from writing 3k of C with nothing but this entire commander keen engine already written and ready to go?

What's are we calling an "advance", exactly?


I do see your point. The advancement is: You don't need to make/test your engine, and we have a lot more graphics cards and platforms, too.


Yes, because now we do platformers in 1024 bytes: https://marijnhaverbeke.nl/js1k/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: