Garry's Mod
Світ модифікацій у всій красі
Знаходьте доповнення, збереженні ігри, демо та багато чого іншого, а потім додавайте їх у Garry's Mod з натиском кнопки. Хочете створити і поділитися своїми власними творіннями? Натисніть тут, щоб дізнатись як.
WebSDR Radio Mod
There are many addons on the radio in the workshop, but they all use the livestream or just sounds from gamefolder...

I had an idea for a modification that would be able to support real-time playback of WebSDR broadcasts (A WebSDR is a Software-Defined Radio receiver connected to the internet, allowing many listeners to listen and tune it simultaneously).
This will create an opportunity to listen to the broadcast of REAL radio stations in the AM band.

As far as I understand, Java or HTML 5 support is required.
I am sure that there is nothing impossible in this. At least MediaPlayer supports flash and HTML 5.

The only question is to arrange everything beautifully and create a mod.
However, I've been designing and textures all my life and have very little programming experience. I need help.
< >
Показані коментарі 115 із 45
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2891337724

Here, in workshop i found some nice models of Radio from past. It will be ideal for such mod, because this is also use AM.
Display design of radioreceiver should resemble this mod. I think this is a good solution.
You can tune the radio and then hide the display in the mod options and just enjoy listening.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=246756300
Don't use an an ingame browser to playback sound/music streams. It is slower, can crash the game, can be unsafe and does not work for every game version branch. The 3D Stream Radio uses sound.PlayURL() function for playback instead for that reason.

https://wiki.facepunch.com/gmod/sound.PlayURL

This function uses the BASS sound engine that ships with the game. It is quite powerful, but also limited. It can only support actuall sound streams such as mp3, wav, acc etc. BASS can not playback HTML5, videos or websocket content.

Also please don't underestimate the programming in a project, it usually makes up a major part of a project's development time. The 3D Stream Radio addon has like hundreds of progamming hours into it already.
Автор останньої редакції: Grocel; 25 груд. 2022 о 5:35
Цитата допису Grocel:
Don't use an an ingame browser to playback sound/music streams. It is slower, can crash the game, can be unsafe and does not work for every game version branch. The 3D Stream Radio uses sound.PlayURL() function for playback instead for that reason.

https://wiki.facepunch.com/gmod/sound.PlayURL

This function uses the BASS sound engine that ships with the game. It is quite powerful, but also limited. It can only support actuall sound streams such as mp3, wav, acc etc. BASS can not playback HTML5, videos or websocket content.

Also please don't underestimate the programming in a project, it usually makes up a major part of a project's development time. The 3D Stream Radio addon has like hundreds of progamming hours into it already.


Thanx for information.
I'm currently reading the gmod scripting wiki... In general, everything looks pretty clear and there is nothing too complicated. I remembered that once I had to work with scripts in Arma-3 and prescribe arrays of script commands myself ... I think I will succeed in Gmod too .... Let's see.
So, as far as I understand, the websdr control panel is a picture on which radio transmission lines are applied every second. Like an oscilloscope. And all this happens through HTML5.

Conclusion - I need to create a panel that can play a stream in html5, as well as an audio stream, and then attach it to the radio model.
Probably something like an in-game browser window is needed. Perhaps similar mods are available in the workshop. I have to find them and tinker with them to understand how it works...
Please be sure you don't half ass your project though. I have seen a lot of ADHD-Projects that got canceled the first week, because it turned out to be much more work/complex than anticipated.

Using a panel for playing/rendering HTML5 is what I mean with unsing the ingame browser. It does not work with every game version branch, is unstable and can be slow and unsafe. On the "main" branch of the game the ingame browser is very outdated, so it is likely you will get some issues running the webpage on it.

I just want to make sure you can make informed decisions.
Автор останньої редакції: Grocel; 25 груд. 2022 о 16:22
https://www.youtube.com/watch?v=AlfJG5sBYeI

I just found such video, where somebody use Google Chrome browser ingame, like display. And it's perfectly works...
But this mod not exist in Workshop. It may have been removed due to copyright or some such nonsense. Or maybe the author of the mod just didn't want to share it in the public domain... It's strange.

In any case, it works great and shows that everything is functioning stably.
This is likely a dev test of an early project. In this particular case it is very outdated, the video is 13 years old.
Автор останньої редакції: Grocel; 25 груд. 2022 о 16:27
Цитата допису Grocel:
Please be sure you don't half ass your project though. I have seen a lot of ADHD-Projects that got canceled the first week, because it turned out to be much more work/complex than anticipated.

Using a panel for playing/rendering HTML5 is what I mean with unsing the ingame browser. It does not work with every game version branch, is unstable and can be slow and unsafe. On the "main" branch of the game the ingame browser is very outdated, so it is likely you will get some issues running the webpage on it.

I just want to make sure you can make informed decisions.

I am a radio specialist by profession and I have always been attracted to the topic of radio. I tried to do something similar to this mod in other games before, but their engines were too primitive and incapable of rendering anything like html 5. Gmod is much more advanced in this regard. Too bad I found out about him so late.
You shouldn't worry about it. I am burning with this idea and therefore, I am unlikely to calm down until I create such a mod.
Автор останньої редакції: Grocel; 25 груд. 2022 о 16:30
Thanks for the links. They will help me.
And now I will try to poke around inside this media player.
In the original mod, there is a certain list of servers from where you can watch streams. It's youtube, reddit and twitch... I need to change this to a websdr window and attach to another model...

Now I will try to figure it out.

Цитата допису Grocel:
This might help you:

https://wiki.facepunch.com/gmod/Panel:SetHTML
https://wiki.facepunch.com/gmod/Panel:UpdateHTMLTexture

This addon runs with HTML5, so you can take a look at this:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=546392647
< >
Показані коментарі 115 із 45
На сторінку: 1530 50

Опубліковано: 24 груд. 2022 о 19:28
Дописів: 45