Sandscape - WTactics browser game

Browser based open source cross platform solution for easily playing customizable card games online vs other players. Lead dev: knitter
User avatar
snowdrop
developer
Posts: 798
Joined: Mon Feb 01, 2010 15:25
Location: Sweden
Contact:

Re: Sandscape - WTactics browser game

Post by snowdrop » Mon Oct 17, 2011 21:48

xarn wrote:...but if the latency is small, i guess it's acceptable.
Latency will most likely never or seldom be noticeable due to the nature of the genre, compared with for example a FPS. :P Very little info is sent back and forth and it is sent seldom and with gaps in between sends, meaning lag is barely ever noticeable compared to most multiplayer games out there.

Also, as Knitter mention, not all actions a player does must be sent back to server. Example: Player re-arranges the cards in his hand, or looks at one card in particular in hand. That wouldn't have to be sent to server, it could just stay strictly client-side. (Then again, eventually the server might "ask" the client for such info, if relevant, but that would just be on a need-to-know-basis.)

Just my 5 cents, don't know if Knitter would agree though. In the end whatever he chooses goes given he's lead on the project. Speaking of which.. if you guys are to co-work you should perhaps start by straightening out coding standards, roadmaps etc so you can agree on what needs to be done, how and who. Knitter, I guess it's you're area to start straightening it out when you get the chance. :twisted:
User avatar
xarn
Posts: 101
Joined: Thu Oct 13, 2011 11:50

Re: Sandscape - WTactics browser game

Post by xarn » Tue Oct 18, 2011 11:54

Yo!

Well, I'm probably a bit difficult to work with since I have issues following decisions I don't judge optimal. I also feel that there is very little margin for discussion as the choices seem already grounded and unlikely to move. At least, that's how I perceive it.

Basically, we favor different technical choices. As everything can be done with everything anyway, it's a matter of taste mostly, and there is no winning argument in such cases.

At least, what can be done is to define a protocol. That way, the server-side implementation can be done independently, as well as the client-side. In the same way, we could split development between client-side and server-side, leaving each one responsible for its area.

my 2 cents
Knitter
developer
Posts: 87
Joined: Mon Jan 17, 2011 11:26
Location: Leiria, Portugal
Contact:

Re: Sandscape - WTactics browser game

Post by Knitter » Tue Oct 18, 2011 12:29

xarn wrote:Yo!
At least, what can be done is to define a protocol. That way, the server-side implementation can be done independently, as well as the client-side. In the same way, we could split development between client-side and server-side, leaving each one responsible for its area.
Again I'm having trouble following, sorry but I can't seem to understand.

What kind of protocol? The protocol is the one every browser uses, it's HTTP and nothing more, what would we add more?

The server and the client are as separated as possible considering it's a web applications using HTML/JS and a server-side language. Naturally there will be an API, or more simply a group of URLs that the webserver needs to reply to.

I understand that you may feel these choices are being imposed, and honestly they are. Most of what you mentioned is already decided since the project didn't start this week. I know that I've been in a long hiatus, almost 5 moths without any proper work on the project but the stuff you're asking about is something that was done in January and unless there is a good compelling reason to just drop everything, and I don't really see one, I'm not just going to ignore all the work that has been done.

I'm hopping to release version 1 sometime this week, I would like to do it today but I don't really know if I can implement the lobby and game area this afternoon.

Still, I don't want you to feel that I'm just rejecting any suggestion you make, it's just that the project is not in the beginning, I would like to have good technical reasons to go back to the drawing board.
Rejoice! For very bad things are about to happen.
User avatar
xarn
Posts: 101
Joined: Thu Oct 13, 2011 11:50

Re: Sandscape - WTactics browser game

Post by xarn » Tue Oct 18, 2011 12:37

About the protocol, I mean how are the requests and responses formatted.
I understand that you intend to use specific urls per request (despite it goes against my taste). In this case, it still leaves out the question: how are the responses formatted? Plain text? JSON? Other?
(Like: "player X moved card C to pos P"?)

In any case, it's probably better for me to wait for the first release then...

Btw, I'm impatient to see what it looks like! :mrgreen:
User avatar
snowdrop
developer
Posts: 798
Joined: Mon Feb 01, 2010 15:25
Location: Sweden
Contact:

Re: Sandscape - WTactics browser game

Post by snowdrop » Tue Oct 18, 2011 14:44

xarn wrote:Btw, I'm impatient to see what it looks like! :mrgreen:
A zillion years ago in a galxy far far away.... >> http://chaosrealm.net/wtactics/2011/03/31/sandscape/
Knitter
developer
Posts: 87
Joined: Mon Jan 17, 2011 11:26
Location: Leiria, Portugal
Contact:

Re: Sandscape - WTactics browser game

Post by Knitter » Tue Oct 18, 2011 17:52

xarn wrote:(despite it goes against my taste)
It's a purely browser based application, how else would you do it? Browsers know only how to ask for URLs, they understand and offer nothing else :).
xarn wrote: In this case, it still leaves out the question: how are the responses formatted? Plain text? JSON? Other?
(Like: "player X moved card C to pos P"?)
JSON encoded information, that I can use almost directly with jQuery. Some jQuery methods receive X,Y positions in JSON format (like CSS properties for top, left, right, bottom) and these methods are use to create the animation. The flow is basically grab the server response and place it in the "animate" method from jQuery and the card will move.
Rejoice! For very bad things are about to happen.
User avatar
xarn
Posts: 101
Joined: Thu Oct 13, 2011 11:50

Re: Sandscape - WTactics browser game

Post by xarn » Tue Oct 18, 2011 19:14

It's a purely browser based application, how else would you do it? Browsers know only how to ask for URLs, they understand and offer nothing else :).
In a standard POST request, you can submit arbitrary data.
Knitter
developer
Posts: 87
Joined: Mon Jan 17, 2011 11:26
Location: Leiria, Portugal
Contact:

Re: Sandscape - WTactics browser game

Post by Knitter » Tue Oct 18, 2011 22:38

xarn wrote:
It's a purely browser based application, how else would you do it? Browsers know only how to ask for URLs, they understand and offer nothing else :).
In a standard POST request, you can submit arbitrary data.
It seems we are either running around in circles or I'm really not understanding the point. I never said I couldn't send arbitrary data, in fact, I see any request as sending arbitrary data properly encoded to comply with the protocol.

You mention that you don't like URL requests, yet you now talk about POST, which is by definition a URL request, also you mentioned that there was no need for a server and a simple script listening to a port would suffice but a POST is part of the HTTP protocol, and to be able to use that you will need a webserver that offers that protocol to the browser.

I'm confuse :oops:
Rejoice! For very bad things are about to happen.
User avatar
xarn
Posts: 101
Joined: Thu Oct 13, 2011 11:50

Re: Sandscape - WTactics browser game

Post by xarn » Wed Oct 19, 2011 08:41

Ok, let's clean up the mess then ;)

What I meant is:
- In case http requests are used, rather than encoding the information in the URLs, I prefer to use just a single (or a few) URL(s) and put the information about the action into its POST data
- In case websockets are used, a TCP/IP connection is established. This means, no http, nor server is needed, but just a simple script opening a listener socket.

Is this clearer?
User avatar
xarn
Posts: 101
Joined: Thu Oct 13, 2011 11:50

Re: Sandscape - WTactics browser game

Post by xarn » Wed Oct 19, 2011 11:02

If you want, you can also provide me with a specific well-defined task, and I'll see what I can do.
Post Reply