We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 837
» Latest member: Ascentszx
» Forum threads: 218
» Forum posts: 2,253

Full Statistics

Online Users
There are currently 37 online users.
» 1 Member(s) | 34 Guest(s)
Bing, Applebot, KennethFem

Latest Threads
ZScript
Forum: Discussion
Last Post: z-s
01-22-2026, 03:31 AM
» Replies: 0
» Views: 24
I think that no more Smal...
Forum: Discussion
Last Post: eddylo
01-20-2026, 11:02 PM
» Replies: 0
» Views: 21
Small Basic Coder-A New G...
Forum: Discussion
Last Post: AbsoluteBeginner
01-17-2026, 07:57 PM
» Replies: 1
» Views: 416
ZS Small Basic Coder GPT.
Forum: Discussion
Last Post: z-s
01-13-2026, 03:32 AM
» Replies: 4
» Views: 132
3D maze in browser contro...
Forum: Discussion
Last Post: stevantosic
01-08-2026, 12:51 PM
» Replies: 128
» Views: 33,311
ZS Extension.
Forum: Extensions
Last Post: AbsoluteBeginner
01-04-2026, 02:50 PM
» Replies: 109
» Views: 28,285
Happy New Year!
Forum: Discussion
Last Post: AbsoluteBeginner
12-31-2025, 10:08 AM
» Replies: 0
» Views: 71
Six different 8-bit emula...
Forum: Discussion
Last Post: stevantosic
12-28-2025, 06:02 PM
» Replies: 2
» Views: 87
Challenge-Command Line GW
Forum: Challenges
Last Post: WhTurner
12-22-2025, 06:24 PM
» Replies: 7
» Views: 2,263
Google Search Terminal SB...
Forum: Standard Small Basic
Last Post: z-s
12-17-2025, 09:09 AM
» Replies: 1
» Views: 337

 
  Helpful YouTube videos (UCI-Interface for Chess-Engines)
Posted by: Scout - 05-22-2024, 08:36 PM - Forum: C# Moving from Small Basic - Replies (2)

The discussion of the AI championship with a playing field and separate engines reminded me of the chess engine championships of the last few decades. The ranking is determined from countless games that the engines play against each other. This is done automatically via defined interfaces (e.g. UCI interface).
My attempts to access this interface with Small Basic failed because I didn't know how Small Basic used the stdio interface.
So I looked for a C# chess engine that was as simple as possible and then wrote a Small Basic program using the source code that could at least access the UCI interface.
Searching on github I found the following video series that shows how an unknown interface can be accessed and operated using debug outputs.

https://www.youtube.com/playlist?list=PL6vJSkTaZuBtTokp8-gnTsP39GCaRS3du

The video series consists of four episodes, of which I have completed the first one and the others will probably take some time.

Definition UCI Interface: https://en.wikipedia.org/wiki/Universal_Chess_Interface

Chess program that can communicate with chess engines: https://cutechess.com/


Episode 1 : Hello World

The program CS_UCI was written in Visual Studio 2017.
It is a console application with the target framework .NET 4.5.2

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CS_UCI
{
    class Program
    {
  
        static void Main(string[] args)
        {
            string[] Move = { "e7e5", "a7a6", "d7d6", "b7b5", "g8f6", "g7g6", "h7h5", "f8g7", "b8c6" };
            int Movecount = 0;
               
            while (true)
            {
                //remove leading & trailing whitecases and split using ' ' as delimiter
                string[] tokens = Console.ReadLine().Trim().Split(' ');
                //string   command = Console.ReadLine().Split(' ')[0];
                switch (tokens [0])
                {
                    case "uci":
                        Console.WriteLine("uciok");
                        break;
                    case "isready":
                        Console.WriteLine("readyok");
                        break;
                    case "go":
                        Console.WriteLine("bestmove "+ Move[Movecount]);
                        // Console.WriteLine(Move[Movecount]);
                        Movecount = Movecount + 1;
                        if (Move.Length <= Movecount)
                            { Movecount = Movecount - 1 ; }
                        break;
                    case "position":
                        // Board;
                        break;
                    default:
                        Console.WriteLine("info " +  tokens[0].ToString());
                        break;
                }
            }
        }
    }
}
After starting Cute Chess, the exe file must be defined as the engine via Settings.

Using New, you can choose any engine for white (stockfish, Dragon, etc.) or you can play yourself.

CS_UCI can now be selected for black.

The dummy moves provided for black should be enough for a few moves.
   
The corresponding Small Basic program is in Thread: https://litdev.uk/mybb/showthread.php?tid=75

Print this item

  Debugging with dnSpy
Posted by: litdev - 05-20-2024, 02:46 PM - Forum: C# Moving from Small Basic - No Replies

I have been playing with dnSpy and find it very useful for debugging Small Basic programs.  You can get it from https://github.com/dnSpy/dnSpy/releases - (download dnSpy-net-win64.zip, unblock, extract from zip and run dnSpy.exe, then File->Open... a compiled Small Basic exe and get a professional debugging experience!)

It allows me to debug into SmallBasicLibrary.dll as well as extensions like LitDev.dll.  This is very useful for me to test things, but maybe also for Small Basic users to see how things are done in extension code.

Print this item

  Tron game
Posted by: litdev - 05-17-2024, 04:12 PM - Forum: Extensions - Replies (2)

Multi-player game I wrote and play with my daughter.  Most the fun is creating new levels (currently 19 that come up randomly) - NQDW702.000

Print this item

  Rotate LDPolygon
Posted by: AbsoluteBeginner - 05-15-2024, 08:17 AM - Forum: Extensions - Replies (7)

(translated by Google translator)

Hi all.
Please tell me, does anyone know of any problems using the rotate "Shapes.Rotate()" function?
I have uncontrolled displacement of the "LD Polygon" shape when I rotate it.
This displacement does not always occur. And the displacement can be different.  Huh

Thank you.

Print this item

  Someone wrote in the Facebook group. Creative users may be interested.
Posted by: eddylo - 05-09-2024, 09:12 AM - Forum: Discussion - Replies (61)

I read a post in this group:

https://www.facebook.com/groups/smallbas...0360642138

If you have great game ideas, why not try to turn the great game ideas into a cool game? In addition, it should be a good way to publicise Small Basic!
Smile

Print this item

  Challenge of the Week: Space Explorer
Posted by: z-s - 05-09-2024, 03:41 AM - Forum: Challenges - Replies (3)

Greetings, Small Basic community!

Are you ready to embark on an interstellar adventure? This week's challenge invites you to unleash your creativity and coding skills to become a Space Explorer!

Challenge Brief:
Imagine yourself as a pioneer of the cosmos, navigating through the vastness of space. Your task is to create a program in Small Basic that simulates an intergalactic journey. Here are some ideas to get you started:

Spacecraft Simulator: Design and program a virtual spacecraft that can navigate through space using arrow keys or mouse controls.
Stellar Map: Develop a graphical representation of the cosmos, complete with stars, planets, and other celestial objects. Bonus points for implementing zoom and pan functionalities.
Mission Control Center: Construct a dashboard that displays essential information such as fuel levels, distance traveled, and current location within the galaxy.
Alien Encounter: Incorporate random events or encounters with extraterrestrial beings during your voyage. Will they be friendly or hostile?
Space Quest: Craft an interactive storyline where the player must complete various tasks or challenges to reach their destination, whether it's exploring a distant nebula or uncovering the secrets of a mysterious planet.

Feel free to mix and match these ideas or come up with your own unique twist! Remember, the sky's not the limit—your imagination is!

Submission Guidelines:

Post your code along with a brief description of your project in this thread.
Feel free to share screenshots or videos to showcase your creation.
Don't forget to provide feedback and encouragement to your fellow Space Explorers!
Let's set our course for the stars and boldly code where no one has coded before!


Feel free to customize the challenge as needed based on the interests and skill levels.
Basic Code : JBJK996.000
MADE AND WRITTEN BY AI. Smile

Print this item

  Old Version of MSBuild in SharpDevelop
Posted by: z-s - 05-03-2024, 03:47 AM - Forum: C# Moving from Small Basic - Replies (7)

May Be Any One Know This.
You Can Get Intelnise In
Sharp Develop By Installing Developer Pack Of .Net Framework.
View A Html In Source Directory Of Sharp Develop Named Dependences.html


LitDev I Have A Question ?
I Tried Using SB-Prime , SVB , SB , LD Extension Source Code In Sharp Develop When We Open It , Shows Some Error In Solution File Saying Old Version OF MSBuild.

Print this item

  LD3DMazeGame
Posted by: stevantosic - 05-02-2024, 06:52 PM - Forum: Extensions - Replies (3)

Hi

This is a work in progress of LD3DMazeGame.sb porting to C# but without ILSpy.

[Image: 1.jpg]

Configuration file (room1.txt):

About: maze3d using litdev extension
a=coffee.png;b=bug.png;c=head.png;d=Tree.png;e=whitePawn.gif;f=whiteRook.gif;
1=wall.jpg;2=stones.jpg;3=water.jpg;

XXaXbXcXdXCXeX
XXXLXXXZLXXZXf
XXXX  LXXXa LX
XXX    XXCXXb
XXLXXcXXSLXXdX
XXXcXCXXeXX

Just an idea for end (non programmer) user to have a feature to make a gaming room by text file and images.
Running:  LD3DMazeGame2  room1.txt

A little bit from source code (got from original litdev's code):

// Create a world based on layout
// X is an empty room
// L is a room with a light
// C is a room with a rotating illuminated cone
// S is a room with a rotating illuminated sphere
// Z is Zeb
// a-z is a custom wall images in config file

Where is a good place to share code? Maybe should be reviewed by litdev before publishing?

st

Print this item

Smile Small Basic 1.3
Posted by: z-s - 05-02-2024, 03:23 PM - Forum: Discussion - Replies (1)

Do Anyone Know About Small Basic 1.3 Today I Read About It.
release link : https://techcommunity.microsoft.com/t5/s...a-p/338112
Book : https://nostarch.com/smallbasic
Many New Features.

Print this item

  FCInstances Bug
Posted by: z-s - 05-02-2024, 07:18 AM - Forum: Extensions - Replies (1)

In The Extension FCInstances There Is A Bug Once I Tried To Use It To Add More Graphics Windows It Was Unstoppable Like A Virus It Made 100 Windows And Was Making More Then I Have To ShutDown The PC.
Don't Know Was Any Coding Fault In It But I Am Thinking To Try Again But It Could Be Dangerous Confused

Print this item