VB6: 2P Cannon Game [Source and Exe]-VBForums
Results 1 to 9 of 9

Thread: VB6: 2P Cannon Game [Source and Exe]

  1. #1

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    VB6: 2P Cannon Game [Source and Exe]

    This is a simple 2D 2P cannon game where you choose your position and angle and fire away at the enemy. Didn't take that long once I got the physics right, but I'm pretty happy with it for a first version.
    I'm planning on adding powerups and the like and possibly a CPU option to play it 1P.
    Any ideas for powerups etc?

    PS: comments and constructive criticism are welcome and encouraged
    Attached Files Attached Files

  2. #2
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: VB6: 2P Cannon Game [Source and Exe]

    Played it against myself , it was absolute madness.
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  3. #3
    Lively Member int3gral's Avatar
    Join Date
    Jan 2007
    Posts
    88

    Re: VB6: 2P Cannon Game [Source and Exe]

    i like it,
    may i suggest though making it a little more visually apealing.
    power ups might includes things like mines ?
    H22 Turbo guy from Accordtuner.com
    im an unknown quantity <10


    Quote Originally Posted by wossname
    You should get one of the new rudePods. You can cram about 500 hours of insults, put-downs and slanders on it.

  4. #4

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: VB6: 2P Cannon Game [Source and Exe]

    yeah i tend to skimp a little on visuals in my games. I have a lot more fun getting the code to work so i sorta just give the visuals the bare minimum. I've yet to actually have any animation in anything. My 2D platformer uses a sprite that just glides, rather than running

  5. #5
    Lively Member int3gral's Avatar
    Join Date
    Jan 2007
    Posts
    88

    Re: VB6: 2P Cannon Game [Source and Exe]

    great..
    lol
    gliding sprites
    H22 Turbo guy from Accordtuner.com
    im an unknown quantity <10


    Quote Originally Posted by wossname
    You should get one of the new rudePods. You can cram about 500 hours of insults, put-downs and slanders on it.

  6. #6

    Re: VB6: 2P Cannon Game [Source and Exe]

    Good Game. I love it.

  7. #7

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: VB6: 2P Cannon Game [Source and Exe]

    This is the first version of this game that I made. Go check out the red link in my sig to see the final version with powerups, AI, nicer graphics etc. Let me know what you think!

    cheers,
    metal

  8. #8
    New Member
    Join Date
    Sep 2011
    Posts
    2

    Smile Re: VB6: 2P Cannon Game [Source and Exe]

    Very nicely coded, indented, and documented. The GUI and the code are very clean and logical. I did start making some improvements though. I put "Option Explicit" at the top of the code and declared all variables. This saves some memory and improves performance (albeit imperceptibly in this case). I changed the keyarray indexes from integers to constants: 32 to vbKeySpace, 37 to vbKeyLeft, 38 to vbKeyUp, etc. These constants are built-in, improve readability, and do not affect performance. I changed '200' to a variable named "velocity" as I plan to make this changeable. If I left it as a constant, I'd declare "Private Const VELOCITY = 200" at the top and use VELOCITY in the code, just for readability. Using all-caps for my constants is my own convention and not standard btw. I checked all of the boxes in the "Advanced Optimizations" dialog box before compiling for (slightly) better exe performance.

    Anyway, this is a nice little program. Thanks for posting!

  9. #9
    New Member
    Join Date
    Sep 2011
    Posts
    2

    Re: VB6: 2P Cannon Game [Source and Exe]

    I forgot to mention ideas for improvements:

    POWER-UPS:

    For power-ups or point bonuses, I'd award extra points for how close to the center of the enemy canon a shot lands - probably just one kind: "Direct Hit!" for a strike to within, say, 5 to 10 pixels from the middle of the canon. (the twips are going in favor of pixels lol)

    ONE PLAYER MODE:

    I'd change the controls to the arrow keys for the human. The computer could have four or five levels of difficulty. As it is, the player can move quite a bit between the time a bullet is launched and lands, so the computer cannot calculate an accurate shot, but how equally spread and close to the center of the user's field can affect the likelihood of a successful shot. It would be harder for a human if shots did not come in order (like left-to-right in sequence) but randomly.

    I have no interest in writing a 2 player game (no friends), but I may write a complete one-player version of this with different difficulty levels (and real explosions probably). If I do, I will post it on this site, well-documented and hopefully quite instructive and fun! It will probably have 10+ levels of increasing difficulty (regardless of the overall difficulty level first selected). You'll probably 'die' if you're hit too many times and/or your accuracy isn't good enough.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.