Pattern for Many enemies, bullets, missiles

0 favourites
  • 9 posts
From the Asset Store
Lasers, Blasts, Beams, Bullets, & Missiles! AAA quality Energy FX for your game.
  • 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

  • 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 :)

  • 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

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.)

    Thanks

  • 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.

  • 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.

  • 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.

  • 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?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)