Yann's Forum Posts

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That should do

    antiReSpawn.capx

  • Funny Topic.

    Through all the reply, I can see the programmer side :

    "What? a template code? Noway we will see all kind of bad clones!

    But yeah Sprite packs are neat I can't draw sh*t! I'm like a penguin with a pencil."

    And... The more or less artistic side :

    "Yeah I don't want to bother with c2 programming, just give me a platformer/tower defense/rpg template and let me put my design on it. I will make that code shine!"

    Well... That's trully the same. You will either make gameplay clones or graphical clones (anyone ever played robot unicorn attack and compared the basic version and the metal one?...). And in all that nobody ever mentionned this obscur but crucial new Art form that is Game Design.

    Thinking about player experience, what emotion you want to create, what kind of challenge I want to put the player into? what will be the rewards? How will I make the difficulty evolve? and what will be the background of my game? The atmosphere? How Gameplay and Background story can mix to create a new neat piece?

    Game design is neither a programming nor a graphic/sound design subject. It's BOTH! And that's why serious project should be made in a team. (or if you are as skillfull as konjak or nifflas... Well... you can be a living exception :D ). But seriously, making game is a team effort and that's the beauty of it.

    Now I hear some comming with a "yeah but a team... it's hard to work with people" "I want to make my own thang" "if I need someone to programm I will take a C++ guy and won't need c2 anymore?" etc etc etc.

    Well, as a matter of fact, you would be right. But my point is that only the end product matters. And I strongly believe that using either template or sprite pack you will definitely end up with a sh*tty game.

    HOWEVER, you are talking money. Want to make money doing games. Selling packs can bring money to scirra.

    Yeah right.

    There are many ways to make money.

    There are many wrong ways to make money.

    Let's imagine, Scirra sells template pack and sprite packs.

    So if I could make a prediction, I would say, you will begin to see many tower defense with the battlefield pack, same with the space pack, and some with the battelfield AND the space pack. And then you will see the same exact tower defense with some neat graphism, and yeah the tower defense with just some square 'cause don't want to bother with art.

    And quickly c2 will be associated to a type of gamePLAY and graphism. "Yeah with c2 you can make... You know, tower defense"

    Well My point is The image of a tool is important.

    When you think unreal development kit, you see in your head "good damn good graphism" and yeah "fps"... for long udk was associated with fps. Hard to do something else with it. But now they managed to show that you could do all type of game with it (even a tower defense)

    UDK didn't suffer from that "with udk you can only make fps" 'cause they well... Epic's tool and games sell well.

    I said, there are many ways to make money, and in my opinion template and sprite pack aren't really a good way because of the image games made with them could give to c2.

    The other way I'm thinking about, since many month ago, is more or less that scirra actually could make a real game to show off C2.

    Not now, but in a near future, when HTML5 will be ripe, C2 could collaborate with some users to make a serious HTML5 game and improve their tool in the process. The end result should show the true power of C2 as long as sell well.

    In a nutshell, that's more or less how udk became that good. Improving an engine by using it.

    I think that would be way more powerfull than some sh*tty pack. And well... How many 2D game makers already did that? :D

  • Jayjay > sorry mate but I have to disagree with you.

    I made a maze generator 2 month ago and it's a recursive algorithm.

    I have the same function calling itself over and over.

    Yes it's buggy, but not because of so many function call, but because I call it inside a loop and CC seems to have hard time keeping track of them and doesn't end them properly.

    So I had to name the loops with a unique name. But even so, there can rarely be some random crash.

  • Already did on PM but I think I'll publicly say thanks to all the scirra Team for their work, and to Ash and Tom for chosing my entry.

    I hope there you will repeat this kind of contest from time to time

    Here are the two books I bought with the Voucher :

    Making Video Games from Marc Albinet (my game design teacher when I was still a student last year)

    I want to read both this book and the one I won to have many input on how to make good video games. 'Cause at the moment I only have my teacher's verbal teachings in memory.

    And Color an Light from James Gurney 'cause he is just awesome

    So thanks again :D

    *returns to work*

    Oh and I tried the 2 other games that won, kastras's one had a nice idea for the attack move, it made attacking fun to do.

    And I like the laser one, I made the same kind of instant laser on cc, but I'd like to know how Animmaniac did his. Also I tried it on a platformer without much success so you did great, the idea of continuous laser is neat.

  • Good question Ashley, next time the bug happens I will check that and bump this topic with the answer (:

  • Oh! r65 good news

    Thanks xenox