Cocos2d-x JS - Typescript - MVC - Entity Framework

Hi, I have recently written an article and created examples for the creation of a cocos2dx game with Typescript:

It covers the following topics
MVC
Entity Framework
TDD - Mocha - Chai
Automated builds - using webpack and webpack-dev server

The source is located here:
https://github.com/dalste/starting-typescript-and-cocos2dx
the readme file contains links to the relevant articles.

Part 7 of the tutorial series, which discusses usage of the dijon the Entity Framework will be released very soon, but the complete source for the game is already present within the example CocosTsGameMVC project.

3 Likes

awesome :heart_eyes::clap:

Note - after doing some testing on native JSB. I noticed a few incompatibilities with JSB - due to the inheritance model used by typescript compiler - it can largely go unnoticed when using a more compositional approach to development i.e not directly extending the cocos classes - iā€™m pushing a fix out very soon.

1 Like

MVC code now works on JSB, Restructured so that we do not extend core cocos classes in typescript. Moved Node and Scene LifeCycle Extensions into dalste.mvc javascript IIFE package with corresponding typescript definitions.

Updated Factories to return Containers rather than cocos 2dx derived objects directly.

Will update articles accordingly very soon