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.

Dark GDK / Something's wrong with sprites

Author
Message
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Dec 2008 22:28
I found something odd occuring with sprites.

It doesn't happen all the time, but occasionally one sprite will mess up.

An example for this would be to do the following:
1) Start a new 2D DarkGDK project
2) Add this line:

Just above the check for when they go off screen.
3) Comment out the line for dbPlaySprite


Run it... you'll see one sprite out of all of them is tiny.

Of course, this could be looked at a different way and say that only one sprite is the correct size because I had to scale the sprites down to 10% otherwise they were way too large!!! I think Animated Sprites that aren't being animated will (save for one of them) retain the size of their original image.


Attached is a screen shot showing the one tiny sprite from running the program.



I stumbled across this by playing around with sprites trying to find out why one of the sprites in my game would display for an instant and then suddenly disappear and never come back!

Has anyone else come across issues like this?


The one and only,


Attachments

Login to view attachments
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Dec 2008 02:20
I'm not sure what you're saying. If you run the dbScaleSprite as you have, it will scale whichever sprite is designated by i to one tenth it's unscaled size.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Dec 2008 02:45
Right, however I scaled all of the sprites. One of them seems to have been scaled differently than the others, though.


Here's the entire code. Just pop it in and run it, they all get scaled the same, but only one of them is tiny.




The one and only,


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Dec 2008 21:13
Did anybody try this? I'd really like to know what's going on here.


The one and only,


elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 26th Dec 2008 06:32
I did my best to replicate your code and got this:


Yet, all of the sprites were small.

~you can call me lantz~
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Dec 2008 07:02
Then... do I have a bad install of DGDK?

Should I just try to reinstall and say "Repair"? Or how would I uninstall it?


The one and only,


Login to post a reply

Server time is: 2024-11-25 09:42:19
Your offset time is: 2024-11-25 09:42:19