r/javascript • • 6d ago

KernelPlay JS v0.6.0 Released — Modular Architecture, Universal Renderer Cores & Decoupled Physics!

https://github.com/Soubhik1000/kernelplay

I'm excited to announce that KernelPlay JS v0.6.0 is officially released!

This update introduces an important architectural shift toward a more modular engine, focusing on decoupling the Renderer and Physics systems.

Here's what's new:

1. Universal Renderer Architecture

Previously, switching rendering pipelines could require developers to replace generic components such as `BoxRenderer` with pipeline-specific components like `PixiBoxRenderer`.

With the new architecture, universal components can work across all supported rendering pipelines without requiring developers to manually switch rendering components.

This makes changing renderers much easier and keeps game logic independent of the rendering pipeline.

2. Decoupled Physics Engine Core

Physics logic has now been moved into a separate Physics Engine Core.

The default physics engine remains integrated and ready to use, but the new structure makes it possible to plug in custom physics engines.

This gives developers more flexibility over how physics is handled in their projects.

3. Future Physics Plugins

We're also planning to expand the plugin ecosystem.

High-end physics engines such as Matter.js will be available as separate plugins in the future. They won't be bundled into the core engine, helping keep KernelPlay JS lightweight.

4. Official TypeScript Support

This release also introduces official TypeScript support through `.d.ts` declaration files.

Developers can now benefit from type information, better editor support, and autocomplete when working with KernelPlay JS in TypeScript projects.

---

This architectural change is a major step toward making KernelPlay JS more flexible, modular, and lightweight.

There's still a lot planned for the project, and I'd love to hear your thoughts.

What do you think about this new modular architecture? Would you be interested in building custom renderer or physics cores?

Thank you to everyone following and supporting KernelPlay JS!

7 Upvotes

11 comments sorted by

3

u/Discordbothost 6d ago

I'd ship one tiny scene that runs with two renderer cores. Keep the scene code identical and change only the renderer setup. That gives someone writing a third renderer a working example of what their core needs to handle.

1

u/APTman1010 6d ago

Thank You 😊 for feedback yeah it possible. My Engine use ECS (Entrie Component System) so you your game objects use render components and it is a purely Data so you need to just use this data and calibrate your self and draw the objects as you want.

This how moduler renderer works here components is a data they help you to shape it , how to draw on developer

Here is full details https://github.com/Soubhik1000/kernelplay/blob/master/docs/modular-renderer.md

2

u/gianluca_caruso-6 5d ago

The data-only split sounds flexible; how do custom renderers agree on transforms, draw order, and asset ownership?

1

u/APTman1010 5d ago

Yeah you need to add transforms data manually, draw orders is a zindex system you need to handle to .

It works like renderer backend use adaptors like spriteadaptor.js

1

u/spatel_21 4d ago

Transforms and z-index are clear; how do adapters represent asset ownership across renderer cores?

1

u/APTman1010 4d ago

Yeah adaptors didn't use asset as a raw it use asset by passing from components.

ECS (Entrie Component System) Entries is a id only and Components are data you pass only URL because of it use web so 😅 you can just use ./assets/player.png.

One thing is at pixi js you need to load sprite before game starts and then use as same.

2

u/ava_896517 5d ago

Optional physics plugins keep the core lean; how will you handle API compatibility across engines?

1

u/APTman1010 5d ago

You need use a API over layers.

So this engine use ECS so you can get components as pure data use thouse raw data set a API over layers on top you can add or make your own Physics engines .

I am plan to add matter.js

0

u/[deleted] 3d ago

[removed] — view removed comment

1

u/APTman1010 3d ago

So you can expose engine specific features like examples matter js use body angular velocity, drag , fiction etc .

So it depends on developer like A official support of matter js will not expose engine specific features but add all needed parameters and features as it a api it self.

But if a developer need to use all advance system then they need to make one by them self 😅 it will be easy actually physics engine use only two things PhysicsEngine class the main class and a rigidbody component.

And another way 😉 just simply ask in GitHub we will do add this for you.

1

u/APTman1010 6d ago

Thanks for checking out KernelPlay-JS!

If you're interested in following development, testing upcoming features, or sharing feedback, feel free to join the community on Discord:

https://discord.gg/bHfe96EnNR

Everyone is welcome, whether you're a game developer, JavaScript enthusiast, or just curious about the project. I'd love to hear your suggestions and ideas as KernelPlay-JS continues to grow.