Recommended Posts

Hi,

i'm looking for best pratices to start a phaser project with TypeScript.

Most of the tutorials are not up to date (2013 on the site).

What about project's structure (i mean directories,  naming convention etc.), which tools etc ?

EDIT :

you can now download a complete Visual Studio Template for Phaser with TypeScript : (it's up to date and easy to install (VS Extension))

https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2

https://github.com/fairydhwen/PhaserTypeScriptTemplate/blob/master/README.md

Regards,

Fairy

Regards,

Share this post


Link to post
Share on other sites

I am using Visual Studio Community, after you create a typescript project, in the project properties you have an option to "combine javascript output into file", really comfortable. (screenshot attached)

other than that use node / npm to refresh the page when developing, I am using this for development - https://github.com/tapio/live-server

 

good luck!

Lior

Screenshot (8).png

Share this post


Link to post
Share on other sites

Hi, if you are on Windows, then Visual Studio 2015 Community is very very comfortable :) Good thing is, that you can code in it not only in Typescript, but almost in everything nowdays - so, single IDE for everything (for example very comfortable support for Cordova, want to wrap your game for Windows Store - make universal Windows App, ...)

As @liorfrenkel wrote, you can merge output into one file. And if you need further processing like minimization, you can run your custom post-build tasks.

If starting, I wrote small tutorial on creating simple game in Typescirpt here: http://sbcgamesdev.blogspot.cz/2015/05/phaser-tutorial-dronshooter-simple-game.html

 

Share this post


Link to post
Share on other sites

Hey,

I finaly made a full template for Phaser projects with TypeScript. You can get it at : https://github.com/fairydhwen/PhaserTypeScriptTemplate

This is a complete structure for small to large projects with best practices i found.

There is all you need to start, with sample inspired from Richard's tutorial.

PhaserTypeScriptTemplate.PNG

Please feel free to contact me if you have any questions or comments

Regards,

Fairydhwen

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.