Magistross's Recent Forum Activity

  • Magistross agreed. Even though! The "floor" doesn't need any distortion. Only vertical sprites do (walls, people etc). And even then it's a distortion that can just happen using code at Start of Layout: all family_vertical_sprites rotate -45 degrees and scale vertical 200%. And then you forget about it

    Quite true, I forgot you could let Construct pre-transform your sprites for you, so the 2D to ISO viewport actually revert them back to their original appearence. Pretty clever indeed !

  • Yes, it's moving in 2D, like everything else. But with the transformation, if I say "Set Y to Y + 32", it will look like it shifted 24 pixels left and 12 pixels down, thus mimicking the iso movement.

    What will be hell is not positionning and movement, it will be having pre-distorted sprites and backgrounds.

  • I still don't see what's wrong. The transformation is purely visual, if I move a blocker it'll still continue to block as it did.

  • Movement happens in a normal 2D plane, it's that same plane that get transformed so movement skewing is already taken care of. Blocker squares is simply a quick way to add collisions in a proof of concept example. I fail to see how christina's idea is not a good one...

  • My javascript hack is intended to work with the text object only. The plugin you used certainly don't have the same implementation, and the script will simply crash.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't open the capx because I don't have the multiline box plugin.

  • Mostly the lineheight. After a few quick tests it looked like setting line-height to the font size + 3pt was a correct estimation. But it might not hold true for all sizes and font-family. Also, if the wrapping in the div did not occur exactly the same as in the canvas rendering, everything's going to be off.

    edit: After a few more hacking around, I noticed that upon rendering, text instances have a javascript property called "lines" that get filled with an array of objects representing the wrapped lines. I used this array to create the div instead of the text property and it seems to work better as it creates a consistent wrapping. The only drawback is that the text object has to be rendered at least once before you can use the lines array.

    Try redownloading the file to see for yourself.

  • Here's my attempt. Not perfect but I guess it's a start !

  • It's a stretch, but maybe you could use javascript to create an offscreen div, set its size/font corresponding to your text object, and THEN use the method I described. I think I might try it... I'm curious !

  • At least one instance of an object must exist. What I usually do is create an empty eventless layout and put all my dynamic objects in it.

  • You won't have the choice to NOT have a hacky solution !

    You could use javascript to wrap your letter in span element, then retrieve its relative position with jQuery. However, if you insert a sprite over your text, it won't shift it at all, you'll have to do it yourself if that's a behavior you wish your text to have.

    edit: Just noticed the text object is actually rendered in the canvas and isn't an html element... this will complicate things a bit...

  • Are you talking about an actual editable textbox or a simple text object ?

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies