The development tools today are big. And that directly reflects on the complexity of projects they produce.

The level of noise modern tools generate is just unbelievable. When you click on “Create a New Project” in a typical modern IDE, you receive a folder full of mystery and surprises.

A hello-world type of project might consist of hundreds of files.

Do these files essential? Do they serve any purpose? Is it possible to hide or eliminate some of them while preserving the functionality? Is it really necessary to be that complex?

I believe Collider.JAM has an answer to this problem. We put all the effort to make projects smooth and clean. You put in only the essentials. And it is a good example of minimalistic design.

sketch mod

In Collider.JAM you don’t need an IDE to create a project. You just type:

mkdir test.mod

That’s it! Simply create a folder named *.mod, cd into it, and you can already run it with:

jam play

It doesn’t show anything, but it works!

It represents a mod - the most fundamental concept in Collider.JAM, that defines both structure and behavior. And you can already explore that structure by hitting F2.

To have something on the screen, you might create lab.js inside:

function draw() {
    fill(.35, .5, .5)
    cirlce(rx(.5), ry(.5), 50)
}

Now you filled a circle in the center.

This type of Collider.JAM project is called sketch mod. We don’t have to create package.json or any other boilerplate files for it to work.

Just a simple folder with content sorted in subfolders. The extension *.mod is important though. It is how Collider.JAM recognizes the root of the project.

The structure inside *.mod have to follow Collider.JAM conventions. It means factories and prototypes go to /dna, utility functions are placed in /lib, event handlers are in /trap, and everything that lives is in /lab.

These folders represent conventions used by Collider.JAM to locate and use different game components. It is similar to conventions used by some web frameworks like Ruby on Rails to locate models, views, and controllers. Placing a *.js file in different folders can change its behavior.

The mod structure might look daunting at first. But it turns into a familiar landscape once you used it for a little while. And when you know it, it becomes easy to navigate Collider.JAM projects, especially the more complex mixes consisting of multiple modes.

The best thing is that you don’t need to know the whole mod structure to start the development. Just 4 essential folders will suffice.

jam new

Sometimes we don’t want to create a structure manually.

Collider.JAM provides some helpers to do it automatically. Run new ls command to see the possible options:

jam new ls

Let’s create a sample mod:

jam new mod sample

This generates a sample.mod folder with a typical structure - there are dna, lab, lib, res, and trap examples generated. Run the mod to see the result:

cd sample.mod
jam play

sketch mixes and packages

There are other types of projects in Collider.JAM - sketch mixes and packages. They are usually used in more special cases.

For example, when packaging the game for a mobile platform or desktop, you need to have a package.json with appropriate dependencies. So these projects are created in the so-called “package mode”.

But in most cases, you can start in the sketch mode and move to the package mode later.

The world is a very noisy place. You don’t need more noise in your Collider.JAM projects. So stick with the sketch mode whenever possible.