R0J0hound's Recent Forum Activity

  • Odin

    I had a quick look at your capx but I don't have time to figure out what's different from the other example I made. Sorry I can't be more help.

  • Of the 134mb most of it is the chromium web browser. If anything I imagine it will only get bigger with newer updates.

    Last I looked it's not trivial to build it from the source code to tinker with ways it can be reduced. I'm not sure it'd be worth scirra's time to cut features from it because someone would miss it, not to mention that from update to update the way to remove a feature may change. What we have is an html5 game enigine that allows any browser feature to be used, so nothing short of a full browser will support it all.

    It could be possible to make a smaller runtime with a graphics library and a small JavaScript enigine and then reinventing the wheel for any other feature needed. There is probably no interest in doing this officially. Unofficially it could be done but the issue of someone to make it and support it is a problem, as well as that could be considered curcumventing the personal licience exe export.

  • blackhornet

    That's cool. I haven't looked at how you did it but I'm glad you were able to make sense of the code to modify it. Especially since working on plugins haven't been an interest to me for a while now.

  • You have to load the image into a Sprite and then paste it into paster.

    • Post link icon

    Look at page 60.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, that's all correct.

    Cpu speed and graphics card speed a probably the first two factors. Then again you can look at two different CPUs with the same speed and one will perform better. Same with graphics cards.

  • You forgot the parenthesis.

    (A.x+b.x)/2

  • Sorry I can't verify this but maybe try:

    "Item"&str(StartArray.At(ItemId))

    str() converts a number to text differently than just using & as I recall. The reason was str(), which uses the js method to convert a number to text would often show long decimals like: 0.0999999999. So the default behavior with & would cause it to be prettier like 0.1. Anyways that's my rough reasoning.

  • Yeah, only the first value is used for sorting.

  • The distance() expression only gives you the distance between two points. To get the closest distance between a point and a shape it will be more involved. Take the example of a square shape, you'll need to get the distance from all the corners and all the edges and pick the lowest value.

    Basically you'd setup the imagepoints on your object like this:

    0---1
    |   |
    3---2[/code:p47hmjbr]
    Where 0 is the origin.
    Then to calculate the distances you'd use the distance() expression to get the distance to a point, and for the distance to a line you'd use a vector dot product to see if the the projected point is on the line, then a vector cross product is used to get the distance.
    
    Example here:
    [url=https://dl.dropboxusercontent.com/u/5426011/examples34/closest_dist.capx]https://dl.dropboxusercontent.com/u/542 ... _dist.capx[/url]
    
    Now if that is too much math you can go for an approximate solution:  Put a lot of instances all around the shape you want to get the closest distance to.  It should look like dots going around the object's edge, the closer together the better.  Then you can then do an event like this:
    
    dotSprite: pick closest to  (mouse.x, mouse.y)
    --- set text to distance(dotSprite.x, dotSprite.y, mouse.x, mouse.y)
  • You can either duplicate the play sound action to every place you set the text:

    every 1 second

    --- set text

    --- play sound

    or you could make a function to set the text and only use that:

    every 1 second

    --- function call "set text" ("foo")

    on function "set text"

    --- set text to function.param(0)

    --- play sound

  • It's from the origin of the object that is usually centered in the image editor. You could always add an imagepoint and use Sprite.imagepointx(1) instead of sprite.x.