Yann's Forum Posts

  • lwgames

    If it's just for you to read it, you can simply copy paste it in some tools like

    jsonlint.com

    You can also, if I remember correctly, check your data in the debugger and it should be prettified

    Otherwise, as far as I remember, I haven't put any prettifying feature in the json output.

  • derikvlog Nope, I don't use C3

  • Yeah, the new forum thingy borked some bbcode tags. The link was in the first post but hard to find

    Here it is polygon.zip

  • The tab group feature is borken when you put lists inside

    • Borken
      • Each
      • Word
      • Should
      • Be
      • Displayed
      • Vertically
    • Werk around
      • just
      • put
      • dashes
      • manually

    Dunno if we are supposed to report forum bugs here though.

  • Nandynho

    Well, yeah NW.js doesn't have the same limitations as chrome or firefox, so CORS headers aren't required. It works with either JSON++ or my plugin (:

  • from https://api.ipdata.co/

    it works

    now using http://tester.marmisdev.win/result.json

    you can easily see that you don't send the proper cors header, and that's what construct is complaining about

  • I can't access http://assets.marmisdev.win/result.json so I can't be sure but if I had to guess, you might not have sent proper headers from your server.

    in php you could try that (before any output)

     header("Access-Control-Allow-Origin: *");[/code:2mmfn43p]
  • Demkamen

    curious, I provided the "Set Origin" action to be able to change the center of the polygon (like a pivot point), most people would never use it though. What it does is just offsetting the position of the vertices and compensating by setting x and y of the object so the polygon doesn't seem to move. So it shouldn't change anything in regard to the chipmunk behaviour.

    Or maybe I misunderstand what you mean by "to add origin point", if you mean that you have to setup the vertices, then yes, since the physics engine need the polygon to work.

    As far as managing points for big levels, well... C2 doesn't have any SDK to design any kind of advanced editor,... well, any kind of editor really, I remember being desesperate about the look of the plugin in the editor, I mean... I couldn't find any good way to display it. It would have been nice to at least be able to leverage the collision polygon tool of the image editor, but alas...

    I guess I could have put a property in the property editor where you could have listed vertices... But it seemed at the time, and still today, kind of useless...

    What I would advise is to look for some tool (or maybe even make one in C2) where you can create polygons and export a json, and then load it and rebuild the polygon by looping through the points defined in the json...

    (hm... I just realized that there's two AsJSON expression... just try one that work :D... not sure I'll ever really update that plugin... if I do, one day, I might actually implement what I mentionned earlier, the property with the list of vertices... but meh... )

  • Demkamen

    Sorry, I've never used chipmunk physics, I have no idea how it works or how you have to setup your polygon for it to work properly.

    I'd say if it's working with Box2D, it's probably not coming from an issue with the polygon plugin. Also "moment of inertia" doesn't look like something to do with shapes, but motion. Just thinking out "loud" here, but yeah, I'm a bit too lazy to download the behavior, fire up c2 and running test, sorry (:

  • irina

    there

    if you are curious about the 0 in JSON.Value(0,"latitude") it means "from the root" of the object, as opposed to 1 which would mean "from current path" (used for loops and recursion)

  • zenox98

    4 years of dev, this plugins is AAA :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just released a tiny new version with some minor bug fixes.

    More details on the first post or github (:

    JSON v1.2.2

    And I just noticed this plugin is still in the "Work in Progress Addons" section...

    I think it's stable enough to be promoted to the "Completed Addons" section.

    What d'ya think?

  • yeah you're right, but at that time, in 2012, C2 didn't have bidirectional for loops, so the inner for loop was automagically skipped in the last iteration of the outer one, like in the wikipedia algorithm.

    But because for loops are now bidirectional, since I don't know when, it does a for "i" from 10 to 9 instead of just skipping.

    Good catch, I'll try to reupload a correction soon.

  • I edited the link, but don't expect something that helpful, it's just a basic example of text loading and displaying