Simple Scorched Earth, Worms game

Get help using Construct 2

Post » Sat Oct 28, 2017 7:00 am

Hi, can someone point me to the tutorials which help me build simple Scorched Earth game? I'm planning to remake old Amiga TANX game. The controls will be simple, numbers based, (not like Worms or Angry Birds).
I tried to find tutorial to generate random terrain in possible simplest way, but most of examples comes from inactive Dropbox accounts.
Also I don't know how to implement script for calculate shots.

Tanx gameplay: youtube.com/watch?v=KYtqZ2WFcIM
B
5
S
1
Posts: 14
Reputation: 341

Post » Sat Oct 28, 2017 8:19 am

You don't need to calculate the shots, just use Bullet behavior with gravity.

The hardest task would be removing parts of the terrain after explosions and figuring out how to move tanks on the changed terrain.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
126
Posts: 1,752
Reputation: 67,325

Post » Sat Oct 28, 2017 5:25 pm

My favorite way to do terrain is with a tilemap. You probably want to generate the terrain with events instead of using the editor. Destroying terrain is just one event as well.
https://www.dropbox.com/s/4sv6lztqwvtxb ... .capx?dl=1

For falling terrain you'd have to do something else. Perhaps a sprite per column of dirt that you'd slice up when destroying circles out of them. It wouldn't work if you wanted each pixel of dirt to have it's own color. For that you'd have to just move tiles around which will be slow so you'll want to use a very low res terrain and maybe change the idea entirely since looping over a lot of positions like that is not something that's fast in events.
B
94
S
33
G
128
Posts: 5,489
Reputation: 81,541

Post » Sun Oct 29, 2017 3:05 am

I thought a large 1x1 px tilemap would be insanely slow. I underestimated C2 again..
Last edited by dop2000 on Sun Oct 29, 2017 4:27 am, edited 1 time in total.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
126
Posts: 1,752
Reputation: 67,325

Post » Sun Oct 29, 2017 3:34 am

It surprised me too when I first saw it used.
B
94
S
33
G
128
Posts: 5,489
Reputation: 81,541

Post » Sun Oct 29, 2017 5:36 pm

Thanks for reply. Your example working very well, but first I need to understand how Tilemap work. I'm gonna study this tomorrow. I was thinking of using just few big base tiles - 1 for flat ground, and 4 for high/low ground (left and right). Is it posible to build random Tilemap or array this way?
B
5
S
1
Posts: 14
Reputation: 341

Post » Sun Oct 29, 2017 6:20 pm

You can do it that way but you won't be able to destroy it per pixel.
Well unless you draw the tiles per pixel onto the other. This is probably as tedious as it sounds but you probably could make a system to do it easier
B
94
S
33
G
128
Posts: 5,489
Reputation: 81,541

Post » Mon Oct 30, 2017 10:59 am

I wasn't even interested in making this kind of games, but checked this thread just to see what was up. I was completely taken aback by your solution @R0j0hound!! Who would think Construct 2 could handle this kind of stuff?!?

Amazing!
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
22
S
6
G
3
Posts: 717
Reputation: 3,996

Post » Mon Dec 11, 2017 11:33 am

I'm doing a prototype trying pixel destruction and this is just what i need.

@R0J0hound Is there any way to add an sprite in the layout and when the layout starts make the tilemap adds tiles there?

Or maybe other way to build a terrain using just sprites and on runtime add tiles in the tilemap so you can make any kind of terrain easily.

I made a fake destruction pixel using the DestinationOUT blend :P
Image

The idea was then make if collides with building and is not overlaping one of the bullets with destinationOUT explode so you can make holes , but is not pixel precise and perfomance drops when losts of bullets blends , but well as first aproach was interesting :P .

So, my idea is add a sprite, on runtime set tiles from tilemap there and use the destinationOUT to make the sprite looks destroyed equal i did for the blue buildings in the gif. But can't find a way to achieve the first step :S
B
29
S
11
G
3
Posts: 653
Reputation: 4,921

Post » Mon Dec 11, 2017 12:03 pm

Well just get it for Rectangular objects

Image

Wonder how get for the ones with alpha mmm...

EDIT: One idea is paste that layer object into your canvas plugin and get the RGBA and detect if have alpha > remove tile. But i guess this means do an arrays that test all the pixels in the canvas looking for the alpha ones. Mmm, i will try later.
B
29
S
11
G
3
Posts: 653
Reputation: 4,921

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests