Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 7:26 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Aug 06, 2007 11:35 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I have done a first approach to the next idea:
Each user could have in its .raydium folder an indication of its nearest airport/weather station. For example LEMG for me(in Malaga), LFRS for Nantes...
All the applications could then make a call like:
Code:
raydium_weather_update("LEMG");

This code read over internet the last weather report for that airport/station.
Then all that data can easily accessed through a few raydium variables like:
Code:
int    raydium_weather_temp;
int    raydium_weather_dewpoint;
char    raydium_weather_station[10];
int    raydium_weather_wind_direction;         // -1 means variable wind
int    raydium_weather_wind_strength;
int    raydium_weather_wind_gusts;            // if equal wind strength, then no gusts at all
char    raydium_weather_wind_unit[5];
int    raydium_weather_visibility;            // 0, i think, means no read. Minimum should be 1
char    raydium_weather_visibility_unit[5];      //if no unit, the no read of visibility
int      raydium_weather_pressure;            //Atmospheric pressure
char    raydium_weather_pressure_unit[5];      
int      raydium_weather_pressure_decimal;      //Atmospheric pressure, decimal positions
char   raydium_weather_observations[1024];      //string with all the observations. NOT WORKING!!!


In this way each game could adapt its weather( weather for raydium is in the TODO) to the real weather in the area of the player.

With that idea, the METAR code from Kees Leune, the curl library and a few headaches, i have done the next horrible example(sorry for the huge post):

EDIT: the post was insanely huge, so i have uploaded the code to pastebin. You can get it from here: http://pastebin.com/f18dbef74

If you launch it directly, it will load the weather of Madrid/Spain. You can add the airport/station ICAO code as a new parameter, like this:
Code:
./odyncomp.sh metar.c LFRS

A few ICAO stations are not working properly. If this happen, the app will crash in a ugly way... I have to fix this in a future version.

Still there are a few things to load properly, like list of observations(rain, volcanic ashes...) and lists of clouds. Surely these two things are the more interesting ones for a videogame... you will have to wait a bit.

Comments?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 07, 2007 1:40 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

It's an other deep localisation process.

Some comments:

I'm not a fan of rainy days. But where i live it's often rainning.

I love play to maniadrive with a beautifull sun. What will happen ? Always drive under cloudy sky :( :( :(

On other hand it's a funny add on.

Bye
Ouille.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 07, 2007 3:06 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
The players could activate/deactivate that function at its own. And they could be able to select the place of their choose.
For example you could choose bahamas like your local area, the system is not able to know if that is right or not.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 07, 2007 10:59 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Honestly, I think this feature should be "application sided", not coded in Raydium ! We're not writing a nuclear plant, "only" a game engine ;)

But, as an option, the idea is nice with ManiaDrive, I must admit ;)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 08, 2007 9:51 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Well, maybe i have to explain a bit what i have in my mind when started with this.
Playstation3 users surely know about Home.It's a virtual place to meet with friends, play, and stay waiting for an online play. Soon Home will replace the current system menu of the PS3. And everything will be done through Home. The characters are done by the own user, with a simple editor and the other playes can see your characters as you designed.

I have certain (*s3cr3t*) information about that and it's planned to give developers a library to allow using the character done in Home to play external games.
Translated: Imagine you launch Silent Hill 6 and suddenly appears YOU in a foggy place. Or when you see the repeats of Gran Turismo, the driver is you.

That library could also be used to get images/videos/audio placed in the HD of the PS3 (in fact user images uploaded there) and that could be used as textures/media in the games.
Translated: You launch Residen Evil 7 and when you enter in a collapsed house you can see photos of the previous owners of the house, and they are your family.

Maybe it's a bit more clear what i want to get with "weather online". It is just an small stone in the road to the get something like that o even better.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 08, 2007 1:51 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
If I'm OK with this idea, I really think that's a huge thing. Just fetching the weather takes 700 lines of code ! (that's the size of NewSkyDiver :) ). IMHO it's a mistake to put such a thing in a game engine claiming simplicity and lightweight.

But there's something interesting here, since your "request" is probably another example of what people would want with a simple engine like Raydium: the ability to modify it. Not just only making a few patches, but really add new features to the engine.

So perhaps can we think about the best way to provide such abilities to users: plugins ? usual "contrib" directory ? SVN branches ? ...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 08, 2007 5:26 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
If code complexity is a problem, maybe it can be solved.
To do all that i have talked long with FlighGear guys in his channel. And i get a few alternative ideas. I mean the best is:

Since we(me?) want that funcionality, How the code or data comes to our application don't should bother us.
Fl.Ge. people has a proxy to feed the METAR strings. That app reads all the METAR files each x minutes and then it can be used by the clients to feed that data.

We can do the same, but with a radical improvement. Our "proxy" could launch that complex code and create simple-to-read-files per each location. Then, under petition, the "proxy" can send a plain text to the client with a content like this:
Code:
station=LEMG
temperature=34
dewpoint=20
...

The code to read that from raydium will be fairly inmediate and of course really easy to modify for our collaborators.
The point in this idea is: Making that server is viable? If needed i can host it in my system (finaly i have static IP).
Also all the weather files(always overwriting the previous ones) can be written in a folder in our current repository of Raydium. In that way the acess to the data, and the code to read it, will be even more easy.

---
And yes, i see what you say about the plugins. This is only one example but people will come eventually with importers, exporters, modifications of the gravity, etc... So yes, we have to take advance now and be prepared for that (in a near future i think).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group