Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Lars-Kristian

Member Since 20 Jul 2012
Offline Last Active Nov 02 2012 02:35 AM

Posts I've Made

In Topic: Xna GameTime problem?

22 October 2012 - 11:02 AM

Try updating your logic less frequent, let's say 30fps:

TimeSpan.FromMilliseconds(1000.0d / 30.0d);


Thanks for a reply, but this did not work for me and the problem is still there.

I used Stopwatch to time my update- and draw method.
Update uses under 1ms and draw under 2ms, so I don't think its because my game is to complex.

In Topic: Xna GameTime problem?

21 October 2012 - 12:49 PM

The code is not displayed the proper way.
Does anyone know how to fix it? :P

In Topic: Whats a good way to do collision detection in a simple JFrame game?

06 October 2012 - 01:36 PM

If you have a basic understanding about vectors this link will help you a lot:
http://www.metanetso.../tutorialA.html

Under the "calculating the projection vector" section.

You can:
1. Find the the smallest projection vector.
2. Move the ball on the outside of the paddle.(The length of the projection vector)
3. Reverse the acceleration of the ball in the direction of the collision.

Note: It can also be useful too not allow movement of the paddle if the ball hits the top or bottom side of the paddle, so that the ball and paddle does not collide 2 time in a row.

This is not the simplest method too find the collision, but it is very useful when it comes too collision handling.

If this does not make sense, please let me know. xD

In Topic: Whats a good way to do collision detection in a simple JFrame game?

06 October 2012 - 11:24 AM

Hi I read your post and I think I can help. But first I need to know:

How do you want your game to look like?

Are you aiming for the absolute simplest version(the ball updates 1-5 times a second), or the more modern version(the ball have a fluid motion)?
Is the ball round or square?
What happens if it hits a corner of the paddle?

In Topic: Bug in Verlet integrated physics engine.

02 October 2012 - 03:31 PM

Thanks for the help, I will try those things tomorrow. :D

PARTNERS