Do you modulate your input?

I don’t even know if that is the right word. Maybe regulate? More on that later.

Here’s my problem. The object of my game is to use a spoon to flip ice cubes into glasses of various sizes and distances. So the spoon is flat on the bar, the cube rests on the end, and you swipe down onto the bowl of the spoon to send the cube flying. I started out using the slingshot model from Hot Cross Bunnies, but I thought this fit the theme better.

Initially, I calculated the velocity of the launched cube based on the length of the swipe. But this means that swipes that start only a couple pixels apart will produce different velocities. That’s how it would work in the real world, but in the real world it would be harder than hades to flip ice cubes into a glass across the table :slight_smile:

So I’m now refactoring to map certain ranges of swipe length down to the same velocity, so that there will only be a dozen or so possible values. (what do you call this? regulating? modulating? damping? fudging?)

Is this a good approach? If not, what would you propose? I could make the target glasses a whole lot bigger, but then it would look incredibly phony. The base of the glass would be nearly the width of the bar top.

Thanks for reading this. [import]uid: 58455 topic_id: 12064 reply_id: 312064[/import]

You might call it “stepping” your input.

You are mapping swipe length to cube velocity, which in the “real” world would be a smooth ramp. It sounds like that’s what you initially simulated and found it to be too real to be fun. The other extreme would be a single step, where no matter the length of the swipe it would be converted to the same velocity. Probably also not fun since all of the challenge and variety is removed, although it might be worth testing just to see how unfun it is. Then you could gradually add steps in one at a time and test each version to find a sweet spot between reality and simplicity that is challenging but still fun.

[import]uid: 9422 topic_id: 12064 reply_id: 43987[/import]

Stepping. I like that. :slight_smile:

I tried one step and it is incredibly un-fun. In its current incarnation, anyway. But it got me thinking, what if the targets moved and it was more about timing? I may not redesign the entire game to play that way, but for some levels? Why not?

Anyway, you got me thinking outside of the proverbial box. Thanks.

[import]uid: 58455 topic_id: 12064 reply_id: 44024[/import]

Yes, that helped. I played around with different step sizes and think I have one that works.

I also found that drawing a temporary crosshairs where you last started your swipe allows you to more easily repeat the same shot. [import]uid: 58455 topic_id: 12064 reply_id: 44126[/import]