Skip to content

kitajchuk/2dk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2dk

For the love of 2D. A JavaScript SDK.

Netlify Status

2dk is a hobby project combining my love for web technology and my nostalgic passion for 2D gaming, specifically the Game Boy era. It's a never ending creative outlet, whenever I have the time, to tinker and develop new features across the engine and studio software.

This issue here is tracking towards an MVP version with the ability to create functional sandbox games without writing a lick of code using the studio software and running in the 2dk engine.

Game bundles

A 2dk game is a static PWA that contains all its own resources and data files. The Player, or engine, has a mobile first philosophy behind it and is designed to be played as a standalone web app on your phone. It handles offline mode with a Service Worker that caches all the game resources.

Game making

Currently you can create and paint maps quite well for the background, foreground and collision layers. It's basically Photoshop for 2D map painting. I've been using the game Link's Awakening as a model for the game engine and mechanics of the TopView plugin for the Player. If you run the Studio you'll find it's there, named LA.

Getting started

To develop clone this repo and then:

# Install packages
yarn

# Run local dev server for static frontend
# Runs watch scripts for all resources for an easy dev experience at localhost:5050
yarn dev

Studio software

The studio software is an Electron application. Currently there are no package scripts for the software distribution as the project is still in what I would consider alpha development. To run the electron application for local development:

# From project root install packages
yarn

# From project root build all resources
yarn build

# Move to studio software directory
cd studio

# Install packages
yarn

# Run the electron app
yarn dev

Audio compression

As of right now the ability for uploaded audio files (mp3) to be compressed requires the installation of lame. For macos you can simply brew install lame. The electron software then uses node-lame for the compression (only if lame is available). Ideally the software will bundle the lame executable for each distro when we get there.

Resources

I've found the Mozilla Gaming docs to be quite helpful. I used these to implement the Gamepad API so I can play with my USB NES controller when developing in electron.

Open source

I've been trying to keep track of where I've found resources online. Stuff like sprites, tiles and audio.

Assets

Inspiration

Disclaimer

I take no credit for the Nintendo IPs used for the Zelda demo game nor for the artwork and designs. All I've done is increased the resolution of sprites and tilesets I've compiled from the internet.

About

For the love of 2D. A JavaScript SDK.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published