rogerfgay's Recent Forum Activity

  • Are you sure that the free version has a debugger? After my first day, which is a little hazy, I have to go back again and let things settle in. I now feel slightly more oriented, as though the day of understanding will in fact one day come. But I think I tried to click on some debugging stuff yesterday and found that it wasn't supported in the free version.

    I don't need anything too fancy just to do this experiment / proof of concept thing. If I can get it to send a clear message that I pressed the right arrow (or JSON action description that goes with it or whatever), I can just maybe reverse it ... send back left arrow command; or something like that.

    Was thinking about this yesterday ... the very first experiment doesn't even require two players. If I do the above, pressing right moves the sprite right, followed by returning to its original position in response to the reverse echo ... or ... maybe right + up or something, since if right + left happens too fast, it could look like nothing happened.

    That would be very, very simple to do as long as the action sends a message to the server that I can modify and send back, and when received, the demo will carry out the new action.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for that jayderyu. I'm just getting focused on applying my technology to games for the first time. I thought I'd start with games requiring transmission of rather small amounts of data, not streaming large numbers of packets. Right click, left click. Moving through a scene might involve sending a series of messages.

    There's nothing a standard transmission protocol can do to defeat lag in transmission times, slow transfers when the Internet is busy, etc. As you mention, there are strategies within applications for dealing with that. For Beta and further development, I'd also very much like to be working with people who understand the issues clearly and are designing appropriately based on that understanding. What actions and interactions hold up well? If the first demos and apps are well-designed with the character of the technology in mind, it would help tremendously. It would also help in further development ... beyond simple websockets ... to be able to focus attention directly on important, well-defined, solvable problems.

    For my first plunge, I want to use WebSockets. It's a standard that is now supported by all major browsers subject to Microsoft's traditional delay. But they have promised it will work in their current version. (Although my latest test in v10 on Windows 7 didn't.)

    But beyond that, I can do anything that I want to do. If the first phase goes nicely, an installable version can support any transmission protocol, and even direct transmissions between users rather than through a common server. That's just one option. Anything is possible.

    One of the great things is that I've developed small footprint components. Even from the start, I envisioned installing even on cell phones.

  • Firebug is telling me that it's continuously reloading localhost:5000

  • I also read in a forum post that someone fixed a problem by setting protocol to something ... meaning yes, use it. Right now, it's set to null.

  • Just as a quick experiment, I entered the ws address for my demo. I can see the connection being made from localhost:5000, the C2 program, with some crazy Cookie data in it, referring to one of my blog articles. But then when I click right, left, or whatever, it requests /robots.txt, which causes it to drop the WebSocket connection. (My demo doesn't take kindly to special requests.)

  • I might be catching on ... I can set values for key right, etc. on the websocket. Will that prepare and send a message? Will it interpret and apply if it receives a message with the codes I set in the same form?

  • That's weird. It began running in Chrome after I used the short-cut to display the html file source, but I can't inspect code. And although it's not actually running in Firefox, I'm now (after viewing source too) looking at the CSWebsocket code in Firebug.

    OK ... So, I should set up server info in event 1 ... but how to I trigger the dictionary update based on received info as you suggested. I'm used to editing directly in code and I'm not seeing any in the development system so far.

    (also wish the forum would stop timing me out)

  • And I apparently need to install CSWebSocket_plugin.js ... searched the directories and then googled, but haven't found it.

  • You could set up key values named for the different directions, and use a Boolean 0, or 1 to tell an object to stop or go.

    Heres an example.

    https://dl.dropboxusercontent.com/u/666516/ws4dir.capx

    OK, now I need to know how to update my free version. The project was saved in R143, and I have R139 ... so it wouldn't load.

  • Well if the return string was already formatted to "{"c2dictionary":true,"data":{}}" then when you received the message you could just load it into the dictionary object, and compare known keys, or do a for each key.

    I would assume there shouldn't be many issues reloading the dictionary that way.

    OK. I'll try to figure out how to do that. Do you happen to have an opinion as to whether this will work with the "8 direction 1 (simple movement)" example?

  • The implication is UDP is necessary for real-time multiplayer games. WebSockets only support TCP.

    I understand what you're saying, but the jury doesn't seem to have given their final verdict on that question: for example,

    stackoverflow.com/questions/13040752/websockets-udp-and-benchmarks

    I can rig my server to do UDP. The problem is at the browser end, which in some configurations might not be a problem at all.

  • Id say the biggest issue now is parsing the notification messages from servers.

    Most strings are in json key pair format, and C2's data objects use that, except they must all have the first key formatted to something they recognize.

    Thanks. I can look at that when I've gotten a little farther along so I have some way to id the problem and test. As per your description, it could be more than one thing. Top of my head says it may need to be serialized or deserialized, depending on how you want to access the results. I don't use JSON myself, but as I understand it, the functions for that are window.JSON.parse("a json string"); and window.JSON.stringify(myObj);

rogerfgay's avatar

rogerfgay

Member since 7 Sep, 2013

None one is following rogerfgay yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies