|
-
May 10th, 2013, 04:24 PM
#1
Thread Starter
New Member
Threading
My first post, so apologies for any confusion I bestow.
I'm new to Visual Basic (2010), but not to coding. My problem is, I have a game I want to make with controls, but I know of no way to allow the form to change and run code while the player controls. I figure multi-threading would do it, or more experienced programmers know a better way. My current events/code:
Private Sub beginButtonClicked(ByVal sender As Object, ByVal e As System.EventArgs) Handles BeginButton.Click
'Many loops and game-running code
End Sub
Private Sub directionKeyPressed(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
'Very short control functionality code
End Sub
-
May 11th, 2013, 09:05 AM
#2
Re: Threading
What you really want is called a game loop. Its not a simple enough topic for me to really cover in this post so I suggest you look up the term on Google and gather ideas about what other people are doing. You can use multi-threading but Timers can also be used.
Here is an article to start you off. Note however that it doesn't cover game loops exclusively but other issues involved in game development in VB.Net as well. Take a good read and as I've said earlier, look up other articles on the topic so you have a firm idea of what directions you need to take with this.
-
May 11th, 2013, 02:22 PM
#3
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|