-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bedrock Edition? #597
Comments
If i'm not mistaken @SquidDev did a very experimental "port" of CC:Tweaked for Bedrock. |
As vico mentioned, there's a very proof-of-concept port at SquidDev-CC/bedrock. While it technically works, there's several deficiencies in the current scripting API which make it pretty unusable:
|
Wow, that's an awesome first step, @SquidDev! Regarding singlethreading, if we don't have dedicated web workers, is there anyway we can hook into the Lua scheduler and make it run for example 3 ms at a time, then unblock the main JavaScript thread, schedule the next Lua execution, and so on? Regarding persistence, if we have HTTP and in particular web sockets, I guess we could add a web server to run alongside Minecraft to handle persistence. |
That's exactly what we do right now! Well, it runs for 30ms, as each server tick should be 50ms. I'm honestly not sure why the performance ends up being as bad as it does - copy-cat uses a similar pre-emption technique to not block the browser thread, and the lag isn't anywhere near as bad. I'm fairly sure the JS is being JITted - it's using Chakra after all - goodness knows.
I'm not what APIs are exposed to the JS side. I'd be surprised if we had access to AJAX/Websockets/ |
If it's anything like a regular browser, each VM turn has 16.67 milliseconds to run business logic and rendering. Realistically, that means something like 8-9 ms tops to run business logic if we expect 60 frames per second. 30 milliseconds definitely sounds like too much blocking at a time. Do we have Some resources on this subject |
I think this is the kicker - we don't have to. The Minecraft server (which is where the computer actually runs) only runs at 20tps (ticks per second), which gives us a much larger timespan to work with.
We do on within the GUI code, but IIRC none of the standard "run immediate" functions ( |
Interesting. Did you try lowering the scheduler execution time to 15ms? 5ms? |
For so far I understand it you are able to use a api for bedrock dedicated servers that allows https connections and therefor websites and other things to communicate with the server. |
With the Bedrock mod APIs, would it be possible to start working on something similar to ComputerCraft?
Minecraft Bedrock Edition now supports 2 languages:
More Bedrock Edition mod documentation:
The text was updated successfully, but these errors were encountered: