sysl-dev / sysl-pixel Goto Github PK
View Code? Open in Web Editor NEWPixel Art Focused Game Art Scale Module for Love2D.
Pixel Art Focused Game Art Scale Module for Love2D.
Hiya,
I'm writing a basic test program to try out sysl pixel + iffy, which helps manage spritesheets with metadata files. So I basically draw a chessboard out of pixel art chess tiles which fills the 128x128 screen, then use sysl pixel to upscale it to its max size. However, without sysl pixel it draws fine, though to a very small window. Once I enable sysl pixel, the window just shows as blank. I've made sure that I am putting my draw calls in between start and stop calls, but the screen remains stubbornly blank. Here is my main.lua, minus the image -- sorry, i don't have permission to distribute the image...
iffy = require("iffy")
sp = require("pixel")
function love.load()
sp.current_cursor = 0
sp.load()
iffy.newAtlas("chessboard_1.png")
end
function love.update(dt) sp.update(dt) end
function love.draw()
sp.start()
-- Things are now scaled...
local x = 0
local y = 0
for y = 0, 7, 1 do
for x = 0, 7, 1 do
if x % 2 == 0 and y % 2 == 0 then -- black
iffy.drawSprite("black-square", x * 16, y * 16)
elseif x % 2 == 1 and y % 2 == 0 then -- white (gray)
iffy.drawSprite("white-square", x * 16, y * 16)
elseif x % 2 == 0 and y % 2 == 1 then -- white (gray)
iffy.drawSprite("white-square", x * 16, y * 16)
elseif x % 2 == 1 and y % 2 == 1 then -- black
iffy.drawSprite("black-square", x * 16, y * 16)
else -- Something has gone horribly wrong...
print(
"Error! The else was encountered in the draw loop. This should never happen!")
love.event.quit()
end
end
end
sp.stop()
end
function love.keypressed(key) if key == "escape" then love.event.quit() end end
And my very basic conf.lua...
function love.conff(t)
t.window.width = 128 -- Base Width that we scale up.
t.window.height = 128 -- Base Height that we scale up.
t.window.resizable = false -- Controled though allow_window_resize, set false in conf.
t.window.minwidth = 128 -- Should match Width
t.window.minheight = 128 -- Should match Height
t.version = "11.4"
-- t.window.fullscreen = true
end
Thanks for any help,
-Michael.
Here is a screenshot, if that helps...
I added
love.graphics.rectangle("line",94,60,128,128)
to the main.lua.
The line is (equivalent of) 2 pixels thick.
love.graphics.setLineWidth( width) cant reduce it but can increase it.
Tks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.