tunepunk's Forum Posts

    He'll be back. Once he start pulling his hair in frustration trying to code stuff or spending way more time doing simple things, he'll miss the Event Sheet way of doing things...

    For something I use almost daily. If someone offered me 2 option. 1st option is a hammer for one time payment, but it takes 30 seconds get one nail in. The other option is a rental nailgun that allows me to get to punch out 10 nails per minute in, I'll definitely choose the nailgun.

    Welcome back if you can swallow your pride, and ever feel that the tool itself is more important than payment model.

  • As you may know Construct 3 beta will be released soon, and I was just wondering if you're planning to make a version of your plugin available for Construct 3?

    This blog post covers a bit more about how plugins are handled in Construct 3.

    https://www.scirra.com/blog/193/addons-in-construct-3

    I'd love to import my project to Construct 3, and continue my work there and keep using photon cloud.

  • >

    > The mindset of some people here seems to be that they want everything for free, or they don't really understand the value and cost of maintaining a product, and providing support, updates, new features, bug fixes.

    >

    I absolutely don't believe that's true at all, I believe my exact words the week or two before the announcement was "I'm ready to pay for C3 if it comes out on Wednesday". I can't believe they charged so little for the "lifetime" updates to C2, but the majority of people here just want to voice their dissatisfaction with a lock-out subscription, especially for what looks like mostly potential C2 tweaks that have been hoarded for Construct Cloud, and a bunch of bleeding-edge features that no-one really wants.

    I'm getting tried of posts implying most users here want a free lunch. I love open-source, but I'd never expect to get the same experience as I would with proprietary software that costs, but fundamentally there's a problem with subscriptions charges for users, and I think that's something most developers haven't anticipated yet.

    I mentioned this in other threads as well. How is subscription a problem? If you decide not to pay it's not scirra locking you out.... (maybe if they ban you and forbid you to ever subscribe again) You're locking your self out...

    C3 is an online service...

    Have you ever played world of warcraft? Try subscribe for a while, then stop paying, and start complaining you're locked out of the game, all your character progress is locked, You can't access the game and play with friends anymore.... If anything, people will laugh at you for posting something as silly as that. WoW is an online service with maintenance costs.

    C3 is also an online service with maintenance, server costs etc. You might not like the route they took by making c3 as a webapp, but any other payment model than subscription is gonna be tricky to juggle for something that has monthly upkeep costs, unless you figure out another clever way to monetize, maybe IAP (selling extra features) using ads or intentionally plan to stop supporting c3 once c4 comes out next year. You can pretty easily calculate when a costumer cost you more than they payed. If you bought C2 5 years ago and still using it, chances are you're probably costing scirra money by now.

    Get over it,... it's business 101, income vs expenses.

    The only surprising thing is that there seem to be so many that doesn't get that. And no one is locking you out if you stop subscribing, you're locking yourself out.

    I just locked myself out from monthly adobe CC, and Autodesk Maya LT subscription, because I don't use it that much lately, but if I ever need to use it again soon I'll gladly pay up again.

  • im being a bit tired of this posts.

    Agree on that.

    The mindset of some people here seems to be that they want everything for free, or they don't really understand the value and cost of maintaining a product, and providing support, updates, new features, bug fixes. If you bought C2 years ago, it's about time you chip in again... and support the continued development.

    The reason that they are giving Free C3 for ar year is because you recently bought a licence since announcement, everyone else with a licence get's a 50% discount, which is very generous.

    jeffige

    Just because you bought one jacket years ago and wear it every day, do you expect your next jacket, years later, to be free because you think you're a loyal customer?

    Or let's put it this way. A customer bought a game you made with C2 years ago, and plays it almost every day, and he's expecting bug fixes, new features, updates, support, etc etc,.... and then wants your next game for free, because he already bought a game from you years and years ago and been active on the forums.... The other customer just recently bought this old game from you, even if you announced that the new game is coming soon... who would you give a discount and why?

  • Thanks R0J0hound . newt 99Instances2Go for your input and ideas. I think i managed to solve it finally. Or at least as close as I could.

    Speed and acceleration is based on distance now, and it works great with touch taps and clicks also. If you click somewhere it will accelerate towards the distance based max speed, then slow down after it passed that threshold.

    Updated capx if you want to take a look at how I solved it.

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

    sprite turns blue when accelerating and red when decelerating.

  • R0J0hound Those are some really neat examples. I've learnt a lot. The steering example feels super smooth.

    I'm still not there yet as I have to optimize it for touch input. A tap on screen still needs an acceleration as well. The deceleration is not the big issue, it's more the acceleration. As you can see here on this screengrab from you steering curve tapping screen or rapidly moving target to a new position.

    This is how it behaves on rapidly changing target, which is what i need to smooth. So combining all of your awesome earlier examples there might be a solution.

    I tried a similar approach using bullet behaviour and a condition from one of your earlier examples. Bullet behaviour has a built in acceleration which i'm trying to replicate in events.

    Your first link for this solution was the closest so far, but it was behaving a bit weird, and overshot target and started to orbit. I need to dampen the deceleration somehow

    viewtopic.php?f=147&t=163491&p=989820&hilit=Stopping+distance#p989820

    here's a link to a capx with that approach.

    https://dl.dropboxusercontent.com/u/20560446/Scirra/smoothchase.capxv

    Thanks a lot for your help, I feel I'm nearly there.

  • 99Instances2Go

    yeah the problem is mostly visible when using touch using on mouse down condition. if object is at standstill, and i click somewhere else regular lerp(sprite.x,mouse.x,0.1) will start fast & decelerate towards that point, where i want the sprite to first accelerate.

    I need some kind of modifier for inertia or torque that increases from 0 to 1 dynamically in some way, to simulate the acceleration.

    Maybe if i can get the XY position of a middle point between sprite and target and use that instead of the mouse,

  • I found this javascript code, for a 2D chase camera... Maybe i can convert it to C2 events somehow.

    float lerp = 0.1f;

    Vector3 position = this.getCamera().position;

    position.x += (Obj.x - position.x) * lerp * deltaTime;

    position.y += (Obj.y - position.y) * lerp * deltaTime;

  • R0J0hound

    I tried your code example It's nearly there but had some quirks. Object really never reaches Mouse, and starts orbiting the mouse pointer, or sometimes it shoots away randomly, after getting close. How would go about to stop the object to overshoot target, and start orbiting? I just need it to home in, then stay there.

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

  • One way is to keep track of the velocity. Basically it starts at 0 and accelerates (ease in). Then you can calculate the distance it would take to decelerate to zero and use that the change the acceleration to decceleration (ease out).

    Here's a link of the idea:

    Thank's rojo. I'll test that out....

    Happen to know if there any plugin/behaviour that does the same thing? LiteTween is based on time, not distance, so that wasn't very useful in this case.

  • Basically a way to apply torque when the distance between mouse and object is far.

  • Cosine interpolation cosp(a, b, x) maybe

    Theres also:

    qarp(a, b, c, x)

    cubic(a, b, c, d, x)

    They are aggressively more complicated however.

    Rex has several behaviors that are simpler to implement, moveto, spline, etc.

    I've tried both qarp and cubic, but not getting the desired effect.

    When mouse left is down, i want the object to accelerate smoothly from 0 to a certain speed based on the distance to the mouse, then when mouse is up I want it to decelerate to zero speed.

    using lerp(self.x,mouse.x,0.1) has the desired effect for slowing the object down as it is getting closer to Mouse.X. But the start of the movement is sudden (max speed from start), getting slower and slower as it approach Mouse.X. I don't know how I can smooth out the start of the movement.

    I'm basically looking for a curve like this. I know how to do it based on time (but that's not what I'm after), but I don't know how to do it based on distance.

    The max speed of the object should be somewhere in the middle.

    When i click. I want object to accellerate to a "Max speed" determined by the object current distance to mouse. Max speed should automatically get slower as the object approaches destination (Mouse)

    I'm just guessing here.

    lerp(a, b, x*m)

    X has to be the max speed. (m) The modifier has to be a value, that is pretty close to zero, when the object starts to move and closer to 1 when it's approaching max speed.

    a = current position, (not starting position as the mouse can move around)

    b = target position, (the current position of the mouse)

    x = maximum speed. (the maximum speed)

    m = modifier (a value that smoothly scales from 0-1 based on distance where further is closer to 0 and closer is closer to 1)

    maybe I'm doing it all wrong, and some math genius here can help me out?

    lerp(self.X,mouse.X,0.1) has the desired effect except that the start of movement is snappy not accelerating.

    I want the object to smoothly catch up to the mouse current position.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Currently I'm using lerp a lot for smoothing movement (to simulate easeIn/Out. Using a lot of them I'm wondering if there's any good behaviour that does the same thing? I'm guessing that using behaviours are a bit more performance friendly as well.

    Any such behaviours available? I tried LiteTween but not doing exactly what i wanted as you has to specify a duration of the tween. I'm more looking for something to constantly smooth things like viewport scrolling, objects that follow the mouse pointers etc.

    Any suggestions?

    Thanks

  • I think that 'for each' is a real hog, when having to go trough a lot of objects that need a personal outcome.

    So lets do something wild.

    https://www.dropbox.com/s/eoxma2kzjj4r4 ... .capx?dl=0

    Do you see how i avoid a 'for each' by using a container ?

    Interesting. That's quite cool actually, I never thought of that. That might come handy in some cases.

    For each is a pain, but sometimes picking just by a variable is enough.

  • newt On PC yes, but on mobile even 20+ instances can have a considerable effect from what I've noticed. Even using a simple particle emitter is huge NONO for mobile.

    Some conclusions I've made so far.

    Sprite count on screen is directly related to draw calls. Sometimes fewer bigger sprites is better.

    Sprite count is directly related to CPU performance, especially when it comes to picking objects. The more objects you have to pick from the heavier it is.

    In this case also, less is more.