-
May 9th, 2016, 04:33 AM
#1
[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
Last edited by reexre; Dec 21st, 2016 at 02:24 PM.
-
May 11th, 2016, 11:54 AM
#2
Addicted Member
Re: [VB6][vbRichClient] Slither-like Game
Nice
-
May 11th, 2016, 01:30 PM
#3
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
-
May 16th, 2016, 06:06 AM
#4
Re: [VB6][vbRichClient] Slither-like Game
Originally Posted by reexre
Hi, on free time just for fun I wrote this Slither-Like Game
Enjoy!
Nice Demo Roberto...
Originally Posted by reexre
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
-
May 16th, 2016, 08:56 AM
#5
Re: [VB6][vbRichClient] Slither-like Game
You can use DirectSound, you can place a sound in the 3d space. You can use simple DirectSound without 3d positioning, just create a buffer that represent a sound, and play it.
You can use my class MP3 player from memory.
-
May 17th, 2016, 03:25 PM
#6
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
Last edited by reexre; May 18th, 2016 at 06:53 AM.
-
May 17th, 2016, 03:31 PM
#7
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
-
May 17th, 2016, 03:57 PM
#8
Re: [VB6][vbRichClient] Slither-like Game
Originally Posted by reexre
@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
. . .
-
May 17th, 2016, 09:47 PM
#9
Re: [VB6][vbRichClient] Slither-like Game
Originally Posted by ColinE66
@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
-
May 18th, 2016, 06:54 AM
#10
Re: [VB6][vbRichClient] Slither-like Game
THANK YOU VERY MUCH TheTrick
Resolved in Post #1 ZIP 04
Last edited by reexre; May 18th, 2016 at 07:03 AM.
-
May 18th, 2016, 09:29 AM
#11
Re: [VB6][vbRichClient] Slither-like Game
-
May 18th, 2016, 09:32 AM
#12
Re: [VB6][vbRichClient] Slither-like Game
-
Jun 28th, 2016, 02:13 PM
#13
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!
-
Dec 20th, 2016, 08:04 AM
#14
Re: [VB6][vbRichClient] Slither-like Game
-
Dec 20th, 2016, 03:57 PM
#15
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|