The best way to work with coin block, item block... help!

Get help using Construct 2

Post » Wed May 14, 2014 3:38 pm

Hello guys, I spent a few hours looking for the proper way to work with the three most common blocks in platform games, i found some practical examples in the forum but in some cases the way that they acted was different and not always worked well... so i ended a little bit confused.

what i propose is to find the best way to do it and share it for everyone.

Image

Here is a .capx to work with https://dl.dropboxusercontent.com/u/51828487/blocks_platform_game/differents_platform_blocks.capx

SOME REFERENCES https://dl.dropboxusercontent.com/u/51828487/blocks_platform_game/block_types.mp4

IMPORTANT DETAILS https://dl.dropboxusercontent.com/u/51828487/blocks_platform_game/important_detail.mp4
Last edited by taymline on Wed May 14, 2014 5:02 pm, edited 2 times in total.
B
12
S
4
G
1
Posts: 6
Reputation: 1,512

Post » Wed May 14, 2014 4:47 pm

It is usually much better to create tutorials on topics that you have spent a lot of time on and are no longer new to you. There are way too many tutorials that were written when someone just learned something which tends to mean the tutorial does not cover enough scenarios or even possibly the right or most efficient way of doing things. Just a thought.

For your blocks some important things to track:

The type of block - If they are all the same sprite but different frames use instance variables to track the type of block
On Collision - Make sure you are checking to see if the player is jumping and if their Y coordinate places them below the block (otherwise you will get lots of odd behaviors whenever your character bumps into a block)
Item Blocks - Make sure you have an image point just for spawning the items when the block is hit so you don't have to worry about odd placement if you use the built in image point.
Breaking Blocks - For these blocks give them an instance variable for health or bumps (how many times it has been hit) and change the animation frame accordingly. Use the above collision methods for making sure blocks only break under the right circumstances as well.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Wed May 14, 2014 5:24 pm

Hello BluePhaze and thanks for the reply and advices. As a new user I have a long way to learn this software so any help is welcome, the experience of people like you help us a lot.

I will try to do what you describe above. thx again
B
12
S
4
G
1
Posts: 6
Reputation: 1,512


Return to How do I....?

Who is online

Users browsing this forum: dop2000, namaewayukidesu and 10 guests