Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Screen Image distortion

Author
Message
Qweeg
19
Years of Service
User Offline
Joined: 23rd Sep 2004
Location: Kent
Posted: 26th Jan 2005 05:35 Edited at: 26th Jan 2005 05:36
I have a problem with some of my screen images distorting. The best way to describe it is with screenshots I think so I have attached 2 images - the first is the image itself with no distortion. The second is a screenshot of how this image appears in my game. The bottom right hand side is slightly distorted. I have tried running the game on different screens with different resolutions and have tried changing the resolution that the exe is compiled at, and have tried different settings for SET DISPLAY MODE - but it always distorts. Any Ideas - please?

Attachments

Login to view attachments
Mr Pointless
19
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 26th Jan 2005 05:39
You image needs to be sized to the power of 2 (32x32, 64x64 etc). It's something to do with the way DirectX handles images (treats them like textures). Try splitting your image into more than one piece.

Originality is not dead, it just has an annoying tendency to fall asleep without setting the alarm clock
Qweeg
19
Years of Service
User Offline
Joined: 23rd Sep 2004
Location: Kent
Posted: 26th Jan 2005 05:39
Here is the second incorrect image

Attachments

Login to view attachments
Qweeg
19
Years of Service
User Offline
Joined: 23rd Sep 2004
Location: Kent
Posted: 26th Jan 2005 05:42
So do I have to just use square images?
Mr Pointless
19
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 26th Jan 2005 05:46
Well, yes, but not just any size square images. The image size needs to be to the power of 2. 32x32 pixels or 128x128 pixels are just two examples.

Think of how games consoles moved from 8-bit to 16-bit then 32, 64, 128 and (soon) 256-bits and you might understand the maths a little better.

Originality is not dead, it just has an annoying tendency to fall asleep without setting the alarm clock
Qweeg
19
Years of Service
User Offline
Joined: 23rd Sep 2004
Location: Kent
Posted: 26th Jan 2005 05:48
Okay, I'll give it a go. Thanks a lot for replying so quickly
Mr Pointless
19
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 26th Jan 2005 05:52
Just noticed it. And I needed it explaining to me before so it was only fair that I pass the info on.

Originality is not dead, it just has an annoying tendency to fall asleep without setting the alarm clock
Qweeg
19
Years of Service
User Offline
Joined: 23rd Sep 2004
Location: Kent
Posted: 26th Jan 2005 22:26
Brilliant! I just extended my images at the bottom to make them 1024x1024 and voila - no distortion. Thanks again Mr P.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 27th Jan 2005 00:15
If you want pixel perfect images and are only using loaded images for 2d stuff, like menus, you can use ANY size image. You simply use the optional texture flag on the LOAD IMAGE command, ie. add a ,1 on the end. This stops DBPro stretching loaded images.

Boo!
Qweeg
19
Years of Service
User Offline
Joined: 23rd Sep 2004
Location: Kent
Posted: 27th Jan 2005 01:14
Oh god - that's a bit embaressing. It even says as much in the online help. Thanks a lot Spooky and feel free to berate me repeatedly with chants of "next time RTFM!"
Mr Pointless
19
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 28th Jan 2005 05:15
It happens. The manual and help files aren't always clear.

Originality is not dead, it just has an annoying tendency to fall asleep without setting the alarm clock
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Feb 2005 03:21
@spooky

Thank you! Like Queeg I hadn't realised the purpose of the texture flag (I suppose I could have tried it ... but hadn't) and was wondering why simple backcloth images had bits missing. Now I know what to do.

@Mr Pointless

Agreed!

Login to post a reply

Server time is: 2024-09-23 10:12:57
Your offset time is: 2024-09-23 10:12:57