Pirate The World - Online Adventure Game

Pirate The World Game Forums
It is currently Sat Apr 27, 2024 4:14 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: lag
PostPosted: Wed Oct 24, 2007 9:59 pm 
Offline
The Doom-Bringer / Site Admin
User avatar

Joined: Mon Dec 05, 2005 9:12 pm
Posts: 1441
Location: Berkeley, CA
257 players.

_________________
To find, explore the funds off shore and skirt the shoals of bankruptcy!


Top
 Profile  
 
 Post subject: Re: lag
PostPosted: Thu Oct 25, 2007 6:27 am 
Offline
User avatar

Joined: Fri Feb 24, 2006 1:38 am
Posts: 726
Location: New Zealand
Not sure if this helps or not, but I'm really happy with the way the site is being run, bugs sorted, etc. I do agree lag is a problem though since I had both radar and log live and saw the attack on my ship show in my log, but no ship on the radar. Also parts of my log go blank, e.g the inbound attacks section. What I think would help is if the data pulled from the server was compressed before coming to our computers. Like our computers store where ships are on the radar and what's in the log until that data needs to be refreshed by the server. Think how many ships we pass which haven't moved in days, yet the name, place, colour, etc, all gets sent to our computer each time. The log shouldn't be too hard to change since when we open the log it checks the server for new attacks. Then it's live but doesn't update until the server tells it there is new data, in which it them updates again, then saves it to memory until the server tells it there's more data, and so on. As for the radar, firstly all the data about inactive players would be loaded to our computers memory and maybe even a cookie. That way only the data for active players would be downloaded by the live radar. When a ship sinks that is then loaded to every players computer. All this kind of data would of course be encrypted so no player could see the ship locations without going there. Really I'm thinking the less data going between our computers and the server the better. Things like ship indexes in which instead of the ship names of other players going to our computers each time there could be an index number. Our computers would already have a list of the ships in the game, and the player name would be displayed based on the index number.
E.g If the game only had 3 players (A, B, and C.) then our computer would download the list:
1) A
2) B
3) C

Then my ship gets attacked by B, but instead of my log downloading B, it would download the number 2, and from that it would find and display B.
The reason this would speed things up is because most player names are longer than say a 4 digit number. These are all simple ideas but I'm sure they would speed up the game play for everyone, and would use no more than 5 Mb of our computer space (Including a full player list, the locations of all inactive players, display pics, etc.).


Hope all that makes sense as it's late at night and I haven't proof read it very well. I'm happy to try and explain it in more detail though.

_________________
It angers me that bottles can say for you to shake well before use, but don't have to say to put the cap back on 1st.


Top
 Profile  
 
 Post subject: Re: lag
PostPosted: Thu Oct 25, 2007 12:51 pm 
Offline
The Doom-Bringer / Site Admin
User avatar

Joined: Mon Dec 05, 2005 9:12 pm
Posts: 1441
Location: Berkeley, CA
If I grasp what you're saying correctly, and I think I do, that's sort of what I'm trying to work on right now. Part of my plan is to reduce the amount of game data that is transferred. One of the previous tests was very good at that. In addition, though, I'm trying to reduce something much larger--presentation data. Each time you load a game page, your computer has to pull the entire page down from the server because parts of it are different. Instead, I am hoping to create a persistent interface that only needs to pull down the "game data" and not the layout information. The amount of information that is required for the layout far exceeds what is needed for the game.

One problem that I had previously, though, is that web pages are kind of like "snapshots in time". What I mean by that is every time you make a web page request, your computer goes through the complex series of negotiations to contact the server and pull the required files down to your computer. Sometimes the files are cached on your computer, so a comparison is done and maybe some files won't be transferred. When everything is done, you have a "snapshot" of that page in time. It's a very efficient system when real-time data is not required. PTW, however, does require it.

What I am working on now will allow each player to create and keep an open connection to the server. Your computer will be able to send and receive data without have to open/send/receive/close for each request. There also won't be any of the overhead from the HTTP information. Hopefully that, too, will speed things up. If anything, this new system should even things out for everyone. Some people might have to slow down, others might be able to move faster. My goal is to even things out for everyone so that how you play the game isn't dependent on what works or doesn't in your browser.

_________________
To find, explore the funds off shore and skirt the shoals of bankruptcy!


Top
 Profile  
 
 Post subject: Re: lag
PostPosted: Wed Oct 31, 2007 10:04 pm 
Offline
User avatar

Joined: Fri Feb 24, 2006 1:38 am
Posts: 726
Location: New Zealand
Yip that is what I was meaning. Another idea to lower the data transfer is to have the radar made up of binary bits which then loads the player data when the mouse moves over the ship. I could post the VB script code which would convert from byte data to ships on a radar if you wanted.
As an example of what I mean, a radar with no ships on it would be all 0 value bytes, as 0 in binary expanded to 8 bits is just 00000000. The byte values would be spread to fit the radar, with 0 meaning no ship, and 1 being a ship in that spot. With a level 8 radar it would just be 8 bytes in a row from top to bottom.

_________________
It angers me that bottles can say for you to shake well before use, but don't have to say to put the cap back on 1st.


Top
 Profile  
 
 Post subject: Re: lag
PostPosted: Sun Nov 04, 2007 11:23 am 
Offline
User avatar

Joined: Thu Feb 23, 2006 4:20 pm
Posts: 70
well just thought id have my say on lag!

Until 3 days ago it all worked fine the odd bit of lag now and again, but now its almost unplayable.
Absolutly nothing has changed on my comp and i tried all the suggestions but no difference.
Im not complaining just thought you would all like to know!

The seas are safe for you all, but not for long hopefully!


Top
 Profile  
 
 Post subject: Re: lag
PostPosted: Wed Nov 14, 2007 8:03 pm 
Offline

Joined: Sat Oct 29, 2005 4:39 pm
Posts: 830
Location: Small Town, CA
I know this post is a couple days old, but I have not experienced any lag recently.

_________________
Jason
Tech Blog | SWTOR SPEC | Knight with a PC


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group