DEV Community

Cover image for Started a repo for my new game engine
Jack Le Hamster
Jack Le Hamster

Posted on

1 1

Started a repo for my new game engine

I just wanted to start by sharing the repo where I'll be building my JavaScript game engine. It's part of my NAPL project, discussed in previous posts.

https://github.com/jacklehamster/bun-engine

It's built using bun.js, because it's the only framework that doesn't constantly break whenever I bring in a new dependency.

There's not much at the moment. You just have an image rendered using WebGL, and you can move around to look at it.

I usually try to have something more interesting before sharing it out, but I guess this time I thought I'd better share this early, in case anyone wants to contribute in any way.

Goal

Ultimately, the goal is for this is to make a engine that makes it easy for creating games. You could have a bunch of JSON files and assets describe your game, with no programming code involved.

Immediate iteration

  • For now, I need to enhance sprite support. A set of images will be uploaded into WebGL textures, separated in slots of 256x256. That's the basic sprite size, but if larger sprites are needed, it can take multiple slots.

  • Animation support: A spritesheet will be uploaded into the textures, so that a sprite can animate by moving the slot within that texture.

  • Movement and transform for a sprite will be coded properly so that we can provide a snippet of JSON to define a sprite. For example:

{
  "name": "turtle",
  "anim": "turtle-animation",
  "size": [1000, 1000],
  "rotation": [-90, 0, 0],
  "position": [0, 0, 0],
}
Enter fullscreen mode Exit fullscreen mode

Note that I already have a game that uses this entire schema (namely World of Turtle). But I found myself still writing too much game specific code for it, so that's why I decided to redo my game engine from scratch.

As I iterate on the engine, you can check the DEMO, which hopefully will look more and more interesting as time goes on, and eventually entire games will be created using this engine.

Cheers.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay