Skip to main content

Building game apps in Sketchware

Promo graphic for my game created in Sketchware

Last week I gave a tutorial on how to create a quiz app using Sketchware. Maybe you want to create a more complex game and that is possible using Sketchware. Today we will be looking at creating more complex games such as an endless runner, car racing or any animated game. You could even create a 3D game but that is of you can create the graphics.


   

 The first step is deciding what kind of game you want to create. This starts with the objective of the game, how the user will earn points, the various levels as well as customizations and upgrades. Once you have the concept you can then start building your app. This tutorial will show you how to create a game app like the one in the video below. Still needs work but I hope you get the idea.



What you will need


For a simple game app, you will need the following: 

1. A sprite sheet

My sprite sheet for my Sketchware made game


These are images of your various characters e.g. it can be a happy face, sad face, angry face and so on. If it's a runner, you can have them at rest and then subsequent images of them in motion. The above image shows a partial spritesheet of a game I am working on. As you can see, the runner is in different positions which when combined will make it seem like they are running.

2. Backgrounds

Depending on the nature of your app you might want to have your own custom backgrounds. If you're creating a fighting, driving or running app about 8 screens could give the illusion of movement.

3. Custom graphics

You will also want to have your own graphics(images) to use for your leaderboards, buttons and the obstacles in your game.

You can download free game kits from craftpix.netThese include all user interface elements, sprites and more. 

 Sketchware components


In Sketchware you can use the following components to create animation and save data. 

Object Animator

this allows you to move widgets in Sketchware- it comes with the option to accelerate, decelerate, rotate, enlarge, shrink bounce and more *Timer-* this will allow you to create the illusion of a moving image by changing(rotating) different images every few seconds. It will also allow you to create a moving background. *Shared preferences-* will allow you to save scores and create a leaderboard. It will also allow you to save any other data from your app to the user's local storage. *Soundpool-* to add sounds, music and effects to your game.

Some simple app ideas

The following are some simple ideas that you could build on to create your own game. I will only explain the logic and I'm sure you'll catch the drift.

Car Racing Game- 



The above image shows the interface I built for a racing game. The main linear has an image set as the background resource. Then I used an imageview and set the image to a car sprite that I got online. The idea is that the car can either move left or right while the background changes to make it seem like its moving. As the background changes obstacles will appear and the driver has to dodge them.

Endless runner

These include games such as Super Mario and Temple Run. I will show you how to build an endless runner using Sketchware below, so let's skip that for now.

Quiz App-


You can create interactive games where users answer questions and earn rewards. This can be done easily using Sketchware. 

Money/Gambling App

using maths logic you can create numerous apps

I believe you can do so much more... Sketchware is a powerful tool and the limit is what your mind can conceive.

[TUTORIAL] HOW TO CREATE AN ENDLESS RUNNER GAME




This tutorial will cover how to create an endless runner game in Sketchware. An endless runner game is one whereby the character is on a continuous pursuit. They will be collecting points whilst avoiding numerous obstacles in their way. One common example of an endless runner game is Temple Run. This concept can be adapted and used to build your own custom game. The idea is to show you that is possible and with ease. So here goes:

What you will need

1. A Sprite sheet... this is 8 or more variations of your character in sequence. These will be used to create the illusion of continuous motion.

2. You will need images for your background

Our game will look like in the video below. I created this with Sketchware... drew the graphics using an app called PicsArt. If you are a graphic designer, I'm sure you can create even more awesome graphics.
 


Creating the animation: 

After adding my Sprite sheet images to sketchware, the first thing I want to do is animate the character. I will create a more block with a number variable. I will trigger the moreBlock onCreate. You can place this on your start button.

This is what will be in our moreBlock


This will change the frame and create an animation. Next, we want to move our character... so this will either move them left, right, up or down. 

Moving left or right

Depending on the size of your screen, you might have to adjust the values to suit your needs. I use a tablet so my screen is bigger. You can use this logic below on your button to move left. Just reverse the values when you place them on your button to move right. 


This will move the character either left or right. You can also change the logic above and use the "Translation Y" value to move up or down.

Collisions





Comments

Mostafa said…
Please sir,in third block
What do you mean by page2activity?

Intent intent = new Intent(MainActivity.this, Page2Activity.class);

Popular posts from this blog

Hip hop and RnB songs to apologize to your partner

Love is a beautiful thing, but it often goes wrong. This often leads to pain, suffering and sorrow.  Being imperfect beings, hearts tend to get broken all the time regardless how hard we may try to avoid it.  The heartbreak is often inadvertent but at times we find ourselves in the wrong. An oversight, a word unsaid or even a lapse in our judgement can cause our loved ones harm. This doesn't always have to be the end though. Oftentimes, relationships can be mended by simply uttering three simple words: "I AM SORRY". This article is a collection of some of my favourite 'I'm sorry' songs. I hope you'll enjoy these apology songs, but more importantly, I hope you will get a few quotables and some wisdom nuggets from them.  The best apology however, is to change behaviour (got that from a Jay Z interview) so as you apologize, please remember that it was your actions that hurt them. The best apology is one which involves you not repeating those same mistakes aga

Php date: How to get the first and last day of the week

In this tutorial, I'll show you how to get the first and last day of the week in php. By default, in PHP the week runs from Monday to Sunday. However we'll cover two methods to get the first and last day for both those who consider Sunday or Monday as their first day of the week. We will be using 2 functions to achieve this: date() strtotime() We will use a combination of these two functions and store the result in a variable.  How to get the first day of the week If you want to get Sunday, use this method: $firstday = date('l Y-m-d', strtotime("sunday -1 week")); echo $firstday; If you want to get the date for Monday, this current week, use this method: $monday = date('l Y-m-d', strtotime("monday -1 week ")); echo $monday; How to get the last day of the week The following code will give you Saturday as the last day of the current week. $lastday = date('l Y-m-d', strtotime("saturday 0 week")); echo $last

How to easily create background notifications in Sketchware(original)

How to easily create background notifications in Sketchware(original) One of the keys to building a successful app is to find mechanisms that will keep your users engaged. You can do this by using background notifications. This tutorial will show you how to do that in Sketchware. We will cover: 1. How to create notifications in Sketchware 2. How to show these notifications even when the app is closed.