How do i make form borders for my game
How do i make form borders for my game
How do i make form borders for my game
How do i make form borders for my game
How do i make form borders for my game
How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game
How do i make form borders for my game How do i make form borders for my game
How do i make form borders for my game
Go Back  Xtreme Visual Basic Talk > > > How do i make form borders for my game


Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2013, 10:13 AM
Chazz85 Chazz85 is offline
Newcomer
 
Join Date: Dec 2013
Posts: 10
Post How do i make form borders for my game


Well i'm trying to build a space invaders game and i can't get the picturebox to stay in the form. I have searched everywere for the answer i have been told that i can use the keydown method use cordinates to stop it. Yet it won't work so i really need help any advice. Any help much appreciated thanks guys
Reply With Quote
  #2  
Old 12-11-2013, 12:42 AM
passel's Avatar
passelHow do i make form borders for my game passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,026
Default

Welcome to the forum.

1. Are you using VB6? A lot of new posters are actually using VB.Net (i.e. something produced after the year 2000). VB6 came out in 1998.
You've posted in the VB6 and earlier side of the forum, and sometimes we can waste a bit of time responding with VB6 code that most likely wouldn't work with someone using VB 20xx.

2. What did you set your Form's ScaleMode to?
I prefer setting it to pixels so you have a one to one coordinate space, i.e. X+1 would move 1 pixel on the screen, rather than using Twips which might be X+12 to move 1 pixel on some machines, and X+15 to move 1 pixel on others.

3. Are you checking your limit based on the direction you're moving, so that you don't get stuck at an edge moving back and forth?

4. If the picturebox goes of the form, which direction does it go off the form? Do you only have trouble moving off the form to the right, but it works OK going to the left?

You normally wouldn't want to use the keydown method to move anything because the keydowns can happen at different rates. You would want a timer to move things (the invaders should be moving regardless of whether you have a key down or not). The keyDown and keyUp events would just be used to set a variable that the periodic code would look at to determine if it should be moving something and in what direction.

5. Do you really think you're up to writing space invaders? Writing a Pong game would probably be much easier to start with.

Oh, and as a final note. I'm deleting your post in this thread about shooting things. That post is over 11 years old. You shouldn't post in threads that have been inactive for more than 30 days.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.

Last edited by passel; 12-11-2013 at 12:51 AM.
Reply With Quote
  #3  
Old 12-12-2013, 10:31 AM
Chazz85 Chazz85 is offline
Newcomer
 
Join Date: Dec 2013
Posts: 10
Default

Oh i figured it out and i use vb2010 express. thanks for the help
Reply With Quote
Reply


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
How do i make form borders for my game
How do i make form borders for my game
How do i make form borders for my game How do i make form borders for my game
How do i make form borders for my game
How do i make form borders for my game
How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game How do i make form borders for my game
How do i make form borders for my game
How do i make form borders for my game
 
How do i make form borders for my game
How do i make form borders for my game
 
-->