Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by pinehead

OK,

#impactjs newb here, i'm trying to create an affect that is much like the missle defender game. My affect is multiple falling (missles in this instance) entities from the sky. I'm looking for some concept help, so here are my questions.

1.) Do i create multiple visible instances inside of the entity js file?
2.) If not where do i create it?
3.) What might the code look like that puts multiple "random" instances of this on the screen.

Thanks guys, Look forward to working with you.

1 decade ago by MikeL

First of all welcome to Impact pinehead. I'd recommend going through Impact's pong tutorial and building it yourself, if you haven't done so already. This will give you a decent feel for where things go and how entities are created. This should help answer 1 and 2.

For number 3, you may want to create an invisible entity that spawns other missile entities at certain intervals of time and at random locations. For spawning, take a look at how the player spawns the EntitySlimeGrenade in the jumpnrun demo. This is in the player.js file in the entities folder for the demo.

The invisible entity would be placed in a level via Weltmeister. It would then generate the missiles as the game progresses.

1 decade ago by pinehead

Wow, this is a great start. I really appreciate it!
Page 1 of 1
« first « previous next › last »