Yann's Recent Forum Activity

  • Yeah, I understand, the ability to draw in CC's image editor was really handy for quick blocky prototyping.

    Also, the absence of homothetic resizing can be annoying sometimes.

    But nothing really limitating, you can still create some quick square and circle for fast prototyping in an external app or use the sprite packs has placeholder. And for resizing, a simple calculation can do the trick.

    So I understand why it's not already here. C2 is still growing... Just have to be patient and cope with any weirdness (:

  • Yeah it was just to make things clear about the fact that it wasn't a project image file that I tried to change but the image files from which I created the sprite by loading them.

    <img src="http://dl.dropbox.com/u/23551572/C2/Report/leftOpen.jpg" border="0" />

  • To be sure we are talking about the same thing, I didn't use the "save as project" and then change a the png of a sprite.

    I used the "save as single file" during all the production of the game.

    So I guess changing a png I imported, to reimport a modified version afterward shouldn't confuse C2.

    As far as I understand how C2 works, once you load a png C2 isn't supposed to keep any link to the file... is it ?

  • yeah offsetting is just hmmm more drag&drop-ish I think

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I already had this problem and asked in the forum, but ok that was 2 weeks ago, it might be hard to find.

    The issue is logical, because coordinates get scale in the layer (to conserv relative position between elements).

    I was surprised by the answer 'cause it looked like a hidden feature of c2 and is actually quite interesting.

    If you want the mouse position projected on the layer that is scaled :

    Mouse.X("layerName") or Mouse.X(layerNumber) (same for Y of course)

  • when you send a project, send it as a single file it's easier :D

  • random is just something I came up with to avoid moving two sprite at the same time when you have two overlapping sprites.

    It should be "pick top most" (in construct classic) but it's not yet implemented in construct 2 so pick random seems to be the only choice

    If you are just over one sprite pick random has no choice but to pick this only sprite

    (the first condition do the main picking, the second is just to avoid to pick multiple sprite)

    Self is just the object you are working on

    Sprite set X to self.X

    is the same as

    Sprite set X to Sprite.X

    I often use self 'cause it's easier to copyPaste code between different objects and self is only 4 letters to type :D

  • Lerp is a very simple function

    Lerp stands for Linear intERPolation

    This function need 3 numbers parameter

    lerp(a,b,t)

    a and b are whatever number you want

    but t goes from 0 to 1 (well it can go under and over but... let's keep things simple)

    lerp(a,b,0) returns a

    learp(a,b,1) returns b

    the values in between 0 and 1 returns a number X between a and b such as X-a = (b-a)*t

    so t describe more or less where you are in between a and b

    lerp(a,b,0.5) return the middle so a+(b-a)/2

    lerp(0,10,0) = 0

    lerp(0,10,1) = 10

    lerp(0,10,0.5) = 5

    the way newt use it with

    sprite set X to lerp(self.X,destination,0.5*dt)[/code:3849wyf8] is a little trick
    the .X you have in the lerp is the .X you change in the expression
    and 0.5*dt is always more or less the same (depending on fps)
    
    so from step to step in the movement, destination-self.X will be shorter and shorter, so the lerp(self.X,destination,0.5*dt) will continue to move the sprite but slower and slower (ease out)
    
    In short the only issue with this technique is that the sprite will takes time to exactly get to destination. Mathematically it should never arrive but thanks to float rounding stuff it will.
    Anyway you should not rely too much on
    if sprite.X = destination
    
    that's all
  • Hehe good, I have some ideas from time to time, I think I'll continue to write them down an post some report like that.

    (Noticed a while ago the shortcut tooltips that appear when holding ALT... Awesome idea never saw that on other app)

  • I would simply not use the platform behavior and do a stepped movement.

    As you have a stepped horizontal movement, I think it would be logical to have a stepped vertical movement.

    so

    Global vRate = 1  //speed of dropping
    every vRate seconds 
      -> Sprite : set Y to self.Y+32
    //sprite2 is just the inert form of sprite
    Sprite overlap Sprite2
      -> spawn sprite2
      -> sprite2 : set Y to self.Y-32
      -> sprite2 : set width to Sprite.Width
      -> sprite2 : set height to Sprite.Height
      -> destroy sprite
    system : sprite.count = 0
      -> create Sprite at X = floor(random(layoutWidth)/32)*32  Y=0

    This way you can even use vRate to modulate difficulty

  • basically you want a drag&drop I guess

    drag&drop.capx

  • Haha yeah plauk don't restart layout but reset player position, nice idea too.

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann