Today we look at how I went about optimizing the BASIC code written way back in 1979 by Hiroshi Suzuki in Japan for his ground-breaking Commodore PET 2001 game called Manbiki Shounen, aka Shoplifting Boy. We'll go step by step through all the changes from the original, and learn quite a bit about how the gameplay was implemented in this possibly first-ever stealth video game. After going through the code, we'll quickly adapt the code to run on a Commodore 64 and take advantage of the Faster 64 variable profiler to add an extra layer of optimizing.
Previous Manbiki Shounen video: https://youtu.be/reuCZf2Yhfk
Closing song: "Bit Pair" by Bedford Level Experiment: https://youtu.be/Appmg64tZB0
To support 8-Bit Show And Tell:
Become a patron: https://patreon.com/8BitShowAndTell
One-time donation: https://paypal.me/8BitShowAndTell
2nd channel: https://youtube.com/channel/UCAgWzEh5c8391eJnELDy9OA
Download the original game and my optimized versions on .d64 here:
https://www.dropbox.com/scl/fi/mwj0ehxp3z88faef6bcb7/manbikim.d64?rlkey=pt34v8dnd680gbevqceznq5si&dl=0
https://8bitshowandtell.com/downloads/manbikim.d64
If the Youtube redirect stuff is munging it, try copying and pasting:
8bitshowandtell.com/downloads/manbikim.d64
Index:
0:00 Last time: Manbiki Syonen
2:09 This time: optimizing
4:22 10 DIM: initializing variables in order
6:24 2000-2050: Why there are two 2030s
12:22 3000-3020: Beginning of main game loop
18:14 3010-3080: Player movement
21:04 3010: Optimizing this line
28:51 3090-3120: Player animation
31:57 3120-3170: Shoplifting
36:01 4000-4050: Warden movement
38:14 4050-4090: Warden animation
43:00 4095-5045: Warden's shoplifter detection
44:46 20000-20050: Game won, fixing my bug
49:11 C64: Profiling Manbiki Shonen with Faster 64
54:13 Making our DIM from the output
1:00:35 Thanks!