This is a browser-only extension for getting the current time. Times in this extension are represented in the traditional browser format, which is milliseconds since the epoch (January 1, 1970). All functions will automatically convert that time into the local time zone based on the settings of the player’s browser/computer.
Also, because it’s fun, this extension includes a few blocks for getting the current lunar phase! This is based on data from the US Astronomical Applications Department and should be accurate for any date between 2026 and 2050.
Nothing would please me more than people starting to make their games behave differently if it’s a full moon.
Me about to make an animal crossing like game where the time is equal to the real world time and certain things happen on special days. Or a game where the current real world lunar cycle effects your cults activies or something.
Hm, this could work really well for a Kerbal Space Program game - accurate times, and then I would have to make a physics engine and stuff like that. Guess I’ll try, why not? Time to destroy everyone’s computers with a really super sort-of accurate rocket simulator (my computer’s doomed, too)!
hmm this could be used alot, and because I always feel like doing so, I made a tiny project using it. One question, why does it add browser extensions? Also, can you make it possible to get the milliseconds?
@TheEarth sorry! i tried to give you a shout out as the inspiration.
and the local time zone is already included in the dates in the browser events extension. you can see the actual implementation of those functions here:
all of the methods on the Date type return local time by default.
You could make a game where on certain holidays different special events can happen, so you don’t need to make a new update and write new code exactly 2 minutes before you promised it to be released. This could also be good for games that use the settings extension, so you don’t lose your progress when you update the link.
Sure, I would really appreciate the extra help. However, I want my game to include the Kerbals so that logo with ‘Makecode’ instead of ‘Kerbal’, while very cool looking and a great name, won’t really work. And the other thing is you probably won’t be able to actually work on the code unless I’m taking a break, just because of both the amount of free time I would have in the summer. So you would probably just provide assets, but if I go on vacation or I am inactive for a while, I would ping you and (if you are available) you would be able to work on the code for that time. I will make a topic for this after I complete the gravity stuff and just a proof of concept demo, and ping you there.