Hi everyone!
I'm using the camera module and leif gui in my project. I use my PC and netbook ( aspireone ) for it. On first it looks great ( resolution 1280, 1024; setCamera(camera.stretchToResolution(1280, 1024)) used ), on second ( 1024, 600; 800, 600; 640, 480 - any but 1280, 1024 ) gui ( and only gui ) looks terrible
Here is the PC and netbook screens:
Anybody knows where the problem?
Camera module & Leif GUI
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Camera module & Leif GUI
Use another camera for the GUI, with a scale of 1..
http://love2d.org/wiki/index.php?title= ... one_camera
http://love2d.org/wiki/index.php?title= ... one_camera
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Camera module & Leif GUI
The source of the problem is that some of the drawing parameters do not operate on fractions of pixels which may cause problems when things are drawn as smaller than they originally were. For this application, the worst parts can be fixed by opening camera.lua and searching for "setScissor". change "camera.love.graphics.setScissor(x, y, w, h)" into "camera.love.graphics.setScissor(x, y, math.ceil(w), math.ceil(h))".
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
Re: Camera module & Leif GUI
osuf, it became better but not the same as on PC:
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Camera module & Leif GUI
What resolution does the game run in (e.g. what is width and height in game.conf)? Did I understand you correctly that you rescale to 1280x1024? Might I ask what the position of the "Sprites" window is?
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
Re: Camera module & Leif GUI
Looks to me that x and y need to be ceil'd too.
Re: Camera module & Leif GUI
osuf, game run in 1024 x 600, but I can set 800 x 600 and nothing changed. Space on the screen the same as PC, becouse I using setCamera(camera.stretchToResolution(1280, 1024)).
"Sprites" pos is -630, -502 ( 0,0 - is the center of the screen )
Kaze, I tried, it became just different, but not better.
"Sprites" pos is -630, -502 ( 0,0 - is the center of the screen )
Kaze, I tried, it became just different, but not better.
Re: Camera module & Leif GUI
Use another camera for the GUI, with a scale of 1.
http://love2d.org/wiki/index.php?title= ... one_camera
http://love2d.org/wiki/index.php?title= ... one_camera
Who is online
Users browsing this forum: Google [Bot] and 2 guests