Developing TicToe HTML5/Preparing the Server: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
Created page with "<noinclude>{{Navigation TicToe HTML5}}__NOTOC__</noinclude> {{TODO|Write this article, at the moment it contains just some notes}} Now it is time to get a basic (empty) server ..."
imported>Hendrik Brummermann
No edit summary
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Navigation TicToe HTML5}}__NOTOC__</noinclude>
<noinclude>{{Navigation TicToe HTML5}}__NOTOC__</noinclude>

{{TODO|Write this article, at the moment it contains just some notes}}


Now it is time to get a basic (empty) server up and running.
Now it is time to get a basic (empty) server up and running.
Line 17: Line 15:
# TCP port for traditional clients
# TCP port for traditional clients
tcp_port=32170
tcp_port=32170

# Web port
http_port=8080


# The length of the server game loop in milliseconds
# The length of the server game loop in milliseconds
Line 49: Line 50:
== Testing client/server communication ==
== Testing client/server communication ==


To test the setup, we open a web browser at <nowiki>http://localhost:8080/index.html</nowiki>.
{{TODO|Write this section}}

This will just result in a green screen, but we can manually connect to the server by using the Firebug console. There is an input field at the bottom, that allows you to call any defined method and to inspect any object.

First of all, we need to connect to the server. Type this command and wait for the message "connected" in the console log:

* '''<code> marauroa.clientFramework.connect(null, null);</code>'''
** <code> connected</code>

While it is possible to execute more methods here, this is not useful because we have not implemented any server code, yet.