Jump to content

Difficult Experience on First Project Phaser 0.9.5/VS2012/Typescript .9/WIN8


eldernos
 Share

Recommended Posts

I wanted to get a first project running in Phaser and it was an extremely difficult process.   I managed to find clues about configuring the csproj file to support the correct output and ecmascript level and that got me most of the way but, when it tried to compile the Phaser Typescript code, it found two error groups.

 

1)  It said optional parameters were not allowed with default values.   SO, everywhere in the project that there was "varname?: type = value"  there was an error.  I had to remove the question mark from each of those locations.

 

2) The QuadTree inheritance from Rectangle was rejected because _halfwidth and _halfheight were marked as private.   

 

Is this typical or a known issue?  I couldn't find anything in the forums or documentation (such as it is).  

 

What versions of TypeScript have been tested?   Are there compatibility flags that need to be set? 

 

 

Thank you.

Link to comment
Share on other sites

This is probably an issue with TypeScript 0.9 more than anything else. I still compile and build against 0.8.3.0 because they've broken a lot in 0.9 and it's still full of bugs, but even worse the compile times seem to have gone through the floor and with such a massive project I didn't want to have to put up with that right now.

 

However I know I need to move to 0.9 because that is what people will be downloading when they hit the TS site now. I just don't need that pain right this second, so close to nearly being finished. But I guess I have to go through it before I can actually release 1.0, damn it :(

Link to comment
Share on other sites

I spent the last two days moving a huge project from TS 0.8 to TS 0.9 I almost finished... but it's really annoying :/

 

there is many breaking changes and many weired behaviours. I think that it also broke some VS features, for exemple when errors ar reported on VS and you double click to jump to that error, you jump to the first line of the file containing error, not to the error itself ...


in my case, most of broken compilation was because of duplicate declared variables (declare var something:type).
 

also if you are using classic javascript codes as TS code there are some cases that don't compile wihout modifications.

 

Link to comment
Share on other sites

My overall process of getting the code to compile took about 30 minutes (removing a bunch of question marks) and changing the private variables in rectangle to public.   It works, or seems to.   I haven't dug too deep into the full library so I may be missing something but my understanding of the code changes I made seem like they'd be work-around-able if not nominal.

Link to comment
Share on other sites

  • 3 weeks later...

Looks like I encounter the same problem here. Is there any way for me to rollback to Typescript 0.8.3 using the NodeJS version? 

I want to use Phaser 0.97 now, but I'm still just learning and don't know how to customize it to work properly for Typescript 0.9 yet.

Do I need to fallback using pure javascript for now?

 

I also want to know more the syntax and usage of Phaser 0.97 since all the example is for 0.95.

Link to comment
Share on other sites

  • 3 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...