Junk Byte Code for Kicks


Flash-Console repo migrated to GitHub

The new report is @ https://github.com/junkbyte/flash-console

Wiki page formatting still needs work.

Filed under: Console, Console, Flash No Comments

Foos table modding

Modded foos table at my company during my free times (evenings, weekends, etc)


Filed under: Games No Comments

Junkbyte Console port to Objective C

I've been working on iOS recently and missed using console style logging.

So I 'ported' flash console to objective C.
Originally planned to use UIWebView as temporary implementation while I figure out how to do high performing multi-coloured texts.
But turns out HTML version is already very fast, so I may keep using HTML view for text rendering.
Native objective c code currently sends javascript message to UIWebView to log the strings.


Test html: http://console.junkbyte.com/ios/

It is still under very early stage of development.

Filed under: Uncategorized 2 Comments

Flash p2p – console remoting

Looks like we have p2p over lan capability without server.


Defo a candidate for console remote

Filed under: Uncategorized 2 Comments

Flash performance ranking ‘framework’

I am writing a simple framework which lets you score the performance of a given piece of code.

The motivation
A lot of the time when I am writing a piece of code that needs to perform really fast (due to it being called so many times per frame, etc) I struggle to figure out which approach is faster.
I am talking something very basic, such as do I use "for each (var num:uint in list)" or "for (var i:uint = 0; i < len; i++)" to loop through a list.

Filed under: Flash Continue reading

Faster Console graphing

New graphing panel seems to run 30 graph lines at 60fps (at least on my machine).
Try it here:
(The actual graph does not mean much to the sound)

Filed under: Console 5 Comments

ASDOC inside SWC

Just learned how to include asdoc inside swc so that it shows up in IDE
(tested with FlashBuilder).

Thanks to http://forums.adobe.com/thread/444791

Added a new console download: Console2.6+asdoc.swc



Console command prompt addon demo

Finally got time to do a simple demo of "CommandPrompt" addon.

I used this addon for a utility AIR app at my work.
The app is a simple command line where you choose what you want to do and it does stuff according to your choices.

Here is a simple greetings demo:
(your selections do not get recorded :)

Filed under: Console Continue reading

Console 2.6

Version 2.6 final is out for download.

* Addons are now included in Console.swc
* DisplayMap addon, Allows inspecting of display tree
* CommandLine auto focus addon, auto focus command line textfield when it becomes visible
* Removed Cc.remotingPassword. use Cc.config.remotingPassword (must be set before starting remote)
* Basic timestamp display support. Use Cc.config.showTimestamp = true;
* Line number display support. Use Cc.config.showLineNumber = true;
* Key binds allow for key down or key up state
* Multi line top menu
* Support for delete operation in commandLine
* Fixed Issue 90. UTF8 chars failing to send to remote

Download at: http://code.google.com/p/flash-console/downloads/list

Tagged as: 1 Comment

Flash String weirdness

A long time ago...

I had this bug report in Console that FPS and memory graph is leaking memory.
Issue: http://code.google.com/p/flash-console/issues/detail?id=89
I was not able to find the exact cause of this other than the fact that if I don't update texts in graph, it doesn't show any memory problems.
I suspected back then that Strings were strange but was not able to pin point what's strange about it.

Fast forward to today

I recently learned that flash keeps 'master string' of strings when they get passed around.
See http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/sampler/package.html#getMasterString()

For example, if you call String.substr(), the returned string will often actually be implemented as just a pointer into the original string, for the sake of efficiency. In normal usage, this is an implementation detail which is not visible to the user; however, it can be confusing when using a profiler to analyze your program's memory consumption, because the string may be shown as taking less memory than would be needed for the string's value. In addition, a string might be retained in memory solely because it is the master for other strings. getMasterString() allows profilers to show the user an accurate graph of string dependencies.

It sounds good, it is obviously saving memory by not copying the strings and reusing via referencing to original string where possible.

  • What if you only need to keep a tiny part of the string (say downloaded from an external file), will it know to discard the big string?
  • What if you chain a lot of strings together, will it keep references to all its parts?
  • Could it cause memory leaks?