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
Moving two objects at once
Page 1 of 11 Replies - 715 Views - Last Post: 07 December 2012 - 06:34 PM
Replies To: Moving two objects at once
#2
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!
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!
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|