Back to Browse

C64 BASIC Bouncing Pixel Inside Bouncing Sprite Optimization Challenge

19.5K views
Feb 21, 2025
50:33

We've optimized the C64 BASIC bouncing ball program before, but how about optimizing a bouncing pixel ball within a sprite frame that also bounces around the screen? That's TWO things happening at once. Thanks to Eyvind for this challenge! Check out Eyvind's github for more C64 code: https://github.com/eyvindebsen CBM .prg Studio: https://www.ajordison.co.uk/ Previous episodes mentioned: "One-Line Bouncing Ball: Commodore 64 BASIC" https://youtu.be/jhQgHW2VI0o "38911 Bytes Free? Commodore 64's BASIC RAM" https://youtu.be/WZQ1FMWnG9w 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 Index: 0:00 A Facebook C64 BASIC challenge 1:24 Measuring code size, general thoughts 5:05 About optimizing for program size 7:17 Robin's V0: Line 10: the magic FN 15:17 Lines 20-30: Initializing the sprite 18:37 Lines 40-50: Main loop moving sprites 23:30 Robin's V1: Four logical lines 27:20 Line 1: V=53269, and how less lines saves memory 30:15 Line 2: Creating the sprite 34:05 Lines 3-4: The main loop 36:42 Eyvind's Final version 45:19 A few more bytes saved in both our programs 47:32 Thanks to Eyvind and my patrons!

Download

1 formats

Video Formats

360pmp4116.3 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

C64 BASIC Bouncing Pixel Inside Bouncing Sprite Optimization Challenge | NatokHD