1 Replies - 2369 Views - Last Post: 07 December 2012 - 06:34 PM Rate Topic: -----

#1 Spaysh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-December 12

Moving two objects at once

Posted 07 December 2012 - 02:32 PM

Hello guys, I have started programming with VB.Net, currently doing a college course based on it, and I was starting to play around with it a bit. I am trying to create a pong game where the two bats move up and down and they hit the ball as it comes into contact. The problem I am having is that I want to use one keyboard to move both bats, as a Player vs Player version, but I cant make both move at the same time. If anyone knows how to make a workaround for this it would be much appreciated.

Spaysh

Is This A Good Question/Topic? 0
  • +

Replies To: Moving two objects at once

#2 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,499
  • Joined: 16-March 11

Re: Moving two objects at once

Posted 07 December 2012 - 06:34 PM

Try firing one on a separate thread. :) Here is a tutorial to threading from MSDN.

Threading MSDN Tutorial

Once you've tried out what you can, assuming you can't get it working, come back here and show me your code. I'm particularly good at threading. Be aware that you'll have to use a delegate to adjust objects on the main thread(gui thread) so here's another tutorial on that.

Cross Threading Tutorial

These are all tutorials I've used time and time again when I forget things. Like I said if you have any trouble you come straight back here and I'll help you out. Good luck man!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1