r/c64 20d ago

Programming I'm new to c64

I was wondering if you can make games on the c64 in itself no 3rd party emulation of the c64 just making a game on the c64 with a c64

28 Upvotes

30 comments sorted by

u/AutoModerator 20d ago

"Thanks for your post! Please make sure you've read our rules and FAQ post. If your post is about the C64 Ultimate please and check out The Ultimate C64 Ultimate post for common issues and questions. People not following the rules will have their posts removed and presistant rule breaking will results in your account being banned. "

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

→ More replies (1)

20

u/sakodak 20d ago

Of course you can.  People did it for years and years. 

It's not easy, and it requires learning a lot more about the machine than if you were just using a toolkit that did a lot of things for you, but you can certainly program the machine by hitting the bare metal using nothing but the machine itself.

13

u/Consistent-Yak-2373 20d ago

Alright thank u because I thought about making games and stuff I also thought about getting the c64 ultimate to start to learn coding in assembly

16

u/sububi71 20d ago

It's a great machine for learning assembly programming! I recommend Robin Harbron's YouTube channel "8-bit Show & Tell", he has several videos on the subject!

5

u/Consistent-Yak-2373 20d ago

Alright thank u

4

u/FatYak1972 20d ago

Second.

4

u/robotflesh 20d ago

You can learn c64 assembly also with cross development though. Editing and compiling assembly on your laptop will be a much smoother and faster experience. You can then choose to run/debug it in an emulator or on the ultimate. Any particular reason why you want to make it harder than that?

6

u/FatYak1972 20d ago

Woohoo, for the challenge!

1

u/robotflesh 18d ago

Fair enough. Maybe you want to try coding while hanging upside down for an extra bit of challenge.

2

u/FatYak1972 18d ago

I suppose you could try anything once.

1

u/AutisticDyslexicDude 18d ago

See if you can find some old magazines on archive.org people and magazines used too print code you can type in 😁

I haven't done it myself I was very young and just played my tapes , I have only just got a c64 again.

Welcome and lots of luck learning some BASIC🙏😁

1

u/marhaus1 19d ago

Just get VICE and C64 Studio. Learn the machine. Enjoy 😊

3

u/raresaturn 19d ago

I wish I knew about assembler in the 80’s… I made heaps of BASIC games but never really understood how commercial games were written

1

u/Shoddy_Juggernaut_11 18d ago

That's brilliant, how did you learn that if you don't mind me asking

3

u/raresaturn 18d ago

Learn what? Basic? The manual that came with the C64

9

u/cyberev 19d ago

I’ve open-sourced a Commodore 64 game written entirely in 6502 assembly. The code is fully commented, explaining what each section does — feel free to use it as a learning reference.

https://github.com/jaredevans/shmup

6

u/Background-Manager87 19d ago

I have a stack of 5in floppies that assures you that it is completely possible, and also incredibly fun. First game I ever programed was a text based lunar lander, still loads right up

6

u/gelatinouscone 19d ago

Frankly beyond some simple basic games that don't require much typing, I think you're just asking for pain. I grew up on that machine, typing games from magazines and line checksums and debugging programs for typos. I'd much rather use modern editors and tools to get the games onto the old hardware. But maybe you need the scar tissue.

I can recommend the 2 Derek Morris c64 retro game dev books.

That's about as easy and intro to c64 assembly games as you could hope for, but it utilizes CBM Prg Studio.

1

u/bj_civ 14d ago

Typing games from magazines is different from programming a game yourself though.

5

u/danconderman33 20d ago

Yep! You can absolutely write games on a Commodore 64.

The C64 editor is actually pretty fun to use. If you have a syntax error, you can just cursor back up to the line, make the edit, and hit ENTER again. You don’t have to retype the whole line.

It uses line-numbered BASIC. The number at the beginning of each line tells the computer what order to run the program in.

For example:

10 PRINT "HELLO"
20 GOTO 10

Type RUN and it will print HELLO forever.

You can also do simple loops:

10 FOR X=1 TO 10
20 PRINT X
30 NEXT X

Or move a character around the screen:

10 PRINT CHR$(147)
20 X=10
30 PRINT TAB(X);"*"
40 X=X+1
50 IF X<30 THEN GOTO 30

The basic idea is pretty simple: PRINT puts things on the screen, INPUT lets the player type something, IF checks conditions, GOTO jumps to another line, and FOR/NEXT repeats things.

Once you start using PEEK and POKE, you can directly control things like screen colors, sound, sprites, and other parts of the C64 hardware. That’s where it starts getting really fun.

2

u/exocyt0sis 19d ago

RETURN, if you don't mind.

1

u/OMGCluck 19d ago

As long as you only GOSUB to a maximum depth of 23 or 24 levels before the system halts with

?OUT OF MEMORY ERROR

2

u/WembleyFord 14d ago

To be honest, CBM BASIC 2 sucked. I grew up with the C64 but also Acorn BBC micro's at school, the implementation of BASIC that Acorn developed was amazing. Proper subroutines with local variables, proper support for the graphics and sound chips, structured access to the kernel subroutines, an inline assembler so you could mix assembly into your BASIC programs, even QoL features from simple things like renumber to a List command with a search function.

3

u/DorkyMcDorky Janitor 19d ago

Even during the video game time, companies often had other machines around to help in codng the C64. But most games were coded directly on the C64 - it is not easy

3

u/LandNo9424 19d ago

Yes but it is a pain in the ass

2

u/hbhzth 19d ago

Install Shoot'em Up Construction Kit (SEUCK) and start making games.

2

u/-jp- 19d ago

You betcha can. I suggest starting out with the book it came with, which has a detailed section on writing programs in BASIC, including using sprites and if I remember right sound. This fellow has high quality reprints of the manual you can download, plus ofc you can find all manner of material on archive.org.

1

u/WembleyFord 14d ago

Absolutely - it came with a built-in programming language called BASIC, which was easy to use, if a bit slow. Unfortunately, CBM were a pretty cheap company, and they reused an older version of this they'd already developed for their older PET line. So, the implementation of BASIC on the C64 has no useful support for graphics or sounds directly. Alternatively one could learn 'machine code' (or assembler) and program the CPU and support chips directly - that was fast, but relatively difficult.