R0J0hound's Forum Posts

  • You can make a layer a layer not rotate with the layout from the layer's properties. Off the top of my head it's done by setting the parallax to 0,0.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To be clear it is possible without third party plugins if no fullscreen scaling is used. Also it may be possible to do by fiddling with some css of the canvas and such, but i didn't spend much time exploring that idea.

  • The catch is with any fullscreen scaling the image will still be the size of the screen.

    If you use the paster or canvas object you can do this instead:

    https://www.dropbox.com/s/mdb3cy5pwt7eb ... .capx?dl=0

    1. A snapshot is done

    2. The image is loaded into a Sprite that covers the view.

    3. That Sprite is pasted to a paster object that is positioned to the spot you want and with the image resolution you want.

    4. The paster.imgUrl expression will give a base64 URL just like the canvassnapshot expression to save the result.

  • Using families is a way to pick separate instances at the same time. It's pretty much the only way to connect two instances of the same object with a joint.

  • What does userfolder & testfolder evaluate to? Does userfolder end with a slash?

  • 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.

  • 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)