Re: Grand theft Access

2020-03-28 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Grand theft Access

@Liam,This project is awesome.  Just letting you know that the link given in your above post does not work.  Not sure if that means the page isn't created yet, or whether it means that the page is down, but this is the error I receive:This site can’t be reachedgt11y.com’s server IP address could not be found.Just thought you should know in case there's a problem.

URL: https://forum.audiogames.net/post/513257/#p513257




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Getting started with coding audiogames in Python?

2019-03-15 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Getting started with coding audiogames in Python?

So maybe my questions will make me seem like an idiot, but I'll ask them anyway.  As the name of this topic suggests, if I want to start to learn Python, what resources are the best for achieving that goal?  Googling "python tutorial" gives a ton of results, but how do I know which ones are legitimately good and which ones are crap?  In terms of audiogame development, since that's what I'd use it for, which tutorials and/or other resources would best help with learning how to set up and manipulate sound correctly.  Also, in terms of audiogame development, which libraries/engines would be best for this, and which ones are documented well, maintained and updated,  and have active communities in case of questions?  There appear to be several to choose from based on what I have found on Google.  Pygame, Pyglet, Ren’Py, Arcade, Cocos2d, Panda3d, probably others that I haven't seen.

URL: https://forum.audiogames.net/post/419012/#p419012




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Getting started with coding audiogames in Python?

2019-03-14 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Getting started with coding audiogames in Python?

so, if sound_lib and accessible_output2 aren't being maintained anymore, are there newer ones that are?  I guess that's my point.  When packages are discontinued and no longer supported, do new ones take their place, or is there just a void then.

URL: https://forum.audiogames.net/post/418848/#p418848




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Getting started with coding audiogames in Python?

2019-03-14 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Getting started with coding audiogames in Python?

@114, Are there actual newer, modern libraries that work?  Is there a reason why people are sticking to the older ones?  Is there nothing newer offered?  @115, I've seen several things in this thread saying this or that is old, not being updated, or discontinued, hence the question.

URL: https://forum.audiogames.net/post/418827/#p418827




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Getting started with coding audiogames in Python?

2019-03-14 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Getting started with coding audiogames in Python?

Are there actual newer, modern libraries that work?  Is there a reason why people are sticking to the older ones?  Is there nothing newer offered?

URL: https://forum.audiogames.net/post/418827/#p418827




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Getting started with coding audiogames in Python?

2019-03-14 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Getting started with coding audiogames in Python?

I myself have been thinking of picking up Python, So here's my question before I undertake learning another language.  With all of the talk of no longer supported or updated libraries that I've seen in this thread, and no modern alternatives to them, I want to make sure that this isn't going to go the way of BGT, where basically everything is abandoned and we're just left in the lurch.  Is there a better language other than Python that actually keeps their libraries up to date?  My question is, if Python is so popular, why are all of these libraries being abandoned and not updated?

URL: https://forum.audiogames.net/post/418783/#p418783




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: How to make load game and save game functions in bgt?

2019-02-26 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: How to make load game and save game functions in bgt?

One observation here.  Cmerry, the vehemence with which you've posted your displeasure baffles me.  Aside from the fact that the amount of your displeasure strikes me as overkill for this situation, your post didn't help anything or anyone.  Posts like this don't do anything but serve to inflame a situation or cause tension where there doesn't need to be any.  I've often wondered why this community leans toward being so discouraging at times.  Instead of ranting on the OP for his question, I submit that it would be more productive to either actually help him, or just not say anything and let someone else who is willing to actually help him do so.  And for the record, I have read the BGT manual.  I've coded in BGT as well.  I'm in the middle of a project, actually, and I myself have questions about this very thing.  I just haven't asked because I'm not at that stage yet.  Does it make me stupid since I'm not sure of the best way to handle or implement save and load states?  Are you going to raise hell at me and take the Lord's name in vain when I get to that point and ask the question?  Just because I don't understand something, or I'm not sure of how to, or the best method for, implementing something does not make me an idiot.  Same applies to the original poster.  Hell, same applies to you and every other programmer in the world.  No programmer understands every facet of any programming language.  Just food for thought.

URL: https://forum.audiogames.net/post/414830/#p414830




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: How to make load game and save game functions in bgt?

2019-02-26 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: How to make load game and save game functions in bgt?

One observation here.  Cmerry, the vehemence with which you've posted your displeasure, and aside from the fact that the amount of your displeasure strikes me as overkill for this situation, your post didn't help anything or anyone.  Posts like this don't do anything but serve to inflame a situation or cause tension where there doesn't need to be any.  I've often wondered why this community leans toward being so discouraging at times.  Instead of ranting on the OP for his question, I submit that it would be more productive to either actually help him, or just not say anything and let someone else who is willing to actually help him do so.  And for the record, I have read the BGT manual.  I've coded in BGT as well.  I'm in the middle of a project, actually, and I myself have questions about this very thing.  I just haven't asked because I'm not at that stage yet.  Does it make me stupid since I'm not sure of the best way to handle or implement save and load states?  Are you going to raise hell at me and take the Lord's name in vain when I get to that point and ask the question?  Just because I don't understand something, or I'm not sure of how to, or the best method for, implementing something does not make me an idiot.  Same applies to the original poster.  Just food for thought.

URL: https://forum.audiogames.net/post/414830/#p414830




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: How to make load game and save game functions in bgt?

2019-02-26 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: How to make load game and save game functions in bgt?

One observation here.  Cmerry, the vehemence with which you've posted your displeasure, and aside from the fact that the amount of your displeasure strikes me as overkill for this situation, your post didn't help anything or anyone.  Posts like this don't do anything but serve to inflame a situation or cause tension where there doesn't need to be any.  I've often wondered why this community leans toward being so discouraging at times.  Instead of ranting on the OP for his question, I submit that it would be more productive to either actually help him, or just not say anything and let someone else who is willing to actually help him do so.  And for the record, I have read the BGT manual.  I've coded in BGT as well.  I'm in the middle of a project, actually, and I myself have questions about this very thing.  I just haven't asked because I'm not at that stage yet.  Does it make me stupid since I'm not sure of the best way to handle or implement save and load states?  Are you going to raise hell at me when I get to that point and ask the question?  Just because I don't understand something, or I'm not sure of how to, or the best method for, implementing something does not make me an idiot.  Same applies to the original poster.  Just food for thought.

URL: https://forum.audiogames.net/post/414830/#p414830




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-22 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

So, the time thing is to calculate the actual physics equations correctly.  For example, take this equation:velocity = initial velocity plus acceleration multiplied by timeAccording to the person who is in physics, the initial way I did it where I did:VF.x = (V).x+A.x)*DT...is incorrect.  You do not multiply by DT, but rather T, actual time.  Then, when you actually move the ball, that is when you use DT.position = velocity multiplied by DT.That's why you need some way to actually get time.As for the sound thing, you are confused.  I wasn't referring to sound of impact on the ball or the ball bouncing.  I was referring to the actual sound of the ball as it travels through the air.  The only way that I can think to make it work correctly is to have that sound play every x number of frames, because if I don't, the sound goes so fast that it's a buzzing that is so loud and overwhelms everything.  If I have it play every x number of frames, it plays correctly.  Not sure if there's a better way to do it.  The sound had nothing to do with impact or bouncing.  Not sure what made you think that, since when the ball hits the ground, I call a separate method entirely for bounce outside of move:if(pos.z <= 0){moving = false;bounce();}This part:if(C.frame == 50){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}Is for the ball as it travels through the air.  I hope that clears up the confusion.

URL: https://forum.audiogames.net/post/413878/#p413878




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-22 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

So, the time thing is to calculate the actual physics equations correctly.  For example, take this equation:velocity = initial velocity plus acceleration multiplied by timeWhat I mean is that the "time" there is not DT, but rather actual time.  Then, when you actually move the ball, that is when you use DT.position = velocity multiplied by DT.That's why you need some way to actually get time.As for the sound thing, you are confused.  I wasn't referring to sound of impact on the ball or the ball bouncing.  I was referring to the actual sound of the ball as it travels through the air.  The only way that I can think to make it work correctly is to have that sound play every x number of frames, because if I don't, the sound goes so fast that it's a buzzing that is so loud and overwhelms everything.  If I have it play every x number of frames, it plays correctly.  Not sure if there's a better way to do it.  The sound had nothing to do with impact or bouncing.  Not sure what made you think that, since when the ball hits the ground, I call a separate method entirely for bounce outside of move:if(pos.z <= 0){moving = false;bounce();}This part:if(C.frame == 50){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}Is for the ball as it travels through the air.  I hope that clears up the confusion.

URL: https://forum.audiogames.net/post/413878/#p413878




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-21 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

The goal there was not to have a variable DT.  The goal was to use time correctly in the equations, then move according to DT.  According to the physics person that is helping me, this example:VF.x = (V0.x+A.x)*DT*cosine(phi);is incorrect.  He said that you don't use DT as the time, you use actual time, but then move by DT.  So, to determine force when the ball his hit, I think my NewShot method would need something like this:void NewShot(double phi, double theta, bool opponentShot = false){//Making sure that the shot cannot occur when rules do not apply.if(B.pos.z == 0 or LastShooter == 1 and !opponentShot)return;//You can't hit the ball if you're too far away.if(distance() > 4){env.play_stationary("sounds/miss.ogg", false);return;}//Get current real time.CT = RealTime.elapsed;//Account for some rules.rules.shots++;if(rules.serving){rules.service++;MustServe=false;B.tossing=false;LastShooter= server;}else{LastShooter++;if(LastShooter > 2)LastShooter = 1;}if(LastShooter == 1){//Original values sent to opponent, will have to be changed based on new code.string message = (deg+180) + ".";Server.send_reliable(0, message, Ball);}rules.bounces = 0;env.play_2d("sounds/shot.ogg", user.x, user.y, x, y, false);B.rising=true;B.moving=true;if(rules.shots==2){rules.serving = false;rules.faults = 0;}//Set initial vel here, at the moment for debugging and testing purposes, will be changed later.V0.x = 200;V0.y = 200;//Make sure chosen angle is correct.  Remember that he has switched it so that phi measures azimuthal angle, and theta measures elevation for some reason in this case.A.x = SetAngle(phi);A.y = SetAngle(phi);Theta(B.pos.z, r);//Now calculate time that it took to actually complete, to use in the equations, and log the value of T for debugging and testing purposes.  NOTE:  T is usually 22 or 23.T = RealTime.elapsed-CT;test.add_entry("T is " + T + ".");//Set velocity using T instead of DT.SetVel();//This is done because the only way to get the ball sound to play correctly seems to be to have it play every x number of frames.  If you know of a better way, let me know.C.frame = 0;//Call move method for the ball.B.move();}}Now, in ball::move, I say:void move(){//Move the ball based on velocity with DT.  I had it set velocity each time to account for the change in gravity acceleration.pos += SetVel()*DT;//Account for gravity.A += G;//For when the ball bounces.if(pos.z <= 0){moving = false;bounce();}//This is done for the sound.  If I don't do it this way, the sound plays so fast that it's just a buzzing that overwhelms everything, and is why I set frames to 0 in the shot method.  Again, if you've got a better way, by all means let me know.if(C.frame == 50){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}env.update_sound_2d(B.slot, B.pos.x, B.pos.y);}I hope that made sense.  If you've got any better ideas of ways to handle things, please feel free to let me know.

URL: https://forum.audiogames.net/post/413540/#p413540




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-21 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

The goal there was not to have a variable DT.  The goal was to use time correctly in the equations, then move according to DT.  According to the physics person that is helping me, this example:VF.x = (V0.x+A.x)*DT*cosine(phi);is incorrect.  He said that you don't use DT as the time, you use actual time, but then move by DT.  So, to determine force when the ball his hit, I think my NewShot method would need something like this:void NewShot(double phi, double theta, bool opponentShot = false){//Making sure that the shot cannot occur when rules do not apply.if(B.pos.z == 0 or LastShooter == 1 and !opponentShot)return;//You can't hit the ball if you're too far away.if(distance() > 4){env.play_stationary("sounds/miss.ogg", false);return;}//Get current real time.CT = RealTime.elapsed;//Account for some rules.rules.shots++;if(rules.serving){rules.service++;MustServe=false;B.tossing=false;LastShooter= server;}else{LastShooter++;if(LastShooter > 2)LastShooter = 1;}if(LastShooter == 1){//Original values sent to opponent, will have to be changed based on new code.string message = (deg+180) + ".";Server.send_reliable(0, message, Ball);}rules.bounces = 0;env.play_2d("sounds/shot.ogg", user.x, user.y, x, y, false);B.rising=true;B.moving=true;if(rules.shots==2){rules.serving = false;rules.faults = 0;}//Set initial vel here, at the moment for debugging and testing purposes, will be changed later.V0.x = 200;V0.y = 200;//Make sure chosen angle is correct.  Remember that he has switched it so that phi measures azimuthal angle, and theta measures elevation for some reason in this case.A.x = SetAngle(phi);A.y = SetAngle(phi);Theta(B.pos.z, r);//Now calculate time that it took to actually complete, to use in the equations, and log the value of T for debugging and testing purposes.  NOTE:  T is usually 22 or 23.T = RealTime.elapsed-CT;test.add_entry("T is " + T + ".");//Set velocity using T instead of DT.SetVel();//This is done because the only way to get the ball sound to play correctly seems to be to have it play every x number of frames.  If you know of a better way, let me know.C.frame = 0;//Call move method for the ball.B.move();}}Now, in ball::move, I say:void move(){//Move the ball based on velocity with DT.  I had it set velocity each time to account for the change in gravity acceleration.pos += SetVel()*DT;//Account for gravity.A += G;//For when the ball bounces.if(pos.z <= 0){moving = false;bounce();}//This is done for the sound.  If I don't do it this way, the sound plays so fast that it's just a buzzing that overwhelms everything.  Again, if you've got a better way, by all means let me know.if(C.frame == 50){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}env.update_sound_2d(B.slot, B.pos.x, B.pos.y);}I hope that made sense.  If you've got any better ideas of ways to handle things, please feel free to let me know.

URL: https://forum.audiogames.net/post/413540/#p413540




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-21 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

The goal there was not to have a variable DT.  The goal was to use time correctly in the equations, then move according to DT.  According to the physics person that is helping me, this example:VF.x = (V0.x+A.x)*DT*cosine(phi);is incorrect.  He said that you don't use DT as the time, you use actual time, but then move by DT.  So, to determine force when the ball his hit, I think my NewShot method would need something like this:void NewShot(double phi, double theta, bool opponentShot = false){//Making sure that the shot cannot occur when rules do not apply.if(B.pos.z == 0 or LastShooter == 1 and !opponentShot)return;//You can't hit the ball if you're too far away.if(distance() > 4){env.play_stationary("sounds/miss.ogg", false);return;}//Get current real time.CT = RealTime.elapsed;//Account for some rules.rules.shots++;if(rules.serving){rules.service++;MustServe=false;B.tossing=false;LastShooter= server;}else{LastShooter++;if(LastShooter > 2)LastShooter = 1;}if(LastShooter == 1){string message = (deg+180) + ".";Server.send_reliable(0, message, Ball);}rules.bounces = 0;env.play_2d("sounds/shot.ogg", user.x, user.y, x, y, false);B.rising=true;B.moving=true;if(rules.shots==2){rules.serving = false;rules.faults = 0;}//Set initial vel here, at the moment for debugging and testing purposes, will be changed later.V0.x = 200;V0.y = 200;//Make sure chosen angle is correct.  Remember that he has switched it so that phi measures azimuthal angle, and theta measures elevation for some reason in this case.A.x = SetAngle(phi);A.y = SetAngle(phi);Theta(B.pos.z, r);//Now calculate time that it took to actually complete, to use in the equations, and log the value of T for debugging and testing purposes.  NOTE:  T is usually 22 or 23.T = RealTime.elapsed-CT;test.add_entry("T is " + T + ".");//Set velocity using T instead of DT.SetVel();//This is done because the only way to get the ball sound to play correctly seems to be to have it play every x number of frames.  If you know of a better way, let me know.C.frame = 0;//Call move method for the ball.B.move();}}Now, in ball::move, I say:void move(){//Move the ball based on velocity with DT.  I had it set velocity each time to account for the change in gravity acceleration.pos += SetVel()*DT;//Account for gravity.A += G;//For when the ball bounces.if(pos.z <= 0){moving = false;bounce();}//This is done for the sound.  If I don't do it this way, the sound plays so fast that it's just a buzzing that overwhelms everything.  Again, if you've got a better way, by all means let me know.if(C.frame == 50){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}env.update_sound_2d(B.slot, B.pos.x, B.pos.y);}I hope that made sense.  If you've got any better ideas of ways to handle things, please feel free to let me know.

URL: https://forum.audiogames.net/post/413540/#p413540




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-21 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

The goal there was not to have a variable DT.  The goal was to use time correctly in the equations, then move according to DT.  According to the physics person that is helping me, this example:VF.x = (V0.x+A.x)*DT*cosine(phi);is incorrect.  He said that you don't use DT as the time, you use actual time, but then move by DT.  So, to determine force when the ball his hit, I think my NewShot method would need something like this:void NewShot(double phi, double theta, bool opponentShot = false){//Making sure that the shot cannot occur when rules do not apply.if(B.pos.z == 0 or LastShooter == 1 and !opponentShot)return;//You can't hit the ball if you're too far away.if(distance() > 4){env.play_stationary("sounds/miss.ogg", false);return;}//Get current real time.CT = RealTime.elapsed;//Account for some rules.rules.shots++;if(rules.serving){rules.service++;MustServe=false;B.tossing=false;LastShooter= server;}else{LastShooter++;if(LastShooter > 2)LastShooter = 1;}if(LastShooter == 1){string message = (deg+180) + ".";Server.send_reliable(0, message, Ball);}rules.bounces = 0;env.play_2d("sounds/shot.ogg", user.x, user.y, x, y, false);B.rising=true;B.moving=true;if(rules.shots==2){rules.serving = false;rules.faults = 0;}//Set initial vel here, at the moment for debugging and testing purposes, will be changed later.V0.x = 200;V0.y = 200;//Make sure chosen angle is correct.  Remember that he has switched it so that phi measures azimuthal angle, and theta measures elevation for some reason in this case.A.x = SetAngle(phi);A.y = SetAngle(phi);Theta(B.pos.z, r);//Now calculate time that it took to actually complete, to use in the equations.T = RealTime.elapsed-CT;test.add_entry("T is " + T + ".");//Set velocity using T instead of DT.SetVel();//This is done because the only way to get the ball sound to play correctly seems to be to have it play every x number of frames.  If you know of a better way, let me know.C.frame = 0;//Call move method for the ball.B.move();}}Now, in ball::move, I say:void move(){//Move the ball based on velocity with DT.  I had it set velocity each time to account for the change in gravity acceleration.pos += SetVel()*DT;//Account for gravity.A += G;//For when the ball bounces.if(pos.z <= 0){moving = false;bounce();}//This is done for the sound.  If I don't do it this way, the sound plays so fast that it's just a buzzing that overwhelms everything.  Again, if you've got a better way, by all means let me know.if(C.frame == 50){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}env.update_sound_2d(B.slot, B.pos.x, B.pos.y);}I hope that made sense.  If you've got any better ideas of ways to handle things, please feel free to let me know.

URL: https://forum.audiogames.net/post/413540/#p413540




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-21 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

The goal there was not to have a variable DT.  The goal was to use time correctly in the equations, then move according to DT.  According to the physics person that is helping me, this example:VF.x = (V0.x+A.x)*DT*cosine(phi);is incorrect.  He said that you don't use DT as the time, you use actual time, but then move by DT.  So, to determine force when the ball his hit, I think my NewShot method would need something like this:void NewShot(double phi, double theta, bool opponentShot = false){//Making sure that the shot cannot occur when rules do not apply.if(B.pos.z == 0 or LastShooter == 1 and !opponentShot)return;//You can't hit the ball if you're too far away.if(distance() > 4){env.play_stationary("sounds/miss.ogg", false);return;}//Get current real time.CT = RealTime.elapsed;//Account for some rules.rules.shots++;if(rules.serving){rules.service++;MustServe=false;B.tossing=false;LastShooter= server;}else{LastShooter++;if(LastShooter > 2)LastShooter = 1;}if(LastShooter == 1){string message = (deg+180) + ".";Server.send_reliable(0, message, Ball);}rules.bounces = 0;env.play_2d("sounds/shot.ogg", user.x, user.y, x, y, false);B.rising=true;B.moving=true;if(rules.shots==2){rules.serving = false;rules.faults = 0;}//Set initial vel here, at the moment for debugging and testing purposes, will be changed later.V0.x = 200;V0.y = 200;//Make sure chosen angle is correct.A.x = SetAngle(phi);A.y = SetAngle(phi);Theta(B.pos.z, r);//Now calculate time that it took to actually complete, to use in the equations.T = RealTime.elapsed-CT;test.add_entry("T is " + T + ".");//Set velocity using T instead of DT.SetVel();//This is did because the only way to get the ball sound to play correctly seems to be to have it play every x number of frames.  If you know of a better way, let me know.C.frame = 0;//Call move method for the ball.B.move();}}Now, in ball::move, I say:void move(){//Move the ball based on velocity with DT.  I had it set velocity each time to account for the change in gravity acceleration.pos += SetVel()*DT;//Account for gravity.A += G;//For when the ball bounces.if(pos.z <= 0){moving = false;bounce();}//This is done for the sound.  If I don't do it this way, the sound plays so fast that it's just a buzzing that overwhelms everything.  Again, if you've got a better way, by all means let me know.if(C.frame == 50){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}env.update_sound_2d(B.slot, B.pos.x, B.pos.y);}I hope that made sense.  If you've got any better ideas of ways to handle things, please feel free to let me know.

URL: https://forum.audiogames.net/post/413540/#p413540




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

In order to use the clock correctly, how exactly is the update method meant to be used?  I assume it basically returns true if a single frame has passed, right?  Just trying to figure out where to use that, or what it would be used for, since when I actually called update in the code in the past, it basically cut the amount of FPS I was getting in half.  After doing further research on using DT, apparently I need a way to keep track of the amount of time between frames, and I'm supposed to use that as DT?  I'm a little confused.  I wonder if the clock update function would be where that's used.  Something like:double T = RealTime.elapsed;bool update(){if (time.elapsed>=delay) {double frametime = RealTime.elapsed-T;time.restart();time.resume();return true;}return false;}Or something close to that.

URL: https://forum.audiogames.net/post/413067/#p413067




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

In order to use the clock correctly, how exactly is the update method meant to be used?  I assume it basically returns true if a single frame has passed, right?  Just trying to figure out where to use that, or what it would be used for, since when I actually called update in the code in the past, it basically cut the amount of FPS I was getting in half.

URL: https://forum.audiogames.net/post/413067/#p413067




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

In order to use the clock correctly, how exactly is the update method meant to be used?  I assume it basically returns true if a single frame has passed, right?  Just trying to figure out where to use that, or what it would be used for.

URL: https://forum.audiogames.net/post/413067/#p413067




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

After adding the line, the tick appears to be called more uniformly, anywhere from  14-20 MS, and at 0.998, 59 frames passed.  I don't understand why it's ever waiting past 0.016, though, since that's what delay should be  since I've got FPS set to 60.  Not sure whether you saw what I wrote about dynamic menu and movement, but I'll post here for convenience, because I do not understand what the hell is causing this.What, the, fuck?  So this time I decided to see what would happen in terms of frame rate if I just walked my player back and forth on the court.  Frame rate dropped a little, to 590.  But there's the question.  Looking at my profile, I see:Total execution time: 58413 msNumber of functions called: 11void clock::tick(): 39733 ms (68.02%)int dynamic_menu::run_extended(string, bool, int, bool): 14689 ms (25.15%)The fuck?  What does moving my player have to do with the dynamic menu?  I do not call dynamic menu when I move.  When I don't move, profile looks like this:Total execution time: 53878 msNumber of functions called: 8void clock::tick(): 50429 ms (93.6%)void StartMatch(bool = true): 1480 ms (2.75%)int dynamic_menu::run_extended(string, bool, int, bool): 1172 ms (2.18%)So what the fuck?  Player::move looks like this:void move(int direction){if(pm.elapsedreturn;switch(direction){case forward:if(y>=net)return;y++;break;case back:if(y<=UserBaseline-5)return;y--;break;case left:if(x<=LeftSideline-5)return;x--;break;case right:if(x>=RightSideline+5)return;x++;break;}if(!OMoving){env.update_listener_2d(user.x, user.y);env.play_stationary("sounds/step.ogg", false);}if(OMoving)env.play_2d("sounds/step.ogg", user.x, user.y, opponent.x, opponent.y, false);Server.send_unreliable(0, (RightSideline-user.x)+"__"+(OpponentBaseline-user.y), Player);pm.restart();}As you can see, simple, and no calls to dynamic menu.  What the hell?

URL: https://forum.audiogames.net/post/413017/#p413017




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

After adding the line, the tick appears to be called more uniformly, anywhere from  14-20 MS, and at 0.998, 59 frames passed.  Not sure whether you saw what I wrote about dynamic menu and movement, but I'll post here for convenience, because I do not understand what the hell is causing this.What, the, fuck?  So this time I decided to see what would happen in terms of frame rate if I just walked my player back and forth on the court.  Frame rate dropped a little, to 590.  But there's the question.  Looking at my profile, I see:Total execution time: 58413 msNumber of functions called: 11void clock::tick(): 39733 ms (68.02%)int dynamic_menu::run_extended(string, bool, int, bool): 14689 ms (25.15%)The fuck?  What does moving my player have to do with the dynamic menu?  I do not call dynamic menu when I move.  When I don't move, profile looks like this:Total execution time: 53878 msNumber of functions called: 8void clock::tick(): 50429 ms (93.6%)void StartMatch(bool = true): 1480 ms (2.75%)int dynamic_menu::run_extended(string, bool, int, bool): 1172 ms (2.18%)So what the fuck?  Player::move looks like this:void move(int direction){if(pm.elapsedreturn;switch(direction){case forward:if(y>=net)return;y++;break;case back:if(y<=UserBaseline-5)return;y--;break;case left:if(x<=LeftSideline-5)return;x--;break;case right:if(x>=RightSideline+5)return;x++;break;}if(!OMoving){env.update_listener_2d(user.x, user.y);env.play_stationary("sounds/step.ogg", false);}if(OMoving)env.play_2d("sounds/step.ogg", user.x, user.y, opponent.x, opponent.y, false);Server.send_unreliable(0, (RightSideline-user.x)+"__"+(OpponentBaseline-user.y), Player);pm.restart();}As you can see, simple, and no calls to dynamic menu.  What the hell?

URL: https://forum.audiogames.net/post/413017/#p413017




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Almost working now.  So close, but then on the final test...Lot of info here.  It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  And after sounds are loaded, why doesn't lag go away after the first ten seconds?  It seems like Philip really, really must have screwed something up when he made BGT, or Windows has got some serious, serious issues.  NOTE:  Retesting shows the following:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 604.Amount of real time that has passed is 10.005seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.009seconds.  DT is 0.016.  Number of frames that have passed is 608.How I'm getting extra frames I don't know.  Is there a way to prevent that?  Extra frames could be an issue across machines.  Could cause the initial problem I had, ball landing differently on different cords.  Really don't want that.  NOTE 2:  This has also changed my profile results.  StartMatch now went down considerably.  Not sure why that is, since I actually added a wait there, but look:Total execution time: 53671 msNumber of functions called: 9void clock::tick(): 50275 ms (93.67%)void StartMatch(bool = true): 1482 ms (2.76%)int dynamic_menu::run_extended(string, bool, int, bool): 1033 ms (1.92%)void main(): 863 ms (1.61%)bool logger::write(string, bool): 6 ms (0.01%)void MainMenu(): 5 ms (0.01%)void CheckEvents(): 3 ms (0.01%)void Voice::speak(string): 2 ms (0%)I don't understand that.  I would have thought the wait call would have lengthened StartMatch.  NOTE 3:  What, the, fuck?  So this time I decided to see what would happen in terms of frame rate if I just walked my player back and forth on the court.  Frame rate drop

Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Almost working now.  So close, but then on the final test...Lot of info here.  It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  And after sounds are loaded, why doesn't lag go away after the first ten seconds?  It seems like Philip really, really must have screwed something up when he made BGT, or Windows has got some serious, serious issues.  NOTE:  Retesting shows the following:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 604.Amount of real time that has passed is 10.005seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.009seconds.  DT is 0.016.  Number of frames that have passed is 608.How I'm getting extra frames I don't know.  Is there a way to prevent that?  Extra frames could be an issue across machines.  Could cause the initial problem I had, ball landing differently on different cords.  Really don't want that.  NOTE 2:  This has also changed my profile results.  StartMatch now went down considerably.  Not sure why that is, since I actually added a wait there, but look:Total execution time: 53671 msNumber of functions called: 9void clock::tick(): 50275 ms (93.67%)void StartMatch(bool = true): 1482 ms (2.76%)int dynamic_menu::run_extended(string, bool, int, bool): 1033 ms (1.92%)void main(): 863 ms (1.61%)bool logger::write(string, bool): 6 ms (0.01%)void MainMenu(): 5 ms (0.01%)void CheckEvents(): 3 ms (0.01%)void Voice::speak(string): 2 ms (0%)I don't understand that.  I would have thought the wait call would have lengthened StartMatch.  NOTE 3:  What, the, fuck?  So this time I decided to see what would happen in terms of frame rate if I just walked my player back and forth on the court.  Frame rate drop

Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  And after sounds are loaded, why doesn't lag go away after the first ten seconds?  It seems like Philip really, really must have screwed something up when he made BGT, or Windows has got some serious, serious issues.  NOTE:  Retesting shows the following:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 604.Amount of real time that has passed is 10.005seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.009seconds.  DT is 0.016.  Number of frames that have passed is 608.How I'm getting extra frames I don't know.  Is there a way to prevent that?  Extra frames could be an issue across machines.  Could cause the initial problem I had, ball landing differently on different cords.  Really don't want that.  NOTE 2:  This has also changed my profile results.  StartMatch now went down considerably.  Not sure why that is, since I actually added a wait there, but look:Total execution time: 53671 msNumber of functions called: 9void clock::tick(): 50275 ms (93.67%)void StartMatch(bool = true): 1482 ms (2.76%)int dynamic_menu::run_extended(string, bool, int, bool): 1033 ms (1.92%)void main(): 863 ms (1.61%)bool logger::write(string, bool): 6 ms (0.01%)void MainMenu(): 5 ms (0.01%)void CheckEvents(): 3 ms (0.01%)void Voice::speak(string): 2 ms (0%)I don't understand that.  I would have thought the wait call would have lengthened StartMatch.  NOTE 3:  What, the, fuck?  So this time I decided to see what would happen in terms of frame rate if I just walked my player back and forth on the court.  Frame rate dropped a little, to 590.  But there's the question.  Looking at my profile, I see:

Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  And after sounds are loaded, why doesn't lag go away after the first ten seconds?  It seems like Philip really, really must have screwed something up when he made BGT, or Windows has got some serious, serious issues.  NOTE:  Retesting shows the following:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 604.Amount of real time that has passed is 10.005seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.009seconds.  DT is 0.016.  Number of frames that have passed is 608.How I'm getting extra frames I don't know.  Is there a way to prevent that?  Extra frames could be an issue across machines.  Could cause the initial problem I had, ball landing differently on different cords.  Really don't want that.  NOTE 2:  This has also changed my profile results.  StartMatch now went down considerably.  Not sure why that is, since I actually added a wait there, but look:Total execution time: 53671 msNumber of functions called: 9void clock::tick(): 50275 ms (93.67%)void StartMatch(bool = true): 1482 ms (2.76%)int dynamic_menu::run_extended(string, bool, int, bool): 1033 ms (1.92%)void main(): 863 ms (1.61%)bool logger::write(string, bool): 6 ms (0.01%)void MainMenu(): 5 ms (0.01%)void CheckEvents(): 3 ms (0.01%)void Voice::speak(string): 2 ms (0%)I don't understand that.  I would have thought the wait call would have lengthened StartMatch.

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  And after sounds are loaded, why doesn't lag go away after the first ten seconds?  It seems like Philip really, really must have screwed something up when he made BGT, or Windows has got some serious, serious issues.  NOTE:  Retesting shows the following:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 604.Amount of real time that has passed is 10.005seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.009seconds.  DT is 0.016.  Number of frames that have passed is 608.How I'm getting extra frames I don't know.  Is there a way to prevent that?  Extra frames could be an issue across machines.  Could cause the initial problem I had, ball landing differently on different cords.  Really don't want that.  NOTE 2:  This has also changed my profile results.  StartMatch now went down considerably.  Not sure why that is, since I actually added a wait there, but look:Total execution time: 53671 msNumber of functions called: 9void clock::tick(): 50275 ms (93.67%)void StartMatch(bool = true): 1482 ms (2.76%)int dynamic_menu::run_extended(string, bool, int, bool): 1033 ms (1.92%)void main(): 863 ms (1.61%)bool logger::write(string, bool): 6 ms (0.01%)void MainMenu(): 5 ms (0.01%)void CheckEvents(): 3 ms (0.01%)void Voice::speak(string): 2 ms (0%)I don't understand that.

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  And after sounds are loaded, why doesn't lag go away after the first ten seconds?  It seems like Philip really, really must have screwed something up when he made BGT, or Windows has got some serious, serious issues.  NOTE:  Retesting shows the following:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 604.Amount of real time that has passed is 10.005seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.009seconds.  DT is 0.016.  Number of frames that have passed is 608.How I'm getting extra frames I don't know.  Is there a way to prevent that?  Extra frames could be an issue across machines.  Could cause the initial problem I had, ball landing differently on different cords.  Really don't want that.

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  And after sounds are loaded, why doesn't lag go away after the first ten seconds?  It seems like Philip really, really must have screwed something up when he made BGT.  NOTE:  Retesting shows the following:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 604.Amount of real time that has passed is 10.005seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.009seconds.  DT is 0.016.  Number of frames that have passed is 608.How I'm getting extra frames I don't know.  Is there a way to prevent that?  Extra frames could be an issue across machines.  Could cause the initial problem I had, ball landing differently on different cords.  Really don't want that.

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  And after sounds are loaded, why doesn't lag go away after the first ten seconds?  It seems like Philip really, really must have screwed something up when he made BGT.  NOTE:  Retesting shows the following:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 604.Amount of real time that has passed is 10.005seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.009seconds.  DT is 0.016.  Number of frames that have passed is 608.How I'm getting extra frames I don't know.  Is there a way to prevent that?

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?  In other words, I can see the first ten seconds being affected by the lag, but after the sounds are loaded, the lag goes away and everything after should work correctly, right?  Besides, how the hell would loading sounds eat that much of 16 GB of ram that it lags to the point that you lose that much performance?  If that's the case, it seems like Philip really, really must have screwed something up when he made BGT.

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.  Next, I added the wait(1000) prior to restarting the timers.  I set frame rate to 60.  This means that after each 0.016 seconds, a frame should pass.  That means that at 0.096 seconds, six frames should have passed.  Log shows:Tick called.  Elapsed real time is 0 seconds.  Number of frames is 0.Tick called.  Elapsed real time is 0.034 seconds.  Number of frames is 1.Tick called.  Elapsed real time is 0.038 seconds.  Number of frames is 2.Tick called.  Elapsed real time is 0.068 seconds.  Number of frames is 3.Tick called.  Elapsed real time is 0.072 seconds.  Number of frames is 4.Tick called.  Elapsed real time is 0.103 seconds.  Number of frames is 5.The pattern still appears to hold.  Not sure why the calls to tick aren't more uniform, instead it gets called back to back virtually, then waits, then back to back, then waits.  So far, loss of one frame at 0.1 seconds.  Log at the bottom shows:Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 590.  So, it appears that I lose one frame every second.  What I don't understand is why the tick method basically gets called that way instead of uniformly across the board.  Is there a way to improve that?  And why now all of a sudden is this appearing to work correctly?  Even if there was initial lag after the sounds, wouldn't the first 10 seconds have shown that, say 50 FPS instead of 60, but then the next ten seconds would have shown correctly, since the lag should have been gone by then?

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.  I removed the wait(5).  The pattern still appears to hold with tick calls:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.042 seconds.Tick called.  Elapsed real time is 0.046 seconds.Tick called.  Elapsed real time is 0.084 seconds.Tick called.  Elapsed real time is 0.086 seconds.Tick called.  Elapsed real time is 0.124 seconds.Tick called.  Elapsed real time is 0.127 seconds.Tick called.  Elapsed real time is 0.166 seconds.As you can see, one longer iteration, then a very short one, then a longer one.

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Here's the StartMatch() function.  I probably didn't do this correctly, but:void StartMatch(bool _online_ = true){//Sets starting values for position and Booleans that cover rules.MustServe = true;rules.games=0;rules.serving=true;m1.load("sounds/power.ogg");server=1;rules.serving=true;user.x=CenterLine+1;user.y=UserServiceLine;opponent.x=CenterLine-1;opponent.y=OpponentServiceLine;//Load and set volume of the sound for the crowd.sound ambience;ambience.load("sounds/ambience.ogg");ambience.volume = -10;//Start the clock timer so that the clock actually starts at the beginning of the match.TRestart(C.time);//Start the timer for real time so that it corresponds with the clock timer for FPS debugging purposes.TRestart(RealTime);//Now initiate the loop:ambience.play_looped();while(true){CheckEvents();wait(5);}}Again, not that huge.  Unless I massively screwed something up, I still don't see how it's causing such a big loss of frame rate.  If you see something screwed up, by all means, let me know.

URL: https://forum.audiogames.net/post/412989/#p412989




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.

URL: https://forum.audiogames.net/post/413001/#p413001




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Here's the StartMatch() function.  I probably didn't do this correctly, but:void StartMatch(bool _online_ = true){//Sets starting values for position and Booleans that cover rules.MustServe = true;rules.games=0;rules.serving=true;m1.load("sounds/power.ogg");server=1;rules.serving=true;user.x=CenterLine+1;user.y=UserServiceLine;opponent.x=CenterLine-1;opponent.y=OpponentServiceLine;//Load and set volume of the sound for the crowd.sound ambience;ambience.load("sounds/ambience.ogg");ambience.volume = -10;//Start the clock timer so that the clock actually starts at the beginning of the match.TRestart(C.time);//Start the timer for real time so that it corresponds with the clock timer for FPS debugging purposes.TRestart(RealTime);//Now initiate the loop:ambience.play_looped();while(true){CheckEvents();wait(5);}}Again, not that huge.  Unless I massively screwed something up, I still don't see how it's causing such a big loss of frame rate.  If you see something screwed up, by all means, let me know.  It appears that tick() was called approximately 43 times in a one-second period, but there are differences in the amount of time between iteration.  For example:Tick called.  Elapsed real time is 0 seconds.Tick called.  Elapsed real time is 0.046 seconds.Then, it almost immediately gets called again:Tick called.  Elapsed real time is 0.054 seconds.But the next iteration doesn't happen until 0.092.  Then 0.101, 0.139, 0.148.  The pattern appears to be one call at longer intervals, followed by a very close call after, then a longer time, then a call close:  So after 0.148, the longer call at 0.185, then the close at 0.195, then the longer time at 0.231, then close at 245, then long at 277...not sure what this means.  Keep in mind that for purposes of this test, I am doing nothing but sitting.  No player movement, no movement of the ball.

URL: https://forum.audiogames.net/post/412989/#p412989




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Whre would I put a timer to check how often tick is called?  Tick already has a timer, so I'm not sure putting another one there works well.  Here's the StartMatch() function.  I probably didn't do this correctly, but:void StartMatch(bool _online_ = true){//Sets starting values for position and Booleans that cover rules.MustServe = true;rules.games=0;rules.serving=true;m1.load("sounds/power.ogg");server=1;rules.serving=true;user.x=CenterLine+1;user.y=UserServiceLine;opponent.x=CenterLine-1;opponent.y=OpponentServiceLine;//Load and set volume of the sound for the crowd.sound ambience;ambience.load("sounds/ambience.ogg");ambience.volume = -10;//Start the clock timer so that the clock actually starts at the beginning of the match.TRestart(C.time);//Start the timer for real time so that it corresponds with the clock timer for FPS debugging purposes.TRestart(RealTime);//Now initiate the loop:ambience.play_looped();while(true){CheckEvents();wait(5);}}Again, not that huge.  Unless I massively screwed something up, I still don't see how it's causing such a big loss of frame rate.  If you see something screwed up, by all means, let me know.

URL: https://forum.audiogames.net/post/412989/#p412989




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-19 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Whre would I put a timer to check how often tick is called?  Tick already has a timer, so I'm not sure putting another one there works well.  Here's the StartMatch() function.  I probably didn't do this correctly, but:void StartMatch(bool _online_ = true){//Sets starting values for position and Booleans that cover rules.MustServe = true;rules.games=0;rules.serving=true;m1.load("sounds/power.ogg");server=1;rules.serving=true;user.x=CenterLine+1;user.y=UserServiceLine;opponent.x=CenterLine-1;opponent.y=OpponentServiceLine;//Load and set volume of the sound for the crowd.sound ambience;ambience.load("sounds/ambience.ogg");ambience.volume = -10;//Start the clock timer so that the clock actually starts at the beginning of the match.TRestart(C.time);//Start the timer for real time so that it corresponds with the clock timer for FPS debugging purposes.TRestart(RealTime);//Now initiate the loop:ambience.play_looped();while(true){CheckEvents();wait(5);}}Again, not that huge.  Still don't see how it's causing such a big loss of frame rate.

URL: https://forum.audiogames.net/post/412989/#p412989




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Again, long post, so please read in its entirety.  To answer your question, nope, not doing anything else when running that test.  I even went into task manager and shut down a bunch of background processes like cortana and other windows shit, and still got 43 FPS when set to 50.As far as players agreeing, I tried doing that initially, although I think I got it wrong.  I tried sending shot strength and direction , to the opponent when I struck the ball.  My thinking was that if the opponent has the same shot strength I do and direction, his machine would call the move method, and the ball should move the same way on both machines.  As I said before, math is immutable, so 2 + 2 will always be four.  So I figured that the formula of calculating the shot had the same values on both machines, there shouldn't be an issue.  If I have a shot strength of 5, and I hit the ball 45 degrees to the right, then if I pass shot strength to him and the direction, albeit mirroring it for sound pool, his machine should call the move method and move the same amount, given that shot strength is equal.  However, the ball was intermittently landing off by one coordinate between the two machines.  Always one coordinate, never more, and always in the direction that the ball was struck.  That might be because of the way I initially had movement running, solely based on timers.  I suspect that the timers were getting different results on both machines, and there were so many that it was causing issues.  I don't know whether changing it to the way I have it now, where it actually uses equations of physics and DT will fix that, but theoretically it should, since velocity isn't going to change based on timers.  I have removed all of the timers from my code with the exception of the one to measure DT, and the one for player movement, but that one only controls how fast the player walks, and that has nothing to do with the ball.  There are no ball timers in my code anymore.  But this frame rate issue is disturbing the hell out of me.  What the fuck is the problem?  There's absolutely nothing in my loop that should cause this level of drop.  The main game loop, with comments,  looks like this:void CheckEvents(){network_event Event;Event = Server.request();switch(Event.type){case 1:speaker.speak("Peer has connected to server from address "+Server.get_peer_address(Event.peer_id)+".");break;case 2://So that opponent position updates correctly.if(string_contains(Event.message, "__", 1) > -1){string[] position = string_split(Event.message, "__", true);opponent.x = string_to_number(position[0]);opponent.y = string_to_number(position[1]);env.update_listener_2d(opponent.x, opponent.y);env.play_2d("sounds/step.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends the shot info to the opponent so that the opponent's machine can calculate ball trajectory correctly.if(string_contains(Event.message, ",", 1) > -1){string[] NewShot = string_split(Event.message, ",", true);opponent.NewShot(string_to_number(NewShot[0]), true);}//Sends the coordinates of the ball to machine 2 when user of machine one is holding the ball before the ball is tossed.if(Event.message == "toss"){B.pos.x = opponent.x;B.pos.y = opponent.y;B.pos.z = 4;env.play_2d("sounds/toss.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends position of the ball to machine 2 at the time of serve along with relevant shot info so that machine 2 can calculate trajectory with the same values.if(string_contains(Event.message, "::", 1) > -1){string[] serveState = string_split(Event.message, "::", true);B.pos.x = string_to_number(serveState[0]);B.pos.y = string_to_number(serveState[1]);B.pos.z = string_to_number(serveState[2]);opponent.ShotStrength = string_to_number(serveState[3]);}break;case 3:speaker.speakInterrupt("Peer "+Server.get_peer_address(Event.peer_id)+" has disconnected.");break;}That's all of the network stuff.  Now this is just the main loop:C.tick();//Testing FPS.if(RealTime.elapsed>= 1)logtime();//This is to check to see that the player serves from the correct side of the court as per the rules of tennis.if(rules.serving){if(!rules.even(rules.p))rules.DC = true;if(rules.even(rules.p))rules.DC = false;}//To allow the move function to iterate.if(B.moving)B.move();//Same for tossing the ball.if(B.tossing)B.toss();//This makes sure that server never goes past 2, since only 2 players are involved.if(server > 2)server = 1;//Just a fuck load of key checks, a lot of which are in here right now for testing and debugging purposes.if(key_pressed(KEY_ESCAPE)){env.destroy_all();exit();}if(key_pressed(KEY_T))speaker.speak(deg + ", " + theta + ".");if(key_pressed(KEY_D))speaker.speak(rules.DC);if(key_pressed(KEY_C))speaker.speak(user.x + ", " + user.y + ". ");if(key_pressed(KEY_O))speaker.speak(opponent.x + ", " + opponent.y + ". ");if(key_pressed(KEY_N))speaker.speak("User is " + user.name + ", and opponent is " + opponent.name + ".");if(key_pressed(KEY_RET

Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Again, long post, so please read in its entirety.  To answer your question, nope, not doing anything else when running that test.  I even went into task manager and shut down a bunch of background processes like cortana and other windows shit, and still got 43 FPS when set to 50.As far as players agreeing, I tried doing that initially, although I think I got it wrong.  I tried sending shot strength and direction , to the opponent when I struck the ball.  My thinking was that if the opponent has the same shot strength I do and direction, his machine would call the move method, and the ball should move the same way on both machines.  As I said before, math is immutable, so 2 + 2 will always be four.  So I figured that the formula of calculating the shot had the same values on both machines, there shouldn't be an issue.  If I have a shot strength of 5, and I hit the ball 45 degrees to the right, then if I pass shot strength to him and the direction, albeit mirroring it for sound pool, his machine should call the move method and move the same amount, given that shot strength is equal.  However, the ball was intermittently landing off by one coordinate between the two machines.  Always one coordinate, never more, and always in the direction that the ball was struck.  That might be because of the way I initially had movement running, solely based on timers.  I suspect that the timers were getting different results on both machines, and there were so many that it was causing issues.  I don't know whether changing it to the way I have it now, where it actually uses equations of physics and DT will fix that, but theoretically it should, since velocity isn't going to change based on timers.  I have removed all of the timers from my code with the exception of the one to measure DT, and the one for player movement, but that one only controls how fast the player walks, and that has nothing to do with the ball.  There are no ball timers in my code anymore.  But this frame rate issue is disturbing the hell out of me.  What the fuck is the problem?  There's absolutely nothing in my loop that should cause this level of drop.  The main game loop, with comments,  looks like this:void CheckEvents(){network_event Event;Event = Server.request();switch(Event.type){case 1:speaker.speak("Peer has connected to server from address "+Server.get_peer_address(Event.peer_id)+".");break;case 2://So that opponent position updates correctly.if(string_contains(Event.message, "__", 1) > -1){string[] position = string_split(Event.message, "__", true);opponent.x = string_to_number(position[0]);opponent.y = string_to_number(position[1]);env.update_listener_2d(opponent.x, opponent.y);env.play_2d("sounds/step.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends the shot info to the opponent so that the opponent's machine can calculate ball trajectory correctly.if(string_contains(Event.message, ",", 1) > -1){string[] NewShot = string_split(Event.message, ",", true);opponent.NewShot(string_to_number(NewShot[0]), true);}//Sends the coordinates of the ball to machine 2 when user of machine one is holding the ball before the ball is tossed.if(Event.message == "toss"){B.pos.x = opponent.x;B.pos.y = opponent.y;B.pos.z = 4;env.play_2d("sounds/toss.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends position of the ball to machine 2 at the time of serve along with relevant shot info so that machine 2 can calculate trajectory with the same values.if(string_contains(Event.message, "::", 1) > -1){string[] serveState = string_split(Event.message, "::", true);B.pos.x = string_to_number(serveState[0]);B.pos.y = string_to_number(serveState[1]);B.pos.z = string_to_number(serveState[2]);opponent.ShotStrength = string_to_number(serveState[3]);}break;case 3:speaker.speakInterrupt("Peer "+Server.get_peer_address(Event.peer_id)+" has disconnected.");break;}That's all of the network stuff.  Now this is just the main loop:C.tick();//Testing FPS.if(RealTime.elapsed>= 1)logtime();//This is to check to see that the player serves from the correct side of the court as per the rules of tennis.if(rules.serving){if(!rules.even(rules.p))rules.DC = true;if(rules.even(rules.p))rules.DC = false;}//To allow the move function to iterate.if(B.moving)B.move();//Same for tossing the ball.if(B.tossing)B.toss();//This makes sure that server never goes past 2, since only 2 players are involved.if(server > 2)server = 1;//Just a fuck load of key checks, a lot of which are in here right now for testing and debugging purposes.if(key_pressed(KEY_ESCAPE)){env.destroy_all();exit();}if(key_pressed(KEY_T))speaker.speak(deg + ", " + theta + ".");if(key_pressed(KEY_D))speaker.speak(rules.DC);if(key_pressed(KEY_C))speaker.speak(user.x + ", " + user.y + ". ");if(key_pressed(KEY_O))speaker.speak(opponent.x + ", " + opponent.y + ". ");if(key_pressed(KEY_N))speaker.speak("User is " + user.name + ", and opponent is " + opponent.name + ".");if(key_pressed(KEY_RET

Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Nope, not doing anything else when running that test.  I even went into task manager and shut down a bunch of background processes like cortana and other windows shit, and still got 43 FPS when set to 50.As far as players agreeing, I tried doing that initially, although I think I got it wrong.  I tried sending shot strength and direction , to the opponent when I struck the ball.  My thinking was that if the opponent has the same shot strength I do and direction, his machine would call the move method, and the ball should move the same way on both machines.  As I said before, math is immutable, so 2 + 2 will always be four.  So I figured that the formula of calculating the shot had the same values on both machines, there shouldn't be an issue.  If I have a shot strength of 5, and I hit the ball 45 degrees to the right, then if I pass shot strength to him and the direction, albeit mirroring it for sound pool, his machine should call the move method and move the same amount, given that shot strength is equal.  However, the ball was intermittently landing off by one coordinate between the two machines.  Always one coordinate, never more, and always in the direction that the ball was struck.  That might be because of the way I initially had movement running, solely based on timers.  I suspect that the timers were getting different results on both machines, and there were so many that it was causing issues.  I don't know whether changing it to the way I have it now, where it actually uses equations of physics and DT will fix that, but theoretically it should, since velocity isn't going to change based on timers.  I have removed all of the timers from my code with the exception of the one to measure DT, and the one for player movement, but that one only controls how fast the player walks, and that has nothing to do with the ball.  There are no ball timers in my code anymore.  But this frame rate issue is disturbing the hell out of me.  What the fuck is the problem?  There's absolutely nothing in my loop that should cause this level of drop.  The main game loop, with comments,  looks like this:void CheckEvents(){network_event Event;Event = Server.request();switch(Event.type){case 1:speaker.speak("Peer has connected to server from address "+Server.get_peer_address(Event.peer_id)+".");break;case 2://So that opponent position updates correctly.if(string_contains(Event.message, "__", 1) > -1){string[] position = string_split(Event.message, "__", true);opponent.x = string_to_number(position[0]);opponent.y = string_to_number(position[1]);env.update_listener_2d(opponent.x, opponent.y);env.play_2d("sounds/step.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends the shot info to the opponent so that the opponent's machine can calculate ball trajectory correctly.if(string_contains(Event.message, ",", 1) > -1){string[] NewShot = string_split(Event.message, ",", true);opponent.NewShot(string_to_number(NewShot[0]), true);}//Sends the coordinates of the ball to machine 2 when user of machine one is holding the ball before the ball is tossed.if(Event.message == "toss"){B.pos.x = opponent.x;B.pos.y = opponent.y;B.pos.z = 4;env.play_2d("sounds/toss.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends position of the ball to machine 2 at the time of serve along with relevant shot info so that machine 2 can calculate trajectory with the same values.if(string_contains(Event.message, "::", 1) > -1){string[] serveState = string_split(Event.message, "::", true);B.pos.x = string_to_number(serveState[0]);B.pos.y = string_to_number(serveState[1]);B.pos.z = string_to_number(serveState[2]);opponent.ShotStrength = string_to_number(serveState[3]);}break;case 3:speaker.speakInterrupt("Peer "+Server.get_peer_address(Event.peer_id)+" has disconnected.");break;}That's all of the network stuff.  Now this is just the main loop:C.tick();//Testing FPS.if(RealTime.elapsed>= 1)logtime();//This is to check to see that the player serves from the correct side of the court as per the rules of tennis.if(rules.serving){if(!rules.even(rules.p))rules.DC = true;if(rules.even(rules.p))rules.DC = false;}//To allow the move function to iterate.if(B.moving)B.move();//Same for tossing the ball.if(B.tossing)B.toss();//This makes sure that server never goes past 2, since only 2 players are involved.if(server > 2)server = 1;//Just a fuck load of key checks, a lot of which are in here right now for testing and debugging purposes.if(key_pressed(KEY_ESCAPE)){env.destroy_all();exit();}if(key_pressed(KEY_T))speaker.speak(deg + ", " + theta + ".");if(key_pressed(KEY_D))speaker.speak(rules.DC);if(key_pressed(KEY_C))speaker.speak(user.x + ", " + user.y + ". ");if(key_pressed(KEY_O))speaker.speak(opponent.x + ", " + opponent.y + ". ");if(key_pressed(KEY_N))speaker.speak("User is " + user.name + ", and opponent is " + opponent.name + ".");if(key_pressed(KEY_RETURN))B.GetBall();if(key_pressed(KEY_V))speaker.speak(V0.z + ", " + A.z + ", 

Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Nope, not doing anything else when running that test.  I even went into task manager and shut down a bunch of background processes like cortana and other windows shit, and still got 43 FPS when set to 50.As far as players agreeing, I tried doing that initially, although I think I got it wrong.  I tried sending shot strength and direction , to the opponent when I struck the ball.  My thinking was that if the opponent has the same shot strength I do and direction, his machine would call the move method, and the ball should move the same way on both machines.  As I said before, math is immutable, so 2 + 2 will always be four.  So I figured that the formula of calculating the shot had the same values on both machines, there shouldn't be an issue.  If I have a shot strength of 5, and I hit the ball 45 degrees to the right, then if I pass shot strength to him and the direction, albeit mirroring it for sound pool, his machine should call the move method and move the same amount, given that shot strength is equal.  However, the ball was intermittently landing off by one coordinate between the two machines.  Always one coordinate, never more, and always in the direction that the ball was struck.  That might be because of the way I initially had movement running, solely based on timers.  I suspect that the timers were getting different results on both machines, and there were so many that it was causing issues.  I don't know whether changing it to the way I have it now, where it actually uses equations of physics and DT will fix that, but theoretically it should, since velocity isn't going to change based on timers.  I have removed all of the timers from my code with the exception of the one to measure DT, and the one for player movement, but that one only controls how fast the player walks, and that has nothing to do with the ball.  There are no ball timers in my code anymore.  But this frame rate issue is disturbing the hell out of me.  What the fuck is the problem?  There's absolutely nothing in my loop that should cause this level of drop.  The main game loop, with comments,  looks like this:void CheckEvents(){network_event Event;Event = Server.request();switch(Event.type){case 1:speaker.speak("Peer has connected to server from address "+Server.get_peer_address(Event.peer_id)+".");break;case 2://So that opponent position updates correctly.if(string_contains(Event.message, "__", 1) > -1){string[] position = string_split(Event.message, "__", true);opponent.x = string_to_number(position[0]);opponent.y = string_to_number(position[1]);env.update_listener_2d(opponent.x, opponent.y);env.play_2d("sounds/step.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends the shot info to the opponent so that the opponent's machine can calculate ball trajectory correctly.if(string_contains(Event.message, ",", 1) > -1){string[] NewShot = string_split(Event.message, ",", true);opponent.NewShot(string_to_number(NewShot[0]), true);}//Sends the coordinates of the ball to machine 2 when user of machine one is holding the ball before the ball is tossed.if(Event.message == "toss"){B.pos.x = opponent.x;B.pos.y = opponent.y;B.pos.z = 4;env.play_2d("sounds/toss.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends position of the ball to machine 2 at the time of serve along with relevant shot info so that machine 2 can calculate trajectory with the same values.if(string_contains(Event.message, "::", 1) > -1){string[] serveState = string_split(Event.message, "::", true);B.pos.x = string_to_number(serveState[0]);B.pos.y = string_to_number(serveState[1]);B.pos.z = string_to_number(serveState[2]);opponent.ShotStrength = string_to_number(serveState[3]);}break;case 3:speaker.speakInterrupt("Peer "+Server.get_peer_address(Event.peer_id)+" has disconnected.");break;}That's all of the network stuff.  Now this is just the main loop:C.tick();//Testing FPS.if(RealTime.elapsed>= 1)logtime();//This is to check to see that the player serves from the correct side of the court as per the rules of tennis.if(rules.serving){if(!rules.even(rules.p))rules.DC = true;if(rules.even(rules.p))rules.DC = false;}//To allow the move function to iterate.if(B.moving)B.move();//Same for tossing the ball.if(B.tossing)B.toss();//This makes sure that server never goes past 2, since only 2 players are involved.if(server > 2)server = 1;//Just a fuck load of key checks, a lot of which are in here right now for testing and debugging purposes.if(key_pressed(KEY_ESCAPE)){env.destroy_all();exit();}if(key_pressed(KEY_T))speaker.speak(deg + ", " + theta + ".");if(key_pressed(KEY_D))speaker.speak(rules.DC);if(key_pressed(KEY_C))speaker.speak(user.x + ", " + user.y + ". ");if(key_pressed(KEY_O))speaker.speak(opponent.x + ", " + opponent.y + ". ");if(key_pressed(KEY_N))speaker.speak("User is " + user.name + ", and opponent is " + opponent.name + ".");if(key_pressed(KEY_RETURN))B.GetBall();if(key_pressed(KEY_V))speaker.speak(V0.z + ", " + A.z + ", 

Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Nope, not doing anything else when running that test.  I even went into task manager and shut down a bunch of background processes like cortana and other windows shit, and still got 43 FPS when set to 50.As far as players agreeing, I tried doing that initially, although I think I got it wrong.  I tried sending shot strength and direction , to the opponent when I struck the ball.  My thinking was that if the opponent has the same shot strength I do and direction, his machine would call the move method, and the ball should move the same way on both machines.  As I said before, math is immutable, so 2 + 2 will always be four.  So I figured that the formula of calculating the shot had the same values on both machines, there shouldn't be an issue.  If I have a shot strength of 5, and I hit the ball 45 degrees to the right, then if I pass shot strength to him and the direction, albeit mirroring it for sound pool, his machine should call the move method and move the same amount, given that shot strength is equal.  However, the ball was intermittently landing off by one coordinate between the two machines.  Always one coordinate, never more, and always in the direction that the ball was struck.  That might be because of the way I initially had movement running, solely based on timers.  I suspect that the timers were getting different results on both machines, and there were so many that it was causing issues.  I don't know whether changing it to the way I have it now, where it actually uses equations of physics and DT will fix that, but theoretically it should, since velocity isn't going to change based on timers.  I have removed all of the timers from my code with the exception of the one to measure DT, and the one for player movement, but that one only controls how fast the player walks, and that has nothing to do with the ball.  There are no ball timers in my code anymore.  But this frame rate issue is disturbing the hell out of me.  What the fuck is the problem?  There's absolutely nothing in my loop that should cause this level of drop.  The main game loop, with comments,  looks like this:void CheckEvents(){network_event Event;Event = Server.request();switch(Event.type){case 1:speaker.speak("Peer has connected to server from address "+Server.get_peer_address(Event.peer_id)+".");break;case 2://So that opponent position updates correctly.if(string_contains(Event.message, "__", 1) > -1){string[] position = string_split(Event.message, "__", true);opponent.x = string_to_number(position[0]);opponent.y = string_to_number(position[1]);env.update_listener_2d(opponent.x, opponent.y);env.play_2d("sounds/step.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends the shot info to the opponent so that the opponent's machine can calculate ball trajectory correctly.if(string_contains(Event.message, ",", 1) > -1){string[] NewShot = string_split(Event.message, ",", true);opponent.NewShot(string_to_number(NewShot[0]), true);}//Sends the coordinates of the ball to machine 2 when user of machine one is holding the ball before the ball is tossed.if(Event.message == "toss"){B.pos.x = opponent.x;B.pos.y = opponent.y;B.pos.z = 4;env.play_2d("sounds/toss.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends position of the ball to machine 2 at the time of serve along with relevant shot info so that machine 2 can calculate trajectory with the same values.if(string_contains(Event.message, "::", 1) > -1){string[] serveState = string_split(Event.message, "::", true);B.pos.x = string_to_number(serveState[0]);B.pos.y = string_to_number(serveState[1]);B.pos.z = string_to_number(serveState[2]);opponent.ShotStrength = string_to_number(serveState[3]);}break;case 3:speaker.speakInterrupt("Peer "+Server.get_peer_address(Event.peer_id)+" has disconnected.");break;}That's all of the network stuff.  Now this is just the main loop:C.tick();//Testing FPS.if(RealTime.elapsed>= 1)logtime();//This is to check to see that the player serves from the correct side of the court as per the rules of tennis.if(rules.serving){if(!rules.even(rules.p))rules.DC = true;if(rules.even(rules.p))rules.DC = false;}//To allow the move function to iterate.if(B.moving)B.move();//Same for tossing the ball.if(B.tossing)B.toss();//This makes sure that server never goes past 2, since only 2 players are involved.if(server > 2)server = 1;//Just a fuck load of key checks, a lot of which are in here right now for testing and debugging purposes.if(key_pressed(KEY_ESCAPE)){env.destroy_all();exit();}if(key_pressed(KEY_T))speaker.speak(deg + ", " + theta + ".");if(key_pressed(KEY_D))speaker.speak(rules.DC);if(key_pressed(KEY_C))speaker.speak(user.x + ", " + user.y + ". ");if(key_pressed(KEY_O))speaker.speak(opponent.x + ", " + opponent.y + ". ");if(key_pressed(KEY_N))speaker.speak("User is " + user.name + ", and opponent is " + opponent.name + ".");if(key_pressed(KEY_RETURN))B.GetBall();if(key_pressed(KEY_V))speaker.speak(V0.z + ", " + A.z + ", 

Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Nope, not doing anything else when running that test.  I even went into task manager and shut down a bunch of background processes like cortana and other windows shit, and still got 43 FPS when set to 50.As far as players agreeing, I tried doing that initially, although I think I got it wrong.  I tried sending shot strength and direction , to the opponent when I struck the ball.  My thinking was that if the opponent has the same shot strength I do and direction, his machine would call the move method, and the ball should move the same way on both machines.  As I said before, math is immutable, so 2 + 2 will always be four.  So I figured that the formula of calculating the shot had the same values on both machines, there shouldn't be an issue.  If I have a shot strength of 5, and I hit the ball 45 degrees to the right, then if I pass shot strength to him and the direction, albeit mirroring it for sound pool, his machine should call the move method and move the same amount, given that shot strength is equal.  However, the ball was intermittently landing off by one coordinate between the two machines.  Always one coordinate, never more, and always in the direction that the ball was struck.  That might be because of the way I initially had movement running, solely based on timers.  I suspect that the timers were getting different results on both machines, and there were so many that it was causing issues.  I don't know whether changing it to the way I have it now, where it actually uses equations of physics and DT will fix that, but theoretically it should, since velocity isn't going to change based on timers.  I have removed all of the timers from my code with the exception of the one to measure DT, and the one for player movement, but that one only controls how fast the player walks, and that has nothing to do with the ball.  There are no ball timers in my code anymore.  But this frame rate issue is disturbing the hell out of me.  What the fuck is the problem?  There's absolutely nothing in my loop that should cause this level of drop.  The main game loop, with comments,  looks like this:void CheckEvents(){network_event Event;Event = Server.request();switch(Event.type){case 1:speaker.speak("Peer has connected to server from address "+Server.get_peer_address(Event.peer_id)+".");break;case 2://So that opponent position updates correctly.if(string_contains(Event.message, "__", 1) > -1){string[] position = string_split(Event.message, "__", true);opponent.x = string_to_number(position[0]);opponent.y = string_to_number(position[1]);env.update_listener_2d(opponent.x, opponent.y);env.play_2d("sounds/step.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends the shot info to the opponent so that the opponent's machine can calculate ball trajectory correctly.if(string_contains(Event.message, ",", 1) > -1){string[] NewShot = string_split(Event.message, ",", true);opponent.NewShot(string_to_number(NewShot[0]), true);}//Sends the coordinates of the ball to machine 2 when user of machine one is holding the ball before the ball is tossed.if(Event.message == "toss"){B.pos.x = opponent.x;B.pos.y = opponent.y;B.pos.z = 4;env.play_2d("sounds/toss.ogg", user.x, user.y, opponent.x, opponent.y, false);}//Sends position of the ball to machine 2 at the time of serve along with relevant shot info so that machine 2 can calculate trajectory with the same values.if(string_contains(Event.message, "::", 1) > -1){string[] serveState = string_split(Event.message, "::", true);B.pos.x = string_to_number(serveState[0]);B.pos.y = string_to_number(serveState[1]);B.pos.z = string_to_number(serveState[2]);opponent.ShotStrength = string_to_number(serveState[3]);}break;case 3:speaker.speakInterrupt("Peer "+Server.get_peer_address(Event.peer_id)+" has disconnected.");break;}That's all of the network stuff.  Now this is just the main loop:C.tick();//Testing FPS.if(RealTime.elapsed>= 1)logtime();//This is to check to see that the player serves from the correct side of the court as per the rules of tennis.if(rules.serving){if(!rules.even(rules.p))rules.DC = true;if(rules.even(rules.p))rules.DC = false;}//To allow the move function to iterate.if(B.moving)B.move();//Same for tossing the ball.if(B.tossing)B.toss();//This makes sure that server never goes past 2, since only 2 players are involved.if(server > 2)server = 1;//Just a fuck load of key checks, a lot of which are in here right now for testing and debugging purposes.if(key_pressed(KEY_ESCAPE)){env.destroy_all();exit();}if(key_pressed(KEY_T))speaker.speak(deg + ", " + theta + ".");if(key_pressed(KEY_D))speaker.speak(rules.DC);if(key_pressed(KEY_C))speaker.speak(user.x + ", " + user.y + ". ");if(key_pressed(KEY_O))speaker.speak(opponent.x + ", " + opponent.y + ". ");if(key_pressed(KEY_N))speaker.speak("User is " + user.name + ", and opponent is " + opponent.name + ".");if(key_pressed(KEY_RETURN))B.GetBall();if(key_pressed(KEY_V))speaker.speak(V0.z + ", " + A.z + ", 

Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

So, what in the world would drop me to 50 FPS when running at 60?  I mean, my code should not be taxing my PC at all.  I'm running latest version of windows.  I've got 16 GB ram with an I7 processor.  No graphics in this game at all.  Graphics tend to lag a machine, yes, but there's no graphical issue here.  So what the hell is bogging down my machine to the level that it drops framerate from 60 to 50?  I would think whatever is doing that would have to be massively resource-intensive.  Nothing running on my PC at the moment that should be taking up enough resources to be an issue.  Next question.  If I can't synchronize number of frames during network events, then how would I proceed to keep machines synchronized?  There's got to be some way to do it, since I know for a fact that online games do manage to accomplish it.  If I play my friend in a game of Madden, for example, the ball doesn't land at different places on the different machines.  If I throw the ball, and it lands incomplete on my opponent's 10 yard line, then my opponent sees the ball land incomplete on his 10 yard line, not his 20.  That means there has to be some way to accomplish this.NOTE:  I dropped my framerate to 50 in my game ccode to see if it would run well since it was running at 50 anyway, and this is now what I see:Amount of real time that has passed is 10.023seconds.  DT is 0.02.  Number of frames that have passed is 435.Amount of real time that has passed is 10.038seconds.  DT is 0.02.  Number of frames that have passed is 436.Amount of real time that has passed is 10.037seconds.  DT is 0.02.  Number of frames that have passed is 436.What the hell?  It ran at 50 when at 60, so I figured it'd be able to handle 50 no problem.  Now it's running at 43?  I know for a fact this machine isn't that slow.  This is really beginning to piss me the fuck off.  And I have no idea where to begin looking to try to fix the issue.NOTE 2:  Just as I suspected, when I googled frame loss, everything I see says that what tends to cause drops of frame rate, or affect frame rate the most, is graphics.  There are no fucking graphics here.  None.  Computer specs:Windows Version:  10.0.17134Processor Intel(R) Core(TM) i7-4980HQ CPU @ 2.8 Ghz, 4 core(s), 8 logical processors16 GB ramWith no graphics to worry about, that should be more than enough to not have this fucking issue.NOTE 3:  As a test, I went into task manager and killed a bunch of unnecessary running processes to see whether freeing more RAM would change things.  Subsequent test at 50 FPS shows:Amount of real time that has passed is 10.024seconds.  DT is 0.02.  Number of frames that have passed is 435.Amount of real time that has passed is 10.01seconds.  DT is 0.02.  Number of frames that have passed is 435.As you can see, nothing changed.  So what the bloody fuck?

URL: https://forum.audiogames.net/post/412725/#p412725




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

So, what in the world would drop me to 50 FPS when running at 60?  I mean, my code should not be taxing my PC at all.  I'm running latest version of windows.  I've got 16 GB ram with an I7 processor.  No graphics in this game at all.  Graphics tend to lag a machine, yes, but there's no graphical issue here.  So what the hell is bogging down my machine to the level that it drops framerate from 60 to 50?  I would think whatever is doing that would have to be massively resource-intensive.  Nothing running on my PC at the moment that should be taking up enough resources to be an issue.  Next question.  If I can't synchronize number of frames during network events, then how would I proceed to keep machines synchronized?  There's got to be some way to do it, since I know for a fact that online games do manage to accomplish it.  If I play my friend in a game of Madden, for example, the ball doesn't land at different places on the different machines.  If I throw the ball, and it lands incomplete on my opponent's 10 yard line, then my opponent sees the ball land incomplete on his 10 yard line, not his 20.  That means there has to be some way to accomplish this.NOTE:  I dropped my framerate to 50 in my game ccode to see if it would run well since it was running at 50 anyway, and this is now what I see:Amount of real time that has passed is 10.023seconds.  DT is 0.02.  Number of frames that have passed is 435.Amount of real time that has passed is 10.038seconds.  DT is 0.02.  Number of frames that have passed is 436.Amount of real time that has passed is 10.037seconds.  DT is 0.02.  Number of frames that have passed is 436.What the hell?  It ran at 50 when at 60, so I figured it'd be able to handle 50 no problem.  Now it's running at 43?  I know for a fact this machine isn't that slow.  This is really beginning to piss me the fuck off.  And I have no idea where to begin looking to try to fix the issue.NOTE 2:  Just as I suspected, when I googled frame loss, everything I see says that what tends to cause drops of frame rate, or affect frame rate the most, is graphics.  There are no fucking graphics here.  None.  Computer specs:Windows Version:  10.0.17134Processor Intel(R) Core(TM) i7-4980HQ CPU @ 2.8 Ghz, 4 core(s), 8 logical processors16 GB ramWith no graphics to worry about, that should be more than enough to not have this fucking issue.

URL: https://forum.audiogames.net/post/412725/#p412725




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

So, what in the world would drop me to 50 FPS when running at 60?  I mean, my code should not be taxing my PC at all.  I'm running latest version of windows.  I've got 16 GB ram with an I7 processor.  No graphics in this game at all.  Graphics tend to lag a machine, yes, but there's no graphical issue here.  So what the hell is bogging down my machine to the level that it drops framerate from 60 to 50?  I would think whatever is doing that would have to be massively resource-intensive.  Nothing running on my PC at the moment that should be taking up enough resources to be an issue.  Next question.  If I can't synchronize number of frames during network events, then how would I proceed to keep machines synchronized?  There's got to be some way to do it, since I know for a fact that online games do manage to accomplish it.  If I play my friend in a game of Madden, for example, the ball doesn't land at different places on the different machines.  If I throw the ball, and it lands incomplete on my opponent's 10 yard line, then my opponent sees the ball land incomplete on his 10 yard line, not his 20.  That means there has to be some way to accomplish this.NOTE:  I dropped my framerate to 50 in my game ccode to see if it would run well since it was running at 50 anyway, and this is now what I see:Amount of real time that has passed is 10.023seconds.  DT is 0.02.  Number of frames that have passed is 435.Amount of real time that has passed is 10.038seconds.  DT is 0.02.  Number of frames that have passed is 436.Amount of real time that has passed is 10.037seconds.  DT is 0.02.  Number of frames that have passed is 436.What the hell?  It ran at 50 when at 60, so I figured it'd be able to handle 50 no problem.  Now it's running at 43?  I know for a fact this machine isn't that slow.  This is really beginning to piss me the fuck off.  And I have no idea where to begin looking to try to fix the issue.NOTE 2:  Just as I suspected, when I googled frame loss, everything I see says that what tends to cause drops of frame rate, or affect frame rate the most, is graphics.  There are no fucking graphics here.  None.  Computer specs:Windows Version:  10.0.17134Processor Intel(R) Core(TM) i7-4980HQ CPU @ 2.8 Ghz16 GB ramWith no graphics to worry about, that should be more than enough to not have this fucking issue.

URL: https://forum.audiogames.net/post/412725/#p412725




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

So, what in the world would drop me to 50 FPS when running at 60?  I mean, my code should not be taxing my PC at all.  I'm running latest version of windows.  I've got 16 GB ram with an I7 processor.  No graphics in this game at all.  Graphics tend to lag a machine, yes, but there's no graphical issue here.  So what the hell is bogging down my machine to the level that it drops framerate from 60 to 50?  I would think whatever is doing that would have to be massively resource-intensive.  Nothing running on my PC at the moment that should be taking up enough resources to be an issue.  Next question.  If I can't synchronize number of frames during network events, then how would I proceed to keep machines synchronized?  There's got to be some way to do it, since I know for a fact that online games do manage to accomplish it.  If I play my friend in a game of Madden, for example, the ball doesn't land at different places on the different machines.  If I throw the ball, and it lands incomplete on my opponent's 10 yard line, then my opponent sees the ball land incomplete on his 10 yard line, not his 20.  That means there has to be some way to accomplish this.NOTE:  I dropped my framerate to 50 in my game ccode to see if it would run well since it was running at 50 anyway, and this is now what I see:Amount of real time that has passed is 10.023seconds.  DT is 0.02.  Number of frames that have passed is 435.Amount of real time that has passed is 10.038seconds.  DT is 0.02.  Number of frames that have passed is 436.Amount of real time that has passed is 10.037seconds.  DT is 0.02.  Number of frames that have passed is 436.What the hell?  It ran at 50 when at 60, so I figured it'd be able to handle 50 no problem.  Now it's running at 43?  I know for a fact this machine isn't that slow.  This is really beginning to piss me the fuck off.  And I have no idea where to begin looking to try to fix the issue.

URL: https://forum.audiogames.net/post/412725/#p412725




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

So, what in the world would drop me to 50 FPS when running at 60?  I mean, my code should not be taxing my PC at all.  I'm running latest version of windows.  I've got 16 GB ram with an I7 processor.  No graphics in this game at all.  Graphics tend to lag a machine, yes, but there's no graphical issue here.  So what the hell is bogging down my machine to the level that it drops framerate from 60 to 50?  I would think whatever is doing that would have to be massively resource-intensive.Next question.  If I can't synchronize number of frames during network events, then how would I proceed to keep machines synchronized?  There's got to be some way to do it, since I know for a fact that online games do manage to accomplish it.  If I play my friend in a game of Madden, for example, the ball doesn't land at different places on the different machines.  If I throw the ball, and it lands incomplete on my opponent's 10 yard line, then my opponent sees the ball land incomplete on his 10 yard line, not his 20.  That means there has to be some way to accomplish this.NOTE:  I dropped my framerate to 50 in my game ccode to see if it would run well since it was running at 50 anyway, and this is now what I see:Amount of real time that has passed is 10.023seconds.  DT is 0.02.  Number of frames that have passed is 435.Amount of real time that has passed is 10.038seconds.  DT is 0.02.  Number of frames that have passed is 436.Amount of real time that has passed is 10.037seconds.  DT is 0.02.  Number of frames that have passed is 436.What the hell?  It ran at 50 when at 60, so I figured it'd be able to handle 50 no problem.  Now it's running at 43?  I know for a fact this machine isn't that slow.  This is really beginning to piss me the fuck off.  And I have no idea where to begin looking to try to fix the issue.

URL: https://forum.audiogames.net/post/412725/#p412725




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-18 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

So, what in the world would drop me to 50 FPS when running at 60?  I mean, my code should not be taxing my PC at all.  I'm running latest version of windows.  I've got 16 GB ram with an I7 processor.  No graphics in this game at all.  Graphics tend to lag a machine, yes, but there's no graphical issue here.  So what the hell is bogging down my machine to the level that it drops framerate from 60 to 50?  I would think whatever is doing that would have to be massively resource-intensive.Next question.  If I can't synchronize number of frames during network events, then how would I proceed to keep machines synchronized?  There's got to be some way to do it, since I know for a fact that online games do manage to accomplish it.  If I play my friend in a game of Madden, for example, the ball doesn't land at different places on the different machines.  If I throw the ball, and it lands incomplete on my opponent's 10 yard line, then my opponent sees the ball land incomplete on his 10 yard line, not his 20.  That means there has to be some way to accomplish this.

URL: https://forum.audiogames.net/post/412725/#p412725




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  Lot of info in this post, so please read in its entirety.  For the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is most assuredly a member of clock.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  What the hell?  That makes no sense.  In an attempt to start troubleshooting, I created a very simple BGT script to test framerate, hence the related error above.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606 frames.  Then on the very next iteration of exactly 10.029 we get 604 frames, while here, 10.012, less time, yields 608, and the kicker, 10.001, the least amount of time of all of them, gives 610?  I don't get this at all.  What in bloody hell is going on?  NOTE:  Interestingly, if I add C.update() to the code just below C.tick(), it cuts the amount of frames in half for some reason, so around 300 for 10 seconds.  So not sure how to use update correctly, since cutting number of frames is not what I want to accomplish.UPDATE:  Given what I found out about the update function cutting the frame rate in half, I removed the update() calls from everywhere in my game code, and now log shows:Amount of real time that has passed is 10.01seconds.  DT is 0.016.  Number of frames that have passed is 514.Amount of real time that has passed is 10.003seconds.  DT is 0.016.  Number of frames that have passed is 513.Amount of real time that has passed is 10.002seconds.  DT is 0.016.  Number of frames that have passed is 513.So still not where it should be.

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  Lot of info in this post, so please read in its entirety.  For the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is most assuredly a member of clock.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  What the hell?  That makes no sense.  In an attempt to start troubleshooting, I created a very simple BGT script to test framerate, hence the related error above.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606 frames.  Then on the very next iteration of exactly 10.029 we get 604 frames, while here, 10.012, less time, yields 608, and the kicker, 10.001, the least amount of time of all of them, gives 610?  I don't get this at all.  What in bloody hell is going on?  NOTE:  Interestingly, if I add C.update() to the code just below C.tick(), it cuts the amount of frames in half for some reason, so around 300 for 10 seconds.  So not sure how to use update correctly, since cutting number of frames is not what I want to accomplish.

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  Lot of info in this post, so please read in its entirety.  For the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is most assuredly a member of clock.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  What the hell?  That makes no sense.  In an attempt to start troubleshooting, I created a very simple BGT script to test framerate, hence the related error above.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606 frames.  Then on the very next iteration of exactly 10.029 we get 604 frames, while here, 10.012, less time, yields 608, and the kicker, 10.001, the least amount of time of all of them, gives 610?  I don't get this at all.  What in bloody hell is going on?SIDE NOTE:  Interestingly, if I add C.update() to the code just below C.tick(), it cuts the amount of frames in half for some reason, so around 300 for 10 seconds.  So not sure how to use update correctly, since cutting number of frames is not what I want to accomplish..

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  Lot of info in this post, so please read in its entirety.  For the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is most assuredly a member of clock.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  What the hell?  That makes no sense.  In an attempt to start troubleshooting, I created a very simple BGT script to test framerate, hence the related error above.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606 frames.  Then on the very next iteration of exactly 10.029 we get 604 frames, while here, 10.012, less time, yields 608, and the kicker, 10.001, the least amount of time of all of them, gives 610?  I don't get this at all.  What in bloody hell is going on?SIDE NOTE:  Interestingly, if I add C.update() to the code just below C.tick(), it cuts the amount of frames in half for some reason, so around 300 for 10 seconds.

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  Lot of info in this post, so please read in its entirety.  For the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is most assuredly a member of clock.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  What the hell?  That makes no sense.  In an attempt to start troubleshooting, I created a very simple BGT script to test framerate, hence the related error above.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606 frames.  Then on the very next iteration of exactly 10.029 we get 604 frames, while here, 10.012, less time, yields 608?  I don't get this at all.  What in the sam hell is going on?SIDE NOTE:  Interestingly, if I add C.update() to the code just below C.tick(), it cuts the amount of frames in half for some reason, so around 300 for 10 seconds.

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  Lot of info in this post, so please read in its entirety.  For the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is most assuredly a member of clock.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  What the hell?  That makes no sense.  In an attempt to start, I created a very simple BGT script to test framerate, hence the related error above.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606 frames.  Then on the very next iteration of exactly 10.029 we get 604 frames, while here, 10.012, less time, yields 608?  I don't get this at all.  What in the sam hell is going on?SIDE NOTE:  Interestingly, if I add C.update() to the code just below C.tick(), it cuts the amount of frames in half for some reason, so around 300 for 10 seconds.

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  Lot of info in this post, so please read in its entirety.  For the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  The hell?  In an attempt to start, I created a very simple BGT script to test framerate.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606 frames.  Then on the very next iteration of exactly 10.029 we get 604 frames, while here, 10.012, less time, yields 608?  I don't get this at all.  What in the sam hell is going on?SIDE NOTE:  Interestingly, if I add C.update() to the code just below C.tick(), it cuts the amount of frames in half for some reason, so around 300 for 10 seconds.

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  Lot of info in this post, so please read in its entirety.  For the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  The hell?  In an attempt to start, I created a very simple BGT script to test framerate.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606, then 604 frames, while here, 10.012, less time, yields 608?  I don't get this at all.  What in the sam hell is going on?SIDE NOTE:  Interestingly, if I add C.update() to the code just below C.tick(), it cuts the amount of frames in half for some reason, so around 300 for 10 seconds.

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  What in the world would cause this?  Also, for the life of me, I still  don't understand why I get this error.  If I declare DT globally, like this:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is.  However, if I add a function to return DT, it works fine:double SetFrameRate(){DT = 0.001*C.delay;return DT;}And it works fine.  The hell?  In an attempt to start, I created a very simple BGT script to test framerate.  Code is:#include "clock.bgt"#include "voice.bgt"#include "logger.bgt"bool testing = false;logger log;Voice speaker;timer RT;clock C(60);double DT;void main(){init();RT.pause();show_game_window("");RT.restart();testing = true;while(true){C.tick();if(RT.elapsed>= 1){log.write("TimeTest.log", true);log.add_entry("Amount of real time that has passed is " + (RT.elapsed/1000.0) + "seconds.  DT is " + DT + ".  Number of frames that have passed is " + C.frame + ".");C.frame = 0;RT.restart();}//key presses just to see current values.if(key_pressed(KEY_E))speaker.speak(RT.elapsed);if(key_pressed(KEY_F))speaker.speak(C.frame);if(key_pressed(KEY_ESCAPE)){testing = false;exit();}}}//Function to return DT, since I get that error if I don't.double init(){DT = 0.001*C.delay;return DT;}log shows:Amount of real time that has passed is 10.001seconds.  DT is 0.016.  Number of frames that have passed is 610.Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 604.Ok, so that presents a few questions.  First, how is the number of frames at 610 after 10.001 seconds?  How in the hell did ten frames pass in a thousandth of a second?  Then, even weirder, we have this:Amount of real time that has passed is 10.029seconds.  DT is 0.016.  Number of frames that have passed is 606.The hell?  That's more time than 10.001 is, yet there are fewer frames.  That makes no sense at all.  Then, even stranger, on the next line we have the exact same amount of time, down to the thousandth of a second, and still fewer frames, at 604.  Then, even less time passes above that, but more frames:Amount of real time that has passed is 10.012seconds.  DT is 0.016.  Number of frames that have passed is 608.What the fuck?  10.029 yields first 606, then 604 frames, while here, 10.012, less time, yields 608?  I don't get this at all.  What in the sam hell is going on?SIDE NOTE:  Interestingly, if I add C.update() to the code, it cuts the amount of frames in half for some reason.

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  What in the world would cause this?  Also, I still for the life of me don't understand why I get this error.  If I say:double DT = 0.001*C.delay;BGT compiler says:Line: double DT = 0.001*C.delay;Error: 'delay' is not a member of 'clock'But actually, it is.  However, if I add a function to return DT, it works fine:double SetFrameRate(){double DT = 0.001*C.delay;return DT;}And it works fine.  The hell?

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

I wouldn't even begin to know where to start looking.  What in the world would cause this?

URL: https://forum.audiogames.net/post/412475/#p412475




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?  I double checked, and FPS is set to 60.  Aside from there being about half of the frames that there should be, some of these numbers make no sense.  For example:Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.Ok, but then we've got:Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.And at 10.01, we've got 301.  So if 10.031 shows 302, 10.001 shows 301, 10.01 also shows 301, 10.005 also shows 301, then how in the ever-loving realm of fuck does 10.008, which is less than 10.031, less than 10.01, and only slightly above 10.005, show 303?  That makes no damn sense.  And I thought this was going to help with the initial problem I was having that began this whole thing, where the ball was landing at different coordinates on different machines.  If my machine thinks that 303 frames pass after 10.008 seconds, and your machine thinks that 301 frames pass after 10.01 seconds, then we're still gonna have the same issue, since my machine would have passed two more frames than yours, right?  So does this mean I'm still going to have the same damn problem after all of the work I've completed?  And why in the hell are only half of the frames there?

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?  I double checked, and FPS is set to 60.  Aside from there being about half of the frames that there should be, some of these numbers make no sense.  For example:Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.Ok, but then we've got:Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.And at 10.01, we've got 301.  So if 10.031 shows 302, 10.001 shows 301, 10.01 also shows 301, 10.005 also shows 301, then how in the ever-loving realm of fuck does 10.008, which is less than 10.031, less than 10.01, and only slightly above 10.005, show 303?  That makes no damn sense.  And I thought this was going to help with the initial problem I was having that began this whole thing, where the ball was landing at different coordinates on different machines.  If my machine thinks that 303 frames pass after 10.008 seconds, and your machine thinks that 301 frames pass after 10.01 seconds, then we're still gonna have the same issue, since my machine would have passed two more frames than yours, right?  So does this mean I'm still going to have the same damn problem after all of the work I've completed?

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?  I double checked, and FPS is set to 60.  Aside from there being about half of the frames that there should be, some of these numbers make no sense.  For example:Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.Ok, but then we've got:Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.And at 10.01, we've got 301.  So if 10.031 shows 302, 10.001 shows 301, 10.01 also shows 301, 10.005 also shows 301, then how in the ever-loving realm of fuck does 10.008, which is less than 10.031, less than 10.01, and only slightly above 10.005, show 303?  That makes no damn sense.  And I thought this was going to help with the initial problem I was having that began this whole thing, where the ball was landing at different coordinates on different machines.  If my machine think that 303 frames pass after 10.008 seconds, and your machine thinks that 301 frams pass after 10.008 seconds, then we're still gonna have the same issue, since my machine would have passed two more frames than yours, right?  So does this mean I'm still going to have the same damn problem after all of the work I've completed?

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?  I double checked, and FPS is set to 60.  Aside from it being about half of what it should be, some of these numbers make no sense.  For example:Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.Ok, but then we've got:Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.And at 10.01, we've got 301.  So if 10.031 shows 302, 10.001 shows 301, 10.01 also shows 301, 10.005 also shows 301, then how in the ever-loving realm of fuck does 10.008, which is less than 10.031, less than 10.01, and only slightly above 10.005, show 303?  That makes no damn sense.  And I thought this was going to help with the initial problem I was having that began this whole thing, where the ball was landing at different coordinates on different machines.  If my machine think that 303 frames pass after 10.008 seconds, and your machine thinks that 301 frams pass after 10.008 seconds, then we're still gonna have the same issue, since my machine would have passed two more frames than yours, right?  So does this mean I'm still going to have the same damn problem after all of the work I've completed?

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?  I double checked, and FPS is set to 60.  Aside from it being about half of what it should be, some of these numbers make no sense.  For example:Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.Ok, but then we've got:Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.And at 10.001, we've got 301.  So if 10.031 shows 302, 10.001 shows 301, 10.005 also shows 301, then how in the ever-loving realm of fuck does 10.008, which is less than 10.031 and only slightly above 10.005, show 303?  That makes no damn sense.  And I thought this was going to help with the initial problem I was having that began this whole thing, where the ball was landing at different coordinates on different machines.  If my machine think that 303 frames pass after 10.008 seconds, and your machine thinks that 301 frams pass after 10.008 seconds, then we're still gonna have the same issue, since my machine would have passed two more frames than yours, right?  So does this mean I'm still going to have the same damn problem after all of the work I've completed?

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?  I double checked, and FPS is set to 60.  Aside from it being about half of what it should be, some of these numbers make no sense.  For example:Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.Ok, but then we've got:Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.And at 10.001, we've got 301.  So if 10.031 shows 302, 10.001 shows 301, 10.005 also shows 301, then how in the ever-loving realm of fuck does 10.008, which is less than 10.031 and only slightly above 10.005, show 303?  That makes no damn sense.

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?  I double checked, and FPS is set to 60.  Aside from it being about half of what it should be, some of these numbers make no sense.  For example:Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.Ok, but then we've got:Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.And at 10.001, we've got 301.  So if 10.031 shows 302, 10.001 shows 301, 10.005 also shows 301, then how in the ever-loving realm of fuck does 10.008, which is less than 10.031 and only slightly about 10.005, show 303?  That makes no damn sense.

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?  I double checked, and FPS is set to 60.  Aside from it being about half of what it should be, some of these numbers make no sense.  For example:Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.Ok, but then we've got:Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.And at 10.001, we've got 301.  So if 10.031 shows 302, and 10.001 shows 301, how in the hell does 10.008, which is less than 10.031, show 303?  That makes no damn sense.

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  To be thorough, I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.  I then created a separate timer to track real time and added the following lines of code to my main game loop for testing:if(RealTime.elapsed>= 1){test.add_entry("Amount of real time that has passed is " + (RealTime.elapsed/1000.0) + "seconds.  Number of frames that have passed is " + C.frame + ".");C.frame = 0;TRestart(RealTime);}This should write the number of frames that pass each time ten seconds pass.  I have FPS set to 60, so 600 frames should pass.  This is what log shows:Amount of real time that has passed is 10.005seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.01seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.011seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.031seconds.  Number of frames that have passed is 302.Amount of real time that has passed is 10.001seconds.  Number of frames that have passed is 301.Amount of real time that has passed is 10.008seconds.  Number of frames that have passed is 303.What the hell?

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60.  I added the test entry in the update function, just before time.restart(), and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.  I ran a check to show what the timer showed after each frame right before it was reset with FPS set to 60, and there's quite a bit of jumping around.  Ten frames:frames = 1, and elapsed times is 34. frames = 2, and elapsed times is 28. frames = 3, and elapsed times is 26. frames = 4, and elapsed times is 30. frames = 5, and elapsed times is 27. frames = 6, and elapsed times is 26. frames = 7, and elapsed times is 28. frames = 8, and elapsed times is 26. frames = 9, and elapsed times is 25. frames = 10, and elapsed times is 25.Notice the large variability from frame 1 to 2, where timer goes from 34 to 28, sometimes down to 25.  Then I ran a test to see whether it indeed ran 60 frames per second.  I had my iPhone set a timer for 10 seconds, and started the game.  After 10 seconds, number of frames shows as only 284.  Last time I checked, 60 x 10 was 600, not 284.  Not sure what is wrong here.

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-17 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

You have two methods in clock.  Tick() and update().  Update appears to reset the timer for each frame after DT is reached:bool update(){if (time.elapsed>=delay) {time.restart();time.resume();return true;}return false;}That would seem to suggest that wherever tick() is called, update() has to be called as well, although update is a Boolean, so not positive.  Just want to make sure that I get this correct.

URL: https://forum.audiogames.net/post/412454/#p412454




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-16 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Ok, just noticed that the clock wasn't exactly working correctly.  Where do the tick and update functions need to be so that things actually update right?  Do I want the tick and update functions in my main game loop where I check for all sorts of rules, key presses and other things, or do the tick and update functions only go in places where the ball, racket, or players move, and thusly, math becomes relevant?  I assume the latter, but I want to make sure.

URL: https://forum.audiogames.net/post/412292/#p412292




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-16 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Ok, just noticed that the clock wasn't exactly working correctly.  Where do the tick and update functions need to be so that things actually update right?  Do I want the tick and update functions in my main game loop where I check for all sorts of rules, key presses and other things, or do the tick and update functions only go in places where the ball, racket, or players move?  I assume the latter, but I want to make sure.

URL: https://forum.audiogames.net/post/412292/#p412292




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-16 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

@Cae,Looking at this code to see if I can understand the collision detection you have, to get an idea of how to do it.  What is all the dictionary stuff for?  Why would I need the dictionary for math stuff?  I doubt I need all of these different forms, right?  All I have is a ball, 2 rackets, the net, and the ground.

URL: https://forum.audiogames.net/post/412264/#p412264




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Bgt Brace Issue

2019-02-15 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Bgt Brace Issue

Where it gets tricky is when you've got nested statements.  Get in the habit of counting braces, and make sure that you end up with 0 open when your function is completed.  You might encounter bugs in behavior if they're in the wrong places, but you will compile, and those bugs are easier to track down than the elusive and all-vague "unexpected end of file" message that the compiler gives.

URL: https://forum.audiogames.net/post/411980/#p411980




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Bgt Brace Issue

2019-02-15 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Bgt Brace Issue

Where it gets tricky is when you've got nested statements.  Get in the habit of counting braces, and make sure that you end up with 0 open when your function is completed.  You might encounter bugs in behavior if they're in the wrong places, but you will compile, and those bugs are easier to track down than the elusive and all-vague

URL: https://forum.audiogames.net/post/411980/#p411980




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Got it, I think.  Just under the line that moves the ball:pos += vel*DT;I added one line of code:V0 += G;Where G is a gravity vector.  Test log now shows:Beginning move function.  Initial velocity z is 20, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 20.Ball is now at 0, 0, 13.330154419.Beginning move function.  Initial velocity z is 10.185803833, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 10.185803833.Ball is now at 0, 0, 13.5031661987305.Beginning move function.  Initial velocity z is 0.37160766602, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 0.37160766602.Ball is now at 0, 0, 13.5094995498657.Beginning move function.  Initial velocity z is -9.4300012588501, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is -9.4300012588501.Ball is now at 0, 0, 13.3523330688477.Beginning move function.  Initial velocity z is -19.2400016784668, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is -19.2400016784668.Ball is now at 0, 0, 13.0316667556763.Beginning move function.  Initial velocity z is -29.0500030517578, accelleration z is 0.  DT is 0.016.It seems to work now, although I am not sure whether actual velocity is supposed to go past -9.81 like that.  If not, I need to know so I can fix it.UPDATE:  In experimenting with adjusting the function to throw the ball, I noticed something I did not know you could do with vectors in BGT.  I put my code back the way it was, where velocity is returned in a function:vector SetVel(){VF.x = (V0.x+(A.x*DT))*sine(theta)*cosine(phi);VF.y = (V0.y+(A.y*DT))*sine(theta)*sine(phi);VF.z = (V0.z+(A.z*DT))*cosine(phi);return VF;}I didn't know I could do this with vectors, but this works from wherever I please:VF = SetVel();If I had known that, updating vel anywhere wouldn't have been an issue.  Damn.  I assume I can do it with the other vectors as well.

URL: https://forum.audiogames.net/post/411595/#p411595




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Got it, I think.  Just under the line that moves the ball:pos += vel*DT;I added one line of code:V0 += G;Where G is a gravity vector.  Test log now shows:Beginning move function.  Initial velocity z is 20, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 20.Ball is now at 0, 0, 13.330154419.Beginning move function.  Initial velocity z is 10.185803833, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 10.185803833.Ball is now at 0, 0, 13.5031661987305.Beginning move function.  Initial velocity z is 0.37160766602, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 0.37160766602.Ball is now at 0, 0, 13.5094995498657.Beginning move function.  Initial velocity z is -9.4300012588501, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is -9.4300012588501.Ball is now at 0, 0, 13.3523330688477.Beginning move function.  Initial velocity z is -19.2400016784668, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is -19.2400016784668.Ball is now at 0, 0, 13.0316667556763.Beginning move function.  Initial velocity z is -29.0500030517578, accelleration z is 0.  DT is 0.016.It seems to work now, although I am not sure whether actual velocity is supposed to go past -9.81 like that.  If not, I need to know so I can fix it.UPDATE:  In experimenting with adjusting the function to throw the ball, I noticed something I did not know you could do with vectors in BGT.  I put my code back the way it was, where velocity is returned in a function:vector SetVel(){VF.x = (V0.x+(A.x*DT))*sine(theta)*cosine(phi);VF.y = (V0.y+(A.y*DT))*sine(theta)*sine(phi);VF.z = (V0.z+(A.z*DT))*cosine(phi);return VF;}I didn't know I could do this with vectors, but this works from wherever I please:VF = SetVel();If I had known that, updating vel anywhere wouldn't have been an issue.  Damn.

URL: https://forum.audiogames.net/post/411595/#p411595




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Got it, I think.  Just under the line that moves the ball:pos += vel*DT;I added one line of code:V0 += G;Where G is a gravity vector.  Test log now shows:Beginning move function.  Initial velocity z is 20, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 20.Ball is now at 0, 0, 13.330154419.Beginning move function.  Initial velocity z is 10.185803833, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 10.185803833.Ball is now at 0, 0, 13.5031661987305.Beginning move function.  Initial velocity z is 0.37160766602, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is 0.37160766602.Ball is now at 0, 0, 13.5094995498657.Beginning move function.  Initial velocity z is -9.4300012588501, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is -9.4300012588501.Ball is now at 0, 0, 13.3523330688477.Beginning move function.  Initial velocity z is -19.2400016784668, accelleration z is 0.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is 0.  velocity z is -19.2400016784668.Ball is now at 0, 0, 13.0316667556763.Beginning move function.  Initial velocity z is -29.0500030517578, accelleration z is 0.  DT is 0.016.It seems to work now, although I am not sure whether actual velocity is supposed to go past -9.81 like that.  If not, I need to know so I can fix it.

URL: https://forum.audiogames.net/post/411595/#p411595




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

But if I set V0 to VF, then doesn't that screw up the equation?  It seems like the ball would never rise like it's supposed to.  If I throw a ball upwards at an initial  velocity V0 of, say, 30, it will rise, and as gravity exerts a force on the ball, that velocity will decrease.  Once it hits 0, the ball has reached its max height, at which point it will begin to fall back to earth.  If I make VF = V0, then how will the ball be able to rise like it should?

URL: https://forum.audiogames.net/post/411591/#p411591




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Ok, so I changed the code to reflect what you wrote above:VF.z = (V0.z+(A.z*DT))...Log shows:Beginning move function.  Initial velocity z is 20, accelleration z is -9.814196167.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 19.8365001678467.Ball is now at 0, 0, 13.3306083679199.Beginning move function.  Initial velocity z is 20, accelleration z is -9.814196167.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 19.8365001678467.Ball is now at 0, 0, 13.6612167358398.Beginning move function.  Initial velocity z is 20, accelleration z is -9.814196167.  DT is 0.016.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 19.8365001678467.Ball is now at 0, 0, 13.9918251037598.What...The hell?  Aside from the fact that the velocity still remains constant, and that V0 isn't decreasing, 19.8365001678467 is very, very wrong.  Also, DT seems weird to me.  I have FPS set to 60.

URL: https://forum.audiogames.net/post/411583/#p411583




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Ok, so I changed the code to reflect what you wrote above:VF.z = (V0.z+(A.z*DT))...Log shows:Beginning move function.  Initial velocity z is 20, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 19.8365001678467.Ball is now at 0, 0, 13.3306083679199.Beginning move function.  Initial velocity z is 20, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 19.8365001678467.Ball is now at 0, 0, 13.6612167358398.Beginning move function.  Initial velocity z is 20, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 19.8365001678467.Ball is now at 0, 0, 13.9918251037598.What...The hell?  Aside from the fact that the velocity still remains constant, 19.8365001678467 is very, very wrong.

URL: https://forum.audiogames.net/post/411583/#p411583




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Bgt Brace Issue

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Bgt Brace Issue

I can't help you with the menu issue, because I have never used it and don't have a copy of it.

URL: https://forum.audiogames.net/post/411575/#p411575




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Ok, slightly confused.  I've got two velocity vectors.  V0, or initial velocity, and VF, or final velocity.  The equation for final velocity is:vx = vx0 + ax * tvy = vy0 + ay * tvz = vz0 + az * tWhich is what I did here, I think, unless somehow I didn't write it correctly in terms of code:VF.x = (V0.x+A.x)*DT*sine(theta)*cosine(phi);VF.y = (V0.y+A.y)*DT*sine(theta)*sine(phi);VF.z = (V0.z+A.z)*DT*cosine(phi);So, if V0 is (0, 0, 20) such that, for now, the ball exceeds gravity so that it should move upward, and assuming that, again, for now, gravity is the only force on the ball:(V0.z+A.z) is equal to (20+-9.81), which should equal 10.19.  So the next time the ball move function iterates, shouldn't V0.z be 10.19, not 20?  Then the equation occurs again:VF.z = (10.19+-9.81)… which equals 0.38, if my math is correct.  Isn't that the way this should work?  Each time the ball move function iterates, the math done on the preceeding iteration should hold, since the vector values get reassigned each time the equation runs.  Look:VF.x = (V0.x+A.x)...VF.y = (V0.y+A.y)...VF.z = (V0.z+A.z)...So each time the ball move function iterates, VF.x, y,  and z are assigned, correct?  Shouldn't that allow for the values to assign correctly?  Or am I missing something?

URL: https://forum.audiogames.net/post/411561/#p411561




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Bgt Brace Issue

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Bgt Brace Issue

The only error that I see is the one about string constant when I try to compile:On line: 6 (28)Line: string[] items="Play game","Explore the grid","exit";Error: Expected identifierOn line: 6 (28)Line: string[] items="Play game","Explore the grid","exit";Error: Instead found ''Which means you might have accidentally removed a brace somewhere or something, and that's why you're getting the token error.  The code that gives the string error is as follows:void main(){show_game_window("Game_alpha");speak("Hello");string text="Welcome To this game. Please choose an option from the below menu";string[] items="Play game","Explore the grid","exit";r=new_menu(text, items, 0);if(r==0)play_game();else if(r==1)explore_grid();else if(r==2)exit();}void play_game(){int answer = question("Question", "would you like to read the game  info and rules??");if(answer==0)alert("", "Let's try that again.");if(answer==1)alert("", "Loading...");if(answer==2)alert("", "All right then. Continuing to game...");}void explore_grid(){//Code for this function goes here.}

URL: https://forum.audiogames.net/post/411558/#p411558




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Ok, so what the hell.  Trying something new to see whether velocity would update correctly, I added the equations for the velocity to the ball move function.  Accelleration vector at the moment is currently (0, 0, -9.81) to account for gravity.  Initial velocity, or V0, when entering the move function is (0, 0, 20), just an arbitrary number to see whether it updates right.  Theoretically, the ball should travel upwards, then as gravity pulls it, initial velocity should slow until reaching 0, and then the ball should fall.  The ball move function, with only log entries omitted, is:void move(){VF.x = (V0.x+A.x)*DT*sine(theta)*cosine(phi);VF.y = (V0.y+A.y)*DT*sine(theta)*sine(phi);VF.z = (V0.z+A.z)*DT*cosine(phi);pos += VF*DT;if(pos.z <= 0){moving = false;bounce();}if(C.frame == 30){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}C.tick();C.update();env.update_sound_2d(B.slot, B.pos.x, B.pos.y);}Instead of what it's supposed to do, though, the velocity just remains constant.  From test log:Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.524520874.Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.0001049041748.Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.0001573562622.As you can see, the velocity just remains constant.  It's not supposed to do that, I don't think.  And since I put the math equations inside of this function, they should update with each iteration, correct?  What am I doing wrong here?

URL: https://forum.audiogames.net/post/411544/#p411544




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Ok, so what the hell.  Trying something new to see whether velocity would update correctly, I added the equations for the velocity to the ball move function.  Accelleration vector at the moment is currently (0, 0, -9.81) to account for gravity.  Initial velocity, or V0, when entering the move function is (0, 0, 20), just an arbitrary number to see whether it updates right.  Theoretically, the ball should travel upwards, then as gravity pulls it, initial velocity should slow until reaching 0, and then the ball should fall.  The ball move function, with only log entries omitted, is:void move(){VF.x = (V0.x+A.x)*DT*sine(theta)*cosine(phi);VF.y = (V0.y+A.y)*DT*sine(theta)*sine(phi);VF.z = (V0.z+A.z)*DT*cosine(phi);pos += VF*DT;if(pos.z <= 0){moving = false;bounce();}if(C.frame == 30){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}C.tick();C.update();env.update_sound_2d(B.slot, B.pos.x, B.pos.y);}Instead of what it's supposed to do, though, the velocity just remains constant.  From test log:Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.524520874.Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.0001049041748.Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.0001573562622.As you can see, the velocity just remains constant.  It's not supposed to do that, I don't think.  And since I put the math equations inside of this function, they should update with each iteration, correct?  What am I doing wrong here?

URL: https://forum.audiogames.net/post/411544/#p411544




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: DT in BGT

2019-02-13 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: DT in BGT

Ok, so what the hell.  Trying something new to see whether velocity would update correctly, I added the equations for the velocity to the ball move function.  Accelleration vector at the moment is currently (0, 0, -9.81) to account for gravity.  Initial velocity, or V0, when entering the move function is (0, 0, 20), just an arbitrary number to see whether it updates right.  Theoretically, the ball should travel upwards, then as gravity pulls it, initial velocity should slow until reaching 0, and then the ball should fall.  The ball move code is:void move(){VF.x = (V0.x+A.x)*DT*sine(theta)*cosine(phi);VF.y = (V0.y+A.y)*DT*sine(theta)*sine(phi);VF.z = (V0.z+A.z)*DT*cosine(phi);pos += VF*DT;if(pos.z <= 0){moving = false;bounce();}if(C.frame == 30){B.slot = env.play_2d("sounds/ball.ogg", user.x, user.y, B.pos.x, B.pos.y, false);C.frame = 0;}C.tick();C.update();env.update_sound_2d(B.slot, B.pos.x, B.pos.y);}Instead of what it's supposed to do, though, the velocity just remains constant.  From test log:Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.524520874.Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.0001049041748.Beginning move function.  Initial velocity z is 10, accelleration z is -9.814196167.In move function, just past where velocity vector values are assigned, and just before the line to move the ball.  Accelleration z is -9.814196167.  velocity z is 0.003166659735143.Ball is now at 0, 0, 12.0001573562622.As you can see, the velocity just remains constant.  It's not supposed to do that, I don't think.  And since I put the math equations inside of this function, they should update with each iteration, correct?  What am I doing wrong here?

URL: https://forum.audiogames.net/post/411544/#p411544




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-11 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

The problem is a logistical one. If I have one function per vector, ghow do I make sure that they all get called?  Once a function calls another, it is exited, if I remember correctly.  So, it's not like I can just have one function call each of them.  For example:void UpdateVecs(){SetDis();SetForce();SetVel();…}Legistically I'm not sure what the best way to handle it would be.  I might be able to do something where I create Booleans  for each and run checks against them, then update if true.  I.e.:bool UpdVel = false;bool UpdAcc = false;…Then before movement is called, set it to true, and in the game loop say:if(UpdAcc)SetAcc();…Again, I am tired, so not sure whether that would work or not.  And the thing is, all of those will need to be updated each time before the ball moves.

URL: https://forum.audiogames.net/post/411027/#p411027




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-11 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

The problem is a logistical one. If I have one function per vector, ghow do I make sure that they all get called?  Once a function calls another, it is exited, if I remember correctly.  So, it's not like I can just have one function call each of them.  For example:void UpdateVecs(){UpdateDis();UpdateForce();UpdateVel();…}Legistically I'm not sure what the best way to handle it would be.  I might be able to do something where I create Booleans  for each and run checks against them, then update if true.  I.e.:bool UpdVel = false;bool UpdAcc = false;…Then before movement is called, set it to true, and in the game loop say:if(UpdAcc)SetAcc();Again, I am tired, so not sure whether that would work or not.  And the thing is, all of those will need to be updated each time before the ball moves.

URL: https://forum.audiogames.net/post/411027/#p411027




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-11 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

The problem is a logistical one. If I have one function per vector, ghow do I make sure that they all get called?  Once a function calls another, it is exited, if I remember correctly.  So, it's not like I can just have one function call each of them.  For example:void UpdateVecs(){UpdateDis();UpdateForce();UpdateVel();…}Legistically I'm not sure what the best way to handle it would be.  I might be able to do something where I create Booleans  for each and run checks against them, then update if true.  I.e.:bool UpdVel = false;bool UpdAcc = false;…Then before movement is called, set it to true, and in the game loop say:if(UpdAcc)SetAcc();Again, I am tired, so not sure whether that would work or not.

URL: https://forum.audiogames.net/post/411027/#p411027




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Bgt Brace Issue

2019-02-10 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Bgt Brace Issue

So, this is caused when braces do not match, or braces are not where they should be.  Keep in mind that BGT needs no brace if there is only one action to be performed based on a condition check.  Like so:if(A > 0)A *= B;However, braces are needed if there is more than one action to be performed after a given check, like so:if(A > 0){A *= B;B += C;A = C;}In this case, you had braces in places you didn't need them, and so the compiler wasn't pleased.  I removed the unnecessary braces.  I also corrected another error that I saw.  Keep in mind that the alert function takes two parameters, so if you want to just give a message without a dialog name, use quotes with a comma, then the string of test you want to actually say, like so:alert("", "This is a test.");However, the compiler is not pleased with your line where you declare menu items in the string array.  It wants an identifier there instead of the string constant it sees.  I prefer to use the dynamic menu, and that is done differently.  The code with the braces and alert calls fixed is as follows:void main(){show_game_window("Game_alpha");speak("Hello");string text="Welcome To this game. Please choose an option from the below menu";string[] items="Play game","Explore the grid","exit";r=new_menu(text, items, 0);if(r==0)play_game();else if(r==1)explore_grid();else if(r==2)exit();}void play_game(){int answer = question("Question", "would you like to read the game  info and rules??");if(answer==0)alert("Let's try that again.");if(answer==1)alert("", "Loading...");if(answer==2)alert("", "All right then. Continuing to game...");}void explore_grid(){//Code for this function goes here.}

URL: https://forum.audiogames.net/post/411002/#p411002




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-10 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

Yeah, I know that part.  But math isn't a class in this case.  I didn't think making it a class was necessary, but I always could in the future.  I've got a math.bgt file, and all of the vectors and mathematical calculations are stored there, so that I don't have math in 50 different places in my code.  Makes bugs related to the math portion easier to track down.  What that means is that any vector and variable stored in math are treated as global, I believe.

URL: https://forum.audiogames.net/post/410932/#p410932




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-10 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

Yeah, I know that part.  But math isn't a class in this case.  I've got a math.bgt file, and all of the vectors and mathematical calculations are stored there, so that I don't have math in 50 different places in my code.  Makes bugs related to the math portion easier to track down.  What that means is that any vector and variable stored in math are treated as global, I believe.

URL: https://forum.audiogames.net/post/410932/#p410932




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-10 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

The problem that I can't figure out how to get around is that if I am not mistaken, a function to return vectors can only return one value.  So in other words, I can't return 5 or 6 vectors, I don't think.  So, using the above function to update velocity, once that vector is returned, it would exit the function, I believe, without updating the rest.  I've got multiple vectors:  displacement, force, acceleration, initial velocity, final velocity, etc.  Maybe I'm wrong and I sound like a moron, and maybe that's due to the less than 3 hours of sleep I got last night.  But if I'm right, if a function to return the vector can only return the one value, then how do I implement an update function that can update all of them at once?  Ideally, this would be done before the ball moves.  So, something like:vector update(){v.x = blah;v.y = blah;v.z = blah;return v;}returns one vector.  If I were to put another vector under the initial return, I don't think it would execute.  And If I did something like:vector update(){v1.x = blah;v1.y = blah;v1.z = blah;v2.x = blah;v2.y = blah;…return v1;return v2;…}I think it would just exit the function after the initial return value and not execute the second return line of code, if I remember correctly.  So not sure how to get around that.  Or hell, maybe I'm totally off base at the moment and I'm a fucking idiot.  If that's the case, then I apologize.

URL: https://forum.audiogames.net/post/410914/#p410914




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-10 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

The problem that I can't figure out how to get around is that if I am not mistaken, a function to return vectors can only return one value.  So in other words, I can't return 5 or 6 vectors, I don't think.  So, using the above function to update velocity, once that vector is returned, it would exit the function, I believe, without updating the rest.  I've got multiple vectors:  displacement, force, acceleration, initial velocity, final velocity, etc.  Maybe I'm wrong and I sound like a moron, and maybe that's due to the less than 3 hours of sleep I got last night.  But if I'm right, if a function to return the vector can only return the one value, then how do I implement an update function that can update all of them at once?  Ideally, this would be done before the ball moves.  And if I'm a moron, then I apologize.

URL: https://forum.audiogames.net/post/410914/#p410914




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-09 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

A couple of things.  So, this is exactly what he said:In spherical coordinates, we can describe a vector by specifying the following components:• r which is the distance from the origin to the point• θ which is the angle the radial vector makes with respect to the z-axis (i.e. up / down)• φ which is the azimuthal angle that the radial vector makes with respect to the y-axis (i.e. rotation about the z-axis)We can get spherical coordinates from cartesian coordinates (and vice-versa) using the transformation:x = r * sin θ * cos φy = r * sin θ * sin φz = r * cos φwhere:r = sqrt(x^2 + y^2 + z^2)φ = arctan(y / x)θ = arccos(z / r)So, it looks like he is saying that θ is used for elevation instead of φ.  If that's the case, then x being sin(theta)*cos(phi) makes sense.On a related mathematical but different note, One thing I have noticed about BGT is that if I declare a vector like so:vector VF((IV.x+acc.x)*DT*sine(theta)*cosine(phi), (IV.y+acc.y)*DT*sine(theta)*sine(phi), (pos.z+IV*DT)+(0.5*9.81)*power(DT, 2)*cosine(phi));it will declare the vector, but the values within the vector do not assign correctly.  in other words, values do not change correctly as they should, as if the math isn't actually completed.  In order to get them to assign correctly, I had to do this:vector UpdateVel(){VF.x = (IV.x+acc.x)*DT*sine(theta)*cosine(phi);VF.y = (IV.y+acc.y)*DT*sine(theta)*sine(phi);VF.z = (pos.z+IV*DT)+(0.5*9.81)*power(DT, 2)*cosine(phi);return VF;}Once I did that, the vector values assigned correctly.  So if the only way to get the values to assign correctly is to return the vector in a function, is there a way to have one function retirn all the vectors so that I don't have to make one for each one of them?  That would suck,  and, quite frankly, seems counterintuitive.

URL: https://forum.audiogames.net/post/410676/#p410676




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

2019-02-09 Thread AudioGames . net ForumDevelopers room : JLove via Audiogames-reflector


  


Re: Updated includes for BGT (includes bgt2py and 1st person sound pool)

A couple of things.  So, this is exactly what he said:In spherical coordinates, we can describe a vector by specifying the following components:• r which is the distance from the origin to the point• θ which is the angle the radial vector makes with respect to the z-axis (i.e. up / down)• φ which is the azimuthal angle that the radial vector makes with respect to the y-axis (i.e. rotation about the z-axis)We can get spherical coordinates from cartesian coordinates (and vice-versa) using the transformation:x = r * sin θ * cos φy = r * sin θ * sin φz = r * cos φwhere:r = sqrt(x^2 + y^2 + z^2)φ = arctan(y / x)θ = arccos(z / r)So, it looks like he is saying that θ is used for elevation instead of φ.  If that's the case, then x being sin(theta)*cos(phi) makes sense.On a related mathematical but different note, One thing I have noticed about BGT is that if I declare a vector like so:vector VF((IV.x+acc.x)*DT*sine(theta)*sine(phi), (IV.y+acc.y)*DT*sine(theta)*sine(phi), (pos.z+IV*DT)+(0.5*9.81)*power(DT, 2)*cosine(phi));it will declare the vector, but the values within the vector do not assign correctly.  in other words, values do not change correctly as they should, as if the math isn't actually completed.  In order to get them to assign correctly, I had to do this:vector UpdateVel(){VF.x = (IV.x+acc.x)*DT*sine(theta)*sine(phi);VF.y = (IV.y+acc.y)*DT*sine(theta)*sine(phi);VF.z = (pos.z+IV*DT)+(0.5*9.81)*power(DT, 2)*cosine(phi);return VF;}Once I did that, the vector values assigned correctly.  So if the only way to get the values to assign correctly is to return the vector in a function, is there a way to have one function retirn all the vectors so that I don't have to make one for each one of them?  That would suck,  and, quite frankly, seems counterintuitive.

URL: https://forum.audiogames.net/post/410676/#p410676




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


  1   2   3   >