Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Irksome Ninja

Pages: [1]
1
Graphics / Draw a sprite trough a polygon mask
« on: February 18, 2015, 01:00:33 pm »
I have been making a 2D visiblity algorithm by following this tutorial http://simblob.blogspot.se/2012/07/2d-visibility.html

I have managed to create the light vertices and it works fine when I draw it in a single color, but I want to use a shadow map to get "faded" lights like this: http://i.ytimg.com/vi/2yrgzlRhAes/maxresdefault.jpg
Mine looks like this now: http://i.imgur.com/wAdRBr9.png where the blue dot is the light center and the green is the lighted area.

How can I "apply" a sprite to this like this one: http://www.alcove-games.com/wp-content/uploads/2013/06/light.png ?

My code lies here: https://github.com/doodlemeat/bugfree-octo-sansa

2
Graphics / Dynamic vertexarray
« on: February 06, 2015, 10:18:15 pm »
For a long time, I have been using static tilemaps, where I only once create and fill my vertexarray with tile information, by using sf::Quads, but say I want to add/remove certain tiles now and then, do I throw away the old array and refills a new? Or should I just append to the vertexarray?
I guess rebuilding the vertexarray often, is not so optimal?

Pages: [1]
anything