how do i simple 'worms' game

Get help using Construct 2

Post » Sat Jan 07, 2012 4:34 pm

I mean when the projectile hits the landscape, there is a hole which you can enter and walk
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Post » Sun Jan 08, 2012 2:17 am

The only way do do such thing, as far as I know, is to destroy some pixels in the canvas object.
But, for now, the canvas doesn't have per-pixel collision, or polygon guessing at runtime. In short, you can visually destroy a landscape but not enter it and walk.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Jan 08, 2012 4:36 am

Here is an example from Construct Classic...


http://69.24.73.172/scirra/forum/viewtopic.php?f=8&t=971aldo2012-01-08 04:37:03
B
5
S
1
G
2
Posts: 99
Reputation: 1,575

Post » Mon Jan 09, 2012 1:23 am

Per pixel collision detection is a must for such a game, but since C2 doesn't have per-pixel collisions you'll have to implement it manually.
Here I used an array to store the pixel collision data and the canvas plugin to do the visual portion.

http://dl.dropbox.com/u/5426011/examples%208/worms.capx
Requires third party plugin Canvas.
B
79
S
24
G
54
Posts: 4,755
Reputation: 40,773

Post » Mon Jan 09, 2012 11:07 am

@R0J0hound

Doesn't work for me on XP FF9.0.1. Get the following error:

Error: inst.drawGL is not a function
Source File: http://localhost:50000/preview.js
Line: 1698

*** EDIT ***

Never mind. Updated to latest release of Canvas fixed it :/zenox982012-01-09 11:16:19
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,850
Reputation: 48,301

Post » Sun Feb 12, 2012 5:31 pm

Did you take a look at the Lemmings Engine by Ize!
B
28
S
9
G
6
Posts: 30
Reputation: 6,609

Post » Sun Feb 12, 2012 5:47 pm

yeah its cool :)
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Post » Fri Dec 02, 2016 10:54 am

You could create sprites as boulders, then have about 100 of them on top of each other to make the landscape, then when missile hits one or more of the boulders it destroys that.
You could add different styles of rocks or boulders and then random their position, so that each time the game starts you have a new different landscape.
Add wait .05 then add your players, maybe dropping them from top of screen, so they would land on the rocks no matter what random pattern it is.
B
6
Posts: 22
Reputation: 294

Post » Fri Dec 02, 2016 11:33 am

@MarkThomas

Bumping a thread nearly 5 years old - not really needed :)

If you have a search, you'll see that there have been numerous ways to create such a mechanic since this thread was created.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,850
Reputation: 48,301

Post » Fri Dec 02, 2016 5:09 pm

Sorry, I was actually looking for a way to do this myself, and when you type in on google worms construct 2, this is at the top.
I know the post was old, but if I found it while looking, then others would do the same, suggesting something on here seemed logical because I would have found it (as I did) and would have been happy with any suggestions.
It was only reading the above posts that I came up with the idea I mentioned, which I'm now trying to do myself.

Sorry if it's against the rules to add something to a post, but that's why I thought old posts are still around to help those that find them :(

Sorry
B
6
Posts: 22
Reputation: 294

Next

Return to How do I....?

Who is online

Users browsing this forum: getplay and 24 guests