NightHaunter's Recent Forum Activity

  • Thanks for the notice. But please, take a week or two more if you want to - it's so deserved! :D You rock!

  • Here is a quick example how system I described could work:

    Spawner example

    It's very basic, but expanding it should not be too hard.

    This is so awesome! Thank you so much vee41 :D This looks very promising and much better than anything I could come up with. I obviously still have a long way to go with construct :D And great you included several spawning locations - that only makes it even more flexible!

  • Thanks a lot for the input, It's a good suggestion with the currentwave/x to differ between the monsters! I'll post in this thread when I've done more work on it. More suggestions are very welcome as well :)

  • Does anyone else feel like contributing towards making a good spawn system? I'll update when I've done more progress myself but had hoped to hear from more - surely others must have had the same challenge? :)

  • Good to hear that! Would you mind sharing some of your ideas already?

  • Hi all!

    The forum contains a lot of great information on many things but I believe one topic is lacking that many other than me could benefit from: how to create a flexible wave system that can control multiple enemies and differences in both waves and maps. All posts on the topics (that I could find) seem to only refer to waves with only 1 type of creature and with the same increment from wave to wave (e.g. 5 more monsters per wave).

    First of all, let me clarify what I mean by a flexible wave system. In most defense games (TD, BD) and games like Orcs Must Die and Dungeon Defenders, there is a spawner system which controls which enemies spawn at what time and how many of each. It is such a wave system that I'm trying to figure out how to go about in Construct 2. I have been unable to find any information about this on the forums, but please let me know if I've missed any! If someone has already made a system I hope they will share some of their ideas :)

    Let's say we have a game with 5 levels each containing 5 waves. The game also includes 3 different monsters. In level 1, wave 1 I want 5 monsters of type 1 to spawn. In wave 2, I want 5 monsters of type 1 and 3 monsters of type 2. In wave 3, perhaps 10 monsters of type 1, 5 monsters of type 2 and 1 of type 3. The number of monsters will be different in the next levels as well. This quickly becomes very difficult for me to deal with in an efficient way.

    What I've tried so far. The first example has random spawning - not fixed, which is what I would prefer.

    1) In this system, I have a list (a dictionary, really) containing what monster types that are allowed to spawn in a given level. I also have an array which holds the number of monsters to spawn in a given wave. What I then do is when the monster is spawned I randomly make it one of the types that is allowed in that level. So, lets say wave 1 spawns 10 monsters that can be of either type 1 or 2. The function will then spawn 10 monsters with random types, e.g. 4 of type 1 and 6 of type 2. This actually works quite well and is relatively easy to scale from wave to wave and level to level. However, this is random spawning which really isn't what I want.

    2) This system is what I'm trying to implement now but it just seems full of hassle. This would be done with arrays and the ability to count instances. Let's say we are in wave 1 of level 1 and want 8 enemies of type 1 and 2 of type 2. What I could do is make an array which would hold the wave number and the monsters to spawn. One way I could think off would be this: (1,1,1,1,1,1,1,1,2,2). I could then, when spawning enemies, use the count to set the monster type, e.g. when monster count is 3 it would choose monster type from index 3 (or 2 with zero-based but let's just ignore that for now to avoid confusion <img src="smileys/smiley1.gif" border="0" align="middle" />) which would be 1. And when monster count became 9 it would spawn a monster of type 2. I haven't tried this system yet but I believe it would work. The problem is, if I end up having a total of hundreds of waves each spawning dozens of enemies it quickly becomes extremely messy.

    Does anyone have any ideas how to go about it? I was hoping that by posting here, we could together come up with a good way to create a flexible spawning system which makes it easy to control what monsters to spawn in what wave. I'm sure that this would help anyone who is trying to create e.g. a tower defense game and be a great resource to the community.

    Cheers!

    I voted for modularity but I want to add that a debugger was very close behind. I'm horrible at debugging my games right now and a build-in debugger of some kind would help me tremendously. Moreover, I believe a debugger would be a valuable addition from an economic view: it's one of those things that us not-too-technical users really need help with.

  • Ashley Wohoo! Fixed it for me. Thanks a lot for the quick response and action! Go Scirra :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm having the same issue. "Uncaught typeerror: object#<object> has no method 'indexof', common_prelude.js, line 461 (col undefined).

    However, my crashes do not happen at random. In my game it appears when I use most of my spells. The error either triggers just when the spell is cast on a monster or JUST before the monster dies (depending on the spell - always the same time for the same spell). All browsers give the same error at the same time as well. My project is pretty big so I've at first just uploaded a few screenshots of the events here: dl.dropbox.com/u/4793120/error123.zip. Let me know if you want the whole, messy capx.

    Edit: a small description of the game might be needed. Monsters spawn at top and move downwards. Player must click on monsters and cast spells on them to keep them at bay. So a lot of the crashing happens when the player clicks on a monster combined with a spell use.

  • Entry

  • Thanks, I'll look into it :)

  • Thanks for you answer, TELLES0808

    I'm using a project-file but made it into a capx which you can get here:

    https://dl.dropbox.com/u/4793120/capxversion.capx.

    The thing I'm most interested in is figuring out the right way to do multiple creeps, towers and items. And especially how I should approach correcting all my horrible code :)

NightHaunter's avatar

NightHaunter

Member since 20 Aug, 2012

None one is following NightHaunter yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies