https://github.com/blitz-krieg-cmd/zs2
Application Framework for the PS2 written in Zig.
https://github.com/blitz-krieg-cmd/zs2
framework gamedev playstation ps2 psx zig ziglang
Last synced: 9 months ago
JSON representation
Application Framework for the PS2 written in Zig.
- Host: GitHub
- URL: https://github.com/blitz-krieg-cmd/zs2
- Owner: blitz-krieg-cmd
- License: gpl-3.0
- Created: 2025-03-21T06:31:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-24T06:07:07.000Z (about 1 year ago)
- Last Synced: 2025-03-24T06:24:18.220Z (about 1 year ago)
- Topics: framework, gamedev, playstation, ps2, psx, zig, ziglang
- Language: Zig
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZS2 - Completely Work In Progress
An application framework for the PlayStation 2 written in Zig.
## How to start?
1. Add *ZS2* as your project's dependency
Add zs dependency to your build.zig.zon, with following command:
```bash
zig fetch --save=zs git+https://github.com/blitz-krieg-cmd/zs2.git
```
2. Use *ZS2*'s build script to add build step
In your `build.zig`, add:
```zig
const std = @import("std");
const zs2 = @import("zs2");
pub fn build(b: *std.Build) void {
const exe = zs2.createApplication(
b,
"mygame",
"src/main.zig",
.Development,
);
const install_cmd = b.addInstallArtifact(exe, .{});
b.getInstallStep().dependOn(&install_cmd.step);
}
```
3. Write some code!
You may import and use zs2 now, here is a skeleton for your `src/main.zig`:
```zig
const std = @import("std");
const zs2 = @import("zs2");
pub fn init(ctx: zs2.Context) !void {
// your init code
}
pub fn event(ctx: zs2.Context, e: zs2.Event) !void {
// your event processing code
}
pub fn update(ctx: zs2.Context) !void {
// your game state updating code
}
pub fn draw(ctx: zs2.Context) !void {
// your drawing code
}
pub fn quit(ctx: zs2.Context) void {
// your deinit code
}
```
## Influences and Reference Projects
* [jok](https://github.com/Jack-Ji/jok) (MIT License)
* [ps2sdk](https://github.com/ps2dev/ps2sdk) (Academic Free License 2.0)