Craft Basic [programming interpreter]

If you are currently developing portable freeware or planning to do so, use this forum to discuss technical implementation, seek out like-minded developers for partnership, or solicit interested users for beta testing.
Message
Author
basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Craft Basic [programming interpreter]

#1 Post by basicgames »

Craft Basic is a BASIC interpreter for Windows 95 and up.

Tested on 95, XP, 10, and 11.

* learn programming
* make simple games
* write code interactively
* perform complex calculations
* display cool graphics
* build windows with forms
* write useful scripts
* and more...

Homepage: https://www.lucidapogee.com/
Documentation: https://www.lucidapogee.com/craftbasic/ ... chelp.html
Rosetta Code: https://rosettacode.org/wiki/Category:Craft_Basic
Collection Database:https://www.portablefreeware.com/?id=3088

Portability info:

The project is freeware and open source. (source included with the download)
The zipped download is 259kb and includes the interpreter, documentation, and over 80 examples.
The unzipped IDE/interpreter exe is 274kb. (it's been growing as I add features)
Exe doesn't write anything to system registry. (just uses Windows api)
Exe will run on it's own without any of the includes files.
The IDE automatically regenerates it's help file in the same directory. (this is the only file it creates)

Screenshots:
attractivenumbers.png
15puzzle.png
15puzzle.png (4.02 KiB) Viewed 5053 times
snake.png
snake.png (5.66 KiB) Viewed 5053 times
sieveoferatosthenes.png
nonogram.png
barnsleyfern.png
darkwoodsadventure.png
alienblaster.png
alienblaster.png (6.53 KiB) Viewed 5053 times
mastermind.png
Youtube videos:

15 Puzzle Game
:arrow: https://youtu.be/pLpXnLFn9qs

Attractive Numbers
:arrow: https://youtu.be/73LsnKmiZrs

Prime Decomposition
:arrow: https://youtu.be/rMIjreP_zho
Last edited by basicgames on Thu Jul 06, 2023 8:29 am, edited 11 times in total.


basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Re: Craft Basic [programming interpreter]

#3 Post by basicgames »

I have added Craft Basic to the collection database.
https://www.portablefreeware.com/?id=3088

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Craft Basic [programming interpreter]

#4 Post by Andrew Lee »

Thanks for adding this to the database.

It looks interesting as a learning tool. I will take a look when I have time, and upvote accordingly.

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Craft Basic [programming interpreter]

#5 Post by Andrew Lee »

Unfortunately, I couldn't get any of the example GUI code to run. Only see a black blank screen when I try to run them. Console code runs OK.

basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Re: Craft Basic [programming interpreter]

#6 Post by basicgames »

Thank you for allowing me to share my program.

The forms.bas example is really bare bones and just shows how to set up a window. It should show a black colored screen and a yellow/blue button thatt says exit. It should also print the mouse coordinates in red/blue at the top left of the window.

Are you not seeing the button and text? What operating system? There's a lot of features packed in the exe, so support may vary a bit between 95 to 11.

Also, did you try the 15 puzzle game? That one should let you know for sure if forms are working or not.

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Craft Basic [programming interpreter]

#7 Post by Andrew Lee »

I am running Windows 10 (all updates applied).

I tried quite a few GUI code, including 15 puzzle, and 3drotate etc. All black screen.

basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Re: Craft Basic [programming interpreter]

#8 Post by basicgames »

I wonder why. I tried it on two Windows 10 computers so far and it worked well . Although it has been developed on 95 and XP.

It is made with Emergence Basic, a 32 bit compiler from Ionicwind.com and uses graphic primitives and windows api gui. It doesn't use DirectX, but draws directly to the window. Slow, but simple for demonstrating programming.

Did any of the examples work or.was it all black? No text?

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Craft Basic [programming interpreter]

#9 Post by Andrew Lee »

The text-based examples worked, like cylinder.bas

basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Re: Craft Basic [programming interpreter]

#10 Post by basicgames »

That's interesting. The text is also based in graphics primitives and is drawn to the window (except stac text forms which are also supported).

I'm glad you got the math stuff working. Perhaps there's a setting in your configuration of Windows that is preventing the graphics. Maybe there's some a 32 bit support mode for programs?

basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Re: Craft Basic [programming interpreter]

#11 Post by basicgames »

An update has been uploaded.

New features include:

newly added commands: for, step, next, and else

The break command now works for do and for loops.
A break by itself targets do loops and with a variable, it target's for loops.
If/endif blocks may now use else.

The IDE search has been upgraded. It now includes a sub search. You may view all your subs in a dialog and see what line they are on at a glance.

The documentation and examples have been updated to reflect the new commands.

Minor optimizations and changes were made overall. I realized that I was using a directinput command and it wasn't even needed. That saved around 20kb of exe space. It was also causing a dependency issue with Windows 95, which is my #1 target OS for this program next to XP.

basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Re: Craft Basic [programming interpreter]

#12 Post by basicgames »

Another update has been uploaded. Also, Craft Basic has a new home website at http://www.lucidapogee.com

The new update includes versioninfo, manifest, and some bug fixes.

User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Craft Basic [programming interpreter]

#13 Post by Midas »

basicgames wrote: Craft Basic has a new home website at http://www.lucidapogee.com
I updated the OP to reflect that. Are other links still valid?

basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Re: Craft Basic [programming interpreter]

#14 Post by basicgames »

The old site links to the new.

I updated the archive entry.

basicgames
Posts: 19
Joined: Fri Feb 10, 2023 9:40 am
Location: Arizona
Contact:

Re: Craft Basic [programming interpreter]

#15 Post by basicgames »

Craft Basic version 1.1 released

Many things have changed for the better with the new 1.1 version. The code has been cleaned up and optimized. Bugs have been removed.

Important changes include the syntax of functions. The functions will work much more like your standard BASIC now.

Also, the image handling commands have been improved. There's now loadimage, drawimage, and freeimage commands.

The math command, round has been added. The rnd function was fixed to work like QBasic.

More example games have been added including Mini Mastermind and Nonogram!

The examples and documentation have all been updated.

Post Reply