MKelm / mct

"Mass Control Tycoon" a GPL game for Windows, Mac and Linux
Other
5 stars 1 forks source link

MCT developer tool #34

Open MKelm opened 11 years ago

MKelm commented 11 years ago

node-webkit is a web application runtime mainly, and the current HTML5 audio element is the simplest type of a widget app inside MCT.

I have the idea for a larger additional in-game app, which will be accessible like the console in Counter Strike (e.g. by pressing the ^ key). But it should not be a console, it should be a tool for developers.

The game should contain more and more definition files to make customization, modification and game balancing changes efficient.

The developers tool can give features to change these definitions with an easy to use interface without editing / changing all parts of JSON files. That can reduce the effort to make changes because the tool features can contain additional calculation / help features* to improve the balancing and modification process of the game. *e.g. showing (valid / broken) dependencies between different definition types / files

The developers tool should not use pixi.js https://github.com/MKelm/mct/issues/18 it is better to use a HTML5 layer with DOM objects, which are better designed for application interfaces. The display / renderer performance is not important for a HTML5/CSS app without graphic effects. And the external library contains jQuery already which is very helpful for dynamic DOM interfaces.

node-webkit itself contains a very useful set of developer tools related to the runtime, see "Developer tools" here: https://github.com/MKelm/mct/wiki/Modifications

jackery4444 commented 11 years ago

I think that the developer console that comes with node-webkit is excellent; with the javascript console you can achieve more or less anything. If we added a few functions for use by the console then I see no reason why we would need our own.

MKelm commented 11 years ago

I do not want to make a developer console, more an editor for game content configurations / definitions with all types of dependencies validation, e.g. it can contain a level / scenario editor and an editor for global game calculation configuration.

jackery4444 commented 11 years ago

Oh, sorry I misunderstood. It sounds like a great idea, but, correct me if I'm wrong, a scenario editor used to create new scenarios wouldn't be possible in JavaScript as it would require the creation of new files. I love the idea of being able to edit things like names, planets and other values to change the difficulty though,

MKelm commented 11 years ago

I updated the atlastojson tool in lib/base/tools but this tool is no longer important because I have added a custom build version of pixi.js with my atlas file loader, but we do not have any spine animations yet, I have to draw something ... Another developer tool is now in the repository, the google closure compiler it can be used by running compile.sh in the root folder. The compile-run.sh needs a customization, because it contains my local file url to the compiled mct. This is a simple compile, the more advanced compile does not work, I think we have too much external library stuff, and the "extern" reference function of the compiler seems not to work correctly .... It is not a must have tool, because the speed improvement of it might be less important because we have local files.

MKelm commented 11 years ago

The developer tool can have e.g. a hotkey to open https://github.com/brads-tools/node-webkit-ace-editor it can be useable by downloading it from the editor repository and setting the location of the editor in a configuration file to enable the hotkey in MCT or something like that, because the editor opens each file in a new window, the best command to open the editor in MCT is module("nw.app").Shell.Open(...). It should be not the main editing tool, because the focus of the developer tool should be to make editing easier, but it can be helpful to make more advanced changes without quitting MCT.

The game needs a reload hotkey for that too, so all changes will be loaded correctly.