Frosty Elk Developer blog

Touch & Physics tossing test!

Took a break from the daily work and tested something i have wanted to give a try for some time. How to make something physics move, based on the velocity and direction of your touch.

So it ended up with me creating a basketball game and a dart game. Booth the games are using the same basics for tossing a physics around.

undefined undefined

Screenshots above.

Test the games
Instructions. Grab the ball/dart and toss it in any direction. The faster you drag it before you release it, the faster the throw.
The basketball can only be tossed when its on the ground. The darts become non physics when they touch the board.

Basketball

Dart

 

Download

You can download the Construct2 .capxfiles here, if you want to use it as a base for a game, learn how i did it or for whatever reason.

Download Basketball
Download Dart

Helping out!

One thing i have learned during all the years i have been fiddling around with new game engines is that it is very important to have a friendly community where developers help each other.

So now that i feel that i have most things in Construct2 under control, i feel that i can contribute to the community over at scirra.com/forum.

Today i got a little carried away though...one guy asked if there was a way to create a car game with a steering-wheel as the turning control. I love to solve problems, so i started to test different ways to handle it. But after messing around a while i decided that there where no great way of doing it with a real steering-wheel, where the actual wheel was controlling the car. Because you need the cars frontwheels to turn for that to work properly. It is doable in Construct2, but it wouldnt be a very good way of doing it. And i dont think any game would really benifit from it either.

So i faked it instead, when touching sprites i turned the wheel sprite, so that it looks like you are turning the wheel. It actually turned out really well and it feels like you are controlling the car with the wheel.

Below here is a screenshot of what the DEMO came to look like....
Yeah, i got a little carried away and added particle fx and skidmarks on fast turns and brakes....
I also threw in a speedometer while i was at it...sometimes i do things like that just to make my brain keep working on a high level while solving other things.

undefined

You can playtest the DEMO here:

Steering wheel - demo

If you want to play around with it in Construct2, here is the .capx file.

Welcome to Frosty Elk Developer blog

A warm welcome to our new developer blog. We know that there are a thirst for information regarding app development on a cross platform system and we love to share our knowledge with everyone.

We will hopefully be able to help some of you along the way in constructing games with Construct2, Cordova, Crosswalk and Intel XDK for Andriod and iOS.

At the same time we will share information about out own creations as we work on our plugins for Construct2 and Cordova.

Home