Vector trace possible?

Get help using Construct 2

Post » Sun Mar 18, 2012 10:51 am

I'm making a game for my Dad to replicate the gameplay of an old 80's vic 20 game ( which I can't remember the name of - if anyone had a vic 20, do you remember this game? )

I'd like to run a vector trace every tick or so to check there are no gaps in the chunks and cause the blocks to fall to fill the gap.

Is this possible, or would I just fire upwards invisible sprites to collide with the blocks and make them fall that way?

For some reason also it doesn't work online- so you'll have to download the capx to play.

Screenshot :



Download : www.johnnysix.net/games/zzzomo/zzzomo.zip
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Sun Mar 18, 2012 4:18 pm

Why don't you just add a physics behavior to the blocks?

See the result

Download the projectJailson2012-03-18 16:29:42
B
228
S
6
G
8
Posts: 86
Reputation: 12,295

Post » Sun Mar 18, 2012 7:20 pm

Yeah, I tried physics and platform movement (with controls disabled), however neither acted in a very controlled manner - platform slowed the game dramatically, and physics causes the whole building to fall over.

I've got a newer version working here, with winning/losing - I've now encountered a few new problems as demonstrated in this video :

http://www.youtube.com/watch?v=Zd-B9cx_PJc

When the 'level1' layout is loaded via "goto layout" event, the aliens respawn but the buildings etc don't, it's rather odd.

New game version here :

http://www.johnnysix.net/games/imd/JohnnySix2012-03-18 19:21:23
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Mon Mar 19, 2012 11:15 am

Then, another thing you should do would be like this:

1) create a imagepoint at the bottom of each block, called BOTTOM;
2) check collision of each block BOTTOM to another block;
3) then create a event: when block BOTTOM is not colliding with another block then set block Y + 1;

Let me know if it works! :) Jailson2012-03-21 13:42:02
B
228
S
6
G
8
Posts: 86
Reputation: 12,295

Post » Mon Mar 19, 2012 12:11 pm

Cool - will give that a try tonight - didn't think you could check for imagepoint overlays.

BTW - when going back to a layout, is there a way to reset it?

When I trigger the level1 layour again, it only spawns the monsters - see the latest example - if you lose.

Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Wed Mar 21, 2012 1:43 pm

Well, basically when you "Goto Layout" and set the same layout it would works. But dont forget the global variables, you should also reset them, use the system expression Reset Global Variables for that!
B
228
S
6
G
8
Posts: 86
Reputation: 12,295

Post » Wed Mar 21, 2012 9:30 pm

Is there a difference between setting global variables in say - the "loading/title screen" layout and "level 1" layout?

Just wondering what best practices is, I already messed up making things like the plane global objects, thinking if I were to reuse them on level2, level3 etc - they would keep the same properties.

Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939


Return to How do I....?

Who is online

Users browsing this forum: makkancs, Yahoo [Bot] and 23 guests