dcsimg
Results 1 to 15 of 15

Thread: [VB6][vbRichClient] Slither-like Game

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    464

    [VB6][vbRichClient] Slither-like Game

    Hi, on free time just for fun I wrote this Slither-Like Game
    Enjoy!


    I don't know how to play Multiple sounds at same time.
    (I mean to play even same sound with a slight delay)
    I found a Module: "SoundManager" that on win-XP works like a charm
    But on Vista it do not works

    To Play a sound it's used my "MyPlaySound"

    On vista I changed a little bit FreeBuffer Sub like this:
    Code:
    '        If Buffers(Index).status = BufferEmpty Then  '''' On XP works perfectlty
            If Buffers(Index).status <> BufferPlaying Then '''' On Vista a little better (it seems not not works CALLBACK)
    and it works a little better but not as good as on XP. If someone could help.

    DownLoad ZIP Snake



    EDIT --------------------------------------------

    Update:
    - Use of The Trick Direct Sound
    - Colors and other things

    DownLoad ZIP Snake04


    EDIT 2-------------------------------------------

    Most updated source code on github:
    https://github.com/miorsoft/Slither-Like



  2. #2
    Addicted Member
    Join Date
    Sep 2015
    Posts
    174

    Re: [VB6][vbRichClient] Slither-like Game

    Nice

  3. #3
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,102

    Re: [VB6][vbRichClient] Slither-like Game

    This is really cool, reexre. Thanks for sharing
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,405

    Re: [VB6][vbRichClient] Slither-like Game

    Quote Originally Posted by reexre View Post
    Hi, on free time just for fun I wrote this Slither-Like Game
    Enjoy!
    Nice Demo Roberto...

    Quote Originally Posted by reexre View Post
    I don't know how to play Multiple sounds at same time.
    (I mean to play even same sound with a slight delay)
    I found a Module: "SoundManager" that on win-XP works like a charm
    But on Vista it do not works
    There was a new SoundAPI introduced since Vista (called "CoreAudio") -
    and the vbRichClient has support for it.

    I could post an example (how to play User-SoundResources with CoreAudio)
    into the Codebank, if you like...

    Olaf

  5. #5

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    464

    Re: [VB6][vbRichClient] Slither-like Game

    @The Trick

    I used your DirectSound without 3D

    Your demo works fine in my PC.

    I create a class "clsSounds" to play multiple sounds.

    It works but

    .Buffer.SetPan Pan
    .Buffer.SetVolume Volume

    raise Automation Error: -2005401570

    This Error do not happens in your Demo...

    Please help

    EDIT
    Resolved:
    Download Snake04

  7. #7
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,102

    Re: [VB6][vbRichClient] Slither-like Game

    @Olaf, I'd be interested to see your demo, please, as it's an area I might delve into when I drop support for XP (a while away, yet, but nice to be prepared). No hurry for it. As and when it suits you...
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  8. #8
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,362

    Re: [VB6][vbRichClient] Slither-like Game

    Quote Originally Posted by reexre View Post
    @The Trick

    I used your DirectSound without 3D

    Your demo works fine in my PC.

    I create a class "clsSounds" to play multiple sounds.

    It works but

    .Buffer.SetPan Pan
    .Buffer.SetVolume Volume

    raise Automation Error: -2005401570

    This Error do not happens in your Demo...

    Please help

    Download Snake03
    Because you should explicitly set the features of a buffer:
    Code:
        
    . . .
    
    ReDim SoundsSET(BUFFLEN)
        
        desc.dwFlags = DSBCAPS_CTRLPAN Or DSBCAPS_CTRLVOLUME
        
        For I = 0 To BUFFLEN
            
    . . .
    Code:
        
    . . .
    
    If .Buffer.GetStatus <> DSBSTATUS_PLAYING Then
    
        desc.dwFlags = DSBCAPS_CTRLPAN Or DSBCAPS_CTRLVOLUME
    
        Set .Buffer = DSCreateSoundBufferFromFile(DirectSound, App.Path & "\Snd\" & S, desc)
    
        .Buffer.Play 0, 0, 0
    
    . . .

  9. #9
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,405

    Re: [VB6][vbRichClient] Slither-like Game

    Quote Originally Posted by ColinE66 View Post
    @Olaf, I'd be interested to see your demo, please, as it's an area I might delve into when I drop support for XP (a while away, yet, but nice to be prepared). No hurry for it. As and when it suits you...
    Ok, an appropriate example is now online: http://www.vbforums.com/showthread.p...CoreAudio-Demo

    Olaf

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    464

    Re: [VB6][vbRichClient] Slither-like Game

    THANK YOU VERY MUCH TheTrick

    Resolved in Post #1 ZIP 04

  11. #11
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: [VB6][vbRichClient] Slither-like Game

    Thanks for posting!

  12. #12

  13. #13
    Fanatic Member
    Join Date
    Feb 2003
    Posts
    725

    Re: [VB6][vbRichClient] Slither-like Game

    Hi, personally I don't like using the mouse to move a game character around and prefer to the use the arrows key, but otherwise a pretty impressive vb6 game!

  14. #14

  15. #15

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    464

    Re: [VB6][vbRichClient] Slither-like Game

    Many Improvements

    Improved AI
    Better Snake Drawing (Lines instead of Circles)
    Better Food Drawing (White new food)
    Turn Speed lower on bigger snakes
    and maybe other....
    https://github.com/miorsoft/Slither-Like

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