# Need help with game project

**URL:** https://discourse.processing.org/t/need-help-with-game-project/24993
**Category:** Coding Questions
**Tags:** homework
**Created:** [October 29, 2020, 1:16am UTC](https://discourse.processing.org/t/need-help-with-game-project/24993 "2020-10-29T01:16:52Z")
**Posts on this page:** 4
**Page:** 3

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [November 16, 2020, 1:59pm UTC](https://discourse.processing.org/t/need-help-with-game-project/24993/41 "2020-11-16T13:59:09Z")

</div>

> [@Someone please help solving a problem : shooting bullets](https://discourse.processing.org/t/someone-please-help-solving-a-problem-shooting-bullets/21210/4):
>
> Here is a shooting example with an explosion where the bullets hit a surface or wall Click the mouse in the upper screen area. This Sketch has multiple tabs originally. Chrisir // \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* // joined pde-file of folder ShootTest3 // \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* // \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* // tab: ShootTe…

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [November 16, 2020, 5:46pm UTC](https://discourse.processing.org/t/need-help-with-game-project/24993/42 "2020-11-16T17:46:31Z")

</div>

“Asteroids Vs. Bullets Sim”:

- [Studio.ProcessingTogether.com/sp/pad/export/ro.9K-kjhuONcJDZ](http://Studio.ProcessingTogether.com/sp/pad/export/ro.9K-kjhuONcJDZ)

---

<div class="post-metadata">

### Author: ![claudinho7](https://avatars.discourse-cdn.com/v4/letter/c/e47774/32.png) [@claudinho7](https://discourse.processing.org/u/claudinho7)
#### Post date: [November 16, 2020, 8:41pm UTC](https://discourse.processing.org/t/need-help-with-game-project/24993/43 "2020-11-16T20:41:35Z")

</div>

i looked in both examples but i dont understand where i should insert the debris class into my code to make it spawn 1 every time an asteroid dies. I’d apreciate if you can have a look and explain for my example where i should add it.

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [November 16, 2020, 9:01pm UTC](https://discourse.processing.org/t/need-help-with-game-project/24993/44 "2020-11-16T21:01:21Z")

</div>

`class Bullet `

in this class, there is a method where the explosion starts. It is called ` void explode () {` .

Here the debris / shrapnels / missiles are added to the ArrayList `missiles`. Yeah. Call it where YOUR asteroid dies.

In draw also call `ExplosionManager()` to let the debris fly.

before setup():

```auto
// for explosions (these are actually Shrapnels)
ArrayList <Explosion> missiles; 

```

IN setup():

```auto
  // explosions: Create an empty ArrayList
  missiles = new ArrayList<Explosion>();

```

Chrisir

[Previous page](https://discourse.processing.org/t/need-help-with-game-project/24993.md?page=2)
