flat assembler
Message board for the users of flat assembler.

Index > Tutorials and Examples > Hobby BASIC, a simple yet powerful BASIC interpreter

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author
Thread Post new topic Reply to topic
386



Joined: 11 Nov 2023
Posts: 28
Location: Ukraine (Ruthenia)
386 15 Nov 2023, 23:10
Quote:
1 mb of memory ... More than enough for a simple toy interpreter.
Absolutely agree! 1 MB (or even 640k) ought to be enough for anybody! Smile

Anyway the users like to decide. So 1 MB could be default, but users would be able to choose.

I think, this would be super!


Last edited by 386 on 15 Nov 2023, 23:13; edited 2 times in total
Post 15 Nov 2023, 23:10
View user's profile Send private message Reply with quote
386



Joined: 11 Nov 2023
Posts: 28
Location: Ukraine (Ruthenia)
386 15 Nov 2023, 23:11
Picnic wrote:
It's easy to implement, i'll think about that. Thanks again for your feedback 386. Quite useful !
Your welcome, Picnic! Smile
Post 15 Nov 2023, 23:11
View user's profile Send private message Reply with quote
386



Joined: 11 Nov 2023
Posts: 28
Location: Ukraine (Ruthenia)
386 16 Nov 2023, 18:26
I think, some directive like MEM or MEMORY to define amount of memory in kilobytes should be fine.
Code:
MEM 640    
Code:
MEMORY 640    
Smile
Post 16 Nov 2023, 18:26
View user's profile Send private message Reply with quote
Carlopiza



Joined: 29 Jun 2007
Posts: 2
Carlopiza 24 Apr 2024, 13:27
Hi; Nice project; Are sources available for the interpreter?

Greets
Carlopiza
Post 24 Apr 2024, 13:27
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 25 Apr 2024, 19:22
Hi Carlopiza, thanks for the interest. It's still, a closed source project, unfortunately.

_________________
Hobby BASIC Interpreter
Post 25 Apr 2024, 19:22
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 25 Jul 2024, 08:19
Post removed by author.

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 27 Apr 2026, 10:05; edited 10 times in total
Post 25 Jul 2024, 08:19
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 12 Oct 2024, 16:09
Post removed by author.

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 27 Apr 2026, 10:06; edited 5 times in total
Post 12 Oct 2024, 16:09
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 10 Nov 2024, 13:22
Post removed by author.

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 27 Apr 2026, 10:06; edited 6 times in total
Post 10 Nov 2024, 13:22
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 24 Nov 2024, 22:12
Hello everyone,

New console-based puzzle games have been added to the Hobby BASIC folder.

🔹 Mandy Crush is a match-3 puzzle game with a character that swaps places with the items. Original concept by Aaron Steed (Mandy Crush)
🔹 John eats Cake is a short puzzle game about moving boxes and eating cake. Original concept by orsonhart (John eats Cake)
🔹 Flow is a puzzle where you have to guide the water to the target field. Original concept by flummox3d (Flow)
🔹 Pullkoban is a small Sokoban type puzzle. Original concept by Ian Spadin (Pullkoban)
🔹 Heartstone is an engaging block-pushing puzzle set within the depths of a dungeon. Original concept by Lunes (Puzzle Castrum)


Hobby BASIC screenshots (Windows 10 console).

Image Image Image Image Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 01 Jul 2026, 22:25; edited 7 times in total
Post 24 Nov 2024, 22:12
View user's profile Send private message Visit poster's website Reply with quote
MatQuasar3



Joined: 04 Nov 2024
Posts: 44
MatQuasar3 06 Dec 2024, 09:37
I saw your animated GIF of HeartStone.bas, looks interesting.

Your mirror link can be used to download HB.zip without issue.


Description: I was stuck here, still figuring out.
Filesize: 23.83 KB
Viewed: 11738 Time(s)

Capture.PNG


Description:
Filesize: 8.78 KB
Viewed: 11738 Time(s)

Capture.PNG


Post 06 Dec 2024, 09:37
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 06 Dec 2024, 09:43
Hi MatQuasar3,

Thank you for the feedback and the screenshots.

Tip for Room 3:
The red boxes should be pulled (not pushed).
If you stand next to it and move in the opposite direction it will follow you.

_________________
Hobby BASIC Interpreter
Post 06 Dec 2024, 09:43
View user's profile Send private message Visit poster's website Reply with quote
MatQuasar3



Joined: 04 Nov 2024
Posts: 44
MatQuasar3 06 Dec 2024, 10:00
Picnic wrote:
Tip for Room 3:
The red boxes should be pulled (not pushed).
If you stand next to it and move in the opposite direction it will follow you.


Yes!!
EDIT: Have to pull more than one time, or else the player trapped inside.
Post 06 Dec 2024, 10:00
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 06 Dec 2024, 10:49
Of course, you have to calculate and create spaces. Things get more difficult (and tighter) later. Press key 4 to undo a move. Razz

_________________
Hobby BASIC Interpreter
Post 06 Dec 2024, 10:49
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 16 Dec 2024, 23:22
Hello everyone,

New console-based puzzle games have been added to the Hobby BASIC folder.

🔹 Gravibox is a challenging puzzle game where you push "gravity" blocks. Original concept by Orcenhaze (Gravicrate)
🔹 Kaima is an arcade-style puzzle game. Original concept by Alex Huang (Kaima Bad Ending Gaiden)
🔹 Pushpull is a Sokoban-inspired game featuring 15 challenging push-pull levels. Original concept by increpare (15 push pull levels)
🔹 Magnets is a fast-paced arcade puzzle game featuring 5 distinct worlds and 51 rooms to explore. Original concept by pxlforge (Magnets)
🔹 2DWorld is a small prototype that demonstrates random procedural world generation.


Hobby BASIC screenshots (Windows 10 console).

Image Image Image Image Image


📝 Notes on The Games

The WIN10 folder contains a curated selection of puzzle games inspired by or remakes of PuzzleScript titles.
I am currently adapting these clever, short games into Hobby BASIC to build a compact gaming library.
Please note that I do not work with PuzzleScript; all Hobby BASIC ports are written entirely from scratch.
The intellectual property and original ideas belong strictly to their respective developers.
I strive to maintain the highest quality standards, ensuring these adaptations fully respect the original creations.

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 01 Jul 2026, 22:29; edited 8 times in total
Post 16 Dec 2024, 23:22
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 14 Feb 2025, 15:57
Hello everyone,

New console-based puzzle games have been added to the Hobby BASIC folder.

🔹 In Blocktrix, the player must create a path between the starting (yellow) block and the finishing (white) block. Original concept by CHCH (Blockon)
🔹 Icy Blocks is a fun puzzle game where you push boxes, seal holes, and reach the goal! Original concept by Tyler Glaiel (IceCrates)
🔹 In Crystal, all blocks of the same color are lined up next to each other. Original concept by Riza Purwo Nugroho (Eliminator in Java)
🔹 QUIX is an original Hobby BASIC game.


Hobby BASIC screenshots (Windows 10 console).

Image


📝 Notes on The Games

Since the beginning of 2025, efforts have been underway to improve some of the newer examples in Hobby BASIC.
Going forward, the goal is to ensure that new code is not only more readable but also better aligned with the capabilities of the interpreter.


I've decided to showcase some of the small puzzle games I've written using Hobby BASIC and add them to my previous posts in this thread,
taking advantage of the fact that the forum allows you to edit your posts. I realize that this might not be the ideal approach, as it creates a
discontinuity in the conversation and makes it seem like other members' posts haven't been replied to or might have been ignored by me,
which is definitely not the case. However, I preferred to update my existing posts rather than creating new ones frequently,
so I could present the puzzles more efficiently.

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 01 Jul 2026, 22:31; edited 7 times in total
Post 14 Feb 2025, 15:57
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 10 Apr 2025, 10:34
Good day, everyone.

New console-based puzzle games have been added to the Hobby BASIC folder.

🔹 In Lines, you need to cross all the lines and then return to the starting point. Original concept by Frpzzd (Some lines were meant to be crossed)
🔹 In Bitcoin Miner, you must dig your way through the landfill and collect the bitcoins. Original concept by Roman Werner (Bitcoin Miner C64)


Hobby BASIC screenshots (Windows 10 console).

Image

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 01 Jul 2026, 22:32; edited 8 times in total
Post 10 Apr 2025, 10:34
View user's profile Send private message Visit poster's website Reply with quote
pabloreda



Joined: 24 Jan 2007
Posts: 122
Location: Argentina
pabloreda 10 Apr 2025, 18:39
beautiful low-resolution designs !!
Post 10 Apr 2025, 18:39
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 11 Apr 2025, 14:14
pabloreda wrote:
beautiful low-resolution designs !!

All designed in DRAW, the design program written in Hobby BASIC. Smile

_________________
Hobby BASIC Interpreter
Post 11 Apr 2025, 14:14
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1468
Location: Piraeus, Greece
Picnic 15 Jun 2025, 19:27
In the upcoming Hobby BASIC release I’ve a implemented a lightweight FPU string math library (no more manual conversions).

Here’s a little teaser: a rainbow‑coloured sine‑wave demo (SINWAVE.BAS) that uses only FSIN, FMUL, FADD, FROUND etc. on string operands to draw a smooth, animated wave in ASCII.

Stay tuned for the full set of routines.

Code:

    !  SINWAVE.BAS
    !  Hobby BASIC Interpreter
    !  Part of the Hobby BASIC examples collection.

    view 7
    cursor 0

    cols = 80
    rows = 60
    screen cols, rows, 0
    cls

    amp$ = FROUND(FDIV(rows, "3"), "NEAREST")
    midline$ = FROUND(FDIV(rows, "2"), "INT")
    scale$ = "0.2"

    for t = 0 to 200
        redraw 0, 0, cols, rows, "*", " "
        for x = 0 to cols - 1
            phase$ = FADD(x, t)
            angle$ = FMUL(phase$, scale$)
            y$ = FMUL(FSIN(angle$), amp$)
            y$ = FROUND(y$, "NEAREST")
            y$ = FADD(y$, midline$)
            y = VAL(y$)
            pen 8 + (x mod 7)
            print at x, y, "*"
        next
        wait 1
    next

    cls : end

    


Windows 11 Console Screenshot.

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 26 Apr 2026, 15:21; edited 2 times in total
Post 15 Jun 2025, 19:27
View user's profile Send private message Visit poster's website Reply with quote
dosmancer



Joined: 20 Feb 2025
Posts: 38
Location: Kingdom of Sweden
dosmancer 15 Jun 2025, 19:52
Sadly does no seem to run in Wine on Linux?

Looks pretty nice and creative!
Post 15 Jun 2025, 19:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.