flat assembler
Message board for the users of flat assembler.

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

Goto page 1, 2, 3, 4, 5  Next
Author
Thread Post new topic Reply to topic
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 05 May 2013, 21:16
Image

Hobby BASIC, a simple but surprisingly capable BASIC interpreter, developed in 32-bit x86 assembly.

-Features a BASIC-like syntax with a collection of specialized commands and functions.
-Fully supports both keyboard and mouse input in the console.
-Effortlessly handles ANSI-encoded graphics.
-Includes a compact set of UDP networking functions.
-Generates standalone pseudo-executables.
-Compatible with Windows XP, 7, 10, and 11 (see General Notes below).
-Includes examples such as Draw, a tool for creating and editing ANSI art, fully written in Hobby BASIC.
-Launched in 2015, the Hobby BASIC interpreter has been continuously evolving.

My goal has always been to create a simple, user-friendly language
designed for game development within the Windows console—and I believe it's progressing quite well!

Hobby BASIC is a small, unsigned executable.
Some antivirus tools might falsely flag it as a virus due to its size and lack of a digital signature.
Rest assured, it is 100% safe.

Version 2.1.3, March 2025

Download

Mirror Download Link


A Hobby BASIC demo running in the Windows 10 console.

Image





How to run the examples

To run the examples, simply double-click HB.EXE and choose an example from the EXAMPLES folder.

Image




Alternatively, open CMD.EXE in the HB folder.
To run the TV.BAS example, enter the following command:
Code:

    HB EXAMPLES/TV.BAS
    

Image





How to create the standalone TV.EXE

To create the standalone TV.EXE, enter the following command in the command-line:
Code:

    HB EXAMPLES/TV.BAS -bind TV.EXE
    

A standalone application will be assembled.
The bind command generates only the executable.
Any external files and folders required by the program should be included alongside it.

Image




General Notes for Windows 10 and 11

The interpreter was initially developed for Windows XP, then continued on Windows 7, but is now being developed in a Windows 10 environment.
Some of the examples still run on Windows XP (and, of course, on Windows 7), but Hobby BASIC now focuses on Windows 10 and 11.

For the examples to function properly:
Enable the "Use Legacy Console" option in Windows 10 and 11.
Right-click on the application title bar and select the "Properties" menu option.
Restart the console.




Important Notes for Windows 11 Users

In Windows 11, you need to revert to the legacy command prompt.
To do so, change the default terminal app to Windows Console Host instead of Windows Terminal.
After applying the changes, restart the console and enable the legacy option.

Image




Showcase

A selection of games created with Hobby BASIC, featuring Windows 10 console screenshots and ANSI graphics.

Image


Description: Hobby BASIC, a simple but surprisingly capable BASIC interpreter, developed in 32-bit x86 assembly.
Download
Filename: HB.zip
Filesize: 497.5 KB
Downloaded: 4357 Time(s)



Last edited by Picnic on 13 Mar 2025, 12:51; edited 399 times in total
Post 05 May 2013, 21:16
View user's profile Send private message Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1692
Location: Toronto, Canada
AsmGuru62 05 May 2013, 22:15
Great stuff!
Things like that motivate beginners to start programming.
Post 05 May 2013, 22:15
View user's profile Send private message Send e-mail Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 05 May 2013, 22:28
I suppose that the author's sentiment to QuickBasic was the main inspiration for this project. Nice thing. Smile
Post 05 May 2013, 22:28
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 07 May 2013, 04:31
Nice. This prompts me to make a CLI graphics library. Looks pretty neat.
Post 07 May 2013, 04:31
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 07 May 2013, 10:10
Bindi is a small puzzle game written in Hobby BASIC.

In the game, your goal is to place the orange heroes in the marked positions.
You control the blue hero, who can push the orange heroes in the classic way.

However, you have an additional ability:
By pressing the Spacebar, the orange heroes "bind" with the blue hero, changing color and becoming blue.
From that moment on, they all move as a single entity, making it easier to complete your objective.

The game is controlled via the keyboard, includes sound effects, and features an undo function, just like the previous games in the series.

The game's source code can be found in the folder: EXAMPLES\GAMES\WIN10\BINDI.BAS.

Windows 10 console screenshot.

Image


Last edited by Picnic on 03 Mar 2025, 21:49; edited 33 times in total
Post 07 May 2013, 10:10
View user's profile Send private message Visit poster's website Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 843
Location: Jakarta, Indonesia
TmX 07 May 2013, 15:45
This is very nice.
Reminiscent of DOS apps.

Mouse handling would be a nice addition, I think Wink
Post 07 May 2013, 15:45
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1178
Location: Unknown
HaHaAnonymous 07 May 2013, 20:58
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:54; edited 1 time in total
Post 07 May 2013, 20:58
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 07 May 2013, 23:30
Picnic wrote:
I am glad you like it, i had some concern whether it can be served as helpful example despite the lack of comments in source.


If it can be understood then no worries.

Besides not all examples are aimed at beginners.
Post 07 May 2013, 23:30
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 18 Aug 2013, 22:52
Blocktrix is a small puzzle game written in Hobby BASIC.

Your goal in this game is to create a path between the starting (yellow) block and the final (white) block.
There are various blocks, each with its own mechanism, as well as a limited number of allowed moves for each puzzle.

The game is controlled using the keyboard arrow keys.

The game's source code can be found in the folder: EXAMPLES\GAMES\WIN10\BLOCKTRIX.BAS.

Windows 10 console screenshot.

Image


Last edited by Picnic on 03 Mar 2025, 21:49; edited 60 times in total
Post 18 Aug 2013, 22:52
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 15 Dec 2013, 01:37
Boxxy is a small puzzle game written in Hobby BASIC.

It is a push-pull type game with a unique mechanic:
The player can push boxes up or down and pull them left or right.

The game is controlled via the keyboard, includes sound effects, and features an undo function, just like the previous games in the series.

The game's source code can be found in the folder: EXAMPLES\GAMES\WIN10\BOXXY.BAS.

Windows 10 console screenshot.

Image


Last edited by Picnic on 03 Mar 2025, 21:50; edited 49 times in total
Post 15 Dec 2013, 01:37
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 15 Dec 2013, 05:58
I get this when I run MOUSE

Image
Post 15 Dec 2013, 05:58
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 15 Dec 2013, 10:10
John Eats Cake is a short puzzle game about moving boxes and eating cake.

It is a push-pull Sokoban game, meaning you can both push and pull boxes, switching modes with the Spacebar.

The game features:

7 rooms.
Keyboard controls.
Undo move function.
Sound effects.

The game's source code can be found in the folder: EXAMPLES\GAMES\WIN10\CAKE.BAS.

Windows 10 console screenshot.

Image


Last edited by Picnic on 03 Mar 2025, 21:54; edited 6 times in total
Post 15 Dec 2013, 10:10
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 15 Dec 2013, 14:27
Windows 7 64 bit. Actually all the programs except the binary and the the color ones. And why it says print I don't know
Post 15 Dec 2013, 14:27
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 15 Dec 2013, 17:28
Mandy Crush is a small puzzle game written in Hobby BASIC.

In Mandy Crush, you control a character who swaps places with objects.
Your goal is to create horizontal or vertical matches of three or more identical objects.

The puzzle features 16 rooms with increasing difficulty.
It is a remake of a PuzzleScript game.

The game's source code can be found in the folder: EXAMPLES\GAMES\WIN10\CRUSH.BAS.

Windows 10 console screenshot.

Image


Last edited by Picnic on 03 Mar 2025, 21:55; edited 6 times in total
Post 15 Dec 2013, 17:28
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 15 Dec 2013, 17:34
I see. It's a version difference thing.
Post 15 Dec 2013, 17:34
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 18 Dec 2013, 21:33
Icy Blocks is a fun puzzle game where you must push crates and seal water holes to reach your goal.

The game features:

Smooth movement.
Animation frames for the hero.
Tileset background in the Windows 10 console.
ANSI graphics, designed using DRAW, like all Hobby BASIC projects.

The game is controlled using the keyboard arrow keys.

The game's source code can be found in the folder: EXAMPLES\GAMES\WIN10\ICYBLOCKS.BAS.

Windows 10 console screenshot.

Image


Last edited by Picnic on 03 Mar 2025, 21:56; edited 6 times in total
Post 18 Dec 2013, 21:33
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 18 Dec 2013, 22:53
They work now Very Happy. Care to share what was causing it to say that?
Post 18 Dec 2013, 22:53
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 19 Dec 2013, 21:09
Gravibox is a small puzzle game written in Hobby BASIC.

In the game, you will encounter classic boxes that need to be placed in the correct positions, as well as "gravitational" boxes that move in four directions.

These boxes, once they find free space, continue moving endlessly, adding an extra challenge to the puzzles.

The game's source code can be found in the folder: EXAMPLES\GAMES\WIN10\GRAVIBOX.BAS.

Windows 10 console screenshot.

Image


Last edited by Picnic on 03 Mar 2025, 21:58; edited 4 times in total
Post 19 Dec 2013, 21:09
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 20 Dec 2013, 01:13
Picnic wrote:
Nice to hear!
Sure, it seems that an improper call to SetConsoleOutputCP function crush the program. By the way, i installed Windows 7.


Hmm. Nice, what Win7 version?
Post 20 Dec 2013, 01:13
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1404
Location: Piraeus, Greece
Picnic 20 Dec 2013, 20:37
Flood is a small puzzle game written in Hobby BASIC.

To play Flood, click on any square with your mouse.

The top-left corner and all squares connected to it will fill with the color of the square you clicked on.
Clicking on a square that is the same color as the top-left corner will have no effect and therefore doesn't count as a move.

It's not the Same Game; it has a completely different gameplay mechanism.
Each level has a specific number of allowed moves.

The program can be found in the folder: EXAMPLES\GAMES\WIN10\FLOOD.BAS.

Windows 10 console screenshot.

Image


Last edited by Picnic on 03 Mar 2025, 21:59; edited 42 times in total
Post 20 Dec 2013, 20:37
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 1, 2, 3, 4, 5  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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.