# What is the best practice for level management?

**URL:** <https://phaser.discourse.group/t/what-is-the-best-practice-for-level-management/4717>\
**Category:** Phaser 3\
**Created:** [December 27, 2019, 3:51pm UTC](https://phaser.discourse.group/t/what-is-the-best-practice-for-level-management/4717 "2019-12-27T15:51:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@doug](https://phaser.discourse.group/u/doug)\
**Post date:** [December 27, 2019, 3:51pm UTC](https://phaser.discourse.group/t/what-is-the-best-practice-for-level-management/4717/1 "2019-12-27T15:51:17Z")

</div>

Hi there,

I am new to phaser and wanted to ask something fundamental. What is the best way to switch from one level to the next?

I currently, use the same scene object and call restart once the level changes. As the level index is incremented, the create() function creates a new level based on my configuration.

Is this a proper way or should I create a new scene for each level or maybe there is a better way…

I’d be grateful for your guidance.

Thanks,

Doug

---

<div class="post-metadata">

**Author:** ![snowbillr](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/snowbillr/32/332_2.png) [@snowbillr](https://phaser.discourse.group/u/snowbillr)\
**Post date:** [December 27, 2019, 4:54pm UTC](https://phaser.discourse.group/t/what-is-the-best-practice-for-level-management/4717/2 "2019-12-27T16:54:11Z")

</div>

I don’t know that I can confirm that your approach is a best practice, but I can confirm that I’ve done things your way and its worked well for me. I currently pass whatever level data I need to into the `restart` call and use that in my Scene’s `create` method to construct the level.

---

<div class="post-metadata">

**Author:** ![Thundros](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/thundros/32/2057_2.png) [@Thundros](https://phaser.discourse.group/u/Thundros)\
**Post date:** [December 27, 2019, 5:03pm UTC](https://phaser.discourse.group/t/what-is-the-best-practice-for-level-management/4717/3 "2019-12-27T17:03:13Z")

</div>

How do you pass all the data from 1 scene to another, then activate it in the 2nd scene?

---

<div class="post-metadata">

**Author:** ![snowbillr](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/snowbillr/32/332_2.png) [@snowbillr](https://phaser.discourse.group/u/snowbillr)\
**Post date:** [December 27, 2019, 5:26pm UTC](https://phaser.discourse.group/t/what-is-the-best-practice-for-level-management/4717/4 "2019-12-27T17:26:31Z")

</div>

I pass the data my scene needs to run via the `restart` method: [https://photonstorm.github.io/phaser3-docs/Phaser.Scenes.ScenePlugin.html#restart\_\_anchor](https://photonstorm.github.io/phaser3-docs/Phaser.Scenes.ScenePlugin.html#restart__anchor)

---

<div class="post-metadata">

**Author:** ![doug](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@doug](https://phaser.discourse.group/u/doug)\
**Post date:** [December 28, 2019, 4:44am UTC](https://phaser.discourse.group/t/what-is-the-best-practice-for-level-management/4717/5 "2019-12-28T04:44:53Z")

</div>

Hi @snowbillr,

Many thanks for your time and for your answer, I do appreciate it.

I create sprites from graphics ( by graphics.generateTexture() ) however, the sprites seem to lose their sharpness after restart.

I feel there might be a better way out there but I will go with this method for now.

Cheers,

Doug

---

<div class="post-metadata">

**Author:** ![fselcukcan](https://avatars.discourse-cdn.com/v4/letter/f/b5a626/32.png) [@fselcukcan](https://phaser.discourse.group/u/fselcukcan)\
**Post date:** [December 28, 2019, 12:05pm UTC](https://phaser.discourse.group/t/what-is-the-best-practice-for-level-management/4717/6 "2019-12-28T12:05:03Z")

</div>

The way you describe seems perfectly fine and convenient. One can say it can be the fundamental way to achieve level management.

I don’t see connection between your sprite sharpness issue and level management via scene restart. Can you elaborate a bit and probably in another post if it is not related to this topic please?
