Juryiel's Forum Posts

  • Thanks a lot! I'll give it a shot as soon as I get a chance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I accidentally made a family with a space in its name, so I can't do things like Family Name.X to get its various values, which I need to do. Is there some way to do this or change the family name without re-making the family? (I already used it in a bunch of other events that I don't want to re-make)

  • What I mean is, IE9 already does play Vorbis codec. Not natively, but IE9 will play that codec if you install it on a client and then have the webserver serve a WebM MIME, but not an OGG with the same Vorbis encoding.

    So yeah, I agree, I like the campaign and if it has an effect that would be great, regardless of which wins (OGG or WebM is irrelevant to me). I just thought I'd point out that it would be a more effective campaign if you backed the stronger candidate that already has partial support.

    Also, apple, with 4% ish browser userbase in Safari, is sort of a triviality. The don't really have any clout and will probably have ot follow suit with whatever format Microsoft, Google, and Mozilla dictate.

  • Microsoft willingly added WebM MIME type support in IE9, but has not done so for OGG, that was my point, that they are already partially supporting WebM. I don't think they'll ever support OGG but google may pressure them into WebM by leveraging its giant web presence, as they seem to have already done somewhat. So what I mean is it actually isn't the case that one will come with the other. It's not just an issue of supporting Codecs. IE9 <audio> tag can use any codecs installed in Windows 7 for example but you'll notice that if you install Vorbis codec you still can't play OGG because IE9 will never support that MIME type in the HTML5 tags. Xiph doesn't have the leverage to make them.

    WebM has also been around for a while as it is a derivative of the Matroska container.

    In any case I think the two players here will be WebM and AAC. Everyone else is backed by someone way too small.

  • Good idea, these browser politics are getting ridiculous. Though I have to mention again, why go for OGG when WebM is same audio codec and is more likely to be productive. E.g. it already enjoys special support in IE9 that OGG still doesn't have, in the form of recognizing WebM MIME in the <audio> and <video> tag and playing it through plugin, whereas an OGG plugin has not been approved and MIME for OGG are not treated with similar regard.

    The point is that it might be an easier battle to support WebM since you have google in your corner.

  • I've been reading the updates about the audio format related issues, and I thought I'd mention that WebM (which I think uses vorbis audio in a different container than ogg) is supported in IE and Safari via plugin, and natively in Chrome and Firefox. So I think WebM audio tracks should be usable by all browsers of consequence so you don't need a bunch of formats.

  • Suggestion:  When hitting reply, only the last post in the thread is visible.  Showing multiple prior posts would help with complicated conversations or requests for help.

  • There's only one client allowed so that shouldn't matter.  I assumed that it must be the fact that the calls are not waiting for stuff to go through before moving on, and that the client was missing some of the incoming data that way (the server was sending it as I tested, but teh client was not getting it) because it was not waiting for the server's info to all come in, but was instead busy trying to do its own data sending to the server.  <div>

    </div><div>I was able to fix the problem by having the client and server do their networking stuff one at a time, such that they wait for each other to be done with sending stuff stuff before sending their own information.  Since it's a turn-based game this works.  I didn't do this originally because the data sent back and forth was independent and I thought it would be faster to have both client and server send to each other at the same time, but apparently when sending a ton of data that way, it doesn't work.  Still haven't tested it with high latency (ran both server and client on same machine) but it seems all the data is getting transferred now.</div><div>

    </div><div>I think all of the networking features in my game are working now :)  Thanks again for the help and the amazing tutorial, I didn't think it would only take such a short time to get the multiplayer operational!</div>

  • Hmm, another question. I'm trying to do the following:

    For Each Units (Event)
    
    myserver.SendToAll({"action": "updateUnits", "Home": SOL.Units.Value('Home'), "Type": SOL.Units.Value('Type'), "AttackTarget": SOL.Units.Value('AttackTarget'), "MoveTarget": SOL.Units.Value('MoveTarget'), "HP": SOL.Units.Value('HP'), "Team": SOL.Units.Value('Team'), "SpecialsTarget": SOL.Units.Value('SpecialsTarget')})
    
    myserver.SendToAll({"action": "updateOrder", "Order": SOL.Units.Value('Order')})
    
    Trigger Once while True (event)
    
    myserver.SendToAll({"action": "processSync"})
    [/code:alye2eyf]
    
    If I comment out the two myserver.SendToAll() calls at the top (updateUnits and updateOrder) the third one works (processSync).  However, if they are all uncommented, processSync does not seem to go through.  It gets called, but the client on the other side does not receive it.  Is there a limit to what I can send ?  And how can I make sure that stuff gets there if I want to send a bunch of data?
  • That's kinda neat. I tried messing with it but I'm not sure it still does what I want, but maybe I don't get it.

    For example, let's say I want to set a color filter.

    I can do something like dir(System) to find that, then dir(System.SetFilter), but I stil don't get how to use SetFilter in python. E.g. what arguments does it take, and what syntax would you put them in, stuff like that (I do need to know how to do something like Sprite.SetFilter(Args) in python btw ) Seems like the default editor for scripting also fills in the commands on the bar on the right so I'm not sure exactly what that program is meant for.

  • Just in case this is useful to others, I was able to track down the problem with the help of scidave. Apparently trying to do connection.Send() over and over while the server is switching layouts causes the connection to close. The solution was to shut the client up while the server was changing layouts.

  • Here's some more information about how I'm switching layouts:

    1. I check if both client and server are ready (via connection.Send({"action": readyToggle"}) and myserver.SendToAll({action": readyToggle"}) ) Client and Host can both change their ready status by checking a box, and each of the readyToggle functions update global vars corresponding to that.

    2. The host checks if both ClientReady and HostReady are true (the globals mentioned above). If they are, it sets a global "starting" to 1.

    3. When 'starting' is 1, the Host does:

    myserver.SendToAll({"action": "ready"}), which just sets the Client's 'starting' to 1 as well

    then it does myserver.Pump() and System.GoToLayout("Layout1")

    4. At this point the Client's 'starting' is 1, which just calls a GoToLayout on the Client but without pumping any connections (so same as above except no myserver.Pump() or any other .Pump().

    5. Both Client and Server are able to get to the new Layout, at which point I get the error message I mentioned.

    6. In the new layout the first round of the game starts and both the host and the Client immediately call a readyToggle2 action which repeats every so often as it is checking to see if the Client and Host ready states (if they submitted their game orders, it's turn based game).

    7. These actions are followed by myserver.Pump() (the one causing the problems I think) and connection.Pump and myclient.Pump(), with the myclient.Pump in a try/except block

  • I did try a bunch of

    try:

    except:

    combinations with server and client. The issue is the myserver.Pump() command in the new layout to which I'm switching for sure. If I put that in a try/except block, the popup error goes away, though I still cannot communicate between server and client any more.

    The error message in particular is:

    Traceback (most recent call last):

    File "<string", line 1 in <module>

    File "PodSixNet\Server.pyc", line 39, in Pump

    File "asyncore.pyc", line 143, in poll

    File "asyncore.pyc", line 80, in read

    File "PodSixNet\Channel.pyc", line 52 in handle_error

    File "asyncore.pyc", line 470, in handle_error

    File "PodSixNet\Channel.pyc", line 59, in handle_close

    File "<string", line 28, in Close

    File "<string>", line 6769, in_getattr_

    File "<string>", line 6782, in _getitem_

    IndexError

    The function Network_disconnected under the client also runs when this happens, so I guess somehow the connection is being lost or cut.

    Also, is there no way to not even acknowledge incoming connections after I've gotten one player connected? I'm not sure it's ideal to have the server bother processing new incoming connections and sending error messages back. It'll work if that's the only way but I'd rather not even acknowledge any more connection attempts after a player has connected.

  • So I've been messing with this and have been able to get it working and to pass the data I want back and forth Thanks for the awesome tutorial.

    One thing I don't get is, how can I limit the number of connections? I don't actually know how this works, just how to manipulate it to change it to pass the data I want around, so I'm not sure how to turn off the listening for new connections without disconnecting everything.

    Right now the way it works is that the client and server are teh same cap, and a player chooses to either Host or Join (it's p2p). When one player joins, I want to stop listening for other players.

    Edit: I seem to be having another issue as well. When the server and client change layouts (since its p2p both of them do this at the same time) sometimes the connection drops. I can't tell when or how to reliably reproduce it but it seems to happen often enough and not sure what causes it. Any ideas on whta I could try?

  • Oh I see. Is that construct-specific? If so, is there a good Construct Python documentation available? I checked the wiki and there's not a whole lot there.