Roadposts and Milestones?

Ask, answer and discuss any and all topics about the hows, whys, wheres and whens of playing Haven & Hearth.

Re: Roadposts and Milestones?

Postby Granger » Wed Feb 13, 2019 9:29 am

Should be a server feature.
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
User avatar
Granger
 
Posts: 9254
Joined: Mon Mar 22, 2010 2:00 pm

Re: Roadposts and Milestones?

Postby Vassteel » Wed Feb 13, 2019 9:51 am

Sevenless wrote:I long for a client that can show a line between the last road spot and the next one being indicated.


has it been suggested in one of the client threads?
User avatar
Vassteel
 
Posts: 718
Joined: Thu Aug 15, 2013 12:38 pm

Re: Roadposts and Milestones?

Postby Hrenli » Wed Feb 13, 2019 11:32 am

Granger wrote:Should be a server feature.


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...

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.
Hrenli
 
Posts: 1169
Joined: Mon Mar 21, 2016 1:39 pm

Re: Roadposts and Milestones?

Postby MagicManICT » Wed Feb 13, 2019 11:35 am

Because
Code: Select all
send.line(pointA, pointB)

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.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18435
Joined: Tue Aug 17, 2010 1:47 am

Re: Roadposts and Milestones?

Postby pppp » Wed Feb 13, 2019 11:57 am

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.
pppp
 
Posts: 403
Joined: Sun Jun 20, 2010 7:30 pm

Re: Roadposts and Milestones?

Postby Hrenli » Wed Feb 13, 2019 1:09 pm

pppp wrote:Client has to draw the line and server does not need to know where mouse hovers currently.


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.

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.
Hrenli
 
Posts: 1169
Joined: Mon Mar 21, 2016 1:39 pm

Re: Roadposts and Milestones?

Postby MagicManICT » Thu Feb 14, 2019 3:11 am

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.

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.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18435
Joined: Tue Aug 17, 2010 1:47 am

Previous

Return to How do I?

Who is online

Users browsing this forum: Claude [Bot] and 0 guests