-
Granger
- Posts: 9255
- Joined: Mon Mar 22, 2010 2:00 pm
-
Vassteel
- Posts: 718
- Joined: Thu Aug 15, 2013 12:38 pm
Re: Roadposts and Milestones?
has it been suggested in one of the client threads?Sevenless wrote:I long for a client that can show a line between the last road spot and the next one being indicated.
-
Hrenli
- Posts: 1169
- Joined: Mon Mar 21, 2016 1:39 pm
Re: Roadposts and Milestones?
Like server has nothing to do right now and easily can run additional path calculations and sending the results to client on your every mouse move? Jeez...Granger wrote:Should be a server feature.
Preview feature of convenience nature, has to be run on the client. Anyone thinking otherwise should not be allowed to any code vicinity.
Too old to rock-n-roll, too young to die.
-
MagicManICT
- Posts: 18435
- Joined: Tue Aug 17, 2010 1:47 am
Re: Roadposts and Milestones?
Because
is highly computational work, right?
Server doesn't have to compute any of it, just tell the client to draw a line from A to B. How basic or fancy the graphics are is up to the client.
Code: Select all
send.line(pointA, pointB)
Server doesn't have to compute any of it, just tell the client to draw a line from A to B. How basic or fancy the graphics are is up to the client.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
-
pppp
- Posts: 403
- Joined: Sun Jun 20, 2010 7:30 pm
Re: Roadposts and Milestones?
It's both server and client. Server has to send starting coordinates (derived from turning point of the milestone on which "extend" or "connect" has been clicked). That's two long integers (only). Client has to draw the line and server does not need to know where mouse hovers currently.
-
Hrenli
- Posts: 1169
- Joined: Mon Mar 21, 2016 1:39 pm
Re: Roadposts and Milestones?
Didn't we talk about PREVIEW of the line between control points of the road before next post is put down? That mean the line changes literally every time you move your mouse to new grid cell.pppp wrote:Client has to draw the line and server does not need to know where mouse hovers currently.
My point is - there is absolutely nothing to gain here by moving the computation which is not affecting anything apart user convenience (therefore nothing to protect against client-side hacks) from client to server.
Too old to rock-n-roll, too young to die.
-
MagicManICT
- Posts: 18435
- Joined: Tue Aug 17, 2010 1:47 am
Re: Roadposts and Milestones?
The client requests the specific coordinates of the last post in the chain. The server sends it. The client tracks the line between the last post and where the next post goes. It's not a difficult operation if this is done client or server side, and doesn't incur much more bandwidth or processing time over what was previously done.Hrenli wrote:Didn't we talk about PREVIEW of the line between control points of the road before next post is put down? That mean the line changes literally every time you move your mouse to new grid cell.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.