Hi, I wanna make a weather system that gets the real-life weather but I don’t know how to achieve this goal, do you have any API tutorials or anything that would help me! Thanks
Okay, I’ll do it, but do you have any tutorials?
Read post above
I will find something though so don’t worry.
I am still looking
There are so many API’s that don’t have JSON format
Oh… Well, I got a plugin, which we can use to rain in our game, but it doesn’t rain like random times.
I found 2 api’s with json but they shutdown their api
For me, this is really impossible. Sorry, if I cannot give you any information about it.
We really have different timezones, so it might be different too when we are in another country playing the game. / If you set the timezone in there timezone, it would be like the weather would be not in filtered (in the same time.).
If this is really possible, I suggest watch some in youtube videos.
All you would need to do is have everyone get their weather from one location or do it just as you say, have everyone put their timezone in and pick a location in that timezone so it’s at least somewhat accurate. There are just so many ways that this IS possible.
I do have an idea, the idea is. If they are in different timezone, they would join the server that is they’re same timezone.
Well actually, I’m pretty sure roblox factors in location when assigning people to servers when they first join a game.
Hi, I wanna make a weather system that gets the real-life weather but I don’t know how to achieve this goal, do you have any API tutorials or anything that would help me! Thanks
https://openweathermap.org/ should have API services that let you do your thing, and roblox has HTTP functionality using the HTTPService (postasync, getasync)
Keep in mind roblox servers might stress your API key a bit
Oh about the stress on the API Key, since he is making a weather system, it only really needs to update maybe once per hour in every server, so it won’t be that bad.
Edit:
Just had a look at their current weather API, and I really like how simple it is.
And they allow grouping based off of a radius from a city or a bounding box, so he could average out based on a bounding box of info around a major city that the user would be comfortable providing. Either that or just go with one of the ideas I said earlier, using this API.
I can’t find anything helpful, maybe just try using the 00:00 (+0) timezone, or asking the player in game something like, to improve player experience please enter your timezone, or something like that
EDIT: like @SteamG00B said, i didn’t see him say the similar idea
I recommend you use BlackShibe’s API using the http service, and check for updates once per hour or a similar slow interval. You could then have a settings box or something in your game that allows a user to choose a major city nearest to them that will be determining their weather. Or allow them to opt out and they will be given the weather of one of the random people in the server, or just a preset city for those that opt out.
Edit: Also, make sure the API calls are server side, but the effects are client side. Even if they opt out, it’ll be friendlier performance wise on everyone depending on how you decide to implement the actual weather using particles or debris.
You guys are too advanced for me
Edit: Sorry, seems I didn’t upload any of my http service projects, and don’t have the computer that they are on currently. However, I’m sure someone else that’s here can explain it though.
There exists Roblox API to get a player’s country region.
I’d suggest taking the weather from the largest city in their country (a player is most likely to be in the largest city). This is a less invasive method which would have similar results.
The same problem exists in that, that would have existed for the timezone idea. What if their country is a really big country like the US? The point of this real-time weather system is that they can look outside and see it raining, and then look in the game and still see it raining. It’s to help the immersion, so as long as we aren’t asking for their address, getting the nearest major city won’t be invasive at all and anyway, it’s not like anyone else has access to this information, they wouldn’t be sharing it with anyone, it’s just to make the game really cool.
For example, I could say that I live in Seattle, but in reality, I live 80 miles away, there’s nothing invasive about that.
Oh also, forgot to mention on my other reply that, you wouldn’t want to ask them to put in a city name in a text box, you would want them to select from a list because for certain APIs, they might have a fee per city, so you want to limit it as much as possible to cut costs.