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 solve the problem with dbSpriteRotate()

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 22nd May 2011 12:49
when I Rotate a sprite ,I find it has sawtooth at the edge. how can I sovle the problem? I need help.

give my best
DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 23rd May 2011 04:28
Quote: "sawtooth"

????
This sounds like your content or display mode is low resolution and you saw's teeth are pixels.
Can you provide a screen shot?


halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 23rd May 2011 06:46
this is a screen shot.

give my best

Attachments

Login to view attachments
DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 23rd May 2011 22:09
Sorry I didn't get back to you sooner. I tried a couple of things with that image you sent me, but to really be able to see what the problem is I will need to see what the sprite looked like before a rotation.


WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 23rd May 2011 22:19
I've had a quick look through but I can't find a command that sets anti aliasing for sprites.

Warning! May contain Nuts!
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 24th May 2011 04:26
hello ,I uploaded the pic.

give my best

Attachments

Login to view attachments
DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 24th May 2011 18:05
Well, One thing that you could do is create a number of images that properly represent the sprite at different angles and then rotate these only a few degrees before you get to the next image's position.

This should minimize the amount of distortion you get from rotating the sprite.


halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 25th May 2011 04:11
Good advice.Thank you!

give my best
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th May 2011 14:57
Hi, I don't have DarkGDK but I'm working on getting it . What you could try, DeadTomGC could you verify this, when you load your image try an extra ,1 at the end. So something like dbLoadImage("Yourimage.png", 1, 1);

DBPro allows this "Load Image "yourimage.png", 1, 1" so I hope there is an equivelant for DarkGDK.

The extra ,1 should keep pixel perfect quality.

A clever person solves a problem, a wise person avoids it - Albert Einstein
DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 25th May 2011 17:16
Quote: "The extra ,1 should keep pixel perfect quality."


I'm pretty sure that only affects 3D, and I tried it a bunch of different ways in comparison to having no 1 there and got the same results. Although, It doesn't hurt to add that extra 1. So, I would recommend doing it.

Halley can try this to see for himself.


Login to post a reply

Server time is: 2024-10-02 17:22:29
Your offset time is: 2024-10-02 17:22:29