Re: Is this possible with C?
It's probably possible. Really depends what you mean by "basic". If you're going to go with ASCII art I'd say definitely. Even some basic graphics packages should allow you to stay under those limits, so long as you make sure everything is linked statically.
Re: Is this possible with C?
Quote:
Originally Posted by
Lindley
It's probably possible. Really depends what you mean by "basic". If you're going to go with ASCII art I'd say definitely. Even some basic graphics packages should allow you to stay under those limits, so long as you make sure everything is linked statically.
basic meaning rectangles for the paddles, a circle for the ball and two lines for the top and bottom edges kind of basic. xD
Re: Is this possible with C?
Honestly it should be trivial to meet those requirements.
Re: Is this possible with C?
I'll bet you can do it in half that. Didn't the atari only have like 128K in those cartridges?
Re: Is this possible with C?
I don't think the question is whether or not it can be done---obviously it can---but whether it would be easy to do with modern graphics libraries. There *is* a tendency towards bloat in some of them.
Re: Is this possible with C?
Well, a basic program using the Allegro graphics library yields a ~600KB exe with Allegro and the CRT statically linked, and uses 3-4MB of RAM. That's with no attempts at size optimization whatsoever, and there's really no way you should use another 400KB of exe space or 5+MB of memory to implement pong.
Re: Is this possible with C?
Quote:
Originally Posted by
ninja9578
I'll bet you can do it in half that. Didn't the atari only have like 128K in those cartridges?
The Atari 2600 console system permitted an absolute maximum of 6KB in a ROM cartridge. Eventually that ceiling was broken to some degree by using bank switching in 4K blocks to swap in and out different 4KB blocks into the memory space.
Still later and more advanced cartridges contained code to swap banks in smaller increments, and even have some onboard RAM, but classic, 2600 Pong (and the 4 or 5 other games that came with) all fit into a singl 6K ROM.
Sure, the console itself had some additional features for display and sound interfacing, but the actual game code was tiny.