Important alert: (current site time 7/16/2013 3:04:16 AM EDT)
 

winzip icon

Winsock Multiplayer Flash Game (Gimp Roulette)

Email
Submitted on: 10/10/2002 1:37:35 PM
By: Ninnghizidha 
Level: Advanced
User Rating: By 63 Users
Compatibility: VB 6.0
Views: 30439
author picture
(About the author)
 
     Flash, Winsock TCP/IP, Chat, Server and Client - all in one application - and it's a multiplayer Internet/Network-Game. If you want you can call it: Russian Roulette. How does it work: Sends your local action FIRST to the Winsock-Control and execute it directly from the Winsock-Control, eg. Jump to the right flash-Frame. ---- Key-Features: * Animations in Flash * Control Flash-Frames trough VB * Push variables into a Flash-File * TCP/IP Server and client in one application * Chat- Server/Client * shows, if opponent gone offline * Learn how to use Winsock to control another app * Handshakes at winsock-load and -unload * Background-Sound * Statistics (Percent-Bar) * Ini-File - Support * clean and comented Code. * Includes the .fla-File, to show how it works. ---- Bugs: None (If you find one, i'll update the file) ---- Votes & comments: Yeah, would be cool - just try it and love it - i always wanted to win the contest :> If you don't vote, please drop me a line, that i know, what you think about it. And now: Enjoy and vote :>

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 5 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
10/10/2002 1:44:20 PMJ. Sperlhofer

voting makes beautiful :>
(If this comment was disrespectful, please report it.)

 
10/10/2002 3:03:18 PM

Pretty cool submission - seems it only needs minor tweaks (like updating score at the end of a round instead of the beginning of a new one). Missing a function to call to ("ClientJoinedOK") in the function "actionOK" - commented it out. Easily worthy of five planets.
(If this comment was disrespectful, please report it.)

 
10/10/2002 3:08:38 PMJ. Sperlhofer

"ClientJoinedOK" - eek - damit, i just deleteted it bevor uploading - was an empty function. Thanks, gonna update it now.
(If this comment was disrespectful, please report it.)

 
10/10/2002 3:33:30 PMJ. Sperlhofer

Updated. :>
Thanks for the report and the nice coment :>
(If this comment was disrespectful, please report it.)

 
10/10/2002 4:32:12 PMCoding Genius

Dude! This is so awesome! I mean...cool! The flash animations just perfect it! LOL. Soooo funny man! 5 Globes! I'm still laughing. Great job.
(If this comment was disrespectful, please report it.)

 
10/10/2002 4:51:31 PMJ. Sperlhofer

thanks :) Some improvements found? :)
(If this comment was disrespectful, please report it.)

 
10/10/2002 5:00:38 PMPersona non grata

Awesome flash graphix dude :) Really looks professional! 5*
(If this comment was disrespectful, please report it.)

 
10/10/2002 5:06:58 PM

GREAT WORK !
Thank you very much to share this with us ;)
(If this comment was disrespectful, please report it.)

 
10/10/2002 5:35:39 PMJ. Sperlhofer

np, thats why i love psc :)
(If this comment was disrespectful, please report it.)

 
10/10/2002 5:36:10 PMJ. Sperlhofer

don't forge tto vote :>
(If this comment was disrespectful, please report it.)

 
10/10/2002 8:14:29 PMShaDoWsToRmEr

Nice, 5 Globes
(If this comment was disrespectful, please report it.)

 
10/10/2002 8:34:34 PM

Nice :) You got my 5 starss :)
(If this comment was disrespectful, please report it.)

 
10/11/2002 2:35:56 AMAmer Khreim

great and very good, I like evry one who can understand what is flash
1000 from me.
(If this comment was disrespectful, please report it.)

 
10/11/2002 4:27:58 AMJ. Sperlhofer

Just wanted to know, how to control Flash from VB. Thats the result, and its really not bad. Thanks to the voters :>
(If this comment was disrespectful, please report it.)

 
10/11/2002 6:28:19 AM

You Could Do The Entire Gui In Flash And Use The Fscommand To Allow Them To Communicate. Thats What I Do In My Flash Gui Programs :)
(If this comment was disrespectful, please report it.)

 
10/11/2002 6:32:27 AMJ. Sperlhofer

I could to it, right - but i didn't wanted to do it. Next project, you got my word :>
(If this comment was disrespectful, please report it.)

 
10/11/2002 8:01:32 AM

Hey, This application doesnot work in a standalone machine having TCP/IP even After running it as a Client. I ran Three Instances of the application . First one as server.
2nd one as 1st Client.
3rd one tried as 2nd Client. But it says 'THERE IS NO SERVER RUNNING OR ANOTHER WINSOCK-ERROR OCCURED.
CONNECTION IS FORCEFULLY REJECTED'.
-?????????????



(If this comment was disrespectful, please report it.)

 
10/11/2002 8:35:01 AMJ. Sperlhofer

calm down .. why did you start 2 clients? Its just a 2-player game ^^. And it runs on one machine, belive me. btw: Ever tried to open 3 ports with just 1 Winsock-Control? hehe .. so "or a Winsock-Error occured" is more than the right answer :>
(If this comment was disrespectful, please report it.)

 
10/11/2002 8:45:26 AMPlasma

Nice job, 5 from me!

Make more games like this :)
(If this comment was disrespectful, please report it.)

 
10/11/2002 9:12:15 AMJ. Sperlhofer

oh, thanks, i'm working on another right now... thanks for the globes :)
(If this comment was disrespectful, please report it.)

 
10/11/2002 10:30:21 AMMax Seim

With VB5, I'm getting an error on a couple of things. ...Round(...) and
...Trim(Replace(...) -- it says: Sub or Function not defined.

Maybe this doesn't work with VB5.0?
(If this comment was disrespectful, please report it.)

 
10/11/2002 10:32:03 AM

Ok,THIS application for two players only. Actually, I went according to the title "Winsock Multiplayer ....".
Ho ho ho..
Any way , I know that client Sockets are one-to-one.






(If this comment was disrespectful, please report it.)

 
10/11/2002 11:02:19 AMJ. Sperlhofer

@Max Seim: Oh, sorry - i've corrected it, sorry for the confusion.

@Nameless:
fine :>
(If this comment was disrespectful, please report it.)

 
10/11/2002 2:36:27 PMgridrun

AHAHAH ROFL!!! SOO CUTE >:)
(If this comment was disrespectful, please report it.)

 
10/11/2002 5:52:11 PMJ. Sperlhofer

hehe.. cute ;)
(If this comment was disrespectful, please report it.)

 
10/11/2002 8:52:19 PMSavage

LEGEND!!!!, man thats good, i really like the animations and how the are in sync on the host and clint - 5* from me, bravo, keep it up
(If this comment was disrespectful, please report it.)

 
10/12/2002 1:01:02 PMPaul Mather

You can play as 2 players on 1 PC if you use a different "Player Name" on the client and server. 5 globes!! Nice job!
(If this comment was disrespectful, please report it.)

 
10/12/2002 2:13:10 PMNinnghizidha

That was the idea - so i could test it. Did i forget to mention that? sorry .. :S
(If this comment was disrespectful, please report it.)

 
10/12/2002 2:14:17 PMNinnghizidha

3rd place - thanks for voting, folks - and keep on voting :> Thx a lot :)
(If this comment was disrespectful, please report it.)

 
10/13/2002 8:31:53 AMNinnghizidha

Some Improvements found, some minor tweaks? If so, please tell me, i'm gonna update it soon..
(If this comment was disrespectful, please report it.)

 
10/14/2002 9:44:19 AMCodeFester

I have wanted to know how the flash thing works. Thanks for sharing. 5 ballz from me.
(If this comment was disrespectful, please report it.)

 
10/14/2002 2:06:29 PMNinnghizidha

What "flash-thing"? I'll answer, but you have to be more specific. Hey, would be fine if you vote - don't just say :(

Just ask an more specific question, and i'll answer :>
(If this comment was disrespectful, please report it.)

 
10/16/2002 8:23:39 AMNinnghizidha

c'mon - would be fine if you vote :S 1 new vote and 1 comment in the last 2 days .. poor :S *cry*
(If this comment was disrespectful, please report it.)

 
10/17/2002 1:06:00 PMPhantom Man

Nice Piece Of Code Ninnghizidha!


(If this comment was disrespectful, please report it.)

 
10/17/2002 1:41:54 PMNinnghizidha

thanks a lot :) And: Nice C&P with my name :>
(If this comment was disrespectful, please report it.)

 
10/17/2002 9:43:57 PMJames P. Walters

Good program! : ) The first time I played I about crapped my pants when the other player shot himself. lol .. Good Code!!

-JPW
(If this comment was disrespectful, please report it.)

 
10/18/2002 5:19:18 PMDude2

interesting idea. nice job dude! 5 globez
(If this comment was disrespectful, please report it.)

 
10/21/2002 4:14:43 PM

HI man ive been doing flash for about two years and never had the idea of controlling flash through vb absolutley amazing im going to try some stuff now :) thumbs up and ten stars heheh
(If this comment was disrespectful, please report it.)

 
10/22/2002 2:15:44 AMEmperor Frollard

one possible problem I found, played locally...havent tried internet yet, anyhoo, played for 4 'games' (not rounds) and after 4 wins for 'player 1' it said 'you - 4, player 2 - 4', its a bit confusing not knowing the diff between rounds and full games
5 for great idea, but I think it should also keep track of actual 'game' wins/losses
(If this comment was disrespectful, please report it.)

 
10/22/2002 2:55:14 AMEmperor Frollard

Found me a few bugs while playing for 15 mins

for an unknown reason his action (Shoot) was displayed as debug in the chat, and not executed it, so neither of us had buttons to click, and I saw data+[ip]+playername+norotate+010000+1data+[ip]+playername+10000+1 (we got stuck).
Also, The Start New Game button is multi-clickable if theres any network lag, suggest to make it disabled...I started a game 5 times before it actually 'started'.
might want to look into it

other than that, excellent game
(If this comment was disrespectful, please report it.)

 
10/22/2002 2:55:53 AMEmperor Frollard

oops -
make it disabled *after its clicked*
(If this comment was disrespectful, please report it.)

 
10/22/2002 2:58:45 AMEmperor Frollard

I just dont quit - it also ruins the effect of the waiting for the animation to play if your opponent dies or not, because the buttons can be clicked way faster than the animation can play, as well, it says 'and nothing happened' way before the animation 'clicks' to show no shot, recommended you delay the messages and enables of the buttons...

once again excellent game - just lookin out to make it excellenter
(If this comment was disrespectful, please report it.)

 
10/22/2002 3:30:01 AMEmperor Frollard

BUT WAIT!!!
DEYers MOAH!

hehehe
uh, if the client quits, and you send a chat message from the server afterwards, it errors you out of the program with a 'wrong connection state' runtime error.
(If this comment was disrespectful, please report it.)

 
10/22/2002 3:31:50 AMEmperor Frollard

EGAD he just wont leave it alone :D

it just occurred to me, if you're 'waiting for opponent', why is your opponent sitting there in the animation? hehehe
(If this comment was disrespectful, please report it.)

 
10/22/2002 5:00:23 AMNinnghizidha

hehe :D

Thanks for the suggestions - i'll wark into every of it tonight and update the game :)

woot - thanks for the coments :)

Greetz,
Ninn :)
(If this comment was disrespectful, please report it.)

 
1/7/2003 8:03:22 AMPaul E Collingwood

Cool code, great game, & a worthy winner!
I have some questions - how did you produce the SWF files? What tools whould I need to create my own?
All the best!
(If this comment was disrespectful, please report it.)

 
1/20/2003 2:19:53 AMNinnghizidha

macromedia Flash 5.0
(If this comment was disrespectful, please report it.)

 
4/21/2003 12:39:39 PMTony G

I get missing ABCTL32.OCX.
What is it? where is it?
(If this comment was disrespectful, please report it.)

 
6/5/2003 9:09:35 AMNinnghizidha

I don't know this .dll - it has nothing to do with the game :-)
(If this comment was disrespectful, please report it.)

 
9/30/2003 3:18:16 AM

cvsdvsdvgfsdf
(If this comment was disrespectful, please report it.)

 
2/7/2004 6:29:37 PM

Can you add the .FLA files?, i want to learn more of actionscript
GREAT GAME AND CODE FIVE FROM ME!
(If this comment was disrespectful, please report it.)

 
4/11/2004 12:56:42 AM

Can I get the .FLA files?
(If this comment was disrespectful, please report it.)

 
5/21/2004 8:15:18 PM

Yeah, 5 Globe me. But, please you share .fla files?
(If this comment was disrespectful, please report it.)

 
10/21/2004 9:37:08 AMGreek Freak

...
if you upload the .fla files...you got 5 g's from me
...
till then cya
(If this comment was disrespectful, please report it.)

 
10/21/2004 12:01:27 PMGeorge

The readme says .fla files are included, but they are not in the zip.
(If this comment was disrespectful, please report it.)

 
3/15/2005 2:46:13 PM

Has anyone found the FLA files for this project, I would like to study of things are being done. Thanks
(If this comment was disrespectful, please report it.)

 
7/15/2006 1:50:37 AMBrian Ail

this deserves a gold medal
(If this comment was disrespectful, please report it.)

 
12/12/2006 12:59:07 AMJason Newland

lmfao
(If this comment was disrespectful, please report it.)

 
3/9/2007 6:28:56 PMCorey134_123

Great game i really loved it, i have spent some time working on it , and it is really one of the best games i have seen on Planet Source Code, since the game uses so much time to make and the flash is great kinda bad how its missing the .fla (Flash files) i really wanted to add some people in the game, eg people watching etc, would really go good with it, if someone wants to get the graphics and stuff u can open the .swf file in MSF and get the images but still u cant edit or addon to the game which would be great if u still had it i gave it 5/5 it really rocket my socks and i hope to see more from you in the futue
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.