Garry's Mod

Garry's Mod

模组之巅
探索插件、游戏存档、录像以及更多内容。只需轻松一点即可将它们添加至 Garry's Mod 游戏中。想要创建并分享属于您的创作品吗?点击这里以了解更多。
Breve 1 2022 年 12 月 24 日 下午 7:28
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.
< >
正在显示第 1 - 15 条,共 45 条留言
Breve 1 2022 年 12 月 24 日 下午 7:29 
Breve 1 2022 年 12 月 24 日 下午 7:33 
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.
Breve 1 2022 年 12 月 24 日 下午 7:36 
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
Grocel 80 2022 年 12 月 25 日 上午 5:34 
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 编辑于; 2022 年 12 月 25 日 上午 5:35
Breve 1 2022 年 12 月 25 日 下午 1:40 
引用自 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.
Breve 1 2022 年 12 月 25 日 下午 3:57 
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.
Breve 1 2022 年 12 月 25 日 下午 4:11 
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.
Breve 1 2022 年 12 月 25 日 下午 4:17 
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...
Grocel 80 2022 年 12 月 25 日 下午 4:19 
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 编辑于; 2022 年 12 月 25 日 下午 4:22
Breve 1 2022 年 12 月 25 日 下午 4: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.
Grocel 80 2022 年 12 月 25 日 下午 4:25 
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 编辑于; 2022 年 12 月 25 日 下午 4:27
Breve 1 2022 年 12 月 25 日 下午 4:26 
引用自 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 80 2022 年 12 月 25 日 下午 4:28 
最后由 Grocel 编辑于; 2022 年 12 月 25 日 下午 4:30
Breve 1 2022 年 12 月 25 日 下午 4:34 
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
< >
正在显示第 1 - 15 条,共 45 条留言
每页显示数: 1530 50

发帖日期: 2022 年 12 月 24 日 下午 7:28
回复数: 45