Digital Paint Discussion Board

Paintball 2: The Game => Paintball 2 Discussion => Topic started by: mRokita on September 19, 2014, 01:42:15 AM

Title: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on September 19, 2014, 01:42:15 AM
DPMusic v1.3
(http://htmldp.com/dpmusic/dpmusic.gif)
How to use it?
Quote from: README_DPMUSIC.TXT
                              [ATTENTION!]
         Read the information below to learn how  to use
                         DPMusic with Paintball2
                      
                   Running DPMusic with Paintball2
Now DPMusic runs from paintball2.exe, so click on any of your paintball2 shortcuts and enjoy listening to your music :).

                              Adding music
To add a music file (Only mp3s are supported.),
just copy a music file to /pball/music
(Propably C:\Games\Paintball2\pball\music).
No subdirectories are supported yet.

                       Accessing the DPMusic menu
To access DPMusic, click Play > DPMusic by hTml.
If you are playing on a server, click Esc > DPMusic by hTml.
PCDP mod:
Main menu > DPMusic by hTml (near the "QUIT" and "PLAY" buttons.)
Ingame menu > DPMusic
                                                             Have fun!
How does it work?
When you run the paintball2_plus_dpmusic.bat file it just starts paintball2 and the DPMusic executable.
When you enter the DPMusic menu and click any button, paintball just saves the console text to a text file that DPMusic app reads. (the console dump will never be uploaded!!! It doesnt even require a stable internet connection.).
How to download it?
Just download the installer here (If you update from older version, just install the new version over an existing installation): http://dpmusic.htmldp.com/index.php?download=installer (http://dpmusic.htmldp.com/index.php?download=installer)
If you are more advanced and you dont want to use an installer, here is a .zip file: http://dpmusic.htmldp.com/index.php?download=zip (http://dpmusic.htmldp.com/index.php?download=zip)
What has changed since v1.2?
Here's a complete list:
[Feature] More visible "Update Available" window
[Feature] Support for PCDPMod
[Feature] DPMusic is now configurable.
[Feature] Uninstaller added ;D
[Feature] Playing from specified time.
[Feature] paintball2_plus_dpmusic.bat is no longer required.
[Feature] 'Reload directory content' option
[Feature] Binds menu.
[Bugfix ] Some minor bugfixes.
Is it safe?
Yes. Here is a virustotal scan: https://www.virustotal.com/pl/file/619bf0d4bcb278caab124159790b5fbf80c87430ba2d75be9c87b614ac9db734/analysis/1411111678/ (https://www.virustotal.com/pl/file/619bf0d4bcb278caab124159790b5fbf80c87430ba2d75be9c87b614ac9db734/analysis/1411111678/)
Where can i see the source code?
Here: http://dpmusic.htmldp.com/DPMusic.py.txt (http://dpmusic.htmldp.com/DPMusic.py.txt)
I'm waiting for bug reports and feature requests!
Greetings,
hTml

Project's homepage: http://dpmusic.htmldp.com (http://dpmusic.htmldp.com)
Title: Re: DPMusic v1.0 - An ingame mp3 player!
Post by: xrichardx on September 19, 2014, 07:53:14 AM
Why install an additional executable? PB2 is able to play .ogg files itself, Oberhippie even made a menu for controlling the playback. You could also just use your regular music player with some hotkeys which most of the media players support today.

So in my opinion, there is not much sense in using this.
Title: Re: DPMusic v1.0 - An ingame mp3 player!
Post by: mRokita on September 19, 2014, 07:56:21 AM
Its lightweight and works on my comp :P
No lags on an 5 year old asus eeepc netbook.
Title: Re: DPMusic v1.0 - An ingame mp3 player!
Post by: promarijan on September 19, 2014, 08:32:19 AM
I've done smth like that in easier for myself too!

But first you dont need a batch and no executable!
Its one single menu that has to be copied...
I think that this is not necessary at all!

Second, don't call it "MP3 player" when it is no mp3player! It is just an ogg player!

The quality of the ingame oggplayer is not nearly as good as others (vlcplayer) in terms of quality and reproducing the sound correctly!


I would still use a external player instead of the ingame player just how richard said! The feature is nice to have, but not really good in comparison!
Title: Re: DPMusic v1.0 - An ingame mp3 player!
Post by: mRokita on September 19, 2014, 08:33:55 AM
I've done smth like that in easier for myself too!

But first you dont need a batch and no executable!
Its one single menu that has to be copied...
I think that this is not necessary at all!

Second, don't call it "MP3 player" when it is no mp3player! It is just an ogg player!

The quality of the ingame oggplayer is not nearly as good as others (vlcplayer) in terms of quality and reproducing the sound correctly!


I would still use a external player instead of the ingame player just how richard said! The feature is nice to have, but not really good in comparison!
it doesnt play .ogg files...
The quality of the player is really nice - tested with my Sony MDR XB 500 headphones...
Title: Re: DPMusic v1.0 - An ingame mp3 player!
Post by: nada on September 19, 2014, 08:34:20 AM
If you don't want it it's ok. Nobody said you have to install it. It's just kinda cool that people still help the DP community. I use it.
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: mRokita on September 21, 2014, 12:24:00 PM
DPMusic v1.1
[BUGFIX] The app doesnt crash on mp3s with no title/artist specified.
Thanks to Mc.Clone for finding this.
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: Ace on September 21, 2014, 02:11:18 PM
Cool idea, putting your name after every song, bad idea. (DPMusic by html)
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: mRokita on September 21, 2014, 02:16:04 PM
Cool idea, putting your name after every song, bad idea. (DPMusic by html)
Ok ill remove "by html" in v1.2. Ill release it tomorrow (propably).
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: Cameron on September 21, 2014, 09:50:59 PM
music player is fine, but please not an 'im listening to this' script.  there was enough of those on msn and irc back in the day, and i couldn't care less what anyone listens to, like i wouldn't expect them to care what i'm listening to.
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: FusSioN on September 22, 2014, 03:18:48 AM
i'd be happy showing off to people that i'm listening to sandstorm.
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: TehShwayze on September 22, 2014, 10:36:34 AM
Cameron no need to be so darn rude. You don't have to use the darn script if you don't want to. It was simply provided to those who wish to.

Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: xrichardx on September 22, 2014, 10:48:12 AM
I want to go a bit deeper into this. First of all: I appreciate that you try to help others and think that you are a very nice person, but i just think this whole thing is wrong in many different ways. You may also interprete the following aspects as feature requests, but my main goal is to raise awareness.


1. There is no real need for using an extra application in order to play music in paintball. It supports playing .ogg files with the vorbis library which puts out high-quality sound and has the same basic features (list of songs, play, pause, stop, volume up & down)

2. You give your application without a way for us to really check whether it's free of malicious code. We're already had incidents where some people phished other people accounts: http://dplogin.com/forums/index.php?topic=27074.0 . Why don't you release the source code? It is possible that your program does something forbidden and using it might result in a ban for people using it. It is possible that you want to get login information for other users profiles. It's just a bad habit to hide information where it shouldn't be necessary to hide it. By making others download this without having real proof (the virustotal scan won't detect malicious code that gets pb users banned or uploads their login credentials) you train them to just download things they can not trust. This is something that should not be done at all, no matter who or what.
You develop for a community and you don't want to earn money by programming this. You do this for an open source game. You use an interpreted language which was designed to make all programs written in it open source. And then you hide behind an installer, don't give any source and donut really make it easy for people to trust you. I think I know you a little bit, and probably you only programmed this for the sake of programming, but the way you published it makes it look like a scam.

3. You say an advantage of your application is that it is lightweight. The installer you provide has a size of 2.3MB. Considering that paintball is already able to play music files, this is 2.3MB too much. Considering that the dll of the bass library, a library that allows programs to play many different sound files including flac, mp3, wav and ogg, is about 100KB large, this is 2.2MB too much.

4. The way your program works is not a good one. Writing a complete consoledump just to give one parameter to another program is something you should not even think about as a programmer who is interested in his users. Just imagine some had installed paintball on a SSD. And you constantly unnecessarily write to it which slowly kills it. I know there is no real way to pass something from an ingame menu to an external application, but then again I have to tell you that there actually is no need for an external application.

5. You upload an installer. I can't support that. Users have no clue what it does, where it diggs into the system an so on. After using it a while, all windows users complain (or at least used to complain) about their PCs being slow as hell. Well, one point of making it slow is running installers like yours. Why don't you just put all needed files into an archive and upload that? Putting a .pak and an .exe file in the right directory is something every user will be able to if they are just told too and then at least they know what exactly was modified.
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: Clipz on September 22, 2014, 11:33:08 AM
music player is fine, but please not an 'im listening to this' script.  there was enough of those on msn and irc back in the day, and i couldn't care less what anyone listens to, like i wouldn't expect them to care what i'm listening to.
I honestly couldn't agree more!

Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: mRokita on September 22, 2014, 11:36:51 AM
@ xrichardx
1. Yeah, but who uses .ogg for music and can you get the track title with it?
2. http://htmldp.com/DPMusic/DPMusic_source.txt (http://htmldp.com/DPMusic/DPMusic_source.txt)
3. I mean the CPU/RAM usage not the disk space :) Talk to py2exe developers ;)
4. ^ 1st point
5. That's True, but an installer is more user-friendly. I will upload a zip archive with v1.2 too.
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: xrichardx on September 22, 2014, 12:36:11 PM
Yeah, but who uses .ogg for music and can you get the track title with it?
quote: Ogg Vorbis uses "Xiph Comments" (same as later versions of FLAC and Speex), which are embedded into the Ogg container. You can find information on these in the comment and container specs on www.xiph.org  (from http://id3.org/Introduction)
To use your program, you have to download your app, install it, put all the music in the right folder and then you can listen to music while playing. To use the ingame ogg player, you have to download a program that converts mp3 to ogg, run it in your mp3 folder and copy the ogg files into the paintball 2 music folder. Its the same amount of steps with the difference that nothing is installed and you dont need to run an additionial executable all the time.

I mean the CPU/RAM usage not the disk space Smiley Talk to py2exe developers Wink
I think in terms of CPU/RAM usage, running an interpreted language is certainly not the best way. The ingame music player which is compiled and does not need an additional application should have a lot less load.
Also, as I said, python was not designed to be compiled. Its a language designed for interpreted open source projects. So noone cared about hiding the source or compiling. What py2exe does is putting the interpreter and the sourcecode into an executable, hence the big filesize.

Thank you for the source and the upcoming non-installer version :).
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: Oberhippie on September 22, 2014, 12:40:18 PM
Thank you for the source and the upcoming non-installer version :).
+1
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: freakii on September 22, 2014, 12:52:18 PM
Thank you for the source and the upcoming non-installer version :).
+1
Title: Re: DPMusic v1.1 - An ingame mp3 player!
Post by: Ace on September 22, 2014, 02:11:59 PM
Its the same amount of steps with the difference that nothing is installed and you dont need to run an additionial executable all the time.

Or you could just foobar2000 and call it day.
Title: Re: DPMusic v1.2 - An ingame mp3 player!
Post by: mRokita on September 24, 2014, 01:09:30 PM
DPMusic v1.2 released!
Download: (If you update from an older version, just install the new version over an existing installation): http://dpmusic.htmldp.com/index.php?download=installer (http://dpmusic.htmldp.com/index.php?download=installer)
If you are more advanced and you dont want to use an installer, here is a .zip file: http://dpmusic.htmldp.com/index.php?download=zip (http://dpmusic.htmldp.com/index.php?download=zip)

Changes:
[Feature] Auto update check.
[Feature] New layout.
[Feature] Sound rewind function (10 secs forward/10 secs backward).
[Feature] Offset changed from 1 sec to 0.1 sec
[Feature] When no title/artist is specified, app will say the filename.
[Feature] Changed the [DPMusic by hTml] tag to [DPMusic]
[Bugfix ] Some minor bugfixes.
Title: Re: DPMusic v1.2 - An ingame mp3 player!
Post by: mRokita on September 24, 2014, 03:45:40 PM
Sorry for a fail - i wrote index.html?download= instead of index.php?download= so the download links didnt work.
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on October 10, 2014, 02:12:49 PM
DPMusic v1.3 released!
Download: (If you update from an older version, just install the new version over an existing installation): http://dpmusic.htmldp.com/index.php?download=installer (http://dpmusic.htmldp.com/index.php?download=installer)
If you are more advanced and you dont want to use an installer, here is a .zip file: http://dpmusic.htmldp.com/index.php?download=zip (http://dpmusic.htmldp.com/index.php?download=zip)

Changes:
[Feature] More visible "Update Available" window
[Feature] Support for PCDPMod
[Feature] DPMusic is now configurable.
[Feature] Uninstaller added ;D
[Feature] Playing from specified time.
[Feature] paintball2_plus_dpmusic.bat is no longer required.
[Feature] 'Reload directory content' option
[Feature] Binds menu.
[Bugfix ] Some minor bugfixes.
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on December 14, 2014, 04:47:08 AM
DPMusic v1.4 is coming :)
Incoming features:
>Smaller ingame menu - no hudscale changes
>Support for directories/music albums
>More intuitive menu :)
>?
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on December 15, 2014, 03:02:19 PM
http://www.htmldp.com/dpmusic-v1-4-ingame-menu/ (http://www.htmldp.com/dpmusic-v1-4-ingame-menu/)
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: jitspoe on February 16, 2015, 12:10:50 AM
So I finally checked this out.  A couple things:

Why do you force the hudscale to 1.6?  Forcing it is bad enough, but using non-integer values causes it to look really bad (it has to blur the texture, and sometimes causes some really ugly artifacts).  Anybody who tries this is going to have their settings stuck like that.

Renaming the executable is kind of an annoyance for me.  The cheat detection picks up on that (since some cheats require the executable to be a certain filename since they were designed for other games), so it generates a bunch of false positives I have to ignore.

Why is the executable so large?  The game is only like 600k, and that exe is 4 megs... not that it's a huge deal.  Just weird.
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on April 05, 2015, 11:56:36 AM
Why do you force the hudscale to 1.6?  Forcing it is bad enough, but using non-integer values causes it to look really bad (it has to blur the texture, and sometimes causes some really ugly artifacts).  Anybody who tries this is going to have their settings stuck like that.
Yeah, it's bad, i've resized the menu to make it useful on 600x800 in 2.0.

Renaming the executable is kind of an annoyance for me.  The cheat detection picks up on that (since some cheats require the executable to be a certain filename since they were designed for other games), so it generates a bunch of false positives I have to ignore.
I'm sorry :/
Why is the executable so large?  The game is only like 600k, and that exe is 4 megs... not that it's a huge deal.  Just weird.
It's a py2exe compiled python script - i was wondering if I should rewrite it to Java or something else, but Python works well with MCI so i don't have to fight with the copyright stuff.
That's the only reason :) The app works really smooth though (about 1% CPU on my 1-cored asus eeepc).
I'm sorry for answering so late.

V2.0 preview:
(https://mrokita.pl/img/scrn-05-Apr-19-50-32.png)(https://mrokita.pl/img/scrn-05-Apr-19-51-29.png)
Features:
>support for albums
>completely rewritten
>quick pause/unpause/next track/previous track menu
>custom mp3 directory
>ID3 tag/directory name based album detection
>album arts
>nicer menu
>bugfixes
>auto downloading album arts
>some buttons replaced with smaller icons
>cleaner code =D
>filenames replaced with id3 titles
>support for directory trees

Sorry for my English ;)
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: ecoli on April 05, 2015, 06:24:06 PM
Renaming the executable is kind of an annoyance for me.  The cheat detection picks up on that (since some cheats require the executable to be a certain filename since they were designed for other games), so it generates a bunch of false positives I have to ignore.
I'm sorry :/

Is that fixed now or will it still generate false positives in the cheat detection?
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on April 06, 2015, 01:42:54 AM
Is that fixed now or will it still generate false positives in the cheat detection?
It i'snt and propably won't be, i like this feature too much =d.
Nobody has been banned for that (many ppl use v1.3), dont worry.
The only person it affects is jitspoe.
However, if you want an option to disable it, let me know. I can add it, but it will be manual, I don't want the default installation to be more complicated. (You will have to run dpmusic.exe to run paintball2+dpmusic then)
As i said, im sorry for annoying jitspoe, i'm sure he can hide the false positives. The executable's name is (and will be) paintball2_nodpmusic.exe, so its quite useless for hacks.
Nobody was/will be banned for that since its not a hack and the false positives should be easy to skip. The only thing it does is renaming paintball2.exe to paintball2_nodpmusic.exe and replacing it. Just to improve your experience with DPMusic
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: pvtjimmy on April 06, 2015, 04:12:09 AM
The executable's name is (and will be) paintball2_nodpmusic.exe, so its quite useless for hacks.

Sorry to say man, but if only I was a talented programmer I would now start developing a hack that would use your .exe for the cheats, since Jitspoe isn't really paying attention to it. You should really look for a different solution.
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: ic3y on April 06, 2015, 04:27:37 AM
As i said, im sorry for annoying jitspoe, i'm sure he can hide the false positives.
But its not his job. You should fix that.
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on April 06, 2015, 05:53:42 AM
But its not his job. You should fix that.
I can't do it at the moment, it seems to be impossible without  removing this feature.
I like it too much to do it.
Sorry to say man, but if only I was a talented programmer I would now start developing a hack that would use your .exe for the cheats, since Jitspoe isn't really paying attention to it. You should really look for a different solution.
Running paintball2.exe from DPMusic is the best possible solution, even if running executables/bats from DP was possible [It won't be because it would be a major security hole].
Yeah, i could modify the game but this is still the same thing.
+it's not an advantage for hackers (i don't mean cheaters) since jitspoe said
Quote
The cheat detection picks up on that (since some cheats require the executable to be a certain filename since they were designed for other games)
It doesn't make any new security hole.
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: Clipz on April 06, 2015, 11:20:07 AM
How many people are going to use this anyways? Most people use YouTube or pandora anyways.
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on April 06, 2015, 11:25:58 AM
How many people are going to use this anyways? Most people use YouTube or pandora anyways.
V 1.3 had 298 downloads.
2 biggest advantages:
-doesnt change the ingame experience even on netbooks
-much easier to play music on fullscreen
Title: Re: DPMusic v1.3 - An ingame mp3 player!
Post by: mRokita on April 06, 2015, 02:45:42 PM
A small update:
(http://mrokita.pl/img/scrn-06-Apr-22-43-07.png)(http://mrokita.pl/img/scrn-06-Apr-22-45-14.png)