Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hazyvt/slifer
2D game framework made in bun
https://github.com/hazyvt/slifer
bun bunsh sdl2 sdl2-image sdl2-ttf slifer typescript
Last synced: 1 day ago
JSON representation
2D game framework made in bun
- Host: GitHub
- URL: https://github.com/hazyvt/slifer
- Owner: HazyVT
- License: mit
- Created: 2024-08-16T14:25:43.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-01-29T09:52:49.000Z (5 days ago)
- Last Synced: 2025-01-29T10:31:56.045Z (5 days ago)
- Topics: bun, bunsh, sdl2, sdl2-image, sdl2-ttf, slifer, typescript
- Language: TypeScript
- Homepage: https://www.slifer.hazyvt.com
- Size: 21.2 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slifer : Native Typescript Game Framework
> [!CAUTION]
> Slifer is currently in alpha. Use at your own risk.> [!NOTE]
> Not all basic features have been implemented. Many are missing such as
> window customization. As such, I recommend waiting for a beta release of
> Slifer before using it for a long term project.Slifer is a game framework made to allow users to code games in typescript. The
framework uses bun and SDL2 under the hood to allow your game to render and
build natively to desktop.If you'd like to learn more about Slifer, feel free to head to [Slifers Webpage](https://slifer.hazyvt.com).
## Contents
- [Goals](#goals)
- [Current Features](#current-features)
- [Future Features](#future-features)
- [Example](#example)## Goals
- Contain all basic game framework implementations. Such as drawing images,
drawing text and making animations from a sprite sheet.
- Provide an easy transition from web development to game development.
- Create an easy to use framework. Slifer should handle the bulk of the work
- Keep updates consistent.## Current Features
- Create a native desktop window with custom title and size.
- Handle both keyboard and mouse inputs
- Load and draw images onto the window## Future Features
- Audio Implementation
- Animation library
- Save file library## Example
```ts
import Slifer from "slifer";Slifer.createWindow("Example Window", 640, 480);
const bg = Slifer.Graphics.makeColor(36, 36, 36, 255);
while (!Slifer.shouldClose()) {
Slifer.Graphics.setBackground(bg);if (Slifer.Keyboard.isPressed("escape")) {
Slifer.isRunning = false;
}Slifer.Graphics.render();
}Slifer.quit();
```