Mode 7 Plugin

0 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • How is going with this development of mode 7?

  • I been waiting for this as well. 8| Perhaps Pode could take it up. ;D

  • I would like to see mode7 on c2 in action. How's the devlopemnt?

  • All : there's a few way available to do a Mode7 plugin. However, I can see a few roadblocks.

    The solutions and their problems :

    • skewing the image via Javascript (a perspective transform) : I have some code doing that already. But it's slow, and even slower on mobile and low en desktop. Another point : Chrome isn't antialisaing the <canvas>, Firefox is doing it. That means that when I triangulate a quad to deform it, the seam between two triangle is perfect on Chrome, but leaks some black pixel on Firefox (because of the anti-aliasing).
    • CSS transform : easy to do. The problem : you can't draw on a <canvas> (which is what C2 is using in the end) a DOM element while retaining the various CSS transforms and filters applied to it. If I keep it as a DOM, overlayed over the game (like the Button Object used in C2), I can't respect layers order, the Sprite is always going to float above everything else.
    • WebGL transform : easy and fast. Works only on system with good WebGL support (no iOS and Android). However I pokked around C2's structure, and I have no way to grab the WebGL canvas as a texture. Perhaps

      Ashley can provide me a hint here ?

    • SVG transform : it's a perspective transform, and luckily it's available on desktop, and mobile (at least it works good on iOs, a little more slower on Android). The problem is the same as the one with my SVGCanvas plugin : I can decide to draw the SVG on the <canvas>. Firefox allows it without a problem. On Webkit, there's a browser-wide bug that says the <canvas> is "tainted" when drawing SVG on it, preventing the reuse of the canvas after that (to simplify).

    If I don't draw the SVG inside the <canvas>, it works everywhere, but the SVG layer is going to float above everything else, like a CSS transform, and doesn't respect the layers' order.

    If you don't want to use plugins (Unity, Flash, Java), there are no other way to do a Mode7, apart from pre-skewing your Sprite in your favorite image editor.

    (You can always do it the old way, with hundred of canvases, each one a little smaller than the previous one, to have a skew effect, but it's not good performance-wise...)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pode, I would gladly take the webgl version over the rest! It's far better than having nothing at all. Personally I use nothing but webgl fx in my game. No real interest of making it portable. That being said I'm sure most people would like to have it work on iOS and droid.

    I'll take anything over nothing though!

    Thanks for letting us know the ups and downs of bringing it in!

  • - WebGL transform : easy and fast. Works only on system with good WebGL support (no iOS and Android). However I pokked around C2's structure, and I have no way to grab the WebGL canvas as a texture. Perhaps Ashley can provide me a hint here ?

    There's actually a way right now to get a mode7-esk effect with WebGL effects. Specifically by using the lens effect with a linear gradient over the thing(s) you want to transform. However, because of the monkey rigged way it's done, the result is mostly useless for actual games.

    <img src="" border="0" />

    So yeah, I think a Webgl effect might be your best bet right now.

  • Anyword on this...I've been out of the loop for a month on pain killers and muscle relaxants (back is out). I haven't touched anything since Oct 31st. I saw we got the sprite collision disable ability so now I can remove all of the work arounds I coded for that :D

    But I'm really dying for a perspective skew!

  • damainman : I'm working on a webgl effect for that. It's not going to work on mobile where there's no (i.e. iOS), but it's a start...

  • Pode

    I'm honestly not all that interested in the mobile market yet. I'm perfectly happy with it being run on a computer from a browser. I'd love to see it run on the Wii U, but I just tried my demo on the browser and it ran worse than it would on any handheld device...

    PC and MAC is enough for me :)

    I've used nothing but WebGL to do the fx in my game. Once this plugin is finished I'll be moving on from Constuct Classic as the bonus level of my game is a space harrier style coin collecting level and that is the main reason why I haven't switched over completely yet... and the water in my "wild west" level looks stupid doing a multi layer scroll.

    And thank you so much for doing this plug in - you have no idea how much I'm looking forward to it!


  • Any word on how this plug-in is coming along? Dying to get my hands on it!!

  • You might want to check out this thread: Mode7 effect

  • Yes, please!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)