10x Faster Than C64 BASIC? Hare Basic

preview_player
Показать описание
Hare Basic is a fast, limited instruction set, integer-only basic interpreter (not a compiler) for Commodore 64 and VIC 20, created by Aleksi Eeben and released for free download in May 2024. There's an excellent handbook included, and the distribution disk includes many excellent example programs. I had a lot of fun developing a little game prototype with Hare Basic and found that it was surprisingly fast and easy to use. Join me as I show you what I've learned about the language, as we walk through the code of some of the included example programs, and the small game I wrote with it.

Downloads here:

To support 8-Bit Show And Tell:

Index:
0:00 Playing Descending Doom game prototype
3:20 Hare Basic - a faster BASIC
8:07 BALLOONS demo
15:16 FILLSPEED demo
19:16 RASTER demo
21:31 TIPS: various code snippets
24:28 Descending Doom walkthrough:setup
29:37 Move spaceship
34:31 Move/detect bullet/fire
37:00 Descend the Doom
41:56 Title Screen / Game Won / Lost
43:46 Some final thoughts & info
46:05 Thanks to my patrons!
Рекомендации по теме
Комментарии
Автор

Optimizing the level generator, lines 120-140:

Use bit 7 of RND instead of bit 0 to remove the need for multiplication, and use variables instead of literals:

120 e=128:d=32:fori=1024to1823:rnd:a=aande:a=a+d:pokei, a:next
130
140
=> 53 jiffies, 2.4x faster than original

Or use bits 15 and 7 of RND, variables instead of literals, and finally do GO6 (16-bit poke) to poke two pieces of 'doom' at once:

120
130
140
=> 29 jiffies, 4.4x faster :)

Thanks for the coverage, Robin! These shows are always great fun to watch :)

AleksiEeben
Автор

I love that Hare BASIC coexists so nicely with C64 basic, seems like it is almost being a library of sorts

MurderMostFowl
Автор

You made a fully functioning game just to "test out Hare BASIC". Gotta admire that as well. Can't wait to try it out at the first opportunity I get.

mikegarland
Автор

Oh - that's *cool* - I keep banging on about how amazing the BBC Basic is because it has a built-in inline assembler. Never even considered you could have a BASIC interpreter with another hi-performance basic interpreter built-in. Very, very cool idea.

DaveF.
Автор

I've been following an excellent 6502 tutorial on board-b's channel and it's given me some confidence to starting watching your wonderful channel again. I'm usually completely lost when I watch your videos but I have a morsel of confidence now so here I am again.

rodoherty
Автор

Nothing wrong with liking your own game. I think it's a testament to how fun it is that you do like it. Don't know how many times I would play Space Invaders back in the day and just spend a lot of time at the start just whittling away at those blocks near the bottom. Used to drive my brother crazy.. "Why are you doing that??!! Shoot the aliens!" Now I have a whole game dedicated to that!! Thanks.

mikegarland
Автор

So basically, it has the same limitations as one of those popular micro-compilers from back in the days but replaces the compilation with an interpreter. Interesting approach.

EgonOlsen
Автор

The documentation really captures the retro feel - it just needs to be photocopied a few times to really get that look heh.

hammondeggsmusic
Автор

Nice to see that BASIC, and it's concept, isn't dead. I thought from the name, that you had actually found something useful from the Haresoft company of back in the day. Glad I didn't miss out on it then.

penfold
Автор

Hare Basic looks pretty interesting and definitely fast for basic. I was kind of hoping to see “10 Print” make an appearance. 😀

Your game prototype looks fun. I tend to like those “falling things create pressure” kind of games. At least up until they are way too fast to play.

andrewgillham
Автор

What a neat idea - the concept reminds me somewhat of "RISC" versus "CISC" - we now have a kind of "RISBAS", if you see what I mean. I especially like the way it "dovetails" with conventional C64 Basic. I'm definitely going to investigate ...

martsmiscmix
Автор

"If you don't think it's fun, that's fine. Go do something else!"
And here I was believing the answer to life the universe and everything was 42.

TheSimTetuChannel
Автор

Really amazing project! It reignites my desire to tinker around in basic again. Thank you for the quick rundown of features and demos. Descending Doom seems like a really cool base to flesh out a wonderful addition to C64 shareware and a great example of Hare Basic's capabilities.

project
Автор

They fact that you can mix Hare Basic and regular basic is awesome. The no white space thing is much less so.

Gooberslot
Автор

You should have called your game "DoomScrolling"

johntrevy
Автор

Whenever I see a new 8-Bit Show and Tell video appear it makes me feel happy!

chromosundrift
Автор

"It's Tetris - but with a military touch" - The New York Times

stefankrause
Автор

I'd really like to see a Hare Basic version of Centipede. If no sprites were used, your game makes it seem easier than I would have thought.

donnierussellii
Автор

I always thought that there were significant inefficiencies in the stock BASIC interpreter. This vindicates my opinion. Thank you for sharing this and thanks @AleksiEeben for making such an amazing interpreter.

jandjrandr
Автор

Reminds me of "back in the day" when I hacked up "quick print" routines from the original basic ML routines, though this is obviously a full-features product rather than hacking. Even that made a massive improvement (mostly as I had no error checking at all and different calls for integer and string). Yet another opportunity to be famous wasted (lol). Well done to Aleski and thankyou for sharing this with us. I'll have to check it out.

db