Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    162
  • comments
    262
  • views
    167464

Outlining

Sign in to follow this  
OrangyTang

115 views

Since I can't get the motivation to do some 'proper' code I spent an hour or so tinkering with an outlining technique to see how good the results would be. I think it turned out rather well:



Theres nothing fancy going on there, the outline is just the original sprite, coloured black, and jittered around by the outline width. This one has an outline 4 pixels thick which is about right I think, and needs about 16 jitters to get good quality results. Thats a few more jitters than I thought would be needed, but less than that tends to make the outlines look 'blobby' and uneven. 16 times overdraw doesn't sound too great, but it should only be on a fraction of the screen at a time so it shouldn't be a problem.

One neat twist to this is placing all the outlines on the same layer, behind the coloured versions. This means that when sprites overlap the colours run into each other, and the outlines merge on the outside edge, something like this:



I'm not entirely sure what I'm going to do with this effect, but for the amount of effort it requires it produces quite nice results. I think I'll end up using it on all my 'dynamic' sprites (ie. the player and other creatures) and leave the background tiles and others to be rendered as normal. Most background sprites don't change position so they can have the outline drawn in directly in the first place.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!