Search found 21 matches

by Zorochase
Sun Oct 15, 2017 10:49 pm
Forum: Support and Development
Topic: [SOLVED] Centering Game Window in Fullscreen
Replies: 10
Views: 5959

Re: Centering Game Window in Fullscreen

I should also mention that when in windowed mode, the window size should match the canvas size, for example, when the canvas is at 1x scale, the window is 416x256 pixels; 2x scale, 832x512, etc.. I also already have two scale variables (SX and SY) that are saved as a part of the game's settings, so ...
by Zorochase
Sun Oct 15, 2017 9:29 pm
Forum: Support and Development
Topic: [SOLVED] Centering Game Window in Fullscreen
Replies: 10
Views: 5959

Re: Centering Game Window in Fullscreen

How can I get the game's window to sit in the center of the screen when in fullscreen mode? The amount of black space around the game window should be determined by the scale of the window. I presume that your window is a canvas? local function scaleToScreen(canvas, ignoreAspect) local width, heigh...
by Zorochase
Sun Oct 15, 2017 1:37 am
Forum: Support and Development
Topic: [SOLVED] Centering Game Window in Fullscreen
Replies: 10
Views: 5959

[SOLVED] Centering Game Window in Fullscreen

Hello, My game has a resizable window. All graphics are rescaled when the window is resized. This works fine in windowed mode, and it even works in fullscreen mode, the only problem being that when in fullscreen mode, the window is drawn to the top left corner of my screen. How can I get the game's ...
by Zorochase
Mon Aug 21, 2017 1:37 am
Forum: Support and Development
Topic: [SOLVED] Rotating Pixels at Scale > 1?
Replies: 3
Views: 3537

Re: Rotating Pixels at Scale > 1?

Render your game to a canvas at your original resolution, then draw the canvas at the scale you want. function love.load() --Create a new canvas, the dimensions you pass to it should be your original resolution canvas = love.graphics.newCanvas(320, 240) end function love.draw() love.graphics.setCan...
by Zorochase
Sun Aug 20, 2017 11:57 pm
Forum: Support and Development
Topic: Help with states and substates
Replies: 1
Views: 2002

Re: Help with states and substates

"Substates" really aren't necessary IMO. I think you're trying to use more layers than you need. You could make each state a table with load, update and draw methods, as well as an ID. You could make another table, with a table inside it to store all states, and a master flag that determin...
by Zorochase
Sun Aug 20, 2017 10:44 pm
Forum: Support and Development
Topic: [SOLVED] Rotating Pixels at Scale > 1?
Replies: 3
Views: 3537

[SOLVED] Rotating Pixels at Scale > 1?

Hello, So I've got all my art to stick to a pixel grid. Nothing moves between pixels, even when the window is rescaled. That is, until it is rotated. The best way I can put it is, when I rotate pixel art, I expect the pixels to "reposition" themselves so that they make it look like the ima...
by Zorochase
Fri Aug 18, 2017 3:37 am
Forum: Support and Development
Topic: [SOLVED] Custom Cursors and Window Scaling
Replies: 2
Views: 4674

Re: Custom Cursors and Window Scaling

You need to also scale the cursor position. For example, say your original resolution is 10x10 pixels. At a scale of 1 the ratio of the system cursor to the game cursor is 1:1. Now let's assume you scale your window to 20x20. The scale is now 2:1, that is, for every 2 pixels the system cursor moves...
by Zorochase
Thu Aug 17, 2017 10:23 pm
Forum: Support and Development
Topic: [SOLVED] Custom Cursors and Window Scaling
Replies: 2
Views: 4674

[SOLVED] Custom Cursors and Window Scaling

Hello, Recently, I've been having an issue with custom cursors and love.graphics.scale. I have a custom pointer that, while the scale is set to 1, the image of the pointer and the actual cursor (hidden) match up fine. However, when I scale the window and all of the graphics using love.graphics.scale...
by Zorochase
Mon May 22, 2017 10:25 pm
Forum: Support and Development
Topic: [SOLVED] Help with custom settings / save files?
Replies: 7
Views: 7032

Re: Help with custom settings / save files?

My guess is newFile doesn't create the file on disk, just the File object in memory (until you read from/write to it, and flush the changes); i guess opening the file and closing it may work; if not, write to it too. function love.load() if not love.filesystem.exists('settings.txt') then local file...
by Zorochase
Mon May 22, 2017 9:46 pm
Forum: Support and Development
Topic: [SOLVED] Help with custom settings / save files?
Replies: 7
Views: 7032

Re: Help with custom settings / save files?

Thanks for the advice, everyone! I only have one more question. I figured out the issue with Ser. When I tried to save the settings with Ser, and there was no existing "settings.txt" file, I would get the error, "attempt to call a nil value." I tried manually creating a settings....