Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: Visual Basic Help  (Read 2564 times)

chaos95

  • Escaped Lunatic
    • View Profile
Re: Visual Basic Help
« Reply #30 on: February 22, 2011, 06:54:27 pm »

Since the previous posts have already detailed the reasons why you shouldn't be using VB6, here's something constructive:

This is a tutorial on making a basic game (Tic-Tac-Toe, in this case) using VB6:
http://visualbasic.about.com/od/usingvbnet/l/aa093002a.htm

I'll try to find some more informative tutes regarding graphics in VB also.

It's been a while since I did any graphics programming in VB (well, _any_ programming in VB...) but there's essentially two fundamental ways to do the graphics side of things (assuming you want to do some kind of action game) - either by using image controls on a form and controlling their position properties, or by blitting bitmaps directly onto the form using Windows API calls (GDI).

Given that you're at beginner level, I'd say your best bet is the former. Your game sprites can be Image controls on your form, and you can add a timer with a tick of, say, 50ms. On the timer tick event, perform your game logic and update the positions of the sprite Image controls.

Bear in mind, this is all based on the 6 months of VB I did in high school, which was almost 10 years ago now. It's pretty amazing that people are still teaching this shit 10 years later. :S

Update:
Here's a fairly detailed tutorial about using GDI in VB6. I'd recommend you look at this after you've learned the basics of syntax, flow control, program structure, module and class structure, etc. - the methods described in these tutes will help you write a half-decent game using conventional windows graphics programming concepts such as blitting, pixel formats, viewports, message handling... but the concepts are a little more advanced, so don't burn your brain out trying to understand them until you have the basics.
http://www.bitwisemag.com/copy/vb/vb_graphics1.html
http://www.bitwisemag.com/copy/vb/vb_graphics2.html
http://www.bitwisemag.com/copy/vb/vb_graphics3.html
« Last Edit: February 22, 2011, 07:06:48 pm by chaos95 »
Logged

IHateOutside

  • Bay Watcher
  • Fire safety is for wimps.
    • View Profile
Re: Visual Basic Help
« Reply #31 on: February 22, 2011, 07:48:27 pm »

Reasons VB may still be used:
  • Teachers aren't real programmers, and only want to learn one language. Also they fear change
  • Its easy enough that even the most incompetent will grasp the basic concepts. "Draw a button, then double click, and write 'msgbox("hai")' job done"
Logged

Blank Expression

  • Bay Watcher
    • View Profile
Re: Visual Basic Help
« Reply #32 on: February 22, 2011, 08:30:32 pm »

Reasons VB may still be used:
  • Teachers aren't real programmers, and only want to learn one language. Also they fear change
  • Its easy enough that even the most incompetent will grasp the basic concepts. "Draw a button, then double click, and write 'msgbox("hai")' job done"
Distressingly true on both counts.
Logged

G-Flex

  • Bay Watcher
    • View Profile
Re: Visual Basic Help
« Reply #33 on: February 22, 2011, 08:53:29 pm »

The blame shouldn't necessarily be placed on teachers, rather some should almost certainly be placed on bad programs at the schools themselves. There can be a lot of inertia there related to probably a few factors not always related to whoever winds up teaching it.

Hell, I had a C++ class in high school whose teacher did not precisely know C++. I have no idea if it was her idea, or if she was just assigned due to some other person hallucinating off Benadryl and deciding it would be a good idea.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

IHateOutside

  • Bay Watcher
  • Fire safety is for wimps.
    • View Profile
Re: Visual Basic Help
« Reply #34 on: February 22, 2011, 09:22:21 pm »

Reasons VB may still be used:
  • Teachers aren't real programmers, and only want to learn one language. Also they fear change
  • Its easy enough that even the most incompetent will grasp the basic concepts. "Draw a button, then double click, and write 'msgbox("hai")' job done"
Distressingly true on both counts.

Indeed. My teacher claimed they would not switch to VB.net because the IDE has too many buttons and might confuse people. Oh, its not like every interface for everything has lots of buttons, unless its designed for a child. A very simple rule of computers anything is that if you don't know what something does, find out what it does before you click it stupidly. Also don't show 6 year olds how to format c:/. I get the feeling that my computing class isn't actually aimed at making us into hireable programmers.


EDIT: Alas, the thread topic is dead and buried by now.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: Visual Basic Help
« Reply #35 on: February 22, 2011, 09:28:29 pm »

How does chess sound?
Logged
Pages: 1 2 [3]