RPG Maker Forums

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.


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.




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! 

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top