2020-05-20 00:59:47

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?

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-20 01:15:37

Googling C# timers brought me this link. That's about 10 seconds of your time.
I understand the sound pool question, but you could have typed in "sound libraries in c#" and possibly found this Stackoverflow question. You could then have made your question more specific.

Thumbs up

2020-05-20 02:04:41 (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.

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-20 02:43:54

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.

Follow on twitter! @masonasons_me
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?

2020-05-20 03:38:19

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.

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-20 05:12:45

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.

Thumbs up

2020-05-20 13:50:59

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 this post was helpful, amusing or what have you, why not thumb it up?

2020-05-20 15:16:29

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.

Thumbs up

2020-05-20 15:21:28

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.

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-20 17:33:24

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.

Thumbs up

2020-05-20 20:34:20

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.

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-20 20:42:55

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.

Thumbs up

2020-05-20 22:29:06

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.

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-20 23:33:08

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.

Thumbs up

2020-05-21 01:04:22

Oh, cool. I'm going to do some research on how MonoGame works then. Thanks. smile

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-21 09:22:13

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.
Good luck

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2020-05-21 10:07:39

I found BGT much harder than C#. Am I weird?

“If you are not united,” Jamuka said in a low voice, “you can be broken by those of no importance, just like a single arrow. If you unite, you will be as solid as the five arrows and no person will break you.”

2020-05-21 11:27:45

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.

if you wish,  you could give a look at my github profile.
If you want to get in touch with me you can follow me on Twitter
have a nice day.
Paul

2020-05-21 14:54:41

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.

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-21 15:42:18

Hi. I'm using monogame and it works great. If you want a good sound engine, I suggest to you to use this.
https://github.com/sanslash332/exploudEngine
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

Sorry for my english

Thumbs up

2020-05-21 17:13:54

@20 that looks awesome. I'll have to look into that. Thank you!

If this post was helpful, amusing or what have you, why not thumb it up?

2020-05-21 17:21:40

@20
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.

My Blog
Twitter: @camlorn38

2020-05-21 18:55:34

@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.

Sorry for my english

Thumbs up

2020-05-21 19:00:17

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.

What you want is of no consequence to me.

2020-05-21 19:14:16

@24
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.

My Blog
Twitter: @camlorn38