If you wonder, in order to access the filesystem for installed maps, settings, etc I am thinking about creating a webbrowser plugin to be able to access the local disk. But this will be strictly for that, for UI and business logic, the HTML5 will be tool. One option would be to do the API calls by the plugin also(such that WebSockets wont be necessary) but this means replicating the whole lobby API, which means alot of work.
This is directed at other members not the original poster:
In before: WebLobby!!!
WebSockets is a completely different thing from having a java applet running in the background of a webpage... this poster is asking for something new that I think could be cool.
This is directed at other members not the original poster:
In before: WebLobby!!!
WebSockets is a completely different thing from having a java applet running in the background of a webpage... this poster is asking for something new that I think could be cool.
Yes, it has nothing to do with Java applets :)
I also think it would be pretty cool to expose it by WebSockets protocol. Does anyone know what technologies are currently used to host the API on lobby.springrts.com ?
EDIT: I see there are two server implemenations: SpringLS(Java) and UberServer(phython) Which one is used on the spring lobby server? I am asking because I can do a small research to see how it could be easier to expose by WinSockets
EDIT2: based on what I found on forum, it looks like the server is using UberServer so phython
i dont want to say you shoudl not, but i see no sense in doing this. with this, i mena an other web-lobby, that uses some different technology for a subpart of its whole. what is the real benefit?
implementing a whole different server protocol, just so you can do soemthign that is not needed, but "is cool" ... i would not like to see dev time wasted on that. not to mention that it introduces useless complexity.
if you want ot help spring, and it has to be HTML5, and you don;t know anythign else.. i am sure you can find plenty of suggestions, if you ask around here.
If the lobby server would be accessible through websokets or xmlrpc then the existing weblobby wouldn't need the java applet - very desirable.
Anyone can just write a small proxy that translates lobby-proto <-> ws/xmlrpc and let it run on some server. It shouldn't be to hard to do it for the most basic commands, and would be a good test to see if it makes sense.
Besides the challenges of accessing the API(I also thought about having a proxy for websocket protocol), the main problem I see is the need of the HTML5 lobby to execute applications and access the local disk.
I haven't yet thought thoroughly about what features are required for lobby, but the most obvious are: #1- lobby must start Spring. this is possible I think by a file protocol. For example, Zero-K lobby uses spring:// protocol to launch itself. you can practically click in a web page and the web-browser will start the app associated with the protocol. the problem is that the protocol obviously needs to be installed. I am not sure how file protocols work on Linux and Mac for example, does anyone know?
#2- lobby must download the maps for Spring
Also, I can see several options how the HTML5 lobby would be embodied in:
#1- pure HTML5 web application(a website). the nice thing is you could just open the webbrowser and navigate to a page and that would be your Spring lobby the problem is starting Spring and local disk access would not be possible, as I mentioned above
#2- pure HTML5 web app(website) + a webbrowser plugin the webbrowser plugin will expose the possibility to access operating system in any way(run Spring, download to a location, etc) there are some challenges however making this secure as the plugin can be maliciously used by any web page to start Spring :D also, a cross-browser and cross-platform plugin is not easy to write and maintain
#3- a native application which runs the HTML5 web application. it will be able to have unlimited access to the operating system
1. Open a socket on another port (maybe just continue the trend and use 8202+) 2. Add this port to startup options and help. 2. Modify Dispatcher to take multiple server sockets, each paired with a callback that creates and returns a new Client-compatible object. 3. Create a new Client-like class able to perform a websocket handshake, then wrap Send/Handle methods with a websocket frame writer/parser. 4. Add logic to reloading to support websocket clients. 5. When the server starts, pass the websocket server socket to Dispatcher as well as callbacks for both websocket and normal clients. 6. Test it.
Tested with Chrome web-browser which supports web sockets. Check it with a test user. I implemented a very few basic features of the lobby
- connecting to server - login user - listing battles - join a battle - write messages written in the battle
You can check with another lobby that the user is connected. Obviously do not use the same user, it won't work.
I am not a web developer so this is time consuming for me. Would be great if someone would want to help I just want to prove that this is really possible.
I have some ideas of how to make the web lobby open spring and even download maps, etc Also, I have ideas how to make the lobby look much more appealing and simplistic. All current lobby implementations look complicated and cluttered.
Last edited by Fuel on 31 Jul 2012, 06:44, edited 1 time in total.
Users browsing this forum: No registered users and 1 guest
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 You cannot post attachments in this forum