Junk Byte Code for Kicks

21Mar/150

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
5Mar/130

Foos table modding

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

http://www.youtube.com/watch?v=yPVNIu_0Pt0

Filed under: Games No Comments
7Aug/122

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.

https://github.com/junkbyte/JBConsole

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

It is still under very early stage of development.

Filed under: Uncategorized 2 Comments
24Mar/122

Flash p2p – console remoting

Looks like we have p2p over lan capability without server.

http://www.flashrealtime.com/local-flash-peer-to-peer-communication-over-lan-without-cirrus/

Defo a candidate for console remote

Filed under: Uncategorized 2 Comments
10Mar/126

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
28Feb/125

Faster Console graphing

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

Filed under: Console 5 Comments
25Feb/120

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

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

22Feb/120

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 :)
http://console.junkbyte.com/addons/commandprompt/

Filed under: Console Continue reading
21Feb/121

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
19Feb/129

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()
Quote:

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.
But...

  • 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?