Capturing and Using Event Data

For developers using the Construct 2 Javascript SDK

Post » Sat Sep 07, 2013 12:23 pm

I'm new to Construct 2, and am interested in doing a quick experiment / demo with my WebSocket technology.
http://highlevellogic.blogspot.se/2011/09/websocket-server-demonstration_26.html

I'd like to construct a very simple initial demo, like for example, using the existing "8 direction 1 (simple movement)" example with two players. If you're more familiar with another simple example, that would likely work just as well; but movement just seems like a good basic start.

I'm wondering if I could get come quick tips / pointers. I need to capture event data to be sent and make use of data that is received. I can do the WebSocket part. My questions have to do with working with Construct 2 browser code.

1. Identify / get data to send that informs the other player of the character used in the local browser.
2. Capture movement event information.
3. Apply movement event information received from the other player.
B
6
S
1
Posts: 76
Reputation: 606

Post » Mon Sep 09, 2013 4:40 pm

This has been partially completed.

Websocket connection is made.
Websocket messages are sent in response to key input.
Websocket messages are received from the server.
Simple movement of a sprite occurs in response to the message input.

I still have very little experience with Capture 2 at this point, but this is an initial proof of concept. However, what I've learned to do so far, simply using the normal game development tool, seems kind of weak. I'm still looking for a better way to grab relevant event data and use it to trigger actions on the receiving end.

Maybe I just need more experience using the tool to build Event Sheets; but at this point I'm wondering if using the JavaScript SDK is a better route to take.

Life is hard when you're a beginner, as I am with Construct 2. Programming this in JavaScript would have been a lot easier for me so far with much better results. But I don't want to make the judgment so quickly, while I'm just a newbie.

Any opinions?

B
6
S
1
Posts: 76
Reputation: 606


Return to Javascript SDK

Who is online

Users browsing this forum: rexrainbow and 0 guests