Actionscript 3 :: Game Network Latency Compensation?
Mar 5, 2012
I am developing a simple fast-paced 2 dimensional real-time multiplayer game in Flash. Players can only shoot and walk in point to move fashion. I use TCP socket connection (AS3 doesnt offer UDP).All I want is to synchronize players' actions so Player1 could see the same on its screen as Player2,Player3... or just see close representation (position,taking damage,etc).
I know movement vector coordinates and I can easily interpolate on them using latency. However,I can not figure out an effective way to determine how much time (T1) did it take the state update to travel client1-server-client2 and then make corrections to client2's screen based on T1.(You know, ping times may fluctuate quite a bit).I need a way to do the above-mentioned, i need way which is as fast and as accurate as posssible but not extremely sophisticated. (what algorithm should i use?
View 1 Replies
Similar Posts:
Sep 24, 2011
We have a typical Flash+J2EE application that makes multiple requests from client to server (over Flex remoting), which is taking quite a long time on some client systems (and hence results in poor application performance on such systems).
Now, suspecting issues with network connectivity (latency) on such client system(s), we need to identify how far does it contribute to the slow response of the application (rather than performance issues in the application itself).
So, what are the best way(s) to diagnose this on a client system (Windows)?
Note that we have tried profiling our application, which does not indicate bottlenecks there, so we just need to clearly identify the possible network issues.
View 1 Replies
Sep 6, 2011
I have the following scenario:
One application JEE / Flex 4 running on a tomcat, inside my Flex layer I have a iFrame passing a url to an ip of my internal network (http:url....) which is another application running within an industrial PLC.When access this app from within my internal network works fine, but when I try to access this iFrame to an external network in my home for example have a timeout error onhttp:[url].........
I believe this error occurs because the flex client is trying to run this url as I was in a internal network.Is there any way to run this url from an external network?
View 1 Replies
Dec 28, 2011
I want to create a simple game (Adobe Air) based on 2 players using ActionScript 3.Let's assume I want to create online chess game.So that I can play with my friend at work, at home, from anywhere via internet.Should I use flash server? Or something similar for this purpose, or there is simpler way to connect 2 players and make fully functional interaction between them?
View 2 Replies
Apr 21, 2011
I need to calculate the latency means time difference between the two user machines the scenario is: 1. App 1 publishes stream 2. App 2 play the stream published by App 1 Now in App 2 I need to show the time difference between the App 2 and App 1 time. Say if current time on App 1 is 10:46:30 and on App 2 it is 10:50:20 then need to display the difference. How to send the time value to App 2 from App 1 as time zones for the two users may be different.
View 1 Replies
Apr 7, 2012
When synthesising sound using the SAMPLE_DATA event of the Sound class, the Flash documentation recommends writing out as many samples as possoible up to 8192. On my system the sound cuts out unless I write at least 4192 samples each event. That's a full tenth of a second, which is going to be user-noticeable.
I may have the option of buffering things up ahead of time, but this is a major annoyance for my application.Is there any way of getting lower latency audio output?
View 1 Replies
Aug 14, 2011
I have a system where clients connect via http streaming channels and use Producer and Consumer classes to dispatch and receive messages. I need to test the latency of messages in a way that adequately simulates real-world usage when the server is under load. I have 3 ideas for how this may be accomplished. Has anyone tried and succeeded or failed with these methods?
View 1 Replies
Sep 29, 2009
Is a latency of 94 - 109 high or low....if its high how do I lower it via the client I don't have control over the server at this point in time.
View 2 Replies
Oct 21, 2010
I can't find the setttings for have a least latency as possible, either the video quality is bad or the latency is up than 5 secondes...What should i do?
[Code]...
View 7 Replies
Mar 6, 2012
Suppose there is a live WAV stream that can be reached at a certain URL, and we need to stream it with as little latency as possible. Using HTML5 <audio> for this task is a no-go, because browsers attempt to pre-buffer several seconds of the stream, and the latency goes up accordingly. That's the reason behind using Flash for this task. However, due to my inexperience with this technology, I only managed to get occasional clicks and white noise. What's wrong in the code below?
var soundBuffer: ByteArray = new ByteArray();
var soundStream: URLStream = new URLStream();
soundStream.addEventListener(ProgressEvent.PROGRESS, readSound);[code]....
View 1 Replies
Jul 23, 2009
I have a project that plays several sounds and triggering interaction on key presses. On mac everything is fine - the animation and the sound gets triggered simultaneously. However, when I port it to windows (either as a swf or exe projector), there seems to be a .5 second delay in the sound. I have to load the sound files from a local filesystem. I've tried pre-loading all the sound so I can just play the sound object when needed, but the latency is always there.
View 1 Replies
Oct 4, 2010
In the game there is a backing groove played by triggering one movieclip to play. The user triggers short sounds from buttons embedded in drag and drop movie clips to play along with the backing groove.
On Safari or Firefox on mac the timing is absolutely fine.
On IE on Windos XP there is enough latency to make it unplayable.
View 0 Replies
Nov 28, 2010
I used to code with "Processing" so maybe I keep the same habbit when I code in AS3. I'm not really sure how to animate in a good way using Enterframe. I made a not so complex animation and I am suprised that there is a very bad latency when I run it. Maybe there is something I don't understand when I write Graphics.
At each Enterframe, I write a black rectangle with a 0.3 alpha to progressively erase old lines and just after I draw new lines.
Are these these Graphics lines and Graphics rectangles stay in memory? Do I have to delete it when they visually disapear from the stage?
Code:
package
{
import flash.display.MovieClip;
import flash.events.Event;
[Code].....
View 4 Replies
Sep 25, 2010
Because of network latency,there will always be latency, how to know how many seconds the latency is with ActionScript?
View 2 Replies
May 24, 2010
Only thing I found is QoS statistic in NetConnection.info, but it does not contain any kind of latency values.
In red5 API "IConnection.getLastPingTime()" exists, is it accessible over standard Flex API or I need to poll it by RMI calls?
View 1 Replies
Oct 17, 2011
if i will load my mp3 to bytearray and then play the bytearray it will beat the latency we have in playing sounds normally?
View 1 Replies
Jun 3, 2010
I'v made an application with all the default codec and settings provided by adobe to publish live video using FMS. I've made two swfs one is for publishing live video and the other is for viewing the published stream (telecast). When I'm publishing the live video on My laptop using the default web Cam and mic attached to the Dell laptop then after 2- 3 minutes delay on the telecast side start increasing and it keep on increasing continuously .At the same time when I use my desktop PC by attaching external Web Cam and mic to publish, delay on my Telecast side is consistent ,it never increase. I found the problem is with the Laptop's mic. Can anybody please suggest me why it is happening, and is there any solution to it.
View 4 Replies
Sep 22, 2010
We have one functionality in which one user can communicate with the other user at the same time through flash media server3.5. In this fucnitonality we are catching stream from both end through camera and pass it to flash media server. On FMS side this streams gets stored also we are displaying those recorded flv files side by side to the corresponding user so that they can communicate with each other. In this situation we are facing a video and audio latency upto 1.5 to 2 sec.
View 2 Replies
Dec 9, 2010
I've build a live video/audio chat application. All works fine only the issue is latency of 5 secs. I'm using FMS 3.5 and FLEX.
View 1 Replies
Sep 8, 2009
iam streaming my web cam to FMS .... i have got a latency of 1 -2 second,,,,,, What should i do to reduce the latency,,,,,, is ter any change i can make in FMS files(xml files) in order to reduce the latency......
View 6 Replies
Nov 17, 2010
I am developing peer to peer video conference application with FMS4 but there is some latency problem.
View 1 Replies
Dec 22, 2010
We developed one video chat application in which one user can chat communicate with anohter user. Latency is coming on one side in peer to peer connection.
View 2 Replies
Mar 17, 2010
Apparently I seem to have upset one of the forum members by cluttering up his space with rantings about FMS not being up to speed or scratch or whatever. So i'll keep it simple. Since i'm not inexperienced in the deployment of Flash via a streaming provider, I just want to know if other users here, find the FMS software to be brilliant in concept and delivery. In other words are the streaming companies going to be worried that my 1000mb of date transfer per month are going to stream just as well as the $360 a month they would like to charge me for doing the same job?!
[Code]....
View 1 Replies
Feb 29, 2008
We recently upgraded our network to Leopard and Flash to CS3,and since then, I can't publish to a network drive.The reason I need to do this is that we're on a network where all our project files are on the server, and we work directly from the server. With previous versions of Flash and the system, I was able to work on a Flash file on the server and publish or test to the same place. Now I need to copy my flash file to my local
computer in order to publish or test.If I try, I get this error: "Error creating Flash movie file.Be sure the destination file is not locked or on a locked drive.Also, check that the file name is not too long." Neither of those are the case.
View 1 Replies
Feb 26, 2011
I've got a Flash Banner worked with AS3.0. It loads XML and then load the Jpegs. At the beginning, the SWF accesses the files under the same directory. So the code goes like
[Code]...
View 6 Replies
Sep 26, 2011
I just installed FMS 4.5 w/ built in apache on Win2008R2 - accepting all defaults. Samples streams play fine when playing on the server. I copied the sample directory and put on a client on the network. I modified the stream URL using the server's IP address. I also modified the manifest files so that localhost was replaced with the server's IP. When I attempt to view in the sample player I get the following:
"We are unable to connect to the network.
View 2 Replies
Apr 22, 2010
I've recently started using FDT, for a while I was using FlashDevelop, it had a really handy feature in Compiler options where you can set UseNetworkServices to false which would stop the compiled swf from connecting to the internet and became very useful for running standalone flash apps without security warnings when loading in an external xml file etc.
View 1 Replies
Jun 30, 2010
I have a swf (flash file) who is making http request.
Which is the easiest way to see what request the flash application is doing?
P.S. I do not have the program as a fla file
View 4 Replies
Apr 19, 2011
Can u recommend me a good book/e-book/tutorial to network programming in as 3.0 ? I'd like to create a multiplayer game.
View 0 Replies
Nov 18, 2005
Just created a banner for our intranet and I have a getURL inside the flash which should open an html file on the local network. The paths:\networkcompetworkfolderfile.htmlIt works from my computer but when we put it on the intranet it doesn't.
View 4 Replies