Chapter 1. Introduction

General model

Kernel Panic implements network client-server interaction system. This system gives very flexible graphical abilities so it is important to make them as secure as possible. There are some tricks which can guarantee a little bit of security.

Here's the approach of network model:

As you can see, input can go directly to server. It will also be passed to Lua environment so Lua can process it and use locally only, send it on server and wait for state update or do both things: update (predict) current state and send actions to server. It may be useful for 3D-action games.

3D graphics can be set up for rendering and sound can be set up for playing directly by server. 2D graphics can't be, beacause 2D rendering is programmed in different way. And of course, Lua environment can work with 3D, 2D and sound.


Resource is any kind of data to be stored as single file. Resource have a name (e. g., "meshes/blood-arena/holobot.mesh"). Most commonly resources are used for textures, video, sounds, meshes, skeletons, animations and materials. Resources can be stored in file system (only for *NIX'es) or inside archives (probably zip without compression).

There are 2 kinds of resources: global and local (server-specific). Global resources are downloaded from several central repositories. There's one trick about using global resources: server can't read global resources from client and can't even know explicitly if it exists. For example if we load texture from Lua environment, resource ID is given in any case, even if there's no such image file.

On the other hand local resources are separate for every server. It's like each server has it's own home directory. Server can read, write or remove resources just like regular files, but there is no access for directories available. Directories are created and removed automatically. Note that server have to take care of updating resources to new versions itself. There's no up-to-date flags or other stuff to make that automatically.