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.

2D All the way! / Image Distortion UNSOLVED

Author
Message
Medicine Soup
23
Years of Service
User Offline
Joined: 25th Mar 2003
Location: Arizona, USA
Posted: 8th Dec 2004 12:36
My sprites always display images at 1/2 the quality.

I know Gamefreak had this problem and that the_winch pointed out the texture flag thing, but that does not really solve the problem.

When I set the texture flag to 1, the image is displayed ok but I can't seem to mess with the sprite. (scaling totally screws it up. sometimes the sprite never appears, sometimes it appears then ALL the sprites dissapear.)

The whole reason I am using sprites is so I can scale, flip, diffuse colors, mess with the alpha channel, etc. but when I set the texture flag = 1 I can't seem to do any of that.

I tried enlarging the picture file to 2x size, then scaling the sprite down to 50% but that makes the program take forever to load.

Does anyone have a solution to this problem?

Thanks.

Medicine Soup

There are 10 kinds of people in the world: those who understand binary and those who don’t.
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 9th Dec 2004 00:12
Look at my reply on this post:

http://forum.thegamecreators.com/?m=forum_view&t=41531&b=4

and download the zip file. It simply bounces a load of sprites around the screen. Tell me what it does on your pc.

Boo!
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Dec 2004 02:14
Try loading your images with a ,1 flag:

Load image "sprite.bmp",10,1


Van-B


It's c**p being the only coder in the village.
Medicine Soup
23
Years of Service
User Offline
Joined: 25th Mar 2003
Location: Arizona, USA
Posted: 9th Dec 2004 02:47
@Van B:
Quote: "When I set the TEXTURE FLAG TO 1, the image is displayed ok but I can't seem to mess with the sprite. (scaling totally SCREWS IT UP. sometimes the sprite never appears, sometimes it appears then ALL the sprites dissapear.)
"


@spooky:
your program works great, I can even scale them, no problem. So this is clearly something I am doing wrong with how I am implementing my code. It may be that I have over 25 different images loaded at the same time. Perhaps I should try PNG files. I was unaware they had a per-pixel alpha channel. very cool.

I will try different things to get it to work, but as it stands now, It still causes problems. I will upload a sample and you guys can try it out and see if it is screwing up on you too. Any more ideas would be helpful.

Thanks.

"I hate people who put stupid quotes at the bottom of thier posts" -Medicine Soup
Medicine Soup
23
Years of Service
User Offline
Joined: 25th Mar 2003
Location: Arizona, USA
Posted: 9th Dec 2004 03:10
Here is the sample program. Feel free to mess with the resolution, sync rate, etc. I couldn't seem to get it to work properly no matter what I did.

BTW, how can I get my hands on a PNG editor?

"I hate people who put stupid quotes at the bottom of thier posts" -Medicine Soup
dj chainz
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 9th Dec 2004 04:15
Photoplus is a good cheaper alternative to photoshop : [href]www.photoplus.com[/href] It can edit alpha channels and a lot more. I use it for all my games' graphics, and I strongly reccomend it.

I am the lead programmer at red spark studios
I also have a blog on how to make a game engine
http://www.dbgame.blogspot.com
pizzaman
22
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 9th Dec 2004 09:33
Hi

Tried your program; worked fine for me - everything displayed correctly. I know this question gets asked a lot, but what version of DBP are you using?

The only other thing I can think of is that it could be fastsync messing up, but I doubt it. Try this



Does it give the same results? Also a screen shot of the results your getting would help.

Also a good image editor that edits PNG's (and is free) is Ultimate Paint. You can get it here

http://www.ultimatepaint.com

pizzaman
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 9th Dec 2004 10:05
Your code and graphic works fine on my pc.

Boo!
Medicine Soup
23
Years of Service
User Offline
Joined: 25th Mar 2003
Location: Arizona, USA
Posted: 9th Dec 2004 13:35
Thanks on the PNG tips, guys.

Ok. These are some pictures of what happens on my computer. (Sprite1 is the first scaled sprite, sprite 2 is the sprite at 100% scaling) Its the same thing I get with dj chainz code.

It may be a really jacked up video card thing. I don't really know. I have the 5.7 update as well as directX 9.0c. I also have the new compiler. the DBPro version is 1.055.

"I hate people who put stupid quotes at the bottom of thier posts" -Medicine Soup
Medicine Soup
23
Years of Service
User Offline
Joined: 25th Mar 2003
Location: Arizona, USA
Posted: 9th Dec 2004 13:47
I just discovered it is related to the dimentions of the picture.

I tried replacing "16.bmp" with spooky's "ring.png". That worked just fine. So I changed the dimentions of 16.bmp from 147x243 to 128x128 (the same dimentions as spooky's ring.png) and it displayed it perfectly. Something to do with 128 being a factor of 2? Any ideas?

"I hate people who put stupid quotes at the bottom of thier posts" -Medicine Soup
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Dec 2004 16:32
Ahh, I had that problem for a bit - I can't remember what made it go away though.

What versions of DX and DBPro are you using?, I think you might need to update.


Van-B


It's c**p being the only coder in the village.
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 9th Dec 2004 18:15
That is a mess isn't it!

bit confused about this:

Quote: "I have the 5.7 update as well as directX 9.0c. I also have the new compiler. the DBPro version is 1.055."


If you have updated successfully to 1.57, then version should be 1.057 - what to you see when doing menu option: help/about in editor?

The only thing you don't say you have updated is video card drivers. What graphics card and driver are you using. Nvidia and ATI are constantly updating drivers. Maybe you should go to their website and download latest.

Boo!
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Dec 2004 20:21
Ahh - that does sound a little familiar, I'm sure it was when a DBPro patch update went wrong, I ended up with strangeness with the sprites (like flickering, garbled images, as well as quality issues) - I also had trouble handling text strings, LEFT$ and MID$ for example would crash my PC - not ideal when your writing a script parser - after a reinstall of pretty much everything (including windows) it worked fine. You should maybe start with your graphics drivers, and update and reinstall them, then do the same with DBPro, then DX. If that does'nt fix it, then the only other option is a complete wipe.


Van-B


It's c**p being the only coder in the village.
Medicine Soup
23
Years of Service
User Offline
Joined: 25th Mar 2003
Location: Arizona, USA
Posted: 10th Dec 2004 03:24
Ok. I'll give that a shot. Fresh start. Thanks.

"I hate people who put stupid quotes at the bottom of thier posts" -Medicine Soup
Medicine Soup
23
Years of Service
User Offline
Joined: 25th Mar 2003
Location: Arizona, USA
Posted: 10th Dec 2004 04:29
Image Distortion SOLVED!

Thanks, guys.

"I hate people who put stupid quotes at the bottom of thier posts" -Medicine Soup

Login to post a reply

Server time is: 2026-06-11 14:48:47
Your offset time is: 2026-06-11 14:48:47