This essentially lets flash calculate the alpha values for each line once and then copy it as simple pixel data for later frames. Every frame I copy what has been drawn on the stage into a bitmapdata objects and set it to display on the stage instead. So the solution was to use the bitmap and bitmapdata objects. After some research it seemed the performance suffered mainly because the graphics drawn with transparency had to figure every single line on the stage to determine it’s color values and flash doesn’t do that too efficiently. Before these edits, the framerate would sink to around 6 in the first 10 seconds of running with more than 3 lines. Then, I had the task of making it more manageable and scalable. The normalize, interpolate and map functions I acquired long ago from kp here, go there to hear his explanation which is much better than any attempt I could make. I also added a few function to help with calculations and updated the alpha values of the lines. This was pretty simple, in the end, and I ended up adding quite a few variables to differentiate each line for the others in line width, color variation and position. The obvious route is to have a var that designates the number of balls which will draw lines, and then loop through creating the desired number and then in the loop function that is executed each frame loop through them again and draw new lines for each one. First I wanted to abstract the duplication of each ball/line so that it didn’t require copying blocks of code for each one. But it was all in the spirit of one step. I took a few steps in this iteration since the last one. Well, so much for blogging each step in my process of creating this generative art series. Many action script language updates: stringent static typing as default, hardware oriented numeric types, type inference… Tagged 3D, actionscript, adobe, AIR, as3, atlanta, browser, conference, event, flash, game, html5, interactive, mobile, notes, standards. Yo will not lock up with intense calculations.īetter sort for hardware accelerated video cards We have so many other outlets to game: browsers, social, mobile devices… Soon professional games will be via Facebook and browsers.įacebook angry birds game built in flash using stage 3D.Ĭoncurrency, multi threading for player. See example game: Angry bots.Ĭonsole sales are declining. Adobe has put in a site to showcase these games at: Īdobe has a new partnership with unity. It even can compile to native apps for ios and many successful apps have done so. While you can do some gaming in browsers today, flash is now positioned to be the best solution for game development. Adobe will always position Flash to be ahead of what is possible with browsers. It might not be easy, but it is where the industry is moving, don’t hide from it! If you want to do things that are to advanced for the current standards and browsers, then flash is most likely where you need to be. Learn about it and learn the capabilities and know when to use what tool and when they are appropriate. What is flash for? Doing things the browser can’t! If you can use HTML5 then do it. Here are my notes on the presentation from Lee Brimelow of Adobe at the Atlanta Adobe Users Group Meeting:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |