![]() |
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-27-2025 Part of the problem with the delays is that we don't know exactly how long it will be and the limitations of my ISP webhosting doesn't allow sockets. Without sockets we can only send a request and get a response from the server. The server cannot directly send a message (unsolicited) to us. When you start addding intelligence you can use this delay time for 'thinking'. You may also use the 'speed' multiplier setting, but this will give you less thinking time! RE: 3D maze in browser controlled by Small Basic - AbsoluteBeginner - 02-28-2025 Hi all. ![]() So, I managed to remove all unnecessary pauses in the program. Now, I will be interested in "opening the robot's eyes". ![]() I want the robot to know what object it is currently looking at. RE: 3D maze in browser controlled by Small Basic - litdev - 03-02-2025 Been tinkering a bit and added new LDNetwork.SendWebRequestAsync method (beta 1.2.29.20). With this method we can receive an event message when all animations are completed - also improved some associated stuff to make the async stuff as robust as I can. My test code, PTSV104.000 - should be self explanatory - I tested with speed setting set up to 10. RE: 3D maze in browser controlled by Small Basic - AbsoluteBeginner - 03-02-2025 In all these days I have not written a single letter of code. ![]() I spent all my free time to improve my interaction with ChatGPT. Now I will test my achievements by examining the PTSV104.000 code. ![]() RE: 3D maze in browser controlled by Small Basic - AbsoluteBeginner - 03-02-2025 The code works fine on my computer too. ![]() The robot moves very quickly. It's a good thing I haven't written any code the last few days. The latest update to the LD expansion significantly changes the robot's capabilities. It is very good that these opportunities are now available to us. ![]() RE: 3D maze in browser controlled by Small Basic - stevantosic - 03-06-2025 Hi, Looking at https://litdev.uk/apps/maze3D/settings.html async command links (bold+italic) and backend server code maze3Dasync.php (on github) there is only action 'isReady' which is valid for async request (https://litdev.uk/apps/maze3D/maze3Dasync.php?name=&action=isReady). Other async commands do not work (Unknown action message). Maybe a typing issue. st RE: 3D maze in browser controlled by Small Basic - litdev - 03-06-2025 ST, Yeh thanks, that was a copy/paste typo The async command only has the isReady action, an additional php is used for this due to issues of non-concurency/non-reentrancy etc for the main php server commands that would be harmed by internal delays since this same maze3D.php is called from js client and web user. I could split the client and web user calls to the server to use different server php calls and allow some web user calls to have delays in them, but may get confusing if a user makes another call wile a previous one is waiting - hence the non-concurency mutex lock currently used. PS, I have updated but there seems some latency or other issue with my upload - my ISP recently moved server so I will wait a bit and investigate later. RE: 3D maze in browser controlled by Small Basic - stevantosic - 03-06-2025 Following line of simplification we can imagine a code snippet (for better understanding of actions): // SendWebRequest(urlSet + "&rotate=90"); waitTillReady(); SendWebRequestAndWaitActionEnd(urlSet + "&rotate=90"); // SendWebRequest(urlSet + "&forward=4"); waitTillReady(); SendWebRequestAndWaitActionEnd(urlSet + "&forward=4"); Just a thoughts. User can write a procedure or function to encapsulate a chunk of actions. Or even: Rotate(90); Forward(4); Looks like turtle. RE: 3D maze in browser controlled by Small Basic - litdev - 03-06-2025 Yes this change could work, but... The main objective is a platform to write 'AI' robot control to perform tasks in a maze. There are probably 3 people interested in this (you, me and AB who doesn't want constant change of the API). So I guess at this point, although I quite like the challenge, I don't want to tinker endlessly changing it. If we get to the point where there are people struggling with issues that cannot be solved with the current API (as there were previously with the move, animation and required delays), then definitely time to reconsider, but I don't in principle like an API that has many ways of doing the same thing. RE: 3D maze in browser controlled by Small Basic - stevantosic - 03-07-2025 I agree. Current API is well defined and finite, I guess. My previous comment was just a hint to a users to imagine 3D maze as a turtle moving. Something like pseudo code, not as an additional API. A user by itself can decide about implementation of custom procedures or functions for a reason. |