This is for Xentor, as he can't post a new thread. I pass the mic over to you...
P.s In the mean time, the url for it is http://www.xensoft.net/software/flashnetwork.shtml
Printable View
This is for Xentor, as he can't post a new thread. I pass the mic over to you...
P.s In the mean time, the url for it is http://www.xensoft.net/software/flashnetwork.shtml
And everyone should look at it. It's a great idea of Xentor to make such a program. (bumping this as well...;))
It's very exciting
Too bad I have a break. Or else I would spread it on my school. Then everyone would play multiplayer games on our LAN... :)
I hope it could take more then 2 players :(
Maybe he can expand it later....
*hopes*
:)
Eventually I'll make it for more than 2 players... But I follow the tried-and-true method of "First we make it work, then we make it pretty"...
Oh, and thanks Ed... Wanted to start a thread, but havin probs :)
Sounds good Xentor. And yes, you're right. I feel the same thing. Before I start working on the graphics of a game, I want the actionscript to be fully ready.
Version 0.1.1 BETA released (Still a developer release)
Added features:
- Drag & Drop functionality (Drag SWFs from windows explorer)
- Restricted characters changed, so you can send carriage returns and linefeeds
- Added variable: /XSFN:localip, which gives the IP address of the local computer.
Also redesigned the page to organize it a bit more... Full changelog, features, API, protocol, and downloads at XenSoft.net
Grovey! It has the localip. The one thing it needs to take off is ease of use for non techies, such as they might be able to get it bundled with a swf or somthing else.
Yeah, I've been brainstorming that, but I'm not sure if it'll be possible... See, my program works by embedding the flash player ActiveX control (The same one IE uses) inside itself...
XSFN loads the movie by simply telling the embedded player what the filename is... So if the swf is attached to the exe file (It would pretty much just be appended to the end of the XSFN executable), the player wouldn't be able to find it... Only solution I could think of is, when you run the program, to copy the swf from the end of the exe to a temporary file...
This would add a little to the startup time, and would still require an installation, so the libraries are registered...
*sigh*... Problems everywhere...
Another option... Use a different file extension, like .xsf instead of .swf, and have that filetype associated to XSFN... In other words, double-clicking on an .xsf file would open it with FlashNetwork...
HEy HEy Xentor, nice to see ya man..whazup. Lemme see if that thingie realy works..:D
ms
PS some Ping-Pong stats will be nice for debugin...
PSS: ha ha Flash-ICQ..just make a buddy list with static IP's
[Edited by Mad-Sci on 04-30-2002 at 01:48 AM]
Xentor.. the .xsf sounds good.
Another way to do it is making a shortcut for each swf file.
That shortcut would execute something like: "XSFN.EXE filename.swf"
And then XSFN would automatically open filename.swf when it starts.
J
Hey Mad, long time no talk man...
jeroen - Well, the idea was to have one file that the user could just double-click on to play... Or maybe just click a link and play it right from a web page...
I know another way as well...
You can make a script so when you right-click on a file in windows, below 'open', it sais 'Open with XSFN...'.
It's possible, I know how to do such a thing manually and I've seen other programs do it as well.
Jeroen, just given some ideas
Possible, but I think what's wanted is a projector-type thing, where the movie can be made into an executable... I'm trying to figure out a good way to do it...
The MM swf player can export projectors, that's just the sort of thing that your player would be good with (I understand implimentation isn't that easy though).
Or else, giving it it's own extension would be good, although many users would be relutant to download players :(
So, anyone else have any suggestions? I put out these pre-releases to see what kind of features people want... Any extra variables needed, any extra commands, anything else the flash movie should be notified of (Events)...
Transparency isn't looking too good, and imitating the "projector" capability of flash is going to be a lot of work, so I'm not going to put time into that unless this really catches on...
For now I'm just trying to see what people need... If I don't get any comments, I'll just put it out as-is with a couple minor changes to turn it into a full release...
Maybe something like onRecieve? Like the onXML() command?
Jeroen
I'm not too familiar with the XML stuff (Never got around to trying it out)...
Right now, since I can't call methods from outside the movie, it notifies the movie of incoming data by calling a frame labeled "ReceiveData" and setting the "message" variable to the incoming data... All inside the XSFN movie clip...
I dont understand it :(
How will I know the IP address of someone elses computer? I could perhaps know the computers name in the network...Quote:
The other person must click the Network menu and select Connect to another Computer. A small dialog box will pop up, where the user can enter the hosting computer's IP address. Click OK, and the connection will be made.
So, could the server program set some name, like "xserver" and then client could type this name in the box to connect?
You can get your own ip address through the projector, so a php script could do the matchmaking, you give it your ip, go back to it again, and it gives you an ip, and that ip's holder get's yours when they check again. Then, it would do it all by magic.
Ok, since no one seems to have any problems with it (Or care about it), I've put out the first full release, still BETA until I figure out if there are any major bugs...
You can get it at: XenSoft.net
Changes in this release:
- Changed the background to black (I think it looks better)
- Added Help > Instructions, which displays a readme-type notice.
- Movies can now be loaded on the command-line, e.g. XSFN.exe mymovie.swf
From this point on, I'll do my best not to change existing API functions, so old XSFN-compatible movies will always work on newer versions.
So, enjoy... Remember, bugs, suggestions, etc, are always welcome.
Oh, and it'd be nice to know if anyone is actually making any games for it... I've started one, but I wasn't just making this for myself :)
Yay! ;)Quote:
Originally posted by Xentor
- Movies can now be loaded on the command-line, e.g. XSFN.exe mymovie.swf
And I'll make a game for it. I already have a kewl idea, but I will start with it over 3 weeks, after my finals.(busy, busy, busy..:))
When I made a button with:
fscommand ("LISTEN");
and clicked on it once, it went to "Listening to connection..." mode.
Now, when I clicked on the button again, while in the listening mode, I got error message:
Run-time error '40020':
Invalid operation at current state
and XSFN closed.
I would also like to see XSFN have the option to find hosts from the network itself. I find it quite annoying to type in IP adress. Can please add this option?
Why cant I read variables localip, remoteip, remotehost? Are the not supported yet, or am I just hopeless?
Finally, someone found a bug...Looks like I missed an error trap... Easy fix... Before, the program depended on just disabling the menu options that wouldn't work, but I forgot that the flash movie doesn't have to follow those rules...
The network variables are set INSIDE the XSFN movie clip, not in the main timeline... This was done in order to help separate the network code from the rest of the game, and make it a bit more modular. /XSFN:localip is set at the very beginning, as soon as frame 1 finishes loading... /XSFN:remotehost and remoteip are set when a connection is completed (When you enter the online state).
As for finding hosts on the local network, I'm putting that on my to-do list... Sounds like a good idea...
No, still no luck with them.Quote:
Originally posted by Xentor
The network variables are set INSIDE the XSFN movie clip, not in the main timeline... This was done in order to help separate the network code from the rest of the game, and make it a bit more modular. /XSFN:localip is set at the very beginning, as soon as frame 1 finishes loading... /XSFN:remotehost and remoteip are set when a connection is completed (When you enter the online state).
This is how I made it:
In your XSFNtest1 movie I made separate layer and put new mc there with action:
and I made 3 dynamic text boxes in the root with variables assigned: localip, remoteip and remotehostCode:onClipEvent (enterFrame) {
_root.localip = _root.XSFN.localip;
_root.remoteip = _root.XSFN.remoteip;
_root.remotehost = _root.XSFN.remotehost;
}
None of those show up, not in the any states.
Also, when I run 2 instances of XSFN in same computer and set both of them to listen, I get error message:
Run-time error '10048':
Address in use
I guess its right for running too many XSFN same time :)
[Edited by tonypa on 05-03-2002 at 12:30 PM]
Well, first of all, the chat example I wrote was done before the localip variable was made available, and in that movie, the XSFN movie clip isn't created until frame 3... The localip variable is set the instant the movie finishes loading frame 1, and when that happens, the XSFN mc doesn't exist yet.
As for remotehost and remoteip... I knew this thing wasn't ready to be released, but no one was interested while it was just a "developer's release"... Bug #2... Due to some restructuring somewhere in the middle of the development process, those are being set in the root when they should be in the XSFN mc...
Just gotta repackage this thing, and I'll release it with the bug fixes...
tony, ever considered professional beta-testing? :)
EDIT: Version 0.2.1 released, with these bugs fixed. (Download)
[Edited by Xentor on 05-03-2002 at 12:53 PM]
Xentor -I don't have much time to check out the whole program. I have realy a lot to do. But I think it's a very good project and when I start making a game for it, over three weeks after my exams, I will also help debugging it, ok.. ;)
:)
Thanks, Xentor, for fixing it so fast :)
Here is an example, where coordinates of hero (green square) are sent to other movie and there enemy (red square) is positioned there.
Try to save it somehow on your disk:
http://www.hot.ee/tonypa/flash/flas/XSFNtest2.swf
Just right-click on the link and choose 'Save Target As...'.Quote:
Originally posted by tonypa
..save it somehow on..
Xentor you have any documentation how you script your movies to use the networks. I mean in a single game how would you diferentiate between host and guest(s) using single AS.
I hope this made sence.
ms
All of the API documentation is on the website... Shows ya what commands are available...
And once the two computers connect, it's a peer-to-peer connection, so it really doesn't make a difference which is the client and which is the server...
Gotcha..
I was thinkin if possible to get both IPs. I mean for example in a chat room:
1. you enter name. and then when you type you get:
mad-sci> hi Xentor
Xentor > hi mad-sci
see my point. So have one AS for the chat room displaing diferent avatars and different coolors..
ms
Well, the remoteip and localip are both available...
Don't forget, you can send just about anything over the network, so as soon as the computers connect, you could have both movies send "NAME myname", and the other computer would know their name.
Very cool, Ill keep in thouch with you over the ICQ..:D
ms
Ok, I've got a network search working... Basically, once the game is loaded, you select the Find option from the network menu, and it pops up a list of computers on the local network who are running the same game as you, and listening for a connection...
In order to make that work, the game has to tell XSFN its name... For example, when a modified version of my chat demo runs, the first frame contains:
fscommand("MOVIENAME","XSCHATDEMO")
Once XSFN knows the name of the game, it enables the Find option. When the user clicks the find option, XSFN immediately sends a broadcast to the network, basically saying (Though in code), "Hey, any XSFN's out there playing XSCHATDEMO?" (Hehe)... As they respond, it lists them for you, and you can double-click one to connect to it...
The problem is, all I can really display (Info about the listed hosts), is the IP address, the version of XSFN being used, and the ping time...
I want to be able to display a name for each computer found, but that would require any computer going into "Listening" mode to have a name.
Basically I can think of a few options for that...
- Ask for their name when XSFN starts, and save it in the registry until they change it via a menu option.
- Prompt them for a name every time they enter listen mode
- Assign a default name (i.e. "User" or "Nameless"), display the user's name while they're listening, and have an option to change it, again via a menu option.
Any opinions?
Maybe you can let the flash movie ask to the user a name to use. Then if that users goes into listening mode, he will also send it's name with the normal vars...
I was thinking, it could be nice, if you can hide all the XSFN menu, like with FSCommand showmenu. And when it will have transparent background, it will be very cool :)