all this hype about POLYVECTOR

Previous topic - Next topic

ampos

You know I am new at GLB...

I have read alot about placing sprites, with and without polyvector, but frankly, I dont know what is all this hype about polyvector.

I know it has to be something, as most of you claim "it is awesome", "its faster",... but I dont see really why.

Can someone explain me more about polyvector that the "little" explanation on the online guide?

Thanks
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

KermEd

I only understand polyvectors in SVG - that is instead of having a set scale X/Y/X2/Y2 image you can have all 4 as variables.  So you can stretch an image unequally (look at it like the Transform command in Adobe Photoshop). 

With that said, I have plans to test polyvector in glbasic - but haven't had a need (yet).  From a development perspective it gives you a lot more options though (mock-3d through fake perspective via polyvector for example).

ketil

Write a little test and play around with the function a bit, and you'll find it very flecible.
I use it to stretch and tweak an png (an inverted semi transparent png) over "some of the tiles" in my game to create an illusion of an flashing candle light. and i also use it to fade down the light/colort of my tiles that is not overlaid by the png.

You can access the sourcemap wherever you want, and stretch/rotate ao.

I almost doubled the speed of my tile-engine with  effects (zooming/stretching, rotating etc.) using polyvector because it improves speed when drawing tiles in batches, and cut down double calling of similiar functions.

Just look up some snippets and play a bit with them.
"Sugar makes the world go 'round. Caffeine makes it spin faster."

ampos

I just play a bit with it, and yes, it has his power.

In my current project (http://www.glbasic.com/forum/index.php?topic=5031.0) the background is painted with polyvector, using just a single 32x32 pixels pattern. Also the colors are set using polyvector, and change every run.

The inner shadows are again a single 32x32 image, rotated inside polyvector.

I have noted that sprites to be tiled on polyvector can not be 24x24, they left a black border. I tryed 32x32 and they work. Dont know if they have to be 16x or 32x.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Ian Price

Tiles used in a polyvector can be any size - your maths must be slightly iffy ;)

It's definitely worth using pv's though - they have so many uses. :)
I came. I saw. I played.