1 decade ago
I have a finished html5 game and I used websocket in it. Now I am thinking about porting it to IPad using Ejecta, but found out that no websocket could be used here.
So, I would like to ask that, did anyone have experience about using websocket in Ejecta, or have any ideas about how to make websocket working with Ejecta?
I would be appreciate it if someone could give some ideas.
1 decade ago
This will require some work, but it should be entirely doable.
class (as described here
) and provide all the functions from the API
Edit: WebSockets are supported in Ejecta now. See: http://impactjs.com/ejecta/supported-apis-methods#websocket
What did you find out dominic ? :)
1 decade ago
When I developed Steamclash I used websockets to test the whole thing a lot easier. Then I wrote some little code and got the networking done with gamekit, which helped a lot. But of course thats just for local networking. But it worked great. If this is what you want, you can find the code here: https://github.com/Houly/Impact-Network
. Keep in mind that the code is over a year old. That means it's written for iOSImpact and iOS 5.
I'm just getting started with Ejecta and my websocket html5 game. I would love to help test whatever there is. Or flail around and try to add SocketRocket to the mix myself.
Has anyone had experience extending Ejecta?
I attempted to follow the instructions on http://impactjs.com/ejecta/extending-ejecta
. I'm working with the latest pull from git-hub from yesterday.
ReferenceError: Can't find variable: simpleTest at line 2 in js/test.js
Here's the source in case I made some mistake:
Just letting you know, I'm attempting to integrate SocketRocket into Ejecta:
connection = new Ejecta.SocketRocket();
causes an error:
TypeError: 'undefined' is not a constructor (evaluating 'new Ejecta.SocketRocket()') at line 117 in js/util.js
I'm an objective c newbie. So be kind.. :-) But I don't see anything substantially different from the other classes in there. If anyone has time to consider, I would appreciate an opinion.
Simple problem, the class prefix was Ej instead the required all caps EJ.
I have a working SocketRocket websocket now integrated in Ejecta! I'm so happy I will be able to roll over my multi player work. I wish it was compatible with Socket.io backend that I'm using. But that adds another layer on top of websockets that SocketRocket doesn't handle now. Still, happy to get it working any way I can.
I have committed the changes to the forked repo here:
I would be happy to post some minimal example client and server code to get people started.
Dominic, if you are happy with these changes, how do I submit a pull request?
Page 1 of 1