Results 1 to 13 of 13

Thread: visual basic and games

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    I know you've propbably read this question before, but is Visual Basic good enough to make games or should I go staight on to learning c++?

    From what I've seen, VB with Direct X is a lot easier to learn and understand than C++ with Direct X. But do the advantages of C++ make the learning worthwhile?

    Thanks
    Nick

  2. #2
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    You are quite right. If you use DirectX with visual basic, you'll get some pretty fancy games, but to spill it right out...VB is not the right laguage for developing state of the art 3D games. For that use C++. And yes, it is worth learning C++! I, myself, is also trying to learn C++, but it is REALLY hard!

    Good luck!
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    I have started learning C++ and windows programming and that is hard enough!!! I haven't even got onto the Direct X stuff yet. I just wondered really if I should persevere, or go with Visual Basic which I know a fair bit about already!

    Ta
    Nick

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    It really depends on what you want to do !
    As CyberCarsten said, VB is not the language for 3D games. 3D games run crap under VB.

    So in that case C++ would be the obvious course of action. But if you were to want to make a simple shoot-em-up, or whatever, then I'd stick with VB.

    To date I've never needed anything but my VB.

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    VB isn't really good for any graphics unless you use DirectX or BitBlt. I've made a pong example on my site that uses bitblt...you can see how that is (doesn't go too well with too many graphics. I find VB is best for turn based games such as classics (tic tac toe etc), and board games (monopoly, battleship etc).

    VB can make some pretty good online games, but winsock is too slow to send coordinates of a player. It just bunches the numbers up so that coordinate 1 is 11 and coordinate 2 is 12, winsock would read it as 1112 if it was sent too fast I also have a winsock tic tac toe game on my site if you want to look at it. Have fun

    I wouldn't jump right in to C++ windows programming. Learn the basics....the console makes you think of interresting solutions to some problems

  6. #6
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Steve, in relation to your co-ords problem, I always delimit the co-ordinates with a comma for example.

    So its a real simple case of just using Split() and Join().

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  7. #7
    Guest
    3D Games dont run like crap in VB, they just arent the best. Im writing my own 3D game for VB, its just a question of keeping the poly count low, and the loops as fast as possible =)

  8. #8
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Okay well this is a nicely tuned P-III 650 with 128Mb RAM, and an S3 Savage /IX video card, and any game written in VB that uses Direct3D runs like a piece of crap

    But I suppose that if you were to use a single do loop with one polygon the 'game' would run like a dream ... in VB terms, 10 fps

    Aaaaanyway.
    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  9. #9
    Junior Member
    Join Date
    Jan 2001
    Location
    New York City, NY
    Posts
    16

    Cool I think it completely depends....

    I think it completely depends on whether you even WANT to make fancy 3D games in the first place -- an issue we appear to have glossed over.

    If you want to make menu-driven or tile-based games or have simple sprites (i.e. CIV, Heroes of Might and Magic, SimCity), VB is just fine.

    Personally, I think computer gaming has been in a massive decline since the advent of 3D technology anyhow. Games today concentrate on developing these ridiculous 3D graphics engines that may or may not make the game better anyhow.

    I can understand the use of 3D in first-person shooters and simulations and such, but they are popping up in all kinds of inappropriate situations where they really do nothing to make the game better, add useless functionality, and -- if you really think about it -- don't even make for as beautiful or as pleasing an environment as wonderful, drawn art.

    I myself, when looking to purchase a computer game, just glance at the back of the box. Unless it's a shooter or simulation, 3D graphics has generally indicated a poor game, in my experience. I can think of a few exceptions (Myth/Railroad Tycoon II), but usually 3D graphics don't even necessarily make for a "prettier" ambience.

  10. #10
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    What I meant was..this

    Send one coordinate: 11
    Have other computer recieve it and place player there...
    Send second coordinate: 12
    Have other computer recieve it and place player there...

    but the computer reads it like this:

    Send one coordinate: 11
    ...its too slow to get this one
    Send second coordinate: 12
    Have other computer recieve it and place player there...so this is now 1112

  11. #11
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well why don't you try something like this ?

    Code:
    Option Explicit
    Dim var_string As String
    Dim var_temp() As String
    Dim var_temp2() As String
    Dim var_temp3 As String
    
    Private Sub Winsock1_Connect()
        'Player side
        'Sent player number + cords
        
        Winsock1.SendData myNumber & "," & XCord & "," & YCord & "-"
    End Sub
    
    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
        Winsock1.GetData var_string, vbString
        var_temp = Split(var_string, "-", -1, vbTextCompare)
        If (UBound(var_temp) = 0) Then
            'ONLY ONE PACKET RECEIVED
            var_temp2 = Split(Replace(var_string, "-", "", 1, -1, vbTextCompare), ",", -1, vbTextCompare)
            player(var_temp2(0)).XCord = var_temp2(1)
            player(var_temp2(0)).YCord = var_temp2(2)
        Else
            'TWO (or possibly more...) PACKETS RECEIVED
            'CHOOSE WHICH ONE TO USE
            
            '1st Packet :
            var_temp3 = Left(var_string, InStr(1, var_string, "-", vbTextCompare))
            var_temp2 = Split(var_temp3, ",", -1, vbTextCompare)
            player(var_temp2(0)).XCord = var_temp2(1)
            player(var_temp2(0)).YCord = var_temp2(2)
            
            
            '2nd Packet :
            var_temp3 = Mid(var_string, InStr(1, var_string, "-", vbTextCompare))
            var_temp2 = Split(var_temp3, ",", -1, vbTextCompare)
            player(var_temp2(0)).XCord = var_temp2(1)
            player(var_temp2(0)).YCord = var_temp2(2)
            
        End If
    End Sub
    I havent tested the above code yet, but something along those lines should work.
    Ya follow ?

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  12. #12
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I've got a Savage4 card too.... It runs 1152x864 at a silky 35 fps.... in OpenGL.... I'd reccomend finding out how to use this with VB. I know it's possible. Check out a game called Infinite Worlds on the web, a game w/ a shareware version (origionally called Mordor) that's made in VB and uses OpenGl for graphix. PS- HalfLife & OpenGl = SWEETGAMEPERFORMANCE. (even in VB!)
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  13. #13
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I agree with Frougal Gourmet (nice name...)

    3D games suck with a few exceptions (wouldn't be saying this if I had a GeForce2 MX Ultra, w/1.5 GHZ, but never mind). There are games like Half-Life, and hundreds of Mods for it that make playing it very good. But 3D stops at a certain point.

    RPGS and Strategys should NOT be 3D. Well, Zelda is possibly an exception...

    Anyway, I am making an RPG and I find the graphics nice.... 800x600 fullscreen game, with 32 bits of colour and fully animated characters... just as good as a 3D game to me.

    Have you heard the new DirectX? It has taken away DDraw and now we are forced to use 3D to make 2D! When and where will this madness come to an end?
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width