
The company
CodeOrchestra has released a new version of its revolutionary live-coding tool -
COLT . The developers added support for JS and made a new interface on the
JavaFX platform.
In the first part of the article I will tell you more about the Colt, and in the second I will share the experience of using this wonderful product in a combat and technically complex project.
What is COLT?
Of course, any new tool in the arsenal of the developer must earn the trust and almost painlessly integrate into the product development process. Colt is just created in order to simplify this process - it removes the compilation step and any code you write will be automatically delivered to the working application with the previous state. Do not waste time on compilation - read Habr!)
Key features of COLT:
- Supports Windows, Linux, Mac, Android, iOS platforms
- Is a separate tool. You do not need a special IDE in order to work with it. You just save the code in your editor and the code is delivered to the working application.
- Tracking application resources (pictures, sound, skins, etc.) That allows you to make the designer and programmer work more efficiently than ever. As soon as the file is saved to the place of the old one, it is immediately delivered to all the running devices. The designer immediately sees how it looks, breathes its design in the working application.
- The application in the live-session mode may be available on the network. COLT runs a web server that can deliver changes even if the application is running on another computer in the office. Immediately on multiple computers and multiple devices. You can bring to testing any number of people and correct errors as they occur. No need to play them later, they will already be visible on a specific device. When the developer changes the implementation, it will be updated on all computers and devices immediately.
')
How to connect COLT to your project?
1) Create a new ActionScript project

2) Save the colt project file. This is a regular xml file with the .colt extension that can be added to the project repository, since he keeps relative paths
3) Specify the main AS class and additional project compilation parameters

4) Put [Live] annotation on the classes that you are going to edit in real time

5) Start a live session

Any of the following changes will be automatically delivered to the working application:
1) change the body method
2) adding method
3) adding a static method
4) adding a field
5) adding a static field
If you want to disable live code for a method or class, add an annotation [LiveCodeDisable]
In order to adapt your application for development in live mode, you can subscribe to the change event of all or a particular class, method, resource, and update the static state of the application objects. For example, in order to update the texture in materials, the safest way to do this is to unload the old texture from the GPU, initialize an instance of the new resource, load it into the GPU, and point out to all the materials that used the old one. In the same way, you can write a shader in real-time mode. You will need to create a method that will remove the old program from the GPU, compile the new one and upload it back. To subscribe this method to the update event of the shader, use the [LiveAssetUpdateListener] annotation if the shader is stored as a separate resource on the hard disk or [LiveCodeUpdateListener (method = ”getDiffuseProcedure”)] if it is generated by the method. Also, if you are using a shader caching system, all mappings must be cleared in order for the material shader to be initialized again and use the shader part you changed in all its variations.
As a flash developer, I am very pleased with the emergence of such a powerful tool that fundamentally changes the approach to the development of interactive applications. It is very easy to start experimenting with it, because You do not need to restore the application state every time.
He helps you with almost everything. With its help, it is pleasant to optimize the scene drawing rendering, correct bugs in algorithms, set parameters for game objects, work with procedural geometry, write shaders, and much more.
In our project Realaxy, there is a lot of work with procedural geometry. The first “wow” effect occurred when it was necessary to fix a bug for calculating normals and tangents in the procedural geometry of the walls.

Launched a live session. Gathered a test scene. After each change in the method of calculating normals and tangents, it was performed for all objects that were on the scene and I instantly saw the result of the calculation. Moreover, I could immediately receive incoming and outgoing data from this live session and save them as a unit test.
It is no secret that testing the 3D engine is not an easy task. Any change in the shader, scene collector, material, etc. should be tested immediately in several environments. When we were developing the material of the lampshade, it was very important to track its correctness of drawing when influenced by light sources and without, with or without transparency, with a normal map and without, etc.

To develop this material, I used a live session in which I easily assembled a test scene with different geometry and light sources. As he edited the shader, he instantly observed the result of his work in different states of the material and object to which he belongs. This turned out to be very useful, since I could immediately set up an experiment and see what would happen if not multiply, but add up light sources, what would happen if I limit their light intensity and much more. It's great when you have the opportunity to play, to better understand the logic and choose the best ways to solve the problem.
Debugging application tools (Selection Tool, Subselection Tool, etc.) has become incredibly simple. As a rule, they contain a lot of branching logic and require thorough testing. With the help of Colt, I can change the logic of the tool and test it in just one click, immediately after the changes to the tool code.
For half a year of use in the
Realaxy project,
quite a few situations occurred in which the Colt manifested itself 100%. I hope you start using Colt too and save yourself a lot of time. I believe that this is really the BOMB in the world of Flash technology!
And in the end, I would like to quote the author of this wonderful project and authoritative flash-developer Evgeny Potapenko, who said: “Never has flash / air development been so fast and productive. Feel new buzz from flash and mobile development with COLT! ”
Thank!
Download COLT for free