Talk:Common Code Locations
From VbGORE Visual Basic Online RPG Engine
This might be a better way to format the example:
GameClient.vbp
Sound_Play
This piece of code controls the volume of weather sound effects (NOT 3d sound effects such as the waterfall). The zero that label 1 is pointing to is the default, and maximum volume. Sound_Volume can take anywhere from -10000 to 0 (-10000 being no sound, 0 being maximum). In my code, I chose -500 as a temporary fix because 0 seemed too loud.
Original Code
<vb>'Confirm the buffer exists
If Not SoundBuffer Is Nothing Then
'Reset the sounds values (in case they were ever changed)
SoundBuffer.SetCurrentPosition 0
Sound_Pan SoundBuffer, 0
Sound_Volume SoundBuffer, 0 '<----- 1
'Play the sound
SoundBuffer.Play flags
End If</vb>
Edited Code
<vb>'Confirm the buffer exists
If Not SoundBuffer Is Nothing Then
'Reset the sounds values (in case they were ever changed)
SoundBuffer.SetCurrentPosition 0
Sound_Pan SoundBuffer, 0
Sound_Volume SoundBuffer, -500 '<----- 1
'Play the sound
SoundBuffer.Play flags
End If</vb>
--kyori 01:59, 9 January 2009 (CST)
Discussion for above formatting
Forgive me if this isn't the way to do discussions, this is my first wiki experience. Anyway, the only thing about that format that I disagree with is that a hierarchy assumes that there will be more subcategories. I was thinking this would be more of a single contribution type of thing. Not "GameClient.vbp code goes here, GameServer code goes there, etc". You probably have something else in mind however in terms of overall organization that i'm not seeing, and maybe it's better haha. Those are just my thoughts however. I'm definitely open to whatever.
- That is exactly what I was implying by creating a heirarchy like that. I was assuming that was the effect you were going for. That way all of the code that you'd need to edit GameServer.vbp for would be in one place, the same with other files. However it is your page, and you know what it is you're aiming for, so don't let me confuse things xD
Make sure to sign your comments with the "Your signature with timestamp" button! =P
--kyori 06:31, 9 January 2009 (CST)
- Yeah actually that does sound good. For some reason I was thinking that people wouldn't need that type of organization because they'd only be editing a few miscellaneous things. If you were to browse the list however, or if you wanted to edit a bunch of things on one file, then the hierarchy would work well. Thanks for the idea, and I'm changing it now.
--Olsonpm 14:31, 9 January 2009 (CST)
- I made one change, and that is to have sub-headers and sub sub-headers to define the file and the sub name respectively. The actual header was for the VB Content section which will hold all of the contributed code. Were you thinking something different might work better?
--Olsonpm 14:51, 9 January 2009 (CST)
- Nope, I only made it a header because it was less key presses =P Like I said, it's your page, deciding whether or not to make something a header or a sub-header isn't exactly wiki-breaking stuff, so it's pretty much up to you to do it how you feel it works best. My example was just a general idea of how it could be done, to give you an idea of..uh..my idea =P
--kyori 16:38, 9 January 2009 (CST)