Question about spawn creatures (enemy)

For questions about using Classic.

Post » Wed Apr 29, 2009 6:43 pm

In the tutorials I looked at, I see something related with creatures. If you want to spawn a monster or a bullet, you need to put that into the level, but out of screen boundaries.
If you want to spawn monsters, you need to put their boxes in the level.

Let's say I want to create a common pool and use that pool in every level. I don't want to put spawning objects outside the screen, or I don't want to put creature boxes on the level. Instead of that, it will take necessary item from the common pool/database and put it on the screen whenever the object spawned.

I think putting necessary objects as hidden and destroyed on the beginning on the level can be problematic when we have hundreds of bullet type and hundreds of creature type. Because in that method we will need to put all the spawning objects on the level. This can increase the level's size and can create a performance problem in the beginning of level.

I am noob at Construct, so i am not sure about this method. What are your ideas or suggestions about this issue?
Posts: 18
Reputation: 886

Post » Wed Apr 29, 2009 6:57 pm

It won't affect performance at all. You can spawn/destroy hundreds of objects in a single tick with no performance issues.

Since you have to have an object in order to spawn an object, that object has to exist somewhere. Sticking it outside the level is just a way of getting out of your work space. You can stick it on a different layer and hide/lock the layer if you want.

Or you can put that first monster in your game level where you want it to appear, and just don't destroy it. Then use spawning objects, or an array, or an .ini, or whatever to create the rest of your monsters. It's entirely up to you, that tutorial just shows one way to do it.

Or if you really want to you can just copy/paste your monsters all over the place in the layout wherever you want them. If they have more than one piece, though, it's easier to use spawn points, so you're not copy/pasting several objects and placing them all just right.
Posts: 4,348
Reputation: 10,971

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests