PDA

View Full Version : Sprites appear blurry



Wizard
31-05-2007, 11:16 AM
Hallo everyone. Game written in Delphi 6 and DelphiX.

Is there something wrong with my code? On my work Pc the sprites are not blurry but on my Laptop they appear very blurry. Is there something that I can do?

procedure TMan.DoMove(MoveCount: Integer);
begin
if (fHit) then
begin
Movement := 0;
Y := Y + (7 * updatespeed);
end
else
begin
if (isUp in form1.DXInput1.States) then
Y := y + (7 * updatespeed) else
Y := Y + (3 * updatespeed);
if y > Form1.DXDraw1.Height - 100 then
dead;
if (Movement = 0) Then
Movement := Random(2);
if X > 560 Then Movement := 1;
if X < 50 Then Movement := 2;
end;
Case Movement of
1:
x := X - (7*updatespeed);
2:
X := X + (7*updatespeed);
end;
end;

TMan(MyMen[loop]).DoMove(1);

Huehnerschaender
31-05-2007, 11:21 AM
Do you have different monitors at work and home? One CRT and one TFT? On TFT's sometimes moving things appear blurry.. Also a resolution which the TFT is not made for (most TFT have native 1280x1024 support and other resolutions look blurred!) makes things appear blurry...

When the sprites look correct on one PC and not on a second one, I guess its the monitors and not your code.

jasonf
31-05-2007, 11:22 AM
what resolution is your laptop screen and what resolution is your game?

Laptops have a fixed resolution of display elements so in order to approximate a lower resolution, they blur the pixels to prevent them from looking odd and blocky as they try to make a smaller image fit a larger display matrix. Otherwise it would look strange, some pixels would be 2 or 3 pixels wide whereas others might be 4 .. it makes the whole image look tatty... blurring is the better option.

Of course, you could always resize your game's window to be the same as the laptop display.

Wizard
31-05-2007, 11:36 AM
Huehnerschaender: I don't know about CRT or TFT...I'll do some investigation but I agree with you. It must be the monitor.

jasonf: The LapTop screen and my Pc is 1024*768 but the game resolution in DxDraw.Display is 800*600*16. I did try differnet values but no change on the LapTop :-( I don't want to resize my game window to be the same as the LapTop display...

Thanks for the insight....I'm not going to worry about it too much as it works 100 % on most PC's I've tested :-)

Huehnerschaender
31-05-2007, 11:55 AM
CRT are the "older" monitors. CRT stands for "Cathode Ray Tube". Those monitors where the front is made of glass and the monitors depth is nearly the same like its width and height :)

TFT ("Thin Film Transistor") monitors are the flat ones you normally buy today. Your laptop comes with a TFT display :)

Wizard
31-05-2007, 12:00 PM
Huehnerschaender: Thanks for explaining :-) Yes, the LapTop is indeed a TFT display. I'll test the 1280x1024 display setting tonight...

Thanks again 8)