Qix Game

Get help using Construct 2

Post » Wed Oct 30, 2013 5:01 pm


Hello to everyone

I want to make a game like Qix, here is a link if you dont know about what Im talking.

http://www.youtube.com/watch?v=Wvzyd0OZg1I

I already have the idea of how to make the player can move online in straight line. But I dont have how to make, when the player make a square, reveal an image in the background, also the enemies cant move in the revealed part.

If someone can help me please, I will be appreciated.

Have a nice day!!!
B
11
S
3
G
1
Posts: 28
Reputation: 1,425

Post » Fri Nov 01, 2013 6:31 am

A while back I came up with a way of doing a game like Quilox, which is very similar to qix. It was slow and unfortunately the capx doesn't work the same with newer versions of C2 due to a breaking change.

Anyway for such a game the idea of doing a flood fill from all the enemies works well to indicate the play area, and anything not flood filled can be safely erased to show what's underneath. The second hurdle is having a way to draw and cut up the play field. Ideally pixels would be used as thousands of 1x1 sprites will drag down performance. The canvas object could be used and there are per pixel collision detection capx' around the forums that will also prove useful. One caveat is I don't think it's flood fill action will work for this problem, so it may have to be done manually. Or if you don't mind it much coarser you could use a bunch of larger sprites. Just find a balance between performance and detail.

For objects only moving on the unrevealed area the idea is basically this:
. if object is on play field.
. then move object
. if object is now not on the play field
. then undo the move and pick a new direction to move.
. repeat

Here's an unpolished example to pick apart using vanilla c2 events:
https://dl.dropboxusercontent.com/u/5426011/examples19/qix_like.capx R0J0hound2013-11-01 06:32:55
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Mon Nov 11, 2013 3:21 am

Hey!!! Thanks a lot for the capx.

I've been without internet several days, so I can't see your answer, now, you make me the happiest men in the world.

When I finish this game, I will make a tutorial, because this is a excellent game and everyone have to try make one.

Again, Thanks a lot
B
11
S
3
G
1
Posts: 28
Reputation: 1,425

Post » Sun Jan 08, 2017 1:28 am

Awesome example!! Polished version here :3
https://drive.google.com/file/d/0B7p49JKt0CGLTFZJR3RGdTNlN1E/view?usp=sharing

CONTROLS: arrow keys
B
13
S
4
G
2
Posts: 22
Reputation: 1,516

Post » Sun Jan 08, 2017 2:17 am

thanks for sharing, good stuff!
B
80
S
29
G
166
Posts: 234
Reputation: 89,119


Return to How do I....?

Who is online

Users browsing this forum: DarthPapalo666 and 24 guests