Displaying REAL-WORLD Weather in Unity (using REST APIs)
HTML-код
- Опубликовано: 25 ноя 2019
- Welcome to PolyMars, a channel focused on game development in Unity!
In this video, I explain how I used the DarkSky weather API with Unity to display the current real-world weather in my (or any user's) location. Enjoy!
Project repository:
github.com/PolyMarsDev/Real-W...
Music from filmmusic.io/
"Chipper Doodle v2" by Kevin MacLeod (incompetech.com/)
License: CC BY (creativecommons.org/licenses/b...)
Follow me on Twitter for more frequent updates on my projects!
/ polymarsyt
making this in wallpaper engine would be dope
you can with lively wallpaper
No
No
Eh
Hmmmmm chain
"Using Unity's Particle System..."
*Dani Intensifies*
I liked your comment with all my 15 accounts (IDK why I have them) and now you're at the top
@@scattagain liar there's 14 likes lol
@@VortechBirb youtube system lags sometimes, now its 15 but I think one is yours
@@scattagain nice can you sub to me on all 15
@@prizmatik8696...
Great video. Finally some different content from what everyone else is doing.
Thanks!
Can’t wait to convert unity into weather
@@breakfastboi3344 convert you computer chips into water then
Numero7 Mojeangering ok
@@breakfastboi3344 Wait no it was a joke
wait imagine if there was a survival platformer that used a real life day/night cycle and this. For example:
Foggy: makes it impossible to see faraway things
Rain: Makes it slippery
Cloudy and Clear: N/A
Snowy: Makes it slightly harder to move
Thunder: Rainy but more deadly (Thunder kills you instantly unless more max health is added)
This is a cool idea
@@uniriah24 And i would use it... IF UNITY FUCKIN WORKED FOR ONCE.
@@lincolnsnewaccount41 I feel this.
@Ezequiel Ciamparella yep
@Ezequiel Ciamparella question of game design: you can be in-game in different location then in real life
I stumbled on your channel yesterday. I will never regret this.
waiting for raining weather
Califrona Summer Players: Oh No
Arizoninans :
Oklahmoa
the Sahara desert players:
That’s so cool and useful
Thanks :)
I like the way you share the coding process really cool to see your thought process during these
I love how quickly and efficiently you taught this. Subscribed
Loved this video man! Inspired me to do the same thing but in under than 24 hours, but yours was definitely much better! Keep it up man
I would love this in Animal Crossing
That's what I wanted to use this for, I was gonna make a 2D Animal Crossing game lol
@@junkeyz Great minds think alike, thats why im here haha
@@Jesse-um1pz Ha, nice!
@@junkeyz well, did you end up making it?
@@Jesse-um1pz did you end up making it?
Hey! This is really nice. Maybe add a few details to the character itself like if it’s rainy, he would open an umbrella. It it was sunny, probably sun bathing ;) or if it’s snowy make it so he’s wearing a sweater or a hoodie. That’s it! Nice vid as always!
Good work dude! I used the darksky API for a school project, just made a little weather site
REST APIs can do really cool stuff, great video!
I was wanting to make a smart mirror in VRC that displays users weather, time, and temperature so this is great!
Very usefull for the quarantine.
your content is simply amazing for me, even iam being brasilian and don't understanding many english coding terms.
I like your unique ideas
thanks for the video, it was helpful.
your videos are cool continue in your work
No dislikes! Good job!
Amazing "this idea can be used many games"
i wish animal crossing used real world weather. kinda sucks when it’s a super nice day out but in my game it’s all dark and dreary, or the other way around- but i do see how in some places that would suck because they would never get rain
they could do something like have a setting to turn it on and off to combat that
Thinking of futureproofing this, you could cut down on the requests by hosting your on server that buffers the requests,
this obviously makes most sence if your game or app gets very big though ;).
Also if your weather- or ipservice ever closes down you can easily switch to a different service.
Yup, because the Dark Sky API is going to be shut down by the end of 2021 :/
@@Cabalex RIP
how are you a small youtuber??? this is great!
Fun fact: Animal Crossing City Folk was originally going to use a similar system, pulling data from the Forecast Channel, but they decided against it after they realized some players would get very samey weather, whether that be constant sunniness, constant snow, or even constant rain...honestly I'm surprised they didn't just go "Welp they can go visit their friends if they want different weather lol" but honestly I think an option for it would've been cool
Escape from Tarkov actually uses this concept. its also a unity game, and it uses the weather in Moscow to decide what the in game weather will be when players join a game. They also use it to change the price of in game bitcoins to give or take match the real world price aswell.
YES,this helped me so much, i want to make a app where your pc is affected by weather
No.
@@mibbleyt bruh
Good idea 👍🏻
Omg this is awesome
people in egypt: *left the chat*
*Sandstorm intensifies*
Imagine enabling earthquakes, eclipses and haze in a actual game
@Ezequiel Ciamparella maybe me :)
@Ezequiel Ciamparella japan has about 1500 eathquakes a year. So they won t stop their life for a little earthquake
@@luxraider5384 We don't even know there's an earthquake when it comes.
niceee
love this i was looking to have real time and date and make day cycle with sunrise and sunset data not sure how to find api or sites though
Good video Keep it up
Thank you!
this would be great for vr games
Instructions unclear, accidentally made it send hitmen to player houses
Pause on 1:36... Cloudy: snowy. Snow: clear-day. Sunny: cloudy. I figure you just mislabeled but thought it was funny
I just noticed that lol...
oh your that guy that makes videos by creating spaghetti code!
shhh
how did you make that art in gimp?
Rest APIs, yeah, we also had to use them once at university ^^
nice
Idea, take a random heightmap of somewhere on earth to use as terrain for a game.
Very interesting and cool Video!
I really want to make something with the rest apis, but i cant find a webpage with a list of them.
I saw, that you found a website or something (0:12), on which some apis are listed.
So can you maybe post the link?
I might be hella late and you might have already found it, but the list is at github.com/public-apis/public-apis if you scroll down
@@thenewgameevolution5442 Thank you!
And no I've not found the list before
Polymars testing this be like. Rain come here. Right now.
It would be cool if whenever it was raining/drizzing, the character would hold an umbrella
Good video, but can you give link to list of REST APIs wich you show at start?
now this looks realistic...
grown 2k subs in one week!
Thinking about adding a Corona weather
Is it secure, typing the API Key in inspector if I have to share the game with others?
it says "replace this with your API key" how can i replace it?
Just register on the darksky website. After you sign up, it will give you the api key. Copy the api key and then go to Unity and paste the API key on the API key box on Unity.
@ilikeminecraft6753 gaming The maximum amount of weather requests are 1000 requests per day.
also i think dark sky signups are disabled now.
Ikr. This has been my daily bruh moment :/
OkMars
2:20 if anyone sees this comment, if u ever plan on getting a client's ip for a project that you want to publish, make sure it is listed in your ToS that u r, there is some law behind it.
which text editor/ide you use for C#?
I really like this explanation, but I cant get it to work with openweathermap, mainly I think because the json has a lot more information about then next 48 hours, which id like to include.
i think its probably where to point inside that huge json file #beginner
rip dark sky
4:11 That means you can request it every 1 minute 26 seconds.
MΛRTYNΛSPLΛYZ it would be more impressive if you showed your working out
But it's literally just 24 hours divided by 1000, then just convert to minutes and seconds
24 hours / 1000 = 0.024 hours = 1.44 minutes = 1 minute 26.4 seconds
@@MrMutebe But that's still more impressive than just saying the answer, even if it is still simple
Garrett Richards Are you a teacher or something
@@CreeperMan2254 lol
Btw the unity particle system is now a real thing
Thanks for the hearth i didnt expect that
9 likes wow
*hearth*
Heareth thee, I have gained thy hearth from thy kings ruler!
Im having trouble making it work :(
Can you do a tutorial on how to get data from Google Fit in Unity?
Y'all ever heard of animal crossing?
ye why
How about adding a new feature make the sky dark when it’s night time
Your new icon looks like it's from project arrhythmia
you should make this into a custom desktop background
Yeah,even in Wallpaper Engine
3:36 Just a little more complex... haha
Oh fck it s raining!!!! Lets plant smth!!!
do someone get any alternative solution, could someone share it ?
does the guy get worried if there's a weather advisory?
I really like the format and pacing of this video, but it's missing something that I've been looking everywhere for... I don't know why, but the API i'm using has a lot of the apis containing a "data" object, which holds a lot of the information... This wasn't so big of a deal with most data objects i made, I made a special class that handled ALL data classes with the help of someone called ApiResponse and it contains a generic object for "Data". Buut for some reason one API has a DATA inside the DATA... It goes like, Odds {Data{ Id, name, Market{data{odds{data" This is incredibly confusing lol, how am i supposed to handle all these datas?! I tried making separate classes, but it doesn't seem to be populating them...
Does it work for people using a vpn
Now make a creepy text box appear that says "find shelter now" when the weather is tornado
:troll:
Hi Pocket Mars
Darksky api is no longer accepting new signup requests :(
Can you please update it? Dark sky will be discontinued next year and you can no longer get api keys
Wait he used Star Dew Valley as an example but I didn't know people still remembered that game.
Is the Dark Sky API detracted now that the app is down.
It's not really down, just the Android and Wear OS. But the API from what I can tell should be going down probably the end of 2021? Or I maybe just misinterpreted it
Rip Dark Sky
RIP Dark Sky API...
you can also use opensource project github .com/chubin/wttr.in for weather api, it's absolutely free
@PolyMars I am sure you probably know this by now but there is an easier way to get a users IpAddress :-)
Try to make a game with scratch
But theres no snow in jamaica :((
im in arizona. so the weather would never change 😭😭
you could have just used ip-api.com/json/{ipaddress}?fields=status,lat,lon to only get the status, lat and long so you don't have to parse that much data
Every one use the wethet for helping thier country
PolyMars: lets make a game
They need to add something like this to animal crossing pocket camp!!
So.. you're saying i can add the ISS to my game & have it relate to the actual location of the ISS.. great
I just noticed that the player looks like a character from "Super Paper Mario." Heh.
waiting for rainy weather
me who stays in International Space Station: Oh no
it isn't possible to use it anymore
cant create a acount
Dark Sky no longer accepts new signups, that's a bummer
Dark sky is shut down :c
Hi
Hello
Ok buddy
This in Minecraft.
YES
karen screaming intesifies
You should make this in minecraft
im glad that farming games dont work like that, cuz if they did, it would be impossible to play them on arizona
I really hope that these aren't the categories 1:35