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!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D maze in browser controlled by Small Basic
Yes, urlAsync+"isReady" which in full is "https://litdev.uk/apps/maze3D/maze3Dasync.php?name=&action=isReady" is a command sent to the server that waits until all animations are completed and returns a message "Ready".  You can actually paste it into browser as a command as well, this is all LDNetwork.SendWebRequest does effectively.

So if we call LDNetwork.SendWebRequest("https://litdev.uk/apps/maze3D/maze3Dasync.php?action=isReady"), then SB waits until the server command returns (i.e. when animations are complete).

If we call LDNetwork.SendWebRequestAsync("https://litdev.uk/apps/maze3D/maze3Dasync.php?action=isReady"), then SB returns immediately and an event is fired (LDNetwork.WebRequestResult) when the server command finishes.  Therefore with this we could continue doing AI work in SB (rather than just waiting) while the animation completes, but only issuing the next command once the previous was completed.
[-] The following 1 user Likes litdev's post:
  • stevantosic
Reply


Messages In This Thread
RE: 3D maze in browser controlled by Small Basic - by litdev - 03-07-2025, 11:50 AM

Forum Jump:


Users browsing this thread: 35 Guest(s)