Results 1 to 21 of 21

Thread: Which is better?

  1. #1
    Guest
    Which is better for a character? BitBlt Animation? Or just moving an Image or PictureBox when they key is pressed.

  2. #2
    New Member
    Join Date
    May 2000
    Posts
    3

    Wink

    You should use BitBlt cause then you can make the backround transparent and it is faster. Pluss you can do double buffering. If you need n e more help or want to start a game w/ me. E-mail me

  3. #3
    Guest
    How would you detect collision then? With a control, all you need to do is check is the Image's Top or Left property Surpasses a certian point. Is there a way to detect collision?

  4. #4
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Unhappy I have the same problem

    I've been having trouble finding out collision detection in BitBlt, tell me if you get anything.

    I've tried things like:

    If Enemy.x > Shot.x > Enemy.x then this should tell when shot is 'in' the enemy, but it doesn't

  5. #5
    Guest
    But when using BitBlt, you do not know where the character is on the screen. Unless you record the position in a Variable. Is that what you are using as well?

  6. #6
    Guest
    By the way, i think i have a solution for your problem.
    If you have both coordinates stored in a variable, make sure that both X AND Y are in the correct position.

    Emeny.x could be greater than Bullet.x, but their Y coordinates could be 100's of units apart.

  7. #7
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    general point here: when making games, forget all "normal" VB. Dont use activex controls (ie img boxes, picboxes, etc) as it's slow and inflexible. Everything is stored in variables, types, etc.
    And use directx
    buzzwords are the language of fools

  8. #8
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    Back to work then...By the way, who ever won the race to the 1000 post mark? Im guessing Kedamen but just curious.

  9. #9
    Guest

    STEVECRM: Kedaman won.


    KENNY: I'm still learning some things about Game Programming. I haven't got into DirectX yet, though.

    I've stopped using VB and am starting to learn a lot of C++ now. I believe it will help me a lot more in the long run.

  10. #10
    Lively Member Xero's Avatar
    Join Date
    Feb 2000
    Posts
    75
    Kenny: I wanted to use DirectX, but I learn best from examples of what I want to do(tile-based rpg engine) and I couldn't find any. Do you know where any are? Or, do you know any websites that could help me out?

  11. #11
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    There are BitBlt and DirectX samples on my website.

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    2D graphics, use DirectX every time.

    If you want to use DirectX for 3D, prepare for months of late nights banging your head against the wall due to Microsoft's sadistic desire to make developers do things the hard way. OpenGL is much easier to use, and there are open source implementations of it. Sure, it doesn't provide direct access to the hardware, but the M$ software driver is quite fast. Then watch it on a GeForce and your jaw will plummet through the floor.

  13. #13
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    OpenGL isn't that much easier. After initializing D3D it's nearly the same. And with D3D you have support for the latest hardware and newest effects

    And BTW: Good programmers only use D3D / OpenGL to draw their pre-calculated polygon arrays to the screen .

  14. #14
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    yes, D3D is extremely dodgy
    all the tutorials I've seen are totally different yet doing the same thing. You need a map editor for anything more complex than a cube, 'cos hard-coding vertices *really* isnt good

    gl support for VB is pretty poor; there's no documentation (i think), but if u wanna try it get the typelibrary from patrice scribe's site.

    D3d will get better, hopefully, as m$ release new dx versions. dotn hold your breath though


    buzzwords are the language of fools

  15. #15
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Fox: Yeah, and initialising DX takes forever. With OpenGL (especially GLUT) you're there in about 50 lines. DX is coming up on hundreds, especially in VB.

    KENNNY: There's tons of documentation for OpenGL, and since it's function-based rather than interface-based, it's dead simple. Quick Tip: remember VarPtr (get a pointer to an array). Do a search for "Ryan Myers" to get some decent tutorials.

  16. #16
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    ok thanks, I'll try that
    I have a couple of samples on GL, but I haven't got the time to do 3d at the mo.
    buzzwords are the language of fools

  17. #17
    Guest
    how do I use bitblt if I dont have a picbox?

  18. #18
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Use the device context for whatever it is you want to paint onto. Form.hDC, UserControl.hDC, ...

  19. #19
    Guest
    Some controls like the ImageBox don't have an hDC property.


  20. #20
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    yeah, I know, it's a bit of a shame. why m$ can't get it sorted and let you get at the useful stuff I have no idea. looks like you'll have to use a picturebox anyway, or use the form's DC and the coordinates from the image control.

  21. #21
    Guest
    an ImageBox is basically just for decoration. It doesn't use up any resouces either. It's ust a small to for displaying images.

    Well, I suppose it is convienient in it's own way.

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