Man Creates Entire Game of Pong Inside a Single Commodore 64 Sprite (neowin.net) 67
"Pong on a Commodore 64 is one thing... but Pong in a single C64 sprite? That's uncharted territory," writes Slashdot reader segaboy81.
Neowin reports: The Commodore 64 is an iconic machine. For many of us boomers, it was our introduction to programming... Josip Retro Bits is a YouTube channel that specializes in fun challenges on old hardware like the Commodore 64. In an older video, Josip creates a game of Pong using Basic. On the surface, this doesn't sound very interesting, but it's a real challenge because Basic is very limited when compared to writing machine code. Basically, the C64 is perfectly capable of a game like Pong, but not really in Basic. Spoiler alert: he does it. However, a commenter on that video had a novel idea. How about creating an entire game of Pong in a single spite?
That's a 24 x 21 pixels object. ("It can be seen as a bigger programmable character that can be moved on hardware on steps of one pixel," explains one tech blog.) And another spoiler alert: he does it again.
Here's the repository for the "Tiny Pong" code. It's written in C, with functions like drawScreen() and batSound().
And about 18 minutes into the video, he not only plays a game of Pong inside the sprite — he simultaneously makes that sprite move around the screen like the ball in a game of Pong.
Neowin reports: The Commodore 64 is an iconic machine. For many of us boomers, it was our introduction to programming... Josip Retro Bits is a YouTube channel that specializes in fun challenges on old hardware like the Commodore 64. In an older video, Josip creates a game of Pong using Basic. On the surface, this doesn't sound very interesting, but it's a real challenge because Basic is very limited when compared to writing machine code. Basically, the C64 is perfectly capable of a game like Pong, but not really in Basic. Spoiler alert: he does it. However, a commenter on that video had a novel idea. How about creating an entire game of Pong in a single spite?
That's a 24 x 21 pixels object. ("It can be seen as a bigger programmable character that can be moved on hardware on steps of one pixel," explains one tech blog.) And another spoiler alert: he does it again.
Here's the repository for the "Tiny Pong" code. It's written in C, with functions like drawScreen() and batSound().
And about 18 minutes into the video, he not only plays a game of Pong inside the sprite — he simultaneously makes that sprite move around the screen like the ball in a game of Pong.
THIS is the kind of news I miss on Slashdot (Score:3)
Silly, curious and definitely news for nerds!
Makes me want to fire up the old MSX and code some.
Re: THIS is the kind of news I miss on Slashdot (Score:2)
Re: (Score:2)
Ah the memories... (Score:2)
I quickly uploaded it here [gitlab.com].
boomers (Score:3)
The Commodore 64 is an iconic machine. For many of us boomers, it was our introduction to programming
Quick google says "boomers" are from 1946 to 1964, the personal computer revolution was in the mid 70's so by 1982 you were in your 40's and joining the fad or just getting out of high school. Either way the original statement isn't that impressive as for most of your life computers were not accessible or there was 4 on the planet for the older crew
Re: (Score:2)
Re: (Score:2)
Gen X started early-mid 60s, so younger boomers would merely have been teens when this started.
Re: (Score:2)
Right. The C-64 was an introduction to programming for pretty much everyone at the time regardless of age, given how popular it was and how easy it was to get started. Literally kids could do it (I did! Programmed my first simple game at age 11...) I feel like most Gen-X coders got started on the C-64 at an early age in the 80s and early 90s. There were after-school computer clubs, magazines, radio programs that transmitted code as audio you could record onto a cassette tape(!) and the Commodore was the p
Re: (Score:3)
Why? (Score:2)
BECAUSE THIS IS A NEWS SITE FOR NERDS (Score:3)
This is cool but I have to ask why?
Turn in your nerd card.
Re: (Score:2)
It's similar to making a game in the favicon of a browser. Just fun.
Re: (Score:2)
Re: (Score:2)
I thought they meant that be made a game of Pong using busy one sprite for everything.
It's possible on many systems by reprogramming the sprite as the screen is being drawn, "racing the beam" as it's called.
Re: (Score:2)
This is cool but I have to ask why?
Because he can and because he wanted to. Sometimes explanations are that simple.
Re: (Score:2)
That video has almost 6 thousand views! Possibly enough to fund the purchase of a new pizza.
Easy to do (Score:2)
The C64 does all the displaying and moving of the sprite in hardware. Hence moving it is trivial and not an accomplishment as the story seems to suggest. Putting Pong into a sprite is similarly easy: This is basically a small screen, no special properties. You just draw your pixels, maybe synced with the screen refresh and that is it.
I guess whoever wrote that mindless sensationalist story has never heard of hardware sprites...
Blinking Dragons would be a good band name (Score:2)
For you young punks, a sprite was an onscreen visual object. But because ram, including viideo ram, was insanely expensive, and processors slow, they built special hardware to shove limited-sized objects around screen. This offloaded general ram and processor needs.
On the old Atari, they only had 4 sprites or something, which is why the original Adventure game sometimes had blinking objects -- with more than 4 dynamic objects in a particular room, they had to rotate through them, giving each a shared sli
What is hard about making pong in basic, exactly? (Score:2)
Re: (Score:3)
The basic interpreter on a c64 is extremely slow and unsuitable for video games. Games were usually written in assembler.
Re: (Score:2)
Re: (Score:2)
Well, it was obviously enough for a PONG game, since it was done. And i still have a few c64 games written mostly in BASIC. But it is a slow interpreter and it has no graphical commands.
Re: (Score:2)
Re: (Score:2)
One of Steve Wozniak's design goals for the Apple II was to be able to write a Breakout-like game for it in BASIC. The result, Little Brick Out, shipped with every Apple II for years.
Re: (Score:2)
Yes. I played pong and breakout style games that were written in Basic on the C64. Nothing by today's standards, but not exactly unheard of back then. This author got carried away in their excitement.
Syed Shahid (Score:1)
While I appreciate the leet skills... (Score:2)
Re: (Score:2)
No one cares that it was a man, just that it was done.
Why does the gender of who did it matter to you?
Re: (Score:2)
Here’s a title: “Game of Pong Created Inside a Single Commodore 64 Sprite" Do you see what's missing? The stuff which is completely irrelevant. Just cos I’m a nerd doesn’t stop me from being a grammar nazi. What is it with the young these days - is everyone dyslexic or illiterate?
Re: (Score:2)
> Just cos I'm a nerd doesn't stop me from being a grammar nazi.
1. Found the problem: You are whining about an issue no one gives a fuck about.
2. If a woman had done this the title would read: Woman Creates Entire Game of Pong Inside a Single Commodore 64 Sprite.
3. The /. editors do fuck all. They can't even be bothered to check for dupes for the past ~20 years yet you expect them to do the ONE job they actually have? Are you new here? /s
> What is it with the young these days
They have lots of proble
Re: (Score:2)
Re: (Score:2)
> My largest bugbear ...
For me, two of the biggest problems with the /. "editors" (and I use the word loosely) are:
* Including the entire article in the summary. Seriously? Like WTF.
* Half-assed dupes. How the hell do you get THREE dupes in the SAME day???
> 'm getting way too old for /.
Me and me both buddy. Now get off my LAN. /s =P
Re: (Score:2)
Because if we wrote "Woman" in the title we'd be objectively wrong. Stop being such a triggered snowflake every time you see a gendered term. There's nothing important about it, you are just trying to make it important.
Go back to tumblr.
Re: (Score:2)
Re: (Score:2)
You quite clearly are not a copywriter either. Of course people read what you wrote as a comment on gender, what you should have written was:
"Why on earth is it important that this was done by a human?"
or
"Why on earth is it important that this was done?"
Or something along those lines.
As an aside, I don't think this was very challenging or important at all. He wrote the simplest of games and had it display on a tiny "window" (the sprite) 24x21 pixels in size. That's all.
It's odd, and useless. I'm sure he had
C64 Sprites cost me a fortune :-) (Score:2)
During the summer of 1982, I had written a game in assembler for the Commodore VIC called "Intruder Scramble". It was a much simplified clone of an Arcade game named Scramble. The idea was suggested perhaps jokingly by my college roommate while we were playing Scramble in the SUNY Stony Brook Union Basement Arcade with something like "Hey Fern, you know computers, why don't you write one of these?" But also afterwards at the start of the summer I saw another young guy later who had written and sold his own
LoL (Score:2)
No idea why none of the folks in the "group" back then didn't think of it, but it would be relatively easy to do.
The commodore 64 had nicer sprites, and more of them, but the atari 800 had a different type of sprites that might be easier to do that with, and could easily be full screen sized without pixelating any more than you wanted if you don't exceed the resolution capability of it.
The differences in sprites between the two was bigger than it might seem, but both had definite advantages
Re: (Score:2)
Re: (Score:2)
You never watch a movie or make a walk, just for fun?
Re: (Score:2)
Re: (Score:2)
I see your point, and I also find making other people happy important, but I need me-time as well. I love reading the paper in the morning, and playing adventure games. Some people need more me-time than others.
Re: (Score:2)
Re: (Score:2)
But seriously, happiness is where one finds it. If "happy" for him is exploring a coding exercise, learning something, rising to a challenge to accept the sense of accomplishment after a job well done and engaging/showing others (who then go on to discuss it on Slashdot), then why not?
Re: (Score:2)
Re: (Score:2)
Dump her and write "Pong", man!
That statement is ironic at so many levels that if it wasn't kind of painful, I would be laughing my ass out right now.
Ouch. Relationships are often difficult; I wish you luck in yours.
Re: (Score:2)
In the ball (Score:2)
Now he just has to find a way to get the ball to show Pong as well.
Re: (Score:2)
Bullshit (Score:2)
The guy doesn't do what the article states.
First claim is he makes pong in basic.
The 'BASIC' code he wrote was full of assembly-like routines and calls. It has very little to do with actual BASIC and BASIC is basically used as a framework for calling faster things. You could maybe argue that this is how you do BASIC on a C64, but it is not a clean BASIC program. It's an exercise in circumventing BASIC.
The second claim is that he made PONG entirely inside a sprite.
But the code actually runs on the CPU. The s
A now inside a single PETSCII Character :) (Score:1)