commit bfb80bb4f7d2f21bb063c83c908d2265dd85772d Author: juni Date: Mon Apr 13 12:05:09 2026 -0400 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..eedbb60 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# love2d-vn-engine +## Running +With love2d installed: +```love .``` diff --git a/assets/images/imp.png b/assets/images/imp.png new file mode 100644 index 0000000..48cf422 Binary files /dev/null and b/assets/images/imp.png differ diff --git a/main.lua b/main.lua new file mode 100644 index 0000000..304fc25 --- /dev/null +++ b/main.lua @@ -0,0 +1,33 @@ +function love.load() + --target height/width + _default_width = 480 + _default_height = 272 + -- window settings + love.window.setMode(_default_width, _default_height, {resizable=true}) + --load images + love.graphics.setDefaultFilter("nearest", "nearest") --fixes scaling; must be done before image loads remove if you want aliasing on scaling + imp = love.graphics.newImage("assets/images/imp.png") + --setup canvas + canvas = love.graphics.newCanvas(_default_width, _default_height) +end + +function love.update() + +end + +function love.draw() +--draws should happen in here +love.graphics.setCanvas(canvas) + love.graphics.clear(0, 0, 0, 0) + love.graphics.setBlendMode("alpha") + love.graphics.print("Hello World", 100, 100) + love.graphics.draw(imp, 50,50) +love.graphics.setCanvas() +--get canvas scale +local w_width, w_height = love.graphics.getDimensions() +local s_width = w_width / _default_width +local s_height = w_height / _default_height +local scale = math.min(s_width, s_height); +love.graphics.setBlendMode("alpha", "premultiplied") +love.graphics.draw(canvas,0,0,0, scale, scale) +end diff --git a/vn-scene.txt b/vn-scene.txt new file mode 100644 index 0000000..4a04bc3 --- /dev/null +++ b/vn-scene.txt @@ -0,0 +1,8 @@ +[bg: bgImage] +[c1: juniIdle] +#juni +> This is a test Script. +> Im not sure about it.\n But its a test +[c2: branchIdle] +#branch +> a test is a decent place to start