tomsstudio's Forum Posts

  • This biggest problem i can see is making sure your server remains the 'host'.

    If it somehow gets disconnected from the signalling server, then one the players trying to connect to the game will become host, and you will have trouble getting back the 'host' position. You could try and have a condition that if player is host when connected, then disconnect from signalling and put a 5 second waiting period. The problem with this however if a lot of people are trying to connect, you will have a hard time connecting and becoming the host again.

    My way around this:

    I run windows server 2012 R2.

    I have a my own copy and license of the signalling server running locally so if the server somehow crashes, it automatically detects it and runs a .bat file shutting down the physical server.

    When i re-launch the server, i make sure the internet connection is disabled first, making sure all the game 'servers' are running, then i open up to the internet, allowing all the players to connect.

    On the actual set up, again i run windows server 2012 R2.

    All my game 'servers' are running via minimized nodewebkit, so very few resources are used. *though when changing something via graphical environment will kill any framerates unless the server has a dedicated GPU. So make you make any changes before you open the game up to the internet.

    I use a modified version of the multiplayer plugin which allows the use of multiple multiplayer objects, allowing the creation of dedicated chat servers and various game instances, all whilst communicating to each other. (very handy)

    Another thing you should note, if you start creating the server and the client separately, any objects that require syncing will not sync at all. This is because (even though you may have copy and pasted the object over), the object will be using different iid's. To fix this you need to go into the save file of each one, and change the iid of the object to that of the servers version, or the other way around.

    I hope some of this answers your questions,

    Best Regards,

    Tom

  • My little strategy game i'm working on

    (c) CopyRight 2014 Tom Healy

  • 10 seconds is a long time.

    I cant really think of a real world scenario(maybe a flatmate torrenting), that would cause a 10 second latency.

    I live in Aus and it only takes 150-250 ms to send and receive messages from my server in the US.

    The longest i have seen is 1500ms from my dads satellite connection.

    Maybe when Ashley was building the multiplayer plugin he didn't consider anything over 5 seconds?

    On an afterthought its probably not anything to do with the messages, rather the host kicking the peer after a few seconds of dodgy connection.

    Best Regards,

    Tom

  • I'm getting 60 fps, no problems here

  • I have noticed this to.

    I 'think' its when your using an event sheet which is included by lots of layouts, i'm guessing the layouts have to be stored in memory or something.

    My work around with this is to take parts of the code from the main event sheet, and spread them into separate events sheets, and include them in the main event sheet.

    So you only have to worry about lag when you want to include a new event sheet.

    Best wishes,

    Tom

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley

    But since i have the downscaling set to 'high quality', shouldn't the last frame be the same as all the others?

    You say setting it to high quality would fix this case, but its just the same as before. What setting do i need to adjust so the last frame appears smooth like the others?

    Regards,

    Tom

  • Problem Description

    High resolution sprites with a uneven number of frames on export are having their last frame skipped in the "spritesheeting phase".

    https://dl.dropboxusercontent.com/u/57190534/renderingtest/index.html

    Attach a Capx

    https://dl.dropboxusercontent.com/u/571 ... gtest.capx

    Description of Capx

    Too see the result you will need to export.

    The capx contains 2 of the same sprite, one with an even number of frames, and one without.

    I just added an extra frame to the second sprite with a blue dot.

    Steps to Reproduce Bug

      Export to nodewebkit or html 5 Speeds are set to 1 frame per second, so be patient. Observe on the last frame of the first sprite the jagged appearance.

    Observed Result

    If you unpack the package data in the nodewebkit export, you will see construct 2 will correctly sprite sheet the first 4 frames of the first sprite, but not the last. You always see the second sprite sheet with 6 frames has been sprite-sheeted correctly.

    Expected Result

    I expect the all frames are treated the same.

    https://dl.dropboxusercontent.com/u/57190534/renderingtest/index.html

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES) NA

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    Construct 183, also tested on 182, 181, and 180.

  • I have an event set to destroy an object on the layout if not the host.

    My problem is, the game never thinks I am the host.

    I dont know if others have had this issue before or not. but I am stuck here.

    As the code is, the player gets destroyed when this should not be happening.

    You are calling the multiplayer.host check before multiplayer can connect.

    So even before it can join the room, its realising its not the host because its not connected, so it destroys the player.

    You need to have,

    on.multiplayer.joined.room

    is host : Associate player with multiplayer.peerid

    Else

    <invert>is host</invert> player.destroy

    Hope this helps,

    Tom

  • One way you could do this is run through all the animations on start of layout and save the animation name for each frame to an array.

    Everything can be done with a little event work.

  • You need to set both player and enemies default controls to "no", this is done while making the game.

    To move the player around,

    if keyhit.key(rightarrow) player.simulate.moving right ,, etc etc

  • This is not a bug.

    The layer background is blue when you save the game using savestate.

    You can change the background color in the project but once you load the it up again, the game loads the previous state you had saved on start.of.layout

    The save state had a blue color background, so what you see is correct.

    You will have to either override the saved state on the start of the layout, or change the background color in game with set.layer.backgroundcolor and then save it.

  • This is not a bug, you need to add the file name to where to you are copying to.

    So nodewebkit.copy( nodewebkit.appfolder & "package.nw") to nodewebkit.appfolder & "copy\package.nw"

  • Hey, any chance of uploading the streams to youtube?

  • I'm trying to set a list and another text box from a dictionary by using the st from json action with the expression dictionary.asjson but none of them seems to respond

    The way your using .asjson wont work.

    When you try and load a text box with .asjson, the text box is looking for the text box format json. As you are trying to load a 'dictionary json format", the text box will not recognize it.

    If you want to insert raw dictionary data, then go textbox.settext > "" & dictionary.asjson.

    If you want to get sequential values from the dictionary, then i highly suggest using an array.

    But it can be done with dictionary.

    One way is to use numbered keys, i.e. key: "0"="bob" key: "1" = "sam" etc etc.

    Now we create a for loop.

    For i = 0 to 9

    Textbox.appendtext "" & dictionary.get(system.loopindex("i") & "") & newline // Here we convert the numbered loopindex into a string so we can address the dictionary key to get the data.

    I hope this helps.