tunepunk's Forum Posts

  • I managed to do it with CSS in C2 as well. I can't believe something so simple in CSS can be so hard to do in C2. Everything I need is a "RotateX" to get the squashed effect that I want. Can anyone with any deeper knowledge explain to me why these kind of transforms are not already built in to C2?

    Textured button, rotated with CSS in C2:

    Capx: If anyone want's to play around with it.

    https://dl.dropboxusercontent.com/u/20560446/Scirra/3drotate.capx

    Ashley Is there any possibility that these kind of transforms will be available in any future update of C2, on regular objects such as sprites, Spritefonts and even Layers, etc? It would be a great addition and very useful.

  • Thanks R0J0hound I will try that as well.

  • Thanks R0J0hound, I'll take a look at it. Just downloaded paster and the example, but a bit clueless where to start. Worth a try to see how it performs on mobile with similar effect. Do you have any other examples lying around? To scale the layer with paster?

  • R0J0hound this one was a tricky one. You're on the right track, but we're not really there. The deformation applied by this one is too small and changing (0.5*sin(Self.Angle) to (0.25*sin(Self.Angle) we're back where we started. I can't seem to multiply it either to get a 2:1 ratio.

    Edit: As I'm developing for mobile, I rather not use any webGl effects.

    I tried the scale effect from this thread, but I would prefer to do something as close as possible in code.

    https://www.scirra.com/forum/nearly-daily-effects-by-somebody-neat-things-big-gifs_t123401

    I wish layers had independent X & Y scale. That would be soo much easier. Maybe that's something Ashley can take care of in a coming update?

  • Hmm... You're right.

    If you just set the width to 200*sqrt(0.5*sin(Self.Angle)^2+cos(self.angle)^2) and leave the height alone it works.

    Fantastic. This one seemed to work as expected. But still need to apply something to the height as well, as the height need to deform as well. Maybe it can be used for height as well, bu reverse the cos&sin and devide the whole string by 2?

  • R0J0hound the scale seems to work fine, although it wobbles as the angle goes around, any way to counter that? for a more smooth scaling between the angles? It seems like at 0, 90, 180, 270 it's dips in a bit too much.

    https://dl.dropboxusercontent.com/u/20560446/Scirra/rotatescale.capx

  • R0J0hound Will that scaling create the skew that I'm after in the 45 degree angles?

  • I have a sprite that I want to scale based on what angle it's rotated at.

    If it's at angle 90 or 270 i want to scale the height. If it's at angle 0 or 180 i want to scale the the width in a smooth transition between the angles.

    I'm trying to create something like this. I wan't to sqash something only in the Y axis, but I'm not getting the desired effekt. Maybe I can't do it directly with C2 events, so maybe there is a plugin to do something like this.

    I'm also wondering how i can make an elliptical orbit. (lower part of the image) I can get a round orbit using sin/cos but how to make it elliptical?

  • There is a new feature in the system action called sort Z-order by:

    add a family variable called Zy. Then create

    Is on screen:

    ---> set Family.Zy (variable) to Family.Y

    ---> sort Zorder by Family.Zy

    That's the easiest way.

  • Nice demo sol. I'm curious to see what you are giong to do with the gameplay. What's will be main goal of the game? Exploration-Survival-sim ? Those nekked dudemen & women looks ready to reproduce att any time. Lol

  • No problem. Looking forward to see a demo later. Sounds like a cool project.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the FPS drop might be because back to front rendering. While the map is open, can you set other layers behind (that you don't really see anyway) to invisible, maybe that would help, and turn them back on when the map is closed?

  • Absolutely, you won't know until you tried. Let me know how it works out.

  • Sounds complicated. Seems like the global layer seems to be the approach though. Then just update on layout switch. I can't really think of any other way to have an inactive layout being modified, unless it's all happening in an array by numbers, and somehow transfer the whole array from one layout to another.

  • https://dl.dropboxusercontent.com/u/205 ... tsave.capx

    Pont and click to move the blue dot

    This seemed to work. Saving positions to localstorage. Maybe you can use for each on the layer, to save all the things, then for each load as well.

    /