Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: dewitters Game Loop Attempt on: 2012-07-02 02:00:54
No they are I was just trying to be thorough.  Anyway, I implemented your suggestions and fixed the game speed issue as well as the collision detection.  Thank you very much for your help Riven.
2  Game Development / Newbie & Debugging Questions / Re: dewitters Game Loop Attempt on: 2012-06-30 04:04:33
Are you saying it should be executed at render time?
3  Game Development / Newbie & Debugging Questions / Re: dewitters Game Loop Attempt on: 2012-06-29 01:40:58
So how does one keep calculating the interpolation value consistently?  It can't be run with the update method because the interpolation needs to be calculated between updates and right before each render.  I'm sorry if I'm missing something here.  I'm trying my best to wrap my head around this.  My interpolation is calculated and applied outside of both my render method and update loop.
4  Game Development / Newbie & Debugging Questions / Re: dewitters Game Loop Attempt on: 2012-06-28 23:01:10
Well my render method is only called once.  I call three different interpolate methods for the three objects that move on screen.  Each of these methods is similar to the one i posted earlier and calculate the new position of the object based on the interpolation value.  Then the render method is called and everything is rendered at the interpolated location.  Is this incorrect?  I can see how the interpolate methods could cause slowdown...can they be placed in the update loop?  I don't see how that would work.
5  Game Development / Newbie & Debugging Questions / Re: dewitters Game Loop Attempt on: 2012-06-28 22:02:04
I was under the impression that the interpolation value (in the case of a game loop) was the ratio between the set time between each update (in the case of 25 updates per second each update should take 40ms) and the actual amount of time that has passed.  In other words if each update should take 40ms and it has been 20ms since the last update, then your interpolation value would be 0.5.  Is that incorrect?
6  Game Development / Newbie & Debugging Questions / Re: dewitters Game Loop Attempt on: 2012-06-28 20:06:57
So i fixed the string object issue, moved all of the logic to the update method and changed the updates per second to 100.  That solved the collision issues I was having, but I still experience game speed slowdowns and speed-ups.  Could it be my interpolate methods?  I'm not sure I handled them right.  Here is the code for the puck's interpolation: https://gist.github.com/3012973  I handled the other rendered objects in a similar manner.  Thanks to Riven and tberthel for your help so far.
7  Game Development / Newbie & Debugging Questions / Re: dewitters Game Loop Attempt on: 2012-06-27 06:28:38
I'm sorry here is that method: https://gist.github.com/3001409  And here is my render method also: https://gist.github.com/3001434
8  Game Development / Newbie & Debugging Questions / Re: dewitters Game Loop Attempt on: 2012-06-27 05:43:27
I call the checkCollisions() method on line 30 which is outside of the update method and update loop.  This method checks for collisions between either of the two paddles and the puck. I did this because, in the update method, the puck would just move through the paddle and the collision wouldn't be detected.  Would checkCollisions() cause the speed variation?
9  Game Development / Newbie & Debugging Questions / dewitters Game Loop Attempt on: 2012-06-27 03:43:12
So I decided to try my hand at making a simple air hockey game that implements the last game loop described in the dewitters article here: http://dewitters.koonsolo.com/gameloop.html (The loop titled Constant Game Speed independent of Variable FPS).  However my results were disappointing because my game runs at different speeds on different computers and sometimes on the same computer, despite my update method seemingly running 25 times per second consistently (maybe my method for checking this is wrong).  Anyway, here is the code in question: https://gist.github.com/2997312  Please let me know if you have questions and thanks in advance for your help.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (15 views)
2014-07-30 21:08:39

Riven (22 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!