I've been looking a lot at C# and I quite like the way it works. I was wondering if anyone had written a SoundPool or a Timer class for C# game development?
#3 (edited by Ty 2020-05-20 02:04:58)
I also found the Timer() class but could not find any examples on it. In regard to sound, I only found ways to play sounds in the center, and no pool, for example with slots, etc.
It's quite easy to make your own sound pool. Read the BGT one and figure out how it works, then make one similar to it in CS.
Thanks, enjoy, thumbs up, share, like, hate, exist, do what ya do,
my website: masonasons.me
If this post is of any use, why not thumb it up?
Where even is a sound library though? The only formats the System.Media namespace support is .Wav, and, I would rather not have to make an audiogame using nothing aside from wave files.
Did you check out the two links I posted? Those literally give you an example and answer your question in regards to timers and sound.
I did check out the timer link, but I still really need to figure out how they work exactly. In terms of audio, that link threw 404 but I'll try again.
If you are intending to create games, I believe monogame is an option as well. Don’t quote me on this, but I think it supports open Al out of the box.
I will warn you though, it’s very different conceptually from BGT. Very, very different.
I have heard of monogame. For a while I was trying to figure out how to get it to work with CSC/the Mono compiler as VS hates this system but I guess I have to use it. Sighs. Also the link now works for sound, thanks for that. It might have just been my network being special or something.
Can’t comment on whatever you’re using, but it works fine with visual studio. It’s, of course, a bit laggy, but I believe that it’s Visual Studio’s fault.
I'm using NVDA wit VS 2019. The text area itself doesn't lag, the menus do slightly, but the thing my NVDA fucks itself on is the errors / debugging window. I press down arrow and have to wait at least 3 seconds to get speech of what it's focused on.
I unfortunately have not found a fix for that. You have to put up with it and not make a lot of errors, LOL. I’m sorry, I wish I could be more helpful.
I've found that jaws is more responsive in VS. It may be because it's more heavy. Jaws is more for heavy stuff and NVDA is for more light weight. Why it's mainly just the errors window is beyond me though. And I don't like having to switch SR's when using an app but I did it when I used office for a short time so. Just slightly annoying. Gonna have to get used to it. Is there a modified version of monogame for audiogames only out there? I mean with the graphics remove because that would most likely make the package smaller.
No. That would require ripping out nearly half of the engine. If you really don’t care about it you can just put a call to make the screen appear blue in your main update loop. Blue, black, doesn’t matter. Point is, it doesn’t require you to worry about graphics.
Oh, cool. I'm going to do some research on how MonoGame works then. Thanks.
As for something similar to timers I always found stopwatch very suitable. As for something similar to soundpool though I found not much around. However, you have quite a few choices. There is monogame, there is base, and there is munawar's BPC shared component. None of these are bgt soundpool but you also have to take this into account that bgt's way of handling stuff is bgt specific. It's C# and it should be different. If you are really after bgt soundpool in C# as already suggested you have to rap one of the mentioned libraries/compenents and make a bgt soundpool out of them, with bgt's soundpool function names.
Ok Recommendations gone, I have to tell you that if you are going for C# with all seriousness summoned, cope with the difference otherwise you're gonna face a slow development, and needless to say quite painful development while doing your thing. Remember it is not bgt, it is C#. You had this very simple handy function string_to_number to convert strings into numbers but in C# you have to get familiar with type conversions and such. That's just one of the difference.
Or follow me on twitter @kianoosh shakeri
I found BGT much harder than C#. Am I weird?
BGT can be harder than c# even for one simple reason. The material you can find about c# is not even comparable to the one you can find about BGT.
Also imo, it is easier to stick with type conversions than to having to use functions such as string_number. Even though in c# there are some type conversions that have to be done through some methods like Int32.Parse because the simple casting to (string) won't work as far as I can remember.
C# actually has Convert.ToInt32(), Convert.ToInt64(), etc, similar to BGT but I use simple type casting when possible because it's something you have to get used to.
Hi. I'm using monogame and it works great. If you want a good sound engine, I suggest to you to use this.
Its in a very alfa stage, but we have implemented the basic functions to get the basics like 2d and 3d sound (with hrtf included) to work
@20 that looks awesome. I'll have to look into that. Thank you!
taking a quick look at that repository, you're using fmod. Are you aware of the fmod licensing issues with respect to being able to distribute? Looks like their current terms are that you can distribute one game every 12 months without paying but more than that is going to need a chunk of change, which is better than it used to be I think, but still pretty bad.
@22 yea, but at least for me i don't plan to publis a game in a period less than a year so... I'm pretty happy with that.
I'd suggest trying to use bass or irklang, but FMOD's license really sucks.
I also wrote a really basic timer class, but I kinda forgot where I put it.
They're using fmod because fmod has a kind of okay HRTF (maybe a good one now, I'm not sure if it improved). Base has licensing issues as well: you acan distribute as much as you want but if you make money you have to buy it. Much, much more affordable than fmod though.