Johncw87's Recent Forum Activity

  • There is no obvious way to fix this problem, because we have to tick the behaviors in some order. Any changes we make would just move the problem somewhere else. If we sort by the object name and tick in that order, then renaming objects can change the tick order. If we tick in the order objects were created in the editor, then deleting and recreating an object can change the tick order. There's no gold standard tick order that is the "correct" one. I am also against letting the user customise the tick order; micro-managing such obscure parts of the engine is the exact opposite of the design principles that has made Construct successful.

    Sure there is. In the Quake engine derived games, moving brushes used a special movement called MOVETYPE_PUSH. MOVETYPE_PUSH entities were responsible for pushing other entities if they were in the way, as well as moving entities that were resting on top of them. Adopting this to Construct 2 would require a few changes (such as being able to specify which objects can be "pushed"), but If you did this, and added a recursive check to it, developers would get the result they want, and the tick order wouldn't matter at all.

  • If I request the files in private (incognito) mode, I still get the 403 forbidden errors. If I use a proxy, I can receive them just fine. I guess the arcade hates my IP address now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I found that a game that I uploaded also wasn't working anymore. Same 403 Forbidden errors on the images. I tried re-exporting and updating the game, but that just seemed to make it worse, as now the data.js file is getting the 403 Forbidden error.

    Also, the server spits this out if I try to view the game iframe:

    [InvalidOperationException: Sequence contains more than one element]   System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) +4506
       System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) +188
       System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) +500
       System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute(Expression expression) +50
       System.Linq.Queryable.SingleOrDefault(IQueryable`1 source, Expression`1 predicate) +490
       V1.Game.IncrementPlaysCount(String playToken) +2946
       Index.ProcessRequest(HttpContext context) +639
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
    [/code:1ndb1i39]
    
    @Tom, could you look into this?
    
    EDIT: I suppose I should actually link my game.
    
    [url=https://www.scirra.com/arcade/action-games/super-mario-bros-world-1-3750]https://www.scirra.com/arcade/action-ga ... rld-1-3750[/url]
  • A very interesting find! Well done!

    If you were to use a sprite as an effect to be randomly placed over certain areas of an image, but random enough for the player to appreciate the effect without it being too repetitive, then you may need that many image points. Names would be fine except when there are so many image points and since I wasn't going to use the points for anything else and may use them again with other similar image frames where you would need to rename them again, I decided not to waste time in naming them all.

    Not sure what kind of effect you are going for, but wouldn't it make more sense to use something like this?

    X = random(Sprite.BBoxLeft, Sprite.BBoxRight)

    Y = random(Sprite.BBoxTop, Sprite.BBoxBottom)

    Or, if you wanted a bit more control on the spacing, you can abuse integer math to align them to a "grid"

    X = floor(random(Sprite.Width) / 4) * 4 + Sprite.BBoxLeft

    Y = floor(random(Sprite.Height) / 4) * 4 + Sprite.BBoxTop

  • > Touch.Alpha gives the compass bearing, so you're using the wrong value here.

    >

    Oh, sorry... Thought that would be the right one to use...

    So, what expression would I need to use? I also tried Beta and Gama, but neither of them worked.

    Well, do you want just gravity, or do you want all acceleration?

    With acceleration:

    X = -Touch.AccelerationXWithG

    Y = Touch.AccelerationYWithG

    Just gravity:

    X = -(Touch.AccelerationXWithG - Touch.AccelerationX)

    Y = Touch.AccelerationYWithG - Touch.AccelerationY

    Then:

    Angle = angle(0, 0, X, Y)

  • This issue appears to be related to the names of the image points. If I rename them all, I can continue to add more. I renamed each one to "Imagepoint ##" where ## is consistent with the imagepoint index.

    I can't fathom why you would need that many image points, but regardless of how many you use, you really should give them meaningful names.

  • And here's why.

    data.js object definitions from unmodified example:

    [
    		["Player", 1, false, [], 1, 0, null, [["Default", 5, false, 1, 0, false, 754574662893683, [["player-default-000.png", 825, 0, 0, 0, 0, 1, 0.5, 0.5, [], [], 0]]]], [["Platform", 2, 684013238865744]], false, false, 461099846823012, [], null],
    		["Sprite", 1, false, [], 2, 0, null, [["Default", 5, false, 1, 0, false, 639043081041614, [["sprite-default-000.png", 825, 0, 0, 0, 0, 1, 0.5, 0.5, [], [], 0]]]], [["Solid", 3, 227558398387300], ["Sine", 4, 717431858105516]], false, false, 251897685913489, [], null],
    		["Sprite2", 1, false, [], 2, 0, null, [["Default", 5, false, 1, 0, false, 961475536146256, [["sprite2-default-000.png", 825, 0, 0, 0, 0, 1, 0.5, 0.5, [], [], 0]]]], [["Platform", 2, 399711601778041], ["Solid", 3, 383344487100023]], false, false, 619511337493328, [], null],
    		["Text", 0, false, [], 0, 0, null, null, [], false, false, 599919735085155, [], null]
    	]
    [/code:3mxbgrbl]
    
    data.js object definitions after moving the Player object out of the subfolder:
    
    [code:3mxbgrbl]
    [
    			["Sprite", 1, false, [], 2, 0, null, [["Default", 5, false, 1, 0, false, 639043081041614, [["sprite-default-000.png", 825, 0, 0, 0, 0, 1, 0.5, 0.5, [], [], 0]]]], [["Solid", 2, 227558398387300], ["Sine", 3, 717431858105516]], false, false, 251897685913489, [], null],
    			["Sprite2", 1, false, [], 2, 0, null, [["Default", 5, false, 1, 0, false, 961475536146256, [["sprite2-default-000.png", 825, 0, 0, 0, 0, 1, 0.5, 0.5, [], [], 0]]]], [["Platform", 4, 399711601778041], ["Solid", 2, 383344487100023]], false, false, 619511337493328, [], null],
    			["Text", 0, false, [], 0, 0, null, null, [], false, false, 599919735085155, [], null],
    			["Player", 1, false, [], 1, 0, null, [["Default", 5, false, 1, 0, false, 754574662893683, [["player-default-000.png", 825, 0, 0, 0, 0, 1, 0.5, 0.5, [], [], 0]]]], [["Platform", 4, 684013238865744]], false, false, 461099846823012, [], null]
    		]
    [/code:3mxbgrbl]
    
    In case you haven't noticed, the order these are stored in matches the order in the XML 1:1. The ID numbers used in the runtime are the indices into this array. The object names only exist unmodified in preview. In exported projects, they are replaced with t0, t1, t2, etc.
    
    Care to tell me I'm wrong now?
  • Changing the subfolder an object is in does not change the order in which they're stored in the XML file, or it's ID. You can look at the XML files to see this.

    Example project posted in this thread without modification:

    <object-folder>
      <object-folder name="New folder">
        <object-type name="Player" sid="461099846823012">
          <plugin id="Sprite" />
          <behaviors>
            <behavior-type name="Platform" sid="684013238865744">
              <behavior id="Platform" />
            </behavior-type>
          </behaviors>
          <animation-folder>
            <animation framecount="1" loop="0" name="Default" pingpong="0" repeatcount="1" repeatto="0" sid="754574662893683" speed="5">
              <frame duration="1" hotspotX="0.5" hotspotY="0.5" />
            </animation>
          </animation-folder>
        </object-type>
      </object-folder>
      <object-type name="Sprite" sid="251897685913489">
        <plugin id="Sprite" />
        <behaviors>
          <behavior-type name="Solid" sid="227558398387300">
            <behavior id="solid" />
          </behavior-type>
          <behavior-type name="Sine" sid="717431858105516">
            <behavior id="Sin" />
          </behavior-type>
        </behaviors>
        <animation-folder>
          <animation framecount="1" loop="0" name="Default" pingpong="0" repeatcount="1" repeatto="0" sid="639043081041614" speed="5">
            <frame duration="1" hotspotX="0.5" hotspotY="0.5" />
          </animation>
        </animation-folder>
      </object-type>
      <object-type name="Sprite2" sid="619511337493328">
        <plugin id="Sprite" />
        <behaviors>
          <behavior-type name="Platform" sid="399711601778041">
            <behavior id="Platform" />
          </behavior-type>
          <behavior-type name="Solid" sid="383344487100023">
            <behavior id="solid" />
          </behavior-type>
        </behaviors>
        <animation-folder>
          <animation framecount="1" loop="0" name="Default" pingpong="0" repeatcount="1" repeatto="0" sid="961475536146256" speed="5">
            <frame duration="1" hotspotX="0.5" hotspotY="0.5" />
          </animation>
        </animation-folder>
      </object-type>
      <object-type name="Text" sid="599919735085155">
        <plugin id="Text" />
      </object-type>
    </object-folder>
    [/code:2vqbv2n9]
    
    After moving player object out of subfolder:
    
    [code:2vqbv2n9]
    <object-folder>
      <object-folder name="New folder" />
      <object-type name="Sprite" sid="251897685913489">
        <plugin id="Sprite" />
        <behaviors>
          <behavior-type name="Solid" sid="227558398387300">
            <behavior id="solid" />
          </behavior-type>
          <behavior-type name="Sine" sid="717431858105516">
            <behavior id="Sin" />
          </behavior-type>
        </behaviors>
        <animation-folder>
          <animation framecount="1" loop="0" name="Default" pingpong="0" repeatcount="1" repeatto="0" sid="639043081041614" speed="5">
            <frame duration="1" hotspotX="0.5" hotspotY="0.5" />
          </animation>
        </animation-folder>
      </object-type>
      <object-type name="Sprite2" sid="619511337493328">
        <plugin id="Sprite" />
        <behaviors>
          <behavior-type name="Platform" sid="399711601778041">
            <behavior id="Platform" />
          </behavior-type>
          <behavior-type name="Solid" sid="383344487100023">
            <behavior id="solid" />
          </behavior-type>
        </behaviors>
        <animation-folder>
          <animation framecount="1" loop="0" name="Default" pingpong="0" repeatcount="1" repeatto="0" sid="961475536146256" speed="5">
            <frame duration="1" hotspotX="0.5" hotspotY="0.5" />
          </animation>
        </animation-folder>
      </object-type>
      <object-type name="Text" sid="599919735085155">
        <plugin id="Text" />
      </object-type>
      <object-type name="Player" sid="461099846823012">
        <plugin id="Sprite" />
        <behaviors>
          <behavior-type name="Platform" sid="684013238865744">
            <behavior id="Platform" />
          </behavior-type>
        </behaviors>
        <animation-folder>
          <animation framecount="1" loop="0" name="Default" pingpong="0" repeatcount="1" repeatto="0" sid="754574662893683" speed="5">
            <frame duration="1" hotspotX="0.5" hotspotY="0.5" />
          </animation>
        </animation-folder>
      </object-type>
    </object-folder>
    [/code:2vqbv2n9]
    
    Clearly, the player object has moved, and as such, the order has changed.
    
    
    

    As for "presumably" - yeah. No. Presumptions don't help solve the issue. Especially when they're not accurate.

    You reeeaaally don't want to go there.

  • >

    > > *quote snip*

    > >

    > > I didn't mean "behaviors" in the sense of C2 Behaviors. I meant functionality (through events) shouldn't be affected by what folder something is in. Poor word choice on my part.

    > >

    >

    > The events are only being indirectly affected. The functionality change isn't related to the events at all. You get different results because the behaviors (both platforms and the sine) evaluate in a different order. This causes the positions of the objects to be different than they otherwise would when the event sheet is evaluated, which then changes the result of the conditions. You can see this when the player 'lags' behind the other sprites. The platform behavior attempted to solve this problem by doing its move logic in 'posttick' while other behaviors use 'tick', but all this really did was move the problem, which is made clear when you have a platform object stand on another platform object.

    >

    > There are ways that this could be changed so that you don't have to think about the tick order of behaviors, but I wouldn't expect to see them in Construct 2, what with Construct 3 being the primary development focus now.

    >

    C2 doesn't export objects in folders, it's all in xml files, where they're stored in the order they've been created, regardless of the "folder" they're tracked in through the IDE.

    Dude, I know that. I regularly edit the xml myself when I want to change something in a way that the editor won't allow (like moving a member variable between an object and a family).

    To clarify on what Construct 2 does on export, it goes through the xml tree and assigns ID values to the object definitions. Presumably, it assigns them sequentially in the order that it finds them, and this order can be changed by moving objects into subfolders (<object-folder> elements in the xml). These ID numbers are how construct 2 refers to object definitions at runtime, and they can affect the order that behaviors are ticked.

    This is also why you can't create objects by name, as the names you assign in the editor don't exist anymore at runtime.

  • It's almost impossible to do anything about bugs that I can't reproduce. Step 1 is to reproduce the problem, so I'm still stuck on step 1.

    I'm with you on that, but the usual methods of achieving that step don't seem to be working. Perhaps we need to think outside the box.

    I'll try to keep this little story brief. Back in the days of Windows XP, there was a crash bug that afflicted

    many users in every game, and for a significant period of time, no developer knew why. EA would just tell you that "you didn't meet the minimum requirements", even though their own utility said the opposite. Then, Valve stepped up and said, "ok, someone send us a computer that can reproduce the crash". Someone did, and then Valve found the cause. Users were running out of paged pool memory, as windows wasn't allocating enough for some arbitrary reason. The problem was worked around with a registry tweak that forced windows to allocate more, and the problem was fixed for good in Windows Vista.

    That being said, I don't think the cause of this Construct 2 bug is so obscure as to require shipping a computer to you. So, lets try some other options first.

    I am able to reproduce the bug in a virtual machine, so perhaps I can let you remote in to it, and you can do as you will with it?

    I could probably reproduce it on a virtual machine provided by you. I have yet to find a computer that I can't reproduce this on.

    Perhaps I could send you a virtual machine with a save state?

    If you have better suggestions, I'm all ears.

  • I tried to do some more digging into this, and found something I thought was interesting. Construct 2 appears to have some utility used on it to provide anti-debugging features. This begs the question: When Ashley tested wertandrew 's capx, did he use the same executable that is distributed on the website, or did he use a version of it before the anti-debugging utility was applied? I ask because a bug that only shows up in the 64bit version could easily be the result of this anti-debugging utility doing something wrong.

    Ashley, could you at the very least respond to let me know that you have read anything in this thread beyond the first page? I'm getting the feeling that you haven't checked back on this thread since last year.

  • *quote snip*

    I didn't mean "behaviors" in the sense of C2 Behaviors. I meant functionality (through events) shouldn't be affected by what folder something is in. Poor word choice on my part.

    The events are only being indirectly affected. The functionality change isn't related to the events at all. You get different results because the behaviors (both platforms and the sine) evaluate in a different order. This causes the positions of the objects to be different than they otherwise would when the event sheet is evaluated, which then changes the result of the conditions. You can see this when the player 'lags' behind the other sprites. The platform behavior attempted to solve this problem by doing its move logic in 'posttick' while other behaviors use 'tick', but all this really did was move the problem, which is made clear when you have a platform object stand on another platform object.

    There are ways that this could be changed so that you don't have to think about the tick order of behaviors, but I wouldn't expect to see them in Construct 2, what with Construct 3 being the primary development focus now.

Johncw87's avatar

Johncw87

Member since 21 Feb, 2014

Twitter
Johncw87 has 13 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

18/44
How to earn trophies