Garry's Mod

Garry's Mod

Modding w najlepszym wydaniu
Odkrywaj dodatki, zapisy stanu gry, dema i wiele więcej. Dodaj je do Garry's Mod jednym kliknięciem. Chcesz tworzyć i dzielić się swoimi kreacjami? Kliknij tutaj, aby dowiedzieć się jak.
Breve 1 24 grudnia 2022 o 19: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.
< >
Wyświetlanie 1-15 z 45 komentarzy
Breve 1 24 grudnia 2022 o 19: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 24 grudnia 2022 o 19: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 25 grudnia 2022 o 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.
Ostatnio edytowany przez: Grocel; 25 grudnia 2022 o 5:35
Breve 1 25 grudnia 2022 o 13:40 
Początkowo opublikowane przez 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 25 grudnia 2022 o 15: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 25 grudnia 2022 o 16: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 25 grudnia 2022 o 16: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 25 grudnia 2022 o 16: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.
Ostatnio edytowany przez: Grocel; 25 grudnia 2022 o 16:22
Breve 1 25 grudnia 2022 o 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.
Grocel 80 25 grudnia 2022 o 16: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.
Ostatnio edytowany przez: Grocel; 25 grudnia 2022 o 16:27
Breve 1 25 grudnia 2022 o 16:26 
Początkowo opublikowane przez 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 25 grudnia 2022 o 16:28 
Ostatnio edytowany przez: Grocel; 25 grudnia 2022 o 16:30
Breve 1 25 grudnia 2022 o 16: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.

Początkowo opublikowane przez 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
< >
Wyświetlanie 1-15 z 45 komentarzy
Na stronę: 1530 50

Data napisania: 24 grudnia 2022 o 19:28
Posty: 45