How to make Piano tiles

Show us your completed creations made in Construct 2

Post » Sun Apr 09, 2017 1:22 pm

I want to make games piano tiles but I am confused entering notes piano sound
B
12
S
5
Posts: 17
Reputation: 924

Post » Sun Apr 09, 2017 1:50 pm

Easy enough.

First of all you would have to own .ogg files for EACH SEPARATE NOTE of your songs.
On start of the layout, pre-load all sounds so your game doesn't slow down then play each note when the right tile is touched.

For the playing of sounds part I would guess the "right sequences" for each song stored is in the form of a .json file

@mod
Image Image Image
B
29
S
11
G
27
Posts: 729
Reputation: 16,995

Post » Sun Apr 09, 2017 11:15 pm

sorry i do not understand using json.js .is there another way to use besides json.js
B
12
S
5
Posts: 17
Reputation: 924

Post » Mon Apr 10, 2017 12:14 am

Probably the simplest way is to add these three objects to your project:
Touch, Audio and a Sprite for a tile.

Then add a note sound effect to your project and add this event to the event sheet:
Touch: on sprite touched
----------> Audio play note sound

Preview that and you have a square that plays a sound when you touch it. More notes can be as easy as adding another sound, another sprite and another event.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Mon Apr 10, 2017 12:30 am

I've been doing touch = on touch object => audio play, problems that occur music does not continue
B
12
S
5
Posts: 17
Reputation: 924

Post » Mon Apr 10, 2017 5:01 am

Correct me if I'm wrong but don't you have to tap other tiles for the music to continue in that game?
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Mon Apr 10, 2017 12:46 pm

I am intrigued by game piano tiles they use engines like what ?. then whether the construct 2 can be exactly like game paino tiles
B
12
S
5
Posts: 17
Reputation: 924

Post » Mon Apr 10, 2017 5:26 pm

They likely just use their own engine but it can be made in pretty much anything, even Construct. It's not terribly useful to give a pre-made example. Instead if I can show you how to take any game, and break down what it does in detail you'll be able to make that game.

For example you want to make a game like piano tiles. Well, what does that game do?
One possible description would be: Black squares move down the screen, and when you tap those tiles a note is played. We can do that. With one event we can have a sound play when you tap a tile. One way to make them move down in to to use a movement behavior like "bullet". You just need to set the sprite's angle to 90 so it goes down instead of right (0).

That's simple, but to make it more like piano tiles you need to describe the game better:
A grid of black and white tiles move down the screen. If you tap a black tile a sound is played. You lose if you tap a white tile or if a black tile moves off the bottom of the screen without being tapped.

So we need to figure out how to keep track if a black tile has been tapped, and we need to find out when the tile goes off the bottom of the screen. A variable can be used to keep track if a tile has been tapped.

on sprite touched:
---> play sound
---> sprite: set beenTapped to True

You can compare the y position of the tile to see if it has moved off the bottom of the screen.

sprite y > 480
[inverted] sprite: is beenTapped
---> game over

Anyways you can continue in that manner and make the game more and more complete.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Mon Apr 10, 2017 6:12 pm

piano music continues tiles way how. every note without looping clicking
B
12
S
5
Posts: 17
Reputation: 924

Post » Mon Apr 10, 2017 6:45 pm

I don't understand.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Next

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 4 guests