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 / How to make sprites bigger?

Author
Message
Bausbsdsa
12
Years of Service
User Offline
Joined: 10th Jul 2012
Location:
Posted: 11th Jul 2012 05:59
I have a sprite sheet that I made and its extremely small in DarkGDK so I was wondering if there was a function to make it bigger, I don't want to back and scale all the sprite frames up so I hope there is.

dsffs
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 11th Jul 2012 19:05
You can use dbStretchSprite or dbStretchImage. As I recall there were issues with stretching an image in DGDK 1 though, the image data would be properly resized, however when updating a sprite from such an image it would get the initial size of the image, thus forcing you to resize the sprite after every other change to it as well.
This might not be an issue in DGDK 2 however; I haven't tried it.


"Why do programmers get Halloween and Christmas mixed up?"
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 12th Jul 2012 16:41
dbSizeSprite() or dbScaleSprite()

dbSizeSprite() gives you control over the actual pixil sizes (x,y)
dbScaleSprite() allows you to set a percentage size of the sprite

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-11-19 00:30:17
Your offset time is: 2024-11-19 00:30:17