|
From: hwa-jun yu on 8 Jul 2008 22:58 Sorry to have posted this question, it may seem exposing Director's inability in certain cases but I am just curious to know answers from senior fellow programmers. From my experiences, I found out that : 1. Director can't scale sprites perfectly. I can't understand images become jaggy when we upscale it, but with Director, images also look jaggy when we downscale it at runtime. (change sprite's width and height directly) 2. Director can't rotate well. The sprite will look awfully jaggy. (change sprite's rotation value) 3. Director doesn't support Particle System Or is it I don't know the proper technique? I used copypixel to create 800 x 600 snow particles. They look good but performance dropped from normal 30 fps to poorly only 15. If there is some algorithm to outcome these problems, please let me know. That'll be very helpful in our upcoming projects. Again, with no intention to harshly criticize Director's creator, this is merely a question I've been wanting to ask for long. Thank you.
From: UdoGre on 9 Jul 2008 03:03 Hi Hwa-jun, You're right about points 1 and 2. About point 3: You don't draw your snow "on exitframe", do you? This would slow down a lot. If so, put the code in "on enterframe" instead and behold a mighty increase in speed. HTH, Udo
From: alchemist on 9 Jul 2008 03:56 When image quality is the issue, you should forget the normal sprite approach, and check imaging lingo. For resizing / rotating, you should use a virtual buffer, that is 2x or more the size of the output. You can e.g. perform any rotation (copypixel using quads) on a 2x virtual buffer, and then copy it to an image half it's size. As for the snow, though it could be done with sprites and object oriented coding, still using an image buffer should be preferable. An 8bit grayscale overlayed image with screen ink applied to it probably. "hwa-jun yu" <webforumsuser(a)macromedia.com> wrote in message news:g519h5$p5o$1(a)forums.macromedia.com... > Sorry to have posted this question, it may seem exposing Director's > inability > in certain cases but I am just curious to know answers from senior fellow > programmers. > > From my experiences, I found out that : > 1. Director can't scale sprites perfectly. > I can't understand images become jaggy when we upscale it, but with > Director, > images also look jaggy when we downscale it at runtime. (change sprite's > width > and height directly) > > 2. Director can't rotate well. > The sprite will look awfully jaggy. (change sprite's rotation value) > > 3. Director doesn't support Particle System > Or is it I don't know the proper technique? I used copypixel to create 800 > x > 600 snow particles. They look good but performance dropped from normal 30 > fps > to poorly only 15. > > If there is some algorithm to outcome these problems, please let me know. > That'll be very helpful in our upcoming projects. Again, with no intention > to > harshly criticize Director's creator, this is merely a question I've been > wanting to ask for long. > > Thank you. >
From: hwa-jun yu on 9 Jul 2008 07:48 Thank you for the replies, guys. I'll try putting my code to enterframe, udo. Is there any good tutorial on virtual buffer, or any other same technique that you tell me, alchemist? You know, for some people, theories are just not enough (including me). Sorry for the trouble~
From: alchemist on 9 Jul 2008 08:50 From a quick search: http://www.mediamacros.com/item/item-1006687612/ The above link contains sample code for rotating an image. Haven't checked it, but since it's written by Luke, it should work. To enhance the quality, you can create a larger image (e.g.2x), copyPixels to the new image (magnify) rotate the big image, and copy the resulting image data to the original image (shrink) You can always google 'imaging lingo tutorial / examples'. "hwa-jun yu" <webforumsuser(a)macromedia.com> wrote in message news:g528i8$sb2$1(a)forums.macromedia.com... > Thank you for the replies, guys. > I'll try putting my code to enterframe, udo. > > Is there any good tutorial on virtual buffer, or any other same technique > that > you tell me, alchemist? You know, for some people, theories are just not > enough > (including me). Sorry for the trouble~ > > >
|
Next
|
Last
Pages: 1 2 Prev: Mac projector looking for shockwave?? from CD Next: TOUCHSCREEN PRESENTATION |