3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Live Streaming Radio  (Read 164 times)

« on: March 04, 2014, 09:30:16 PM »
Curious.
Is it feasible to approach the idea of adding a live-streaming radio to 3D Rad? I've been highly curious about this. Since scripting has a downloading in-game function, would it not be possible to have, say, an internet radio playing in the game you've created?
Just wondering. It'd be pretty cool if this was possible.
« Reply #1 on: March 05, 2014, 05:43:22 AM »
It would be sort-a possible. You can download audio files from the internet and refresh the audio object, however, you cannot do this at runtime. You'd have to download the entire program of the day or download each new song.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #2 on: March 05, 2014, 06:59:31 AM »
ah, that was expected. thanks!
« Reply #3 on: March 06, 2014, 10:42:08 AM »
here's something that ya might not have expected Nick...

Roberto was right when he said sorta possible... he gave you one option...

here's another...

let 3DRAD run an internet radio player minimized in the background...

if ya don't already have one, go here and get this decent, small, easy to use one...
SureRadio http://www.radiosure.com/downloadz/downloadz-select/ (select the local mirror and avoid the downloader crap)... install it...

i think we could use windows media player, but i found this simpler...


next...

lets write up a batch file so we can run it automatically from a command line prompt...  the  the only line that needs to be in the batch file will look like this... c:\program files\radiosure\radiosure.exe" /hidden /source="http://provisioning.streamtheworld.com/pls/WLWKFMAAC.pls"

the first part runs the app and the second 2 are options for running the app minimized and a station to connect to...

save it as PlayRadio.bat in your 3DRAD folder...

then open the 3DRAD editor and add a script object...  the only line you need in the script object will look like this...   if(iInitializing()) iCommandContinue("playRadio.bat");

you can add other stuff like a terrain and a cam 1st person so you can be doing something while the player streams in your radio content...


that should do what you want...


--Mike

« Last Edit: March 06, 2014, 10:48:13 AM by Mike Hense »
« Reply #4 on: March 06, 2014, 11:57:28 AM »
Now that /was/ unexpected.
Thanks a ton Mike. That will come in very useful.
Now, would it be remotely possible to "print" what the name of the song playing is?
« Reply #5 on: March 07, 2014, 06:10:01 PM »
i think that you may be able to come up with something, but not sure if you'll be able to see what's playing...

ya gotta look to see if the player exports the data first of all... right now i don't have the time to focus on this, and i right clicked on the player to get the .pls file to play by default...

good luck...


--Mike

« Reply #6 on: March 07, 2014, 09:09:28 PM »
The answer most likely lies in the String functions. There's a way to read strings that are input from the project, and I had a little project with an example I made but it keeps crashing because of a bug :-\

I think the scripted path editor Shadmar made has a way for the script to read the filename of MyPath.txt to properly import the path, so if that can read the name, I'm sure it can read the stream name. http://www.3drad.com/forum/index.php?topic=2325.0

That is, if the stream has an actual filename and not something like e876frey437hf8y8hf4.ogg or something like that. And the name (of the stream) wouldn't be able change either.
« Reply #7 on: March 07, 2014, 09:38:38 PM »
Thanks guys. Helped a ton!
Pages: [1]