Well guys, it took forever for me to decide on, but...
I will not be reinventing the wheel for sound and creating my own .ogg, .mid, and .wav decoders.i just vomited a little in my mouth typing that...i feel dirty...
I was trying to get .oggs to work, but it got to the point where I was sacrificing quality, and taking too much time on something simple. So I decided that I should just find a library. What better than paulscode's 3D Sound Engine
? It is amazing taking plugins for different formats (so extra space is now optional
space), and making sounds a pleasure to work with. Also, it is WAY more complex and fast than anything I could write up in less than a month.
So I just took paulscode, and did a few things with it:
- You can add in codecs optionally, and if you don't all you get is a Logger
- You can add in LibraryLWJGLOpenAL
optionally too, if you don't plan on using sound!
* All you really need to have is the Sound Engine itself.
- Wrapped everything in a nice Audio
class, which will
* Create an Audio
* Supports .wav, .ogg, and .mid
* Plays, stops, loops, toggles
* Volume, and pitch controls
* Master volume control staticly
You can now use sound like this (as pulled from MERCury.test.AudioTest
RM.loadResource(Audio.loadAudio("res/test/AudioTest/sound.ogg", false), "ogg");
RM.loadResource(Audio.loadAudio("res/test/AudioTest/sound.wav", false), "wav");
else if (in.keyClicked(Keyboard.KEY_O))
Now, there is also a new, slightly less important few changes with Logging
- You can log in different levels, from NULL
, to INFO
, to DEBUG
, to WARNING
, and to SEVERE
(Shuts down program by throwing a SevereLogException
- All initialization in the Runner
is in the present tense, not the past tense (just a standard that I forgot when making it).
- Removed saving to a log file. Will be replaced by a cleaner, and less space consuming method in the next feature.
Also, I have added in a feature in MERCuryException
: have you ever had a non-tech-inclined person ask you what is going on, and you needed the console output, but they have no clue how to get that? Well, now MERCuryException
will save its stack-trace into a [date].stacktrace, which you can direct your users to find, and give. You can disable this static-ly with:
Finally, and probably the most useful, is data-management
added into MERCury.data. This will allow you to:
* Create a new .MERC.dat
* Write to a .MERC.dat
* Parse a .MERC.dat
- Parser version allows you to know whether or not MercData
needs to be updated.
The way this will work, is:
MercData mercdat = new MercData("my/file/location");
this.x = mercdat.getProperty("x");
this.y = mercdat.getProperty("y");
this.health = mercdat.getProperty("hp");
Also, the source code is in next-line braces (gasp!
), since Jev is used to C++ right now.
That is all, and thank you very much for following our progress, and let us know what you think! Every post is just a little bit closer to v1.0
- Team Alluminum
The xmind was appropriately moved into /evilplans, and I refactored some code into more organized packages.P.S.S.
Thanks for 4 reddit readers too! We have a bit to go to beat /r/pics though...