Overview
Phaser editor 2d is a web-based, multi-platform IDE to develop HTML5 Games based on the fast and popular Phaser Framework. It provides a framework for creating animations, handling user input and creating physics-based games. It provides a basic editor for coding Javascript/Typescript which follows the phaser ‘Standards and APIs’.
This editor brings a powerful features when it comes to HTML5 Game Development:
- Phaser editor provides a built-in code editor for writing custom game logic.
- It provides Asset manager for managing game assets such as images and audio , and a built – in physics editor for similar characteristics and attributes based games. Also the Drag and drop interface for creating game scenes and animations is a very convenient tool for users.
- It also provides syntax highlighting,code completion, and other productivity features to help developers write game logic and scripts using javaScript and typeScript.
Create a first Project in phaser editor 2d
Let’s assume that you have downloaded the phaser editor 2d on your system or device.
After that you open the phaser editor and you will see three options.
- New Project
- Open Project
- Recent Project
Steps:
- Click on the new Project and you can see a list of a project template. About templates you can see in further topics.
- Click on open project you can open an already created project.
- Click on recent project you can open a recently opened project.
Finding the right template from plethora of choices
Phaser Editor 2d provide a couple of project templates that you will be able to reuse
and apply in any future project you work on. The advantages of having a template is that
It is a good starting point for your game, and we can save you a lot of time when you are setting up your game.
This templates will include scenes:
Boot : the first scene that is loaded by phaser, and it will load the assets that all are required in the preloader scene.
Preloader : It displays a game logo , a progress bar and loads all of the assets that are needed in the game.
Game : Game scene contains the main logic for your game.
There are 3 types of templates
- Basic javascript
- Basic typescript
- Webpack TypeScript
Basic javascript
- It is a lightweight and highly interpreted programming language.
- It is the most well- known scripting language for web games and web pages.
- Javascript helps you create really awesome and crazy fast games . You can develop your game with a console like look and feel and give your users the best Graphical User Experience.
Basic typescript
- It is a strongly typed programming language that depends on JavaScript that compiles to plain JavaScript.
- Typescript follows “classic” object-Oriented design,which plays nicely with many approaches prevailing in the game dev industry.
Webpack Typescript
- Webpack is a popular tool that we can use to bundle all our typescript code into a single minified file.
Understanding basic default project structure of basic javascript in phaser editor 2d
- Views : A view is a small window or a part of a inside the workbench window.They are commonly used to present the information of a certain resource.
- Toolbar : In the toolbar there are some tools, using those tools you can move gameobjects ,set gameobjects origin.
- Editor Area : In this editor area you can align a gameobjects ,set position and a set scale of a game object.
Running the project on a local machine
To run a project on a local machine you can click on the play button on the left side of the editor.
This play button starts the local web server and the system browser and points to the WebContent of the project. In other words, it runs the game.
Another way to run the game is pressing the F12 key.
Conclusion
I hope that this blog might be helpful to understand phaser editor 2d .In future See Phasor editor for 2D has numerous benefits that we will surely explore in the future blogs. Currently we just explained to you a basic setup that could get started with the editor. When one caters a game development project there are plenty of complexity which could challenge even the most skilled HTML5 game developers.
So, if you are looking to launch a big project in the game development market, it is highly suggested that you consult a game development company. They will provide you wonderful insights about your project and few clutch characteristics that you were never really aware of before. Till then thank you for reading and keep tracking our blogs.