FAQ: Learn Phaser: Basics - Start Making A Scene

This community-built FAQ covers the “Start Making A Scene” exercise from the lesson “Learn Phaser: Basics”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn Phaser

FAQs on the exercise Start Making A Scene

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

How does the color of the text correspond to the background? On the code I don’t see how the color of the text is initially made so I was wondering how it is done.

1 Like

This reply is quite late, but in case you are still wondering about this (or someone else reading this is), I think that the text is simply white since we didn’t provide the third argument (style) which is optional. Even if you change the color of the background the text will remain white (e.g. if the background is white, the text will be invisible). You can change the color of the text by adding an object with the style properties.

E.g. to make the text gray:
this.add.text(20,20,"Hello, world!", {color: 'gray'})

More information is available here in the official documentation:
https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.GameObjectFactory.html#text__anchor

1 Like

Fun fact that I finally figured out by trial and error: Phaser does not support ES6!! Hope this helps someone else