The Best Resources For Learning TypeScript for Game Development
2020.12.10 by COCOS
Tutorials

With the growth of Cocos Creator to 3.0, there are a lot of great things inside the program, including 3D game development. But before you get into all of that, you'll have to write your games in a language that might be new to some game developers. For many, learning to code in JavaScript and TypeScript can be very hard to understand.

That's why we are bringing you an ultimate beginner's guide to the best places to learn not only to code in TypeScript.  If you already know Typescript, awesome! Go start building your games!

Why learn TypeScript?

Talking to our developers of the Cocos Creator engine, we talked a lot about this question. Why not just make everything in JavaScript since Typescript is just a JavaScript with static-type settings and other features? TypeScript comes with many things you can't get with JavaScript, such as being easier to compile scripts, use of JavaScript libraries, and a bunch of great features you'll learn about as you learn TypeScript.

So, we compiled a bunch of videos, books, and other material to help you out!

Videos

This video is a great short video that gives you a complete overview of the language and why it's great to use it compared to JavaScript natively.

Got 3 hours? You can learn TypeScript from scratch (no JavaScript knowledge required) and get everything you need! Just make sure you have Microsoft Visual Studio Code installed first!

This excellent talk by James gives you a straightforward setup on how exactly you'll be able to build games with TypeScript for HTML5. Great to help you understand what Cocos is doing in the background and how to prepare your game project.

Start using Typescript to make a simple progress bar in Cocos Creator. Follow the tutorial and show off your skills.

Books

If you really want to read up on everything it can do, then go straight to the source at Microsoft. This site has everything you need to know about the language

If you want something a bit different and not as technical, This book by Basarat Ali Syed is an excellent book with tons of added looks into Node.js and JavaScript as well.

This paperback/Kindle book is the best introduction to Typescript and allows you to read up without your need for a computer. Perfect for those quiet nights and sunny days.

Online resources

If you need help, our developers are always checking the forums, and many other developers are using the forums for their game development, so go ahead and sign up and be a part of the community

We have a discord group filled with some great developers. Just hop in and ask away. Also, show off your games when you finally build them.

Microsoft's TypeScript team have their own discord group. If you have some simple issues or issues with the language itself, they are always happy to share some help to get you back on track with your game.