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: 318
» Latest member: lejavaAloky
» Forum threads: 144
» Forum posts: 1,730

Full Statistics

Online Users
There are currently 60 online users.
» 1 Member(s) | 57 Guest(s)
Bing, Applebot, Dwightinoni

Latest Threads
3D maze in browser contro...
Forum: Discussion
Last Post: AbsoluteBeginner
3 hours ago
» Replies: 86
» Views: 2,520
AI learns Small Basic
Forum: Discussion
Last Post: AbsoluteBeginner
Today, 06:11 AM
» Replies: 12
» Views: 643
Challenge 12 - Rotating t...
Forum: Challenges
Last Post: litdev
Yesterday, 09:23 AM
» Replies: 0
» Views: 22
Chart Doesn't show true v...
Forum: Extensions
Last Post: jrmrhrb00
02-16-2025, 06:04 PM
» Replies: 6
» Views: 95
LDdictionary not working
Forum: Discussion
Last Post: litdev
02-15-2025, 06:14 PM
» Replies: 28
» Views: 431
DeepSeek.c0m
Forum: Discussion
Last Post: AbsoluteBeginner
01-28-2025, 06:21 PM
» Replies: 1
» Views: 80
GraphicsWindow.LastKey
Forum: Standard Small Basic
Last Post: litdev
01-18-2025, 01:41 PM
» Replies: 16
» Views: 393
Challenge 11 - Hourglass
Forum: Challenges
Last Post: AbsoluteBeginner
01-17-2025, 08:56 AM
» Replies: 8
» Views: 342
Threading
Forum: Extensions
Last Post: jrmrhrb00
01-13-2025, 07:51 PM
» Replies: 10
» Views: 437
Spam
Forum: Discussion
Last Post: litdev
01-08-2025, 01:06 PM
» Replies: 2
» Views: 306

 
  Challenge 12 - Rotating triangle
Posted by: litdev - Yesterday, 09:23 AM - Forum: Challenges - No Replies

Create a triangle shape in the center of a GraphicsWindow and rotate it left and right with arrow keys.

This is trickier than you may think NOT using an extension and will need some experimentation to work out the rules for it.

When you get this you could extend to using the line shape to make clock hands.

Print this item

  Chart Doesn't show true values
Posted by: jrmrhrb00 - 02-15-2025, 11:10 PM - Forum: Extensions - Replies (6)

In the chart function it does not show the true value. It will show a percentage and it graphs the true value, but will not show it. In the snippet if ran you will see what I mean.

Code:
Data["2000"]=1
Data["2001"]=2
Data["2002"]=3

Name=LDChart.AddChart(500,400)
LDChart.Legend(Name,1,"Legend_percent","True")
LDChart.Properties(Name,"Column",1)
LDChart.SetData(Name, Data)

It charts the data values 1,2,3 but will not show them. It does show the percentages up to 100%. Would it be possible in SetData to make values as a choice to show? Then it would show the value rather than a percentage?

JR

Print this item

  LDdictionary not working
Posted by: jrmrhrb00 - 02-10-2025, 11:36 PM - Forum: Discussion - Replies (28)

LitDev, 

Did you know that the LDDictionary function isn't working? I found that the regular one in small basic doesn't work any longer and then I tried yours and it doesn't work either.

JR

Print this item

  DeepSeek.c0m
Posted by: jrmrhrb00 - 01-28-2025, 04:03 PM - Forum: Discussion - Replies (1)

Since the company "DeepSeek" is in the news I thought I would try it out. So, I went to "DeepSeek.com".

I did find that the website offers free access "V3" to its AI model. Also, I did find that it can do a really good job of coding with "Small Basic" and it can utilize the "LitDev" extension. I was impressed with DeepSeek's coding ability which it is known for.

You might want to give it a try.

JR

Print this item

Brick 3D maze in browser controlled by Small Basic
Posted by: litdev - 01-26-2025, 10:25 AM - Forum: Discussion - Replies (86)

I have been playing with 3D in a browser, simulating a maze environment that needs to be navigated by a simple controller.  This was inspired by some discussions with SB user Stevan Tosic.

I have openned it up to be controllable by Small Basic.

To have a go you need to:

1] Get LitDev beta extension 1.2.29.15 from Extension Manager or my website (new Network command added).
2] Open the 3D maze in a browser (https://litdev.uk/apps/maze3D).
3] Get my sample SB controller program XRWF529.000.

Everything should be fairly self explanatory from comments in the SB sample.

The idea is to improve the navigation skills of the observer in the maze - my sample is very crude and not very good at all.  Think of it like the Turtle in 3D trying to navigate a maze, maybe a control logic or AI challenge.

It would be possible for multiple players to interact in this environment, but this is not implemented yet.  The only information stored is the control data and your IP address to distinguish potentially different users running on the server.

Question/feedback very welcome.

   

EDIT

Some updates:

Example solving the maze - one way to control the 'dumb' robot: JTDS122.000
Emplty room test space: https://litdev.uk/apps/maze3D/empty.html
Simple random walk example using 'intelligent' robot: GRWW331.000
Example looking at latency timing of commands: JKQM901.000-0
https://litdev.uk/apps/maze3D/settings.html can be used to create your own maze
Control variables (rotate and forward) added, they take change in angle (degrees) and forwards distance (in current direction), ZDPD698.000
Game name and Observer player added to settings
Added (action=getAll) that will return basic data about all users present in your 'game' - QRHC107.000

Print this item

  GraphicsWindow.LastKey
Posted by: jrmrhrb00 - 01-15-2025, 01:37 PM - Forum: Standard Small Basic - Replies (16)

This is a little confusing, but here goes!

I have a program that I want to rerun for a second or more times. So, I clear the GraphicsWindow, and tell it to rerun by using a button. The problem I am having is: in the first run I use this:

While key <> "Return"
  key = GraphicsWindow.Lastkey
EndWhile

This is to hold the program until I hit the return key. That works just fine. Then steps in "GraphicsWindow.LastKey" That function is read only. The problem is there is no way to reset it in standard "Small Basic" and it remembers the key was used in the first round of the program. So, on the second round the program zips right through the while loop. To work properly GraphicsWindow.LastKey needs to reset for the second or more rounds of the program. I looked in the LitDev Extension. Didn't see any way to reset it.

Any suggestions of how to do it?

Maybe, LitDev could add it to the extension?

JR

Print this item

  Threading
Posted by: jrmrhrb00 - 01-09-2025, 03:27 PM - Forum: Extensions - Replies (10)

I think that it is interesting that with the wonderful LitDev Extension that there isn't at least one function for threading. Maybe, I missed it if there is, but I looked and I haven't found anything. LitDev did write an excellent article about threading and how to avoid its pitfalls. I suggest a new function for the LitDev extension called (LDThreading). What it would consist of I'm not sure, but I am sure the best person to create it would be LitDev.

JR

Print this item

  LDDialogs.SetStartupPosition
Posted by: Yumda - 01-06-2025, 02:33 AM - Forum: Extensions - Replies (4)

Hi there:

does lddialogs.setstartupposition work for lddialogs.inputbox?  

I tried to set it like this LDDialogs.SetStartupPosition(373,210,1) and then called lddialogs.inputbox,

eg

LDDialogs.SetStartupPosition(373,210,1)
dialog1 = lddialogs.inputbox("","")


but the input box position is not set in relation to the graphicwindows... any ideas?

or does the setposition option not apply to the input box?

Regards

Print this item

  Will this forum be beautified in 2025?
Posted by: eddylo - 12-27-2024, 04:34 PM - Forum: Discussion - Replies (3)

This forum is nice. Sure. I have learned a lot of knowledge by reading the posts here.

If the forum is rationally beautified, maybe the number of frequent visitors will increase significantly. The forum will be more attractive and more active!

Print this item

  Challenge 11 - Hourglass
Posted by: litdev - 12-19-2024, 11:21 AM - Forum: Challenges - Replies (8)

Use standard Small Basic to make an animation of an hourglass (egg timer). 

Something on the lines of this:

https://cdn.dribbble.com/users/11609495/...rglass.gif

Print this item