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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.