Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET Game Programming > Any Suggestions?


Reply
 
Thread Tools Display Modes
  #1  
Old 03-05-2012, 08:43 PM
squirrel4123 squirrel4123 is offline
Newcomer
 
Join Date: Mar 2012
Posts: 1
Default Any Suggestions?


So I have to make a game in VB as a final for a programming class I am taking. I already have almost all of the code done, but there is just one problem I have. I am using a timer to have objects at random appear in a random y position each time. I create a new picturebox each time through code. I already have all this coded, so don't worry. My question is on making it move. I know the syntax and all that stuff and how to move it to a location, but how do I make it move there in a timer? I have the syntax down for like moving the arrow keys and stuff, which works, but I don't know how to do it in a timer. I've tried loops and other things, but it doesn't do anything and usually just stalls the program or freezes it. Any ideas? Thanks so much, it would be great if you supplied some code, but it's fine if you think you are helping me with homework too much. Again, I'm not asking you to create the whole program, just that small syntax. Thanks
Reply With Quote
  #2  
Old 03-06-2012, 10:30 AM
gamecodingguide gamecodingguide is offline
Newcomer
 
Join Date: Dec 2011
Posts: 3
Smile

I would use just one picture box or form as the canvas for drawing your game. Then use the graphics class to create and move images. That would be a much more efficient way.

Watch these three videos I even included a download for the sample projects if you would like to try them. In the last video I made a simple card game where you try and guess the correct number. The whole thing is maybe like 50 lines of code.

- Enjoy !

part 1
http://www.youtube.com/watch?v=QbRf6LHy1NQ

part 2
http://www.youtube.com/watch?v=CwGHlysMK_4

part 3
http://www.youtube.com/watch?v=wAqd50sfMhU

You can download the sample projects here.
http://www.firstdaygaming.com/downloads/VBguide.zip
Reply With Quote
Reply

Tags
bwah, game, hey, movement, yeah


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->