preview builds; password is aregamesart
Vnêpls. is created around a tool-first mindset. i create the tools i need inside the game itself, to minimize the friction and create a more coherent whole. i minimize the dependency on art assets, privileging procedural art created in engine.
this project is therefor heavily code based. i chose to use Zig and SDL.zig for confort and my own mental health: i love Zig and i’m getting a bit burnt out on C lately. as usual, i’m also holding myself to high quality standards on this project, all errors should be handled cleanly (thankfully that’s quite easy with Zig’s error system), and it should run Fast even on slow/obsolete hardware.
i started by writing a 1-bit 2D software rendering system, with cool bliting options such as xoring sprites with the canvas. you can see it in use in my latest release, abstract (MIT license).
after that was done, i needed to make some work on texture generation. i generate at runtime basic texture shapes. i intend on using simple blocks as a basis for complex visual compositions in level design.
all the texture generation code:
pub fn solidSquare(allocator: std.mem.Allocator) !Self {
var b = try Self.init(allocator);
b.solid.fill(.on);
return b;
}
pub fn slopeLeftDown(allocator: std.mem.Allocator) !Self {
var b = try Self.init(allocator);
for (0..cfg.tsize) |y|
for (0..y) |x|
b.solid.point(.on, x, y);
return b;
}
pub fn slopeRightDown(allocator: std.mem.Allocator) !Self {
var b = try slopeLeftDown(allocator);
b.solid.flip(.x);
return b;
}
pub fn slopeLeftUp(allocator: std.mem.Allocator) !Self {
var b = try slopeLeftDown(allocator);
b.solid.flip(.y);
return b;
}
pub fn slopeRightUp(allocator: std.mem.Allocator) !Self {
var b = try slopeLeftDown(allocator);
b.solid.flip(.d);
return b;
}
i then worked a lot on writing the in-game level editor. i won’t give details about the entire process, but the notable points is than i spent a lot of times on ergonomics to automate basic tasks and make editing very fast. the usage of the editor is described on the projects private itch page.
today i wrote an input manager, which makes for very pleasant to read player code.
pub fn update(self: *Self) void {
const dir: f32 =
@as(f32, (if (self.input.down("right")) 1 else 0)) -
@as(f32, (if (self.input.down("left")) 1 else 0));
const grounded = self.collide(Vec2.init(0, 1));
self.vel.X().* = appr(self.vel.x(), maxRunSpeed * dir, acceleration);
self.vel.Y().* = appr(
self.vel.y(),
@as(f32, if (grounded) 0 else maxFallSpeed),
gravity,
);
if (grounded and self.input.down("jump"))
self.vel.Y().* = jumpSpeed;
self.move(0);
self.move(1);
}
this is the entire placeholder player logic so far.
i will work on the player movement, and i hope soon lock everything that’s here and start spilling out levels. this is what truly interests me here.
if i wasn’t so tired i would have recorded a video for those that don’t want to download, sorry about that. might come later.