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! / edges are jaggy

Author
Message
Hummanoid Typhoon
20
Years of Service
User Offline
Joined: 4th Aug 2005
Location: Middle of nowhere
Posted: 6th Jun 2007 12:34
i have a sprite inpng-24 and i have a nice smoothed alpha layer it looks great when it's not rotated but once i turn it a few degrees the edges look really nasty is there some way of stopping this aside from making a sprite for each degre of rotation?

Clever code is fast code

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Jun 2007 09:47
Perhaps using images a little bigger than you need would help. Like instead of rotating a sprite that is the same resolution as the screen, use say, 64x64 sprites and scale them down to 48x48, or whatever suits. This might reduce the jagged appearance because it would have more image data to generate the rotated image from.


Good guy, Good guy, Wan...
Hummanoid Typhoon
20
Years of Service
User Offline
Joined: 4th Aug 2005
Location: Middle of nowhere
Posted: 7th Jun 2007 11:56
Thats a very good idea thanks Van B.

I found doubling my sprite dimensions and then scaling down to 50% greatly improves the quality of the rotated sprite.

Moondog
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: outside the box
Posted: 8th Jun 2007 19:09 Edited at: 8th Jun 2007 19:11
you would think there wouldn't be any problem considering their 3D...might be easier to build a billboard engine with DBP's 3d commands and go about it that way, then you could add other details like shaders and the like.(i heard you can add shader's to sprites, but i've yet to actually see it done...though my info may be wrong)

also, doing it in 3d, it would be easier to do layers by just adjusting the z coordinates instead of having to figure out when to paste a sprite before another.

MOONDOG

Hummanoid Typhoon
20
Years of Service
User Offline
Joined: 4th Aug 2005
Location: Middle of nowhere
Posted: 9th Jun 2007 12:37
i would love to know how to use shaders on sprites!

I had considered 3D but decided to stick with inbuilt sprite commands. I have already created a layer based drawing system each sprite gets assigned a layer then the drawing sub draws them to the screen in order.

Hummanoid Typhoon
20
Years of Service
User Offline
Joined: 4th Aug 2005
Location: Middle of nowhere
Posted: 9th Jun 2007 15:27 Edited at: 9th Jun 2007 15:29
i'm using paste sprite.... Is that bad?? i.e. slower than using norma sprite commands?

I sort of assumed it was faster to paste one sprite many times than use the sprite command but i also have ended up pasting single sprites I don't really know how that effects things. I'm a bit of a noob to 2D in darkBasic been mostly doing 3D

MonoCoder
19
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 14th Jun 2007 02:30
As long as you draw in the right order, paste sprite is very good, and very fast. Besides, you can use it to draw the same sprite several times (like instancing), rather than having unnecessary duplicates.

Login to post a reply

Server time is: 2025-08-09 02:15:23
Your offset time is: 2025-08-09 02:15:23