Babylon

This section describes the way Babylon is used as the game engine for Kurono.

Here we will go into some detail on how Babylon is structured within our project, and how we've chosen to organise the files.

First, we will look at the file structure for the babylon part of the game page:

babylon
β”‚
β”œβ”€β”€ assetPacks
β”‚   β”œβ”€β”€ assetPack.ts
β”‚   β”œβ”€β”€ future.ts
β”‚   β”œβ”€β”€ ...
β”‚   └── getAssetPackForEra.ts
|
β”œβ”€β”€ entities
β”‚   β”œβ”€β”€ avatarManager.test.ts
β”‚   β”œβ”€β”€ avatarManager.ts
β”‚   β”œβ”€β”€ ...
β”‚   └── index.ts
β”‚
β”œβ”€β”€ environment
β”‚   β”œβ”€β”€ index.ts
β”‚   β”œβ”€β”€ light.test.ts
β”‚   β”œβ”€β”€ light.ts
β”‚   β”œβ”€β”€ ...
β”‚   β”œβ”€β”€ environment.ts
β”‚   └── environmentManager.ts
β”‚
β”œβ”€β”€ animation.ts
β”œβ”€β”€ diff.ts
β”œβ”€β”€ gameEngine.ts
β”œβ”€β”€ ...
β”œβ”€β”€ interfaces.ts
└── orientation.ts

interfaces.ts contains the typing (interfaces) for objects specific to our project, such as GameNode.

We split the remaining elements of the game into two folders:

  • entities: These populate the game world, and cover elements such as obstacles, avatars, and interactables.

  • environment: The elements of the game that make up the world, such as camera, light and terrain, as well as the renderer.

The files inside assetPacks handle the loading and processing different 2D and 3D assets required for each different level, or era, of the game.

All classes in these folders implement the GameNode interface. Entities also implement the DiffHandling interface.

Last updated