GildedFox's Forum Posts

  • 10 posts
  • Any effects out there that provide a simple drop shadow type effect? Not quite to the level of the newest beta version with dynamic shadows, something that basically just adds an offset, dark and semi-transparent version of the sprite/object. So basically what you'd get using a drop shadow filter in Photoshop and such:

  • You can convert the array to JSON format, which should then be able to be stored in WebStorage as a string without any problem.

    So for the value box of the WebStorage Set Local Value command, you'd just use "[YourArray].asJSON"

    Then when you start up your project you just tell [YourArray] to load up the JSON formatted string from your webstorage.

    So for the load action on [YourArray] you just put in: WebStorage.LocalValue([ChosenKeyName])

  • You already have code to test whether the player is wall clinging with your wallcling boolean, so you can tie in setting the "Wall Slide" animation to when "wallcling" is true.

    For the rest it's just simple checks of what the player is doing, basically what I have in the image attached. The checks may change depending on what other things you might want to include, depending on the game, but as far as just getting that group of animations to work this is all you need. Some of what I have might be redundant, but it works.

  • Yeah, it would be a case of the player dying. I thought the Ghost Shooter multiplayer demo just re-spawned you at a different position on death, so I wasn't sure how the Multiplayer object handled object destruction. I'm designing the game to be match based, so the players start in a chat lobby until the host starts the game. Once the player dies in the match, they still get to watch the match to its end, at which point I'll probably throw everyone back to the lobby to start a new match if they want.

    After playing with it, looks like hiding the player object is the only option unless there's a way to disassociate the object after it's been associated. I'll have to go through and add a check in a few events to disable all interactions with the "dead" player and cancel out inputs, collisions and bullet overlap checks (does disabling a Sprite's collisions disable overlap checks as well? Overlapping at Offset seemed like the easiest way to test for bullet collisions with lag compensation). Bit more work, but not too bad.

  • So what's the best way to destroy the object and still have the player be able to stay connected spectate the game until its end? Should I have the host send out a command to destroy it on the peer side? Or am I better of doing a fake destruction, making the object invisible and otherwise unable to be interacted with?

  • Looks like this behavior is even worse with input prediction turned on for the peer side, while input prediction makes things a bit more smooth for the peer it causes really bad rubber-banding when the object wraps.

  • So I have player objects being synced between peers in a multiplayer mode. Ideally the player objects would be destroyed at the same time for all peers, they were easily created at the same time and move around just fine, but as soon as an event on the host side calls for destruction of the object, it immediately destroys it on the host side as expected but has a 2 or 3 second delay on the peer side. Is there a better way to sync the destruction of objects? There are a few other things that will be created that I'd like to have synced on just when they're created and destroyed, like bullets, but with that destruction delay it doesn't really work.

    Edit: I should note that these are peer-associated objects. It actually has no problem destroying them immediately when the peer disconnects (which was unexpected behavior for me, but it works out alright). I don't know if that has some effect on the destruction speed.

  • In trying out the new multiplayer functionality I have a few car and bullet type objects that have the wrap behavior. Their movements are followed fine with the multiplayer syncing, but whenever one of the objects wraps around the screen, all of the clients will get a frame or two of the object flying across the screen to where it wrapped to.

    What's the best way to handle a wrapping object for multiplayer? Is there a way to disable interpolation for syncing the position of an object, ideally for only while it's wrapping?

  • Unchecking minify scripts does the trick. Nice that there's at least a work around so I can get to testing, for now. Thanks!

    I'll add that unchecking the minify script also lets it work in Firefox.

  • Try Construct 3

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

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

    After exporting any game with Multiplayer implemented in the project the game will load up with a black screen when reaching in the browser, with only button and textbox objects showing through and music playing. This only occurs with exported versions of the game, the preview version run directly from Construct 2 works normally.

    The following errors are shown in the console in Chrome when running the unchanged, exported form of the Real-Time Multiplayer example:

     Uncaught ReferenceError: cr is not defined 		c2mp.js:811
    C2Multiplayer.doPings 					c2mp.js:811
    (anonymous function) 					c2mp.js:148[/code:se62z37r]
    
    The following error also occurs in Chrome, though less frequently (the errors are cycling down):
    [code:se62z37r] Uncaught ReferenceError: cr is not defined 		c2mp.js:1314
    C2Multiplayer.getHostInputArrivalTime 			c2mp.js:1314
    h.ss 							c2runtime.js:275
    h.Qb 							c2runtime.js:272
    k.Ar 							c2runtime.js:101
    k.Qb 							c2runtime.js:98
    k.setSuspended 						c2runtime.js:84
    window.cr_setSuspended 					c2runtime.js:138
    onVisibilityChanged					index.html:107
    [Construct 2] Suspending [/code:se62z37r]
    
    Also gives more when trying to run the project from a Node.Webkit export:
    [code:se62z37r]Uncaught node.js Error 
    
    ReferenceError: cr is not defined
        at C2Multiplayer.getHostInputArrivalTime (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2mp.js:1314:11)
        at h.ss (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:275:93)
        at h.Qb (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:272:342)
        at k.Ar (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:101:95)
        at k.Qb (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:98:46)
        at k.Wq (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:95:194)
        at k.go (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:92:201)
        at eval (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:93:524)[/code:se62z37r]
        
    [b]Capx[/b]
    Happens with real-time multiplayer example provided with r164.
    
    [b]Steps to Reproduce Bug[/b]
    [ul]
        [li] Step 1: Export project with multiplayer functions built in to HTML5 or Node.Webkit
        [/li][li] Step 2: Upload and run the game (or run directly for Node.Webkit)[/li][/ul]
        
    [b]Observed Result[/b]
    The game area will be black, with the exception of button and text box objects if there were any on the layout. Music will still play, and some sounds will play.
        
    [b]Expected Result[/b]
    The game to load and play how it does in the preview from Construct 2.
        
    [b]Affected Browsers[/b]
    [ul]
        [li] Chrome: YES
        [/li][li] FireFox: YES
        [/li][li] Internet Explorer: NO (Multiplayer not supported)[/li][/ul]
        
    [b]Operating System and Service Pack[/b]
    Windows 8.1 64-bit
        
    [b]Construct 2 Version ID[/b]
    r164 64-bit
  • 10 posts