# Create a game with geometrical shapres

**URL:** <https://phaser.discourse.group/t/create-a-game-with-geometrical-shapres/3111>\
**Category:** Phaser 3\
**Created:** [July 14, 2019, 11:29pm UTC](https://phaser.discourse.group/t/create-a-game-with-geometrical-shapres/3111 "2019-07-14T23:29:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leoparis89](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@leoparis89](https://phaser.discourse.group/u/leoparis89)\
**Post date:** [July 14, 2019, 11:29pm UTC](https://phaser.discourse.group/t/create-a-game-with-geometrical-shapres/3111/1 "2019-07-14T23:29:33Z")

</div>

Hello,  
I would like to build a game with juste basic geometrical shapes, thus not having to import images.  
Is there a way to do this properly with phaser 3 ?

I have attempted something like this:

```
  const rectangle = scene.add.rectangle(100, 100, 10, 10, 0xff0000)
  const rectangleWithPhysics = scene.physics.add.existing(rectangle)
  // cannot do rectangleWithPhysics.setBounce !

```

All I want is to create a geometric object that has all the methods as when I created a rectangle from an image like below:  
`scene.physics.add.image(300, 300, 'rectangleImage') // gives me all the methods I want, like setBounce !`

---

<div class="post-metadata">

**Author:** ![Telinc1](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/telinc1/32/60_2.png) [@Telinc1](https://phaser.discourse.group/u/Telinc1)\
**Post date:** [July 15, 2019, 8:27am UTC](https://phaser.discourse.group/t/create-a-game-with-geometrical-shapres/3111/2 "2019-07-15T08:27:22Z")

</div>

`scene.physics.add.existing` will only give the Game Object passed to it a physics body. `add.image` and `add.sprite`, on the other hand, create special subclasses of the respective Game Object which pull in those methods. For any other Game Object, you can find equivalent methods on its [`body`](https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.GameObject.html#body__anchor) property.

The physics-related methods on Arcade Images and Arcade Sprites come from the mixins in the [`Phaser.Physics.Arcade.Components`](https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Components.html) namespace. If you really want them on your shape Game Objects, you can make your own child classes and apply those mixins to them - or just apply them directly to the constructed objects. If I were you, however, I would just use the `body` property.
