![]() |
3D maze in browser controlled by Small Basic - Printable Version +- Small Basic Forum (https://litdev.uk/mybb) +-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1) +--- Forum: Discussion (https://litdev.uk/mybb/forumdisplay.php?fid=4) +--- Thread: 3D maze in browser controlled by Small Basic (/showthread.php?tid=223) |
RE: 3D maze in browser controlled by Small Basic - litdev - 02-04-2025 I made a couple update fixes, mainly to do with some SB sent events getting ignored if the server is busy, so if you have seen this hopefully it is better - may wanr to refine a bit. RE: 3D maze in browser controlled by Small Basic - stevantosic - 02-04-2025 I think this part of Litdev's code (GRWW331.000) should be emphasized: Code: urlGet = "https://litdev.uk/apps/maze3D/maze3D.php?action=get" RE: 3D maze in browser controlled by Small Basic - AbsoluteBeginner - 02-05-2025 Hello everyone. ![]() Today I had a new interesting idea for our project. I was conducting tests to determine the dependence of the robot's rotation angle on the duration of the "right = 1" command. At that moment I thought that if the browser engine is given the "right = 1" command for one second, then due to the different characteristics of the computers on which we will run this project, the robot's rotation angle will be different. Therefore, it will be cool if at the beginning of the game our robot will make test turns and movements to determine the engine's performance and optimize the robot's settings. A self-tuning robot is cool. Am I right? ![]() RE: 3D maze in browser controlled by Small Basic - litdev - 02-05-2025 AB, This is a good idea - I also found the approach below good which you could also test with your idea. 1] Decide direction to turn or move 2] Send the rotate or move instruction 3] Almost immediately after send the stop instruction - there is some inbuilt latency on the server and browser so even with no explicit delay some movement will occur, but your idea will test this further 4] Wait a while until there is no further movement - again your method can test this 5] Get the current position and direction while stationary and go to 1 This is what I meant by small steps and keep correcting movement. The rotation angle dependence on time the message is sent will depend on lots of factors, PC hardware, internet, other processes on PC, browser window size, other users using the server etc and may vary from time to time as well from PC to PC. RE: 3D maze in browser controlled by Small Basic - AbsoluteBeginner - 02-05-2025 (02-05-2025, 09:27 AM)litdev Wrote: ... That is, perhaps we should have the robot CONSTANTLY analyze the result of dividing the value of the "angle of rotation" ("distance traveled") by the number of "Timer intervals" in order to more accurately determine the new number of "Timer intervals" for the next action of the robot. ![]() ( I say this for the version of the SB program, when the developer decided to use DURATION CONTROL of commands, instead of controlling the NUMBER of short commands (step-by-step control). I want to test the "duration control" method now.) RE: 3D maze in browser controlled by Small Basic - litdev - 02-05-2025 Internally, the rotation rate is 1.5radians/s (270deg/s) and is designed to be fairly independent of the fps. Here is a little program inspired by ABs work looking at SB imposed delay vs actual internal rotation time - JKQM901.000 RE: 3D maze in browser controlled by Small Basic - litdev - 02-05-2025 May maths is all wrong! 1.5 radians/s is 270/pi degrees/s, the SB file and plot updated and makes more sense - JKQM901.000-0 RE: 3D maze in browser controlled by Small Basic - AbsoluteBeginner - 02-05-2025 I admire this method !!! ![]() Now that we have a real graph from a real study, I feel like I'm part of a real research group, and not just a club of technical hobbyists. ![]() I even began to respect myself even more. ( I'm serious, LitDev. I really enjoyed this.) RE: 3D maze in browser controlled by Small Basic - AbsoluteBeginner - 02-06-2025 Hi all. ![]() Dear LitDev, I just discovered that on your site, in the help information, on the page "https://litdev.uk/LitDev.html" there is no help for the method "LDGraph.ScaleWidth()". This is a very useful method. This method is worthy of having kind words said about it on the Internet. ![]() RE: 3D maze in browser controlled by Small Basic - litdev - 02-06-2025 Updated website for LDGraph.ScaleWidth() - not sure why it wasn't already there - it is auto generated from extension but not uploaded for some reason - thanks for mentioning it. |