why not use flash?

wild wolf
01-16-2002, 01:32 AM
i tried this trick to play music in my game, i imported the sound in macromedia flash and used the flash movie in VB, it was put in the background. might be handy for u also :)

Flyguy
01-16-2002, 04:27 AM
Maybe I don't understand what you are doing, but why not simply use the PlaySound API?

Squirm
01-16-2002, 10:21 AM
Why not use Flash? Well I can think of a number of reasons:


Extra dependencies
Extra files
Less flexibility and power
Have to know how to use Flash


Using flash for playing sounds is a seriously misguided concept, bulky and inefficient. PlaySound API is what you're looking for, DirectSound, MCI interface, or mediaplayer. Many options that are much better than Flash. Thanks for the idea though. :)

Kitaiko
01-18-2002, 04:43 AM
:)
If you highlight a smiling face it becomes a freaky sad face
:eek:
a shocked face becomes an alien
:mad:
and a mad face becomes a south park pic!
i find this 1000000000 times more useful than flash

wild wolf
01-20-2002, 11:35 PM
thanx for the comment kitaiko

Robby
01-21-2002, 12:19 AM
Originally posted by Kitaiko
:)
If you highlight a smiling face it becomes a freaky sad face
:eek:
a shocked face becomes an alien
:mad:
and a mad face becomes a south park pic!
i find this 1000000000 times more useful than flash

Don't know about you guys but I found this real funny...I laugh
just thinking about it.

wild wolf
01-24-2002, 12:30 AM
reasons for using flash

1. less size, when i say this i mean, in my last game i used music which was 3.4Mb and it was in mp3 format, since i was using DirectSound i had to convert it into wav and so the file size became 300+Mb, but then i imported the mp3 into flash and created a shockwave file and embedded it in VB and i din have to attach the 300 Mb wav file, i had to attach only the swf which was only 3.4Mb, the original size
2. less functions needed, u dun have to call funtions from api as the only thing u have to do is embed the flash movie in VB and use the playmovie option (false or true) to play or stop a sound, no need for creating buffers like i had to in DirectSound
3. to play multiple sounds i imported all sounds in swf file and played each sound according to an action, i call a frame number according to an action and play it from there and stop at a specific frame

ill agree on one point, if ur using sounds of small size then the first point wont apply

orufet
01-24-2002, 08:08 AM
More reasons not to use "Flash":

1) Have to participate in illegal activities or pay $300 (or so) dollars just to use it. API is...free!
2) "less functions needed".....I miss the point about how this is a reason for using flash.....API and more functions is way better that distributing the swflash.ocx file (is that even legal?) and using the extra memory for the control.

wild wolf
01-24-2002, 09:29 PM
hey dun have to distribute the swflash.ocx file, if u buy a legal copy of Visual studio then the ocx file is with the package, there is nothing illegal about it

orufet
01-24-2002, 09:46 PM
You sure? That's what I originally thought, then I realized that I thought I had it because I installed Flash 4 about 2 years ago (haven't used it since). Hmm. Still, it's a far better programming practice not to use extra, unnessasary dependencies like that.

wild wolf
01-25-2002, 12:04 AM
Originally posted by orufet
You sure? That's what I originally thought, then I realized that I thought I had it because I installed Flash 4 about 2 years ago (haven't used it since). Hmm. Still, it's a far better programming practice not to use extra, unnessasary dependencies like that.

ill agree with you orufet on the idea of not using unnessasary dependencies, there are times when u cant use these idea, its just an idea for people who know flash and have problems with usnig API (many of my frens had problems fixing sound problems using DirectSound and finally when running out of time settled down with flash.

Banjo
01-25-2002, 05:08 AM
I don't know where this huge dislike of using DLLs and OCXs comes from. I think it is a great way to program. Why re-invent the wheel (other than as a learning excercise).
At the end of the day it all comes down to cost/benefit trade offs. If the time it takes you to write some code is worth less than the cost of buying that code then you might as well write it yourself. If not then buy it.

orufet
01-25-2002, 08:05 AM
Well, in my personal opinion, the only reason I'm here is I love to do the coding myself. That's where all of the fun is. Remember, somebody has to write the dlls and ocx you use.

OberCanober
01-25-2002, 10:14 AM
Woa...

I can give you a bunch of reasons why Flash is great in VB

1. 300 bucks is not much.
2. There is no loss in functionality. You can have a button on your flash and with an FSSCommand it can communicate back to VB.
3. VB can also set variables within your flash. (Example Type your name on the flash video)
4. The OCX is the player for IE and is usually installed with IE
5. Flash has a great tutorial that will teach you everything you need to know to create a flash movie.
6. There is plenty of souce code out there to use VB with Flash and if you can't find any let me know because I have a great example!
7. I belive flash compresses wave files to a MP3 file size. (anyhoo flash is much smaller than an AVI.)
8. You can load the swf file in the resources of your VB procject just like a WAV file so a single EXE will work.

Also check out this cool screen shot of one of my applicaitons.
I made the GUI in flash and the code in VB.
Now tell me thats not easier to do in flash than API calls and AVI files.

OberCanober
01-25-2002, 10:19 AM
Also if you don't know how to load the swf file as a resouce here is an example that does.

I created the VB but I stole the Flash SWF somewhere off the net.

If you still don't think flash is good in VB then try making this game in VB and tell me how long you think it would take.

(needs flash 5.0 or greater to play)

Teric
01-25-2002, 10:58 AM
Fascinating. That's a great port of the original game. And the executable is only 84KB. But I wonder how long it took that flash programmer to build this?...

OberCanober
01-25-2002, 01:47 PM
Hmmm

I also am curious to see how long it took.

I sent paul at paul@neave.com an e-mail asking him this very question. Lets see what he has to say...

:rolleyes:

Squirm
01-26-2002, 09:27 AM
Originally posted by Robby
Don't know about you guys but I found this real funny...I laugh
just thinking about it.

Me too..... :D

Originally posted by wild wolf
reasons for using flash

1. less size, when i say this i mean, in my last game i used music which was 3.4Mb and it was in mp3 format, since i was using DirectSound i had to convert it into wav and so the file size became 300+Mb, but then i imported the mp3 into flash and created a shockwave file and embedded it in VB and i din have to attach the 300 Mb wav file, i had to attach only the swf which was only 3.4Mb, the original size

ill agree on one point, if ur using sounds of small size then the first point wont apply

You know why flash keeps the original file size? Because its got an embedded MP3 codec (decoder to you and me). If you get a codec that works with DirectSound then you can keep your audio in MP3 format, no need to do any converting at all. You can get them all over the net, such as here (Lucky's VB) (http://www.rookscape.com/vbgaming/l3codecx.exe). (Plus, most people have this codec anyway).

Originally posted by wild wolf
3. to play multiple sounds i imported all sounds in swf file and played each sound according to an action, i call a frame number according to an action and play it from there and stop at a specific frame

Um..... that exactly what DirectSound does, only much faster and more accurately. You give each sound a name, then call it when you need it, and can have a lot of sounds playing at once. You can start and stop them dynamically, change panning, plus use 3D surround sound all at the same time, depending on the sound card.

Originally posted by OberCanober
I can give you a bunch of reasons why Flash is great in VB

1. 300 bucks is not much.
2. There is no loss in functionality. You can have a button on your flash and with an FSSCommand it can communicate back to VB.
3. VB can also set variables within your flash. (Example Type your name on the flash video)
4. The OCX is the player for IE and is usually installed with IE
5. Flash has a great tutorial that will teach you everything you need to know to create a flash movie.
6. There is plenty of souce code out there to use VB with Flash and if you can't find any let me know because I have a great example!
7. I belive flash compresses wave files to a MP3 file size. (anyhoo flash is much smaller than an AVI.)
8. You can load the swf file in the resources of your VB procject just like a WAV file so a single EXE will work.

1. I happen to own Flash, I used to be a web designer, but still have no incling to use Flash for gaming in VB. And hey, DirectX and API are free!
2. Fair enough, but then again using native VB and DX also (obviously) has no loss in functionality, why mention it? The fact that it can do such a thing doesnt make it good, it just makes it not bad. If it couldnt do what you said then absolutely nobody would use flash in VB for anything.
3. As above
4. Good fair point, although DirectX does also come with most PCs, and with any recent DirectX game, and you can download it from the MS site. Do I even need ti explain the availablility of the Windows API?
5. OpenGL has very little following on the VB side of things due to lack of tutorials. Doesnt make OpenGL bad, Ive seen it in action and its very powerful. A tutorial does not make a bad thing become good. (Oh, and the Flash tutorial I got were terrible anyway).
6. There is plenty of souce code out there to use VB with DirectX or API and if you can't find any let me know because I have lots of examples and links to good examples.
7. I believe you can buy or download utilities to do this, and with an MP3 codec, can playback MP3 through DirectSound, and anyhoo, who said anything about AVI?
8. Thats great! Wait a minute, you can do that with any file.

Originally posted by OberCanober
Now tell me thats not easier to do in flash than API calls and AVI files.

That looks great, but then, its not a game, is it?

I personally dislike flash and have difficulty using it, takes me forever to create anything decent, but with VB I have been known to knock game engines together in an afternoon, thats just me I guess (yeah I did say game engine, not whole game, do you think I am completely insane? ;)). I have used flash, for applications yes, but since this is in the Game Programming forum, AND the original post was all about sound, I dont think what I have used it for in multimedia apps has any bearing on its use in gaming. And who said anything about AVI files?

Flash was designed for animated and fun webpages, DirectX was designed for games, now which will I choose to make a game? umm...... :rolleyes:

Originally posted by OberCanober
If you still don't think flash is good in VB then try making this game in VB and tell me how long you think it would take.

Thats basically a flash game that could, infact, be found on any website such as http://www.coffeebreakarcade.com. The fact that you have placed it in its own window I dont personally find great (no offence :)). Oh, and I notice the type of game is 2D arcade game. Thats about as good as flash gets. Now you tell ME something, how long would it take you to write a long RPG in Flash, or maybe an RTS? I can see how VB could add extra functionality to a game in Flash, but I dont see how flash could help a game made in VB.

Ask yourself this: Did the VB coder or the Flash designer take more time in making that game. If you can seriously say the VB coder then fair enough, but if (as I hope/suspect) you agree that the Flash designer did more of the work, then that doesnt belong in this forum. If I wrote a Java game then played it through a webbrowser control in VB, I wouldn't call that a VB game. And since this is the Game Programming forum of Extreme VB then I cant say that such a thing belongs here. Everybody knows you can create great things with Flash, but here we talk about how to make games with VB, not with Flash. And since the original topic was about using Flash to store sounds for VB games, I dont think this game belongs here.

And finally........ *cough* Direct3D *cough* I'd really like to see flash do some fast compex 3D for me, if I saw that then...... well no, it isnt going to happen :p

And finally finally...... a note about files. People seem all to eager to make their projects into as few files as possible. Fair enough, but adding things into the EXE is not my preferred approach. After all, have you ever bought a piece of (professional) software that only loaded one file onto your PC, just the EXE? I sure havent...... When dealing with DirectX I use my own type of resource file, which is basically an additional file with a number of smaller files attached together end to end. I wrote a little tool for making these little files and a module that can be added to any of my games which handles the removal of the individual files. Maybe thats because I cant make .RES files like you VB6 guys, but overall I prefer my method.

Links:

Lucky's VB (http://www.rookscape.com/vbgaming/tutorials.php) DirectX, API, and general gaming tutorials.
DirectX 4 VB (http://64.23.12.52//index.asp) DirectX and a few general gaming tutorials (where I got the files-in-a-file idea from).
Galaxy (http://www.rookscape.com/vbgaming/pubalpha.php) One of the best VB games I have ever seen, also where you can download the MP3 codec from.
VBAPI.com (http://www.vbapi.com/ref/funcc.html) The list of API isnt exactly comprehensive by any means, but the ones they do cover they cover in relative depth.
AllAPI.net (http://www.allapi.net/) A comprehensive list of most (AFAIK) of the win32 API. Plus, you can download the API-Guide, much recommended by this forum.
CoffeeBreakArcade (http://www.coffeebreakarcade.com) Loads of free and fun Flash, Shockwave, and Java games!

In Brief: (yeah this post was a long one)

Quick, easy, and simple go for Flash
Large, indepth, fancy, good AI, or 3D go for VB

Banjo
01-26-2002, 04:03 PM
Squirm:
Whoa! That was a diatribe and a half. All completely accurate though :).

Orufet:
That's why I excluded the possibilty of doing it as a learning exercise. Remember that in a commercial sense it is often more cost effective to buy a component than have a programmer work for several hours creating and debugging one of your own.

reboot
01-28-2002, 08:32 AM
Bravo. Nicely said. Unfortunately, as insightful and accurate as your comments were, the people they were directed at will never agree with them in this lifetime.

wild wolf
01-28-2002, 09:16 PM
reboot, its not a matter of agreeing or not, we all learn from each dun we? iam sure people who din know much about flash now know something about it,well originally i was discussing on sound and we ended up discussing a game, well well i never thought of using flash in a game and using VB as a "platform", if thats the case then i might as well have not use VB, i can also do the scoring in flash so VB is not of much use in this game,

squirm, u can make 3D in flash using Swift3D, a software for 3D stuff which can be imported in flash by creating a a swf and its relativley fast and very simple to use also. When talking about sound,


Um..... that exactly what DirectSound does, only much faster and more accurately. You give each sound a name, then call it when you need it, and can have a lot of sounds playing at once. You can start and stop them dynamically, change panning, plus use 3D surround sound all at the same time, depending on the sound card.


i will agree with ur point but if ironically thats what flash does exactly and plus u can edit ur sound just as u have said it has a built in codec and u can use effects like fading and also use sorround sound and just as u said, u give each sound a name and call it, we give each sound a frame and call it using FSCommand.

i hope this thread is of some use and informative to people, if not i might as well end it here as i dun see any reason of making fun indirectly ( i guess u all know what i mean, i did not find the comment by kitaiko funny :mad: )

orufet
01-28-2002, 10:30 PM
Here's more of my perspective on this. Powerpoint is a great program to use if you're getting paid to quickly make a crappy presentation without need for customization or anything good looking. Flash is a great program if you want to make a simple, crappy game quickly without learning good techniques or having a lot of fun.

I just started making online games that my friends at school will play (after they pay me some money, of course :D). They would never pay for a game I would make in Flash. You have so little ability to create what you want, so little freedom. Flash is a program with a scripting language embedded. Visual Basic is a language with a nice IDE embedded. You can do WAY more with VB then you can with Flash.

Flash is really not much good for anything except for teaching simple computer animation concepts. I've never seen a good website made in Flash. I've never seen a good game made in Flash. I've seen OK animations made in Flash. It's been way overused. The web is so large, if I stuble on a site in Flash, I leave and find another site. It's just not good enough. Too many people think it's cool and like it, and decide that everyone else likes it, when in fact more often than not, people will hate it.

I understand how this will never sink in to you, but it's completely true. It's been said somewhere (on this forum?) that "There's no money in Flash", and that's quite true. I could go on and on, but I think I've wasted enough of my time.

wild wolf
01-29-2002, 06:53 AM
orufet, i have mentioned this earlier, i was NOT talking about any game making using flash neither will i think about it, what i was discussing was of using SOUND,

can the moderator please close this thread??

reboot
01-29-2002, 08:57 AM
Because you've been proven wrong and want the pain to stop now?

:p

Teric
01-29-2002, 11:04 AM
Come now, let's be kind. This thread has had some very good points, but now it's just a dead horse to kick. Please move on.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum