A lightweight, Love2D-inspired game engine that brings the simplicity of Lua to the power of JavaScript. Perfect for 2D games, prototypes, and creative coding.
window.love.load = function() {
// Initialize game assets
player = {
x: 100,
y: 100,
speed: 200
};
}
window.love.update = function(dt) {
// Game logic goes here
if (love.keyboard.isDown('d')) {
player.x += player.speed * dt;
}
}
window.love.draw = function() {
// Drawing code
love.graphics.rectangle('fill', player.x, player.y, 32, 32);
}
Designed with simplicity and performance in mind, our engine provides everything you need to bring your game ideas to life.
Inspired by Love2D's elegant design, our API is intuitive and easy to learn with familiar functions like load(), update(), and draw().
Built for the web from the ground up. Your games run in browsers with no plugins required, making distribution a breeze.
Use only what you need. The engine is modular, so you can keep your game lightweight by including just the components you use.
Touch controls and responsive design built in. Test your game on desktop and it will automatically adapt to mobile devices.
Uses ES6+ features and modern browser APIs. Works seamlessly with your favorite tools like Webpack, Babel, and npm.
Free and open source under the MIT license. Contribute, fork, or modify - the engine is yours to build upon.
With included modules, you can use to create games like:
A simple to use 2D physics module.
Interactive particle effects.
Create and edit tile-based maps for your games.
Add animations with sprite sheet in you character
Start building your game immediately with our simple setup process. No complex build tools required!
git clone https://github.com/danielmhsouza/JS2Love.git
//optional modules
import { physics } from './modules/physics2.js';
import { anim } from './modules/anim.js';
import { particles } from './modules/particles.js';
import { tilemap } from './modules/tilemap.js';
window.love.load = function () {
//load all you need here
}
window.love.update = function (dt) {
//update all you need here
}
window.love.draw = function () {
//draw all you need here
}
// Initialize the game
if (window.love.load) {
window.love.load();
}
Any text editor will work, but we recommend:
Helpful for beginners:
Enhance your workflow:
Our detailed documentation makes it easy to learn and master JS2Love. Everything is explained with clear examples.
Connect with other developers, share your games, get help, and contribute to the engine's development.
Chat with the community in real-time. Get instant help, share your progress, and participate in game jams.
Join ServerContribute to the engine's development. Report issues, suggest features, or submit pull requests.
View RepositoryLonger discussions, tutorials, and showcases. A great place for in-depth conversations about game development.
Visit ChannelJoin thousands of developers creating amazing games with JS2Love. It's free, open source, and waiting for your creativity.