public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

How to get comfortable with typescript for your game.

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: How to get comfortable with typescript for your game.
  • Original author: nio kasgami
  • Original date: May 26, 2016
  • Source thread: https://forums.rpgmakerweb.com/threads/how-to-get-comfortable-with-typescript-for-your-game.62378/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Learning Javascript

Summary

This thread is a "plus" to the current thread made by @Dr.Yami here but will go more on the "Game Dev Aspect" on the shot when you are not making plugin for anyone else or truly intend to use other people plugin. So this thread is for show you how you can get "comfortable" for dev  your game coding with Typescript So for this you would need to get : a IDE who support the add of Typescript as language (by downloading or downloading the package from Sublime text etc) for myself I...

Archived First Post

This thread is a "plus" to the current thread made by @Dr.Yami here but will go more on the "Game Dev Aspect" on the shot when you are not making plugin for anyone else or truly intend to use other people plugin.


So this thread is for show you how you can get "comfortable" for dev  your game coding with Typescript


So for this you would need to get :

  • a IDE who support the add of Typescript as language (by downloading or downloading the package from Sublime text etc) for myself I use Sublime Text 3 
  • JSLint for detect error in your codes (I honestly don't use much this since it's not working wells with sublime text 3)
  • DocBlockR for write fast documentation or comment for your code if you ever doing comment (will be explain later) https://github.com/spadgos/sublime-jsdocs
  • a TsConfig.json for setup your workspace
  • a coding workspace



SO on that I will assume that people know how to create Projects in their respective IDE so I will not explain much on this but in simple now 


for setup our workspace  we need folders then example for my game I placed a folder named "AloneJS" who's my coding workspace where all my code will get.


THEN on that we need to create a folder who will contain our "Final" products or the JS compiled code. for myself I call it "Final" but you can call it like you want like "Output" or "MarsmhallowPowa!" I just do it for organisation sake.

rmPjy3v.png

THEN now we create a ts Files and let's call it "first" you will able to erase it later it's just for init the tsConfig.JSON


so save the TS files then click the button for your IDE to compile the code (CTRL + B ) for Sublime Text


Then they will appear (on sublime) a lines where you can enter you parameter


enter this line 


-init or -i


it's will call a parameter and create a TsConfig.Json for you.


SO NOW let's configure your TsConfig.Json


THEN it's will give you a default setting and you can edit like you want. Just check how works the configuration in the Compiler Options in the main typescript website.


but on that I will show how I do mine : 


{
"compilerOptions": {
"target": "es5", // Important it's permit the system to compile in ES5 and avoid the famous error with property definition
"removeComments": true, // remove your comments in your JS files
"module": "commonjs", // Use the common JS but you can change for nodes etc
"noImplicitAny": false, // avoid the build to throw you error when you use the any word
"sourceMap": false, // I don't even f*cking know what's the use of it lol
"outDir": "C:\\Users\\Nio kasgami\\Documents\\Games\\Alone\\AloneJS\\Final" // Will set where the files are compiled for me it's "final"
},
"exclude": [
"node_modules" // exclude the nodes modules
],
"files": [ // Files permit to include wich files are compiled AND you can with that get the reference of other code from other files in your current
// files e.g : if you works on Manager and one of the code you are using is in core it's will not throw a error and even give you reference.
"C:\\Users\\Nio kasgami\\Documents\\Games\\Alone\\AloneJS\\rpg_core.ts",
"C:\\Users\\Nio kasgami\\Documents\\Games\\Alone\\AloneJS\\rpg_managers.ts",
"C:\\Users\\Nio kasgami\\Documents\\Games\\Alone\\AloneJS\\rpg_objects.ts",
"C:\\Users\\Nio kasgami\\Documents\\Games\\Alone\\AloneJS\\rpg_scenes.ts",
"C:\\Users\\Nio kasgami\\Documents\\Games\\Alone\\AloneJS\\rpg_sprites.ts",
"C:\\Users\\Nio kasgami\\Documents\\Games\\Alone\\AloneJS\\rpg_windows.ts",
"C:\\Users\\Nio kasgami\\Documents\\Games\\Alone\\AloneJS\\rpg_enigma.ts"

]
}




so on that if we return on the fact off making comment it's because in Typescript you get a meaningful description of methods...here a examples.

jDVHPUj.png



as you can see it's a really nice tools and DocBlockR permit to make nice comment with only phew touch pressing.


on that you can make really easily your code without having to worry.


Yes Typescript seem a little overwhelming in beginning but it's a nice language who make everything's more faster! 


PS : also it's a good idea to enclosing your codes in a Namespace for avoid that the global var get spread in the global space for nothing !


On that I hope you find this useful I just explain my joy to use this awesome language who are fast for game dev  and offers intelligent debugging! 

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#rpg-maker-archive#js-learning

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar