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 / Blurry Sceen :(

Author
Message
Lascerus
20
Years of Service
User Offline
Joined: 14th Feb 2004
Location: spaced out
Posted: 17th Oct 2004 17:42 Edited at: 17th Oct 2004 17:43
Hi, I created a scrolling bitmap test for my game. it uses fine detail but now the detail is all smudged like over smoothing or something...anybody know why and how to fix it please...? I'm running in a 800*600 res (the image is the same size). I've tried bmp & jpg. Theres a difference in the way they look but still the smudging....here's a sample of the scrolling code i used(tutorial code)ps. its a single screen 2d game.

Please help...

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 17th Oct 2004 17:49
It looks fine here. You might want to try set sprite 2,0,0 though in case your image has some small black pixels that might be making it look smudged when trasparent.

Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 17th Oct 2004 18:01 Edited at: 17th Oct 2004 18:02
How about deleting the bitmap after using the GET IMAGE command?? i had a few problems in a similar way and thats all i did... but then my problem was in 3d space i'm probably wrong but it's an idea

I can see from your smile, you're not here for the sunset.
Lascerus
20
Years of Service
User Offline
Joined: 14th Feb 2004
Location: spaced out
Posted: 17th Oct 2004 18:09 Edited at: 17th Oct 2004 18:12
thanks for the help, here's the image kind of like the matrix, I once heard that dbp has some sort of automatic smoothing thingy, which could distort textures could that be the same prob here...



p.s. the deleting made it worse .
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 17th Oct 2004 18:12
Try this. It looks fine here.


The Wendigo
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 17th Oct 2004 18:18 Edited at: 17th Oct 2004 18:20
Make sure your images are of proper size (powers of 2). Try Full Screen Exclusive mode under settings.

A major problem I see in your code is your get image does something like (0, 0, 800, 600). This is wrong as it should be (0, 0, 799, 599) (remember 0 counts). Try those and see if that helps.

By the way, the bluring artifacts you may see are due to DB resizing the images to powers of 2 (square, generally). You may want to rewrite using images and setting the image flag to 1 (to preserve resolution, though it will run slightly slower).

Finally, object oriented programming using Dark Basic with a new C++ style translator - DOOP. You can get it here for free (BETA):
http://www.geocities.com/djpeterson83/projects.html
Lascerus
20
Years of Service
User Offline
Joined: 14th Feb 2004
Location: spaced out
Posted: 17th Oct 2004 18:22
ohhhhhhhhhhh thank you, thank you, thank you. Success!
It's working fine. thanks. Now i have a cool matrix background....!
Well... after a bit of editing ^_^
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 17th Oct 2004 18:30
Actually yes 799 and 599 are the proper numbers. It will be much more exact in regular windowed mode (not windowed fullscreen) because there is no streching of the pixels at all. Try all the display modes for your self but regular windowed shos up best here. Next is full screen exclusive, and then full screen windowed.

Lascerus
20
Years of Service
User Offline
Joined: 14th Feb 2004
Location: spaced out
Posted: 17th Oct 2004 19:15
yes thanks your code did the trick and the 799, 599 made it more precise(don't know why i didnt see that<sigh>, anyway thanks, Can i ask how i change between screens (i.e. menu to game) without comprimising my system resources. I was thinking of writing a gosub command to load it....i would then start the gosub command with cls to clear everything on it....is this a good way of doing it? p.s. major newbie ^_*
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Oct 2004 22:08
The problem with the code isn't the size of the area used in GET IMAGE - that is actually correct. The problem is that the extra ',0' on the end of those lines should be ',1' instead.

As a rule of thumb, all commands that deal with screen area use an inclusive/exclusive system.

For example, GET IMAGE 0, 0, 10, 10 will grab an image inclusive of 0, 0 and up to but excluding 10, 10 (ie 9, 9). The box, line and copy bitmap commands also work in this way.

It may seem weird, but its the way that DirectX does it. DBPro just went along for the ride

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Lascerus
20
Years of Service
User Offline
Joined: 14th Feb 2004
Location: spaced out
Posted: 18th Oct 2004 00:40
thanks fred..I mean Ian...I mean Mr.M?ummm...riight. ...i think i'm starting to get the hang of this coding thing.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 18th Oct 2004 07:11
If you put a 1 after get image command it seems to disable the ability of the texture to scrool on a sprite. See the pic in the zip attached. Thats why I didn't recommend it.

Attachments

Login to view attachments
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Oct 2004 22:17
Ah. In that case, why has no-one posted this as a bug? Huh?

If it doesn't work, then the fix might be to ensure that your image is a power-of-2 size in each direction, then you should be able to load it without the extra texture flag.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Oct 2004 03:47
I just assumed thats the way it was supposed to work. As sprites are basically textured plains. And the extra 1 flag is for images not to be used as textures (or so the help files say). I figured it kept it from splitting up to scroll.

Login to post a reply

Server time is: 2024-11-27 12:34:49
Your offset time is: 2024-11-27 12:34:49