Pattern for Many enemies, bullets, missiles

Get help using Construct 2

Post » Wed Apr 04, 2012 3:42 am

Is there a good example of a game that has a lot of onscreen enemies, and other objects such as bullets and/or missiles fired from these enemies, player objects, and checking or tracking of missiles to targets, bullet-collision, etc?

I want to see how to structure such a game within C2.

Thanks
B
14
S
4
G
1
Posts: 26
Reputation: 1,747

Post » Wed Apr 04, 2012 12:59 pm

well the game I'm currently working on doesn't have LOTs of enemies on the screen at one time but it has a decent amount of constantly spawning ones, and they shoot at the player, and the projectiles track the player as well, so if you want, I can help you make what you want to make :)
B
16
S
3
G
4
Posts: 40
Reputation: 3,877

Post » Wed Apr 04, 2012 5:13 pm

Certainly. :)

It's not so much the counts involved, but the structure you would use to handle more than a handful of objects.

Thank you
B
14
S
4
G
1
Posts: 26
Reputation: 1,747

Post » Wed Apr 04, 2012 5:33 pm

alrite, first of all, what kind of game you want to make and how would your player and enemies behave?
I mean, is it a platformer where the player runs around and enemies spawn near him and shoot from the ground, or they follow him around and shoot him? or is it a ship flying in the sky and other ships start shooting at it when it nears them or they chase it? etc
B
16
S
3
G
4
Posts: 40
Reputation: 3,877

Post » Wed Apr 04, 2012 11:22 pm

I have a beginning project built for an RTS. It is a scrollable, zoomable background with main and GUI layers, and includes a clickable mini-map.

So just consider that this project will be a simple form of tower defense. The scroll and zoom aren't really required at this point.

Consider player objects are fixed. These would initially just be a tower-type of object. (A GUI for placing those, and additional variety can come later and is not really in the scope of this example, at least not yet.) For now, let's just do whatever is easiest, such as pre-create those programmatically. Need to spawn enemies as well, which move toward target (center of map). Assume that enemies are 'fliers', so they move without need for complex path-finding for now. Player base is at center of map. A consideration is that enemies would be created in waves, but I'm not sure that is really a big factor in the structure of tracking and handling them, only in the initial spawning of them. So that might be out of the scope of this example too.

I would like to be able to easily increase and extend the types of player and enemy objects as development continues.

I figure this is a fairly simple learning project, but useful for the style of game I am trying to create.

(I'd also like to put the whole experience of this learning project into a tutorial series, since I would like to encourage others to come up with some good RTS games.)

ThanksJaycephus2012-04-05 03:53:21
B
14
S
4
G
1
Posts: 26
Reputation: 1,747

Post » Thu Apr 05, 2012 5:05 am

A commented capx presenting a possible implementation.

I made mobs that shoot each others, but this should display some ways to control many instances on screen, with different projectile types, etc...

Another implementation could be to use families.Kyatric2012-04-05 05:07:04
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Thu Apr 05, 2012 9:30 pm

Thanks. I'll check this out later today.

Yes, that was one thing I was wondering about, if families should be used. No manual update on families yet.
B
14
S
4
G
1
Posts: 26
Reputation: 1,747

Post » Thu Apr 05, 2012 10:03 pm

Families are still missing behaviors.
They can be useful already though.

Simply add object type (the same one, sprite, text, one object type per family) in a family folder and use the family as if it was an object type in events.

For now, experimenting is the best way to get used to families.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Fri Apr 06, 2012 7:32 pm

Kyatric, still 'digesting' the capx. It looks like I'm going to get a lot of learning out of it. Thank you.

I see that you are a supporter of Spriter. Do you think spriter would benefit a simple RTS? Obviously, some kind of cut-scene animation might make good use of it, as I understand it. But what about an RTS-style game that 'just' has animated buildings and units?

B
14
S
4
G
1
Posts: 26
Reputation: 1,747


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, Magistross, mallorcaredes, PavleNikolic and 28 guests