# Scaling problems

**URL:** <https://phaser.discourse.group/t/scaling-problems/13355>\
**Category:** Phaser 3\
**Created:** [June 20, 2023, 7:28pm UTC](https://phaser.discourse.group/t/scaling-problems/13355 "2023-06-20T19:28:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Fang](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Joseph\_Fang](https://phaser.discourse.group/u/Joseph_Fang)\
**Post date:** [June 20, 2023, 7:28pm UTC](https://phaser.discourse.group/t/scaling-problems/13355/1 "2023-06-20T19:28:30Z")

</div>

Hi, everyone. I have a problem that when i try to scale the game, I listen the event “resize”, and i call the function layout() which used for relayout the game. Iin this function, i have a global variable and it is the ratio of the changes, basiclly, i uses this ratio to change the size of every gameobjects, and every location of that objects, also the moving distance of those objects. I am just wondering if there exist an other method that can help me to scale those game objects including size, location, and moving distances instead of using the ratio that i calculated in almost every sentences that objects included.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [June 20, 2023, 7:30pm UTC](https://phaser.discourse.group/t/scaling-problems/13355/2 "2023-06-20T19:30:26Z")

</div>

👋

I don’t think so, but an alternative is zooming/scrolling cameras.

---

<div class="post-metadata">

**Author:** ![ErlendKK](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/erlendkk/32/7695_2.png) [@ErlendKK](https://phaser.discourse.group/u/ErlendKK)\
**Post date:** [August 19, 2023, 10:06am UTC](https://phaser.discourse.group/t/scaling-problems/13355/3 "2023-08-19T10:06:14Z")

</div>

I might be misunderstanding your question, but isn’t this what

```javascript
config.scale: {
        mode: Phaser.Scale.FIT,
    },

```

is for?
