Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-29 Thread AudioGames . net Forum — Off-topic room : Blind angel 444 via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. @Aprone, thank you for these tutorials on coding and can someone please post the link for beginners since I’m still learning the language. This is advanced for me but very helpful. URL: https://forum.audiogames.net

Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-29 Thread AudioGames . net Forum — Off-topic room : Rastislav Kiss via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hi there,@62: you can imagine it easily from sine's and cosine's diagrams (warning, I mean diagrams, not function graphs).Imagine a 2d graphing plane, with x axis going from left to right, and y axis from

Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-29 Thread AudioGames . net Forum — Off-topic room : Rastislav Kiss via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hi there,@62: you can imagine it easily from sine's and cosine's diagrams (warning, I mean diagrams, not function graphs).Imagine a 2d graphing plane, with x axis going from left to right, and y axis from

Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-29 Thread AudioGames . net Forum — Off-topic room : Rastislav Kiss via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hi there,@62: you can imagine it easily from sine's and cosine's diagrams (warning, I mean diagrams, not function graphs).Imagine a 2d graphing plane, with x axis going from left to right, and y axis from

Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-29 Thread AudioGames . net Forum — Off-topic room : Rastislav Kiss via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hi there,@62: you can imagine it easily from sine's and cosine's diagrams (warning, I mean diagrams, not function graphs).Imagine a 2d graphing plane, with x axis going from left to right, and y axis from

Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-29 Thread AudioGames . net Forum — Off-topic room : Rastislav Kiss via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hi there,@62: you can imagine it easily from sine's and cosine's diagrams (warning, I mean diagrams, not function graphs).Imagine a 2d graphing plane, with x axis going from left to right, and y axis from

Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-29 Thread AudioGames . net Forum — Off-topic room : Rastislav Kiss via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hi there,@62: you can imagine it easily from sine's and cosine's diagrams.Imagine a 2d graphing plane, with x axis going from left to right, and y axis from bottom to top. On this plane, imagine a cyrcle wit

Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-28 Thread AudioGames . net Forum — Off-topic room : Nuno via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. I know this question might be stupid, but I am genuinely interestedi n the process.How does the cosine relate to the horizontal, and sine to the vertical line? DOes it have to do something with the function graphs? I

Re: Learning how to code free movement and panning in a game like Swamp.

2020-05-28 Thread AudioGames . net Forum — Off-topic room : chrisnorman7 via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hi all,Afraid I've done that most terrible of things! I've copy and pasted Aprone's wonderful formula into my own code, without really understanding the maths behind it.It's all working fine, exc

Re: Learning how to code free movement and panning in a game like Swamp.

2017-04-29 Thread AudioGames . net Forum — Off-topic room : brian . kurosawa via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. I understud all of the consepts of the code, but i'm not able to think on how we could play a footstep sound exactly whem the player moves a distance of 1.0 from their previous spot. Is there a formula to solve i

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-23 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Yeah. You probably can't actually fix that, and in practice it's not noticeable.See, the thing is that two floats are almost never equal.  The only time you can be sure that a==b is if you type out the va

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-23 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. So, This just pans a sound based on a location 1 coord away.But it also says that the sound is behind when it is really to the side. See the following prints:print pan_value((3, 2), 90, (5, 2))print pan_value((4, 2

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Okay. So, here is an informative Python repl session.>>> import timeit >>> timeit.timeit(lambda: pan_value((5, 0), 90, (2, 0)), number=1)/1.0 1.0377488363072835e-05 >>> timeit.tim

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Okay. So, here is an informative Python repl session.>>> import timeit >>> timeit.timeit(lambda: pan_value((5, 0), 90, (2, 0)), number=1)/1.0 1.0377488363072835e-05 >>> timeit.tim

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hm, You're right, I'm very lost on this code... I did however make it python 2 and 3 compliant I believe as well as sped it up to 1/3 it's original speed.from math import cos, sin, sqrt, atan2,

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hm, You're right, I'm very lost on this code... I did however make it python 2 and 3 compliant I believe as well as sped it up to 1/3 it's original speed.from math import cos, sin, sqrt, atan2,

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hm, You're right, I'm very lost on this code... I did however make it python 2 and 3 compliant I believe as well as sped it up to 1/3 it's original speed.from math import cos, sin, sqrt, atan2,

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. My east is at 0 because I was trying not to break the convention too badly, but Aprone's east is at zero most likely because this is how trigonometry works.  The standard convention in the literature is east

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. I'll go through camlorn's code and see what he's doing. It's just a little different than what Aprone did.BTW, you can copy and paste the code into EdSharp and do a ctrl+r and type:replace:    w

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. I'll go through camlorn's code and see what he's doing. It's just a little different than what Aprone did.BTW, you can copy and paste the code into EdSharp and do a ctrl+r and type:replace:    w

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. The following code is correct as far as I can tell.  I included the test cases.  The function pan_value returns two things: a value between -1 and 1 as above and a true/false value that tells you if the object is

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : Aprone via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Which parts Are working for you?  For example, can you measure the angle that your character is facing?  Can you measure the angle between you and the sound you are trying to hear?  Perhaps listing what parts are

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Well,The problem is that each set of code that was typed out here is different and none of it seems to work for me. Granted I am not the best at BGT, so there could have been some new thing that was introduced above

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : Aprone via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. frastlin wrote:Aprone really likes dividing his numbers by 0 doesn't he When there's nothing good on TV, I often sit around dividing numbers by zero.    It's fun!  ROFL!I'd weigh in and help with

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hello,I'm using python2, but I converted all numbers to a floatingpoint.Here is what aprone says about pa:If relativetheta was equal to zero, then the sound is exactly in front of us.  If relativetheta equals 45

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hello,I'm using python2, but I converted all numbers to a floatingpoint.Here is what aprone says about pa:If relativetheta was equal to zero, then the sound is exactly in front of us.  If relativetheta equals 45

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hello,I'm using python2, but I converted all numbers to a floatingpoint.Here is what aprone says about a:If relativetheta was equal to zero, then the sound is exactly in front of us.  If relativetheta equals 45

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-22 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hello,I'm using python2, but I converted all numbers to a floatingpoint.According to aprone's first post, 270 is facing north. His  equation:elif temp2 <= 0:        a = atan(temp1/temp2) + pidoesn'

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. You probably don't have the background to understand either of these fully.  There is no gameobjects documentation because anyone who understands 3d transformation matrices will immediately get it from the fun

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. I didn't even see any good documentation on gameobjects, just the API...I think I'm closer to figuring this out than gameobjects...But I don't know what atan does, so don't know how to error-ch

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. A good transformation matrix library in Python is gameobjects.  The tutorial I need to write is the important bit here: it's like having the sine and cosine functions in that you can call them but probably ha

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hello,I changed everything to floats and entered pi and I still get the wrong result.I believe with the player at 10,2 and the sound at 5,2 the result should be -90, but with the sound at 15,2 the sound should be at

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. I think your problem may be the integers.  Is this Python 2 or 3?  Because if it's 2, you've got a truncating division or 10.  Replace 5 with 5.0, etc, or wrap your variables in float() before usi

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : camlorn via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. I think your problem may be the integers.  Is this Python 2 or 3?  Because if it's 2, you've got a truncating division or 10.  Replace 5 with 5.0, etc, or wrap your variables in float() before usi

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hello,So taken my assumptions from the above post, I did:#start codeimport mathsqrt = math.sqrtsound = (5,2)player = (10,2)theta = 270mya, myb = playersounda, soundb = soundtemp1 = sounda - myatemp2 = myb - soundbif

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hello,Going through the code on the first page, I just want to make sure I have the correct understanding of the terms as some could have a couple interpretations:sqr is square root and not squared correct? In most

Re: Learning how to code free movement and panning in a game like Swamp.

2015-01-21 Thread AudioGames . net Forum — Off-topic room : frastlin via Audiogames-reflector
Re: Learning how to code free movement and panning in a game like Swamp. Hello,Going through the code on the first page, I just want to make sure I have the correct understanding of the terms as some could have a couple interpretations:sqr is square root and not squared correct? In most