I’ve started to look after good console under Windows after I’ve tried console on MacOS and Linux (Ubuntu).
Problem with alpha in BitmapData / PNG
BitmapData doesn’t store each data what we would like to store.
If BitmapData contains transparency (from constructor argument, or loaded by Loader). It is possible to store R,G,B information in concrete pixel only if A component is not 0. That makes some problem with right texture support for Stage3D
Create alias to apps in Windows
Recently I facilitated problem that there is no easy way to create alias to most useful apps in Windows command line. I found some hacks they require registry modifications and so one. So because of lag of this feature I decided to simplify my workflow and I created simple Python script.
Do right things rather that do things right
I think that problem what I had on the beginning was that I tried to make something in perfect way. With perfect architecture. Sometimes it was almost over-engineered but I was proud because of that. I was so stupid. I waste so much time because of that.
Problem of this way of thinking is that I cannot be sure that some solution, or project will be the right one. Sometimes client just says “No, I don’t like it”. Sometimes it is OK, but after a while there is revolution in project and this particular feature will be trimmed off.
I think that it’s better to be able to create several prototypes in not right way. But this gives opportunity to choose the best one, and if I am sure that this is right way I can spend some time to improve it. Even I can delegate this to someone.
In other case I’ve got crap what has been written in perfect way.
Don’t use ||= operator. Memory leak if there is no coerce.
Adobe scout is great profiling tool sometimes is annoying but only in usability wise.
During profiling application life cycle I have found some peeks of GC process. Like here:
Dictionary vs Object
Recently I was wondering about different between using Object and Dictionary. One of the biggest pros about using Dictionary is possibility to use weak reference in key. This mechanism do not create an obstacles during Garbage Collection. Important fact is that weak references is quite expensive for collecting process, there is impact on overhead.
I have crated some test to show differences between Objects and Dictionaries.
FlashDevelop is on the GitHub!
Regarding to forum post: (http://www.flashdevelop.org/community/viewtopic.php?f=1&t=10961)
We finally did it: FlashDevelop is now under git.
For obvious size reasons (unless you want to download a gigabyte of git objects) only the current state of the code has been archived.
The svn repository will remind us of our long history: in 2004/2005 there was nothing like github. Even Google code only appeared in March 2005 and it quickly became FlashDevelop’s code home.
In the last few years git tool, hosting and clients have become a lot better than the svn offering (does Google still cares about Google code?) and we realize that svn makes us waste a lot of time, especially for a relatively large project with lots of contributors like FlashDevelop.
And there it is, fork FlashDevelop on github:
https://github.com/fdorg/flashdevelopFor good measure, I’d like to remind that bitbucket is another fantastic host, offering even free private repositories for small projects. The company behind bitbucket offers the great, and crossplatform, SourceTree client for free (github tools are toys in comparison).
Now we have an opportunity to improve the best open source IDE to Flash. Move to C# in quite easy.
Enjoy!
Fun Fun Fun with Array and Vectors conversion
One of the most important benefit of using vectors is performance, and ability to fixing memory.
Arrays are better in:
- copying whole structure (Array to Array, using slice())
- as a source to create typed Vector (using statement: Vector.<T>(sourceArray))
Vectors are better in:
- iteration over collection by index
- more familiar in IDE (auto-complete syntax of generic)
But what is the range of those benefits and how write program to see the difference?
Abstract class in ActionScript
There is a shame that we have to emulate Abstractions or virtual members. In most cases we can use Interfaces to define some required structure. Of course this is useful to valid composition.
When we would like to set composition over inheritable that will goes to use some tricks. We can image situation in normal implementation:
public interface IFactory { function create(description:Object):Object; }
Flash main loop
Flash is platform like another one, but specific is that we have a quarantined loop cycle.
That means if we set 30 FPS in our app/game that in the best way we achieve exactly 30FPS (or less in some cases), and each next ENTER_FRAME broadcast event will be dispatched in next 33,(3)ms. Rest of this time will be spend in idle mode.
Categories
-
Recent Posts
Tags
Meta
Categories