Game Development Community

Sprite pixel sizes change on camera size?

by Azmodeus · in Torque Game Builder · 10/01/2006 (12:51 am) · 6 replies

I'm in the editor. If I set my camera size to 200x400 and place a sprite it shows up as lets say 10x10. Now, if I change the camera size to 1024x768 and drop the same sprite on the editor, it now shows up at 50x50. Why does its size change?

How can I get a 1=1 pixel ratio and keep it?

If my sprite is 10 x 10 pixels big, I dont want it to change sizes when I drop it on the editor just because my camera size has changed.


So far, I've gotten around it by setting my "camera" size to 800x600 and my sprites are showing up as the correct pixel ratio to my background tiles. So to get a wider view, do I play with zoom now? Or keep switching my camera size back and forth while i'm editing in the level builder? Cuz I want a 1024x768 window not a 800x600, but if I dont edit with the camera at 800x600 my tiles all show up too big.

#1
10/01/2006 (1:09 am)
Ugh.. that wont work. I'm getting some kind of tearign/shearing at slow movement speeds then.

Its like it moves part of a line then the next part of a line (think row of pixels) at a time. Like a bad interlaced image or something.

I tried zoom and settign the camera position before I mount it.

Any suggestions?
#2
10/01/2006 (1:13 am)
Ok I've got it working.. its sorta confusing, but atleast its not shearing/tearing anymore.

Had to turn on smoothing of my sprites.
#3
10/01/2006 (1:14 am)
Quote:
How can I get a 1=1 pixel ratio and keep it?

The easy answer, design your game for only one resolution and set your camera size to that resolution. Any time you put something in the scene you should immediately resize it to it's actual size. At least that's how you do it if I'm understanding your question correctly.
#4
10/01/2006 (1:51 am)
I think I got it working. I just have to reset my camera size when I add something. Then I change it back. Its crazy, but it works.
#5
10/01/2006 (2:52 am)
Sounds like you're doing way to much work to set the camera size every time you make an object. What are you actually trying to accomplish?
#6
10/01/2006 (8:19 am)
I think I got it working. I just have to reset my camera size when I add something. Then I change it back. Its crazy, but it works.