Modifiy CreateJS for performance MouseMovements and Ticker - performance

To all CreateJS professionals, I need your tips on performance.
Especially with mouse movements and ticker.
I don't really modify libraries, but with CreateJS I am motivated.
Do you have or know of examples to improve MouseMovements and Ticker methods?

Related

RxJs good tutorials [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am trying to learn ReactiveX. I have spent almost a whole day and I am not able to understand it properly. I tried to look the official documentation but is is very difficult to understand. Something like this:
"Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence."
How a new person is able to understand it. So if someone knows the good resource then please mention
As a commenter has said, Brian Troncone's page is a good place: https://www.learnrxjs.io/.
The reality is that learning Rx is not a snap. The hard part isn't learning the library, the operators, etc. Rx requires at least a little bit of investment in thinking differently, at least for most people (myself included).
The best way to start understanding it is to play with it. For RxJS, the interactive examples in rx-book are a great place to start. They use jsbin, so you can run the sample code to see the output, then tweak the code to see what difference it makes.
From a .Net angle, playing with Linqpad is the best way to start getting a feel for how Rx works.
Ultimately you'll need to combine different aspects of learning:
Some theory reading
Some practical examples (which is where rx-book is useful)
Some practical application to a demo or real system of your own
I have a list of helpful resources that I've compiled here. But there is so much being put out there, especially on rxjs, that it's hard to keep up.
What's not common is true examples of real world usage of Rx. Partly this is because Rx is typically applied to larger scale problems, so it's not easy to just fabricate a good use case to make a demo from.
ReactiveTrader is one example of a large scale demonstration of applying Rx. It's a good example of an app making heavy use of Rx to build a complex web app that deals with streaming data and UI events.
I've also given a talk on how to apply Rx to tweet streams to analyze the data. This is oriented around real-time manipulation, aggregation and filtering of streaming data. There's a full video of the talk, plus articles discussing the approach and results here.
Ultimately it will take you time to learn Rx, but it will be worth the effort if you follow through.
The best way to learn RxJs to play with it by going through the api reference.
Besides that you can go through the following resources:
Video courses on Egghead.io
Awesome explanation: The introduction to Reactive Programming
you've been missing
Hot vs Cold Observables ( Also All Ben Lesh Articles on Medium)
Tutorials on youtube like : Adding Even More Fun to Functional
Programming With RXJS - Ryan Anklam
Explanatory tutorial with example on
https://auth0.com/blog/understanding-reactive-programming-and-rxjs/

Are basic HTML Canvas drawing/animation frameworks (or at least large portions of a framework), such as processing.js still necessary?

Allow me to explain, so that this doesn't just get marked as an "opinion-based" question.
I'm learning processing.js right now, and I can't help but notice many of the similarities in functionality with what already exists in the Canvas API of Vanilla-JS. Perhaps writing a set of large-scale animations is much more complicated in plain old Canvas than it is in processing?
I'm asking this because, as I continue to learn more about the vanilla APIs, I'm seeing a lot of new functionality added in JS over the years that is starting to (VERY SLOWLY) make certain aspects of popular frameworks, no longer necessary (jQuery being a great example). I'm curious as to whether or not this is the case with Canvas and processing.js as well.
Personally, I'm trying to determine whether or not I should still be spending a lot of time in processing.js (I'm not asking you to make that decision for me though, but I just want some information that can help me decide what's best for me).
Stackoverflow allows specific non-coding questions about programming tools-like ProcessingJS, but your question seems likely to be closed as too broad.
Even so, here are my thoughts...
Native Canvas versus ProcessingJS
Html5 canvas was born with a rich set of possibilities rivaling Photoshop itself. However, native canvas is a relatively low-level tool where you must handle structuring, eventing, serialization and animation with your own code.
ProcessingJS adds structure, eventing, serialization, animation & many (amazing!) mathematical functions to native canvas. IMHO, ProcessingJS is a higher-level tool that's well worth learning.
Extending native canvas into a higher level tool instead of a low-level tool
With about 500 lines of javascript, you can add a reusable framework to native canvas that adds these features in within a higher level structure: eventing (including drag/drop, scaling, rotating, hit testing, etc), serialization / deserialization.
With about 100 more lines you can add a reusable framework to native canvas that does animation with easing.
Even though native canvas was born with most of the capabilities needed to present even complex content, a PathObject is sorely needed in native canvas. The PathObject would serialize paths to make them reusable. With about 50 lines you can create a reusable PathObject.
Here's a fairly useless recommendation :-p
Try to use the right tool for the job (yeah, not specifically helpful).
Learning native canvas alone will let you do, maybe 70% of pixel display tasks.
Coding the extensions (above) will get you to 90%.
Using a tool like ProcessingJS will get you to 98%.
Yes, there are always about 2% edge cases where you either "can't get there" or must reduce your design requirements to accommodate coding limitations.
A slightly more specific recommendation
Since ProcessingJS merely extends native canvas, IMHO it's well worthwhile to take a few days and learn native canvas. This knowledge will let you determine the right tool for the job.

How to improve performance with many objects in game in HTML5?

What things can I do when it's necessary to show many objects and calculate position, collision detection, reaction, etc. and I want everything look smoothly? Here's an example I'm developing. I want that if I have 100 balls on the screen, I can show them smoothly. But I don't have any idea of how to do it. Every suggestion will be appreciated.
The basic steps to improve performance in canvas can be seen in this HTML5 Rock's Canvas Performance Tutorial.
And, if you are free to handle collision detection without Box2D, check this quad-tree implementation. The quad-tree doesn't deals with collisions directly but can improve performance by reducing the amount of comparisons needed to detect the collisions.
Articles suggestion for further reading:
Broad Phase Collision Detection Using Spatial Partitioning
Collision Detection and Response
Making Games With Box2dWeb
I see you're using box2d--an excellent and mature physics library. Good choice!
Box2d is fairly well optimized already...and a lot of eyeballs have looked at the code to search for further optimizations.
Therefore (if your design needs permit), your path to improvement is replacing this large library with simpler collision functions.
Check out this set of video tutorials. Ignore the fact it targets processingJS, it still provides a good tutorial on game physics and handling collisions. Skip to the second link if you are already good on physics basics:
Tutorial "home":
http://channel9.msdn.com/Series/Sketchbooktutorial
Tutorial chapter on collision of circular objects:
http://channel9.msdn.com/Series/Sketchbooktutorial/Simple-Collision-Detection-and-Response

FPGA Filter Project [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Do you guys have any good ideas on FPGA projects involving a filter? I want to do something interesting... not sure what. Thanks ahead of time.
Aloha!
As an alternative you could look at implementing some audio filter effects. The I/O requirements are easier than video. This means that you can focus on the effects themeselves and also create a stand alone (board) demo for your peers and teachers to try out.
As an example, look at the Cubase64 by Pex Tufvesson. A really sweet example of constrained implementations of audio effects algorithms. There is a good paper as well as a source code available:
http://www.livet.se/mahoney/c64-files/Cubase64_White_Paper_by_Pex_Mahoney_Tufvesson.pdf
Your task would be to implement one or more of these in HW instead of in SW. How about implementing a few and have switches toggle them on and off for user controlled effects?
You would get a pipeline with ADC interace followed by one or more effect blocks, each of which would have a bypass/enable controlled by an external switch. The pipeline would end with the DAC interface.
A simple design with littre overhead control which would clearly (audible) demo the implemented effects.
Hmmm, I think I should do this myself. ;-)
If you want to here Cubase64 there is a movie on YouTube:
http://www.youtube.com/watch?v=PTGkf21UpJ8
Here's an idea - implement a fast image histogram routine in FPGA. It could just take 8 bit input data and update a 256 bin histogram. You'd also need a way of zeroing the histogram at the start and a way to read the contents of the 256 bins afterwards. This is a potentially useful application as histogramming is a very common operation in image processing and it is inherently bottlenecked on general purpose CPUs due to serial dependencies. It can also not easily be vectorized with SIMD. A fast FPGA implementation would therefore offer real advantages over a software implementation.
I always find image processing projects are great - you can see results on a screen, not just pretty graphs, but actual processed imagery. Get an FPGA board with a camera input and VGA output. Try implementing a Sobel filter first, graduate to a corner detector like Harris or Shi Tomasi after that.

What is your choice for a Time Managment Solution? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I've come across a few different applications that monitor my usage while on the computer, but what have you used, and like? whether it be writing down your activities in a composition notbook or install an app that reports silently to a server? what do you like?
For explicit time tracking for projects I use SlimTimer. I also run RescueTime to track my time implicitly, but I end up not looking at that data very often.
I use neomem to keep track of things by hand. This allows me to keep track of more than just time. I often keeps notes associated with the story. This has become a collection of knowledge that I often search.
I use a paper timesheet to track my time. It looks like this:
(source: redbitbluebit.com)
and as a back up, I use a paid version the excellent TimeSnapper in case I need to go back and retrace anything I missed tracking the time on.
I prefer writing the times down using pen and paper. That way you can more fairly weigh things that would have been miscalculated if you were recording them with a stopwatch or timer.
If you start on something and have to get up for a few minutes, a timer may count that toward your working time had you neglected to stop or pause the timer. The good-old pen and paper are going to more accurately show which tasks you focused most of your time and energy on...not just the ones that you started earliest and ended latest. It may not be 100% accurate, but neither is the timer if you don't use it properly.
I have used both in the past, and find that there are problems with both, but I prefer the pen and paper method.
We use Standard Time as a Time Tracking tool and it's got a nice quick tasks window that is relatively small and lets you easily click checkboxes to switch between tasks. You can also create projects/customers and pre-set tasks to be loaded for each project (development, unit testing, documentation, etc...) and then just use the quick tasks window to switch which task you are currently working on without wasting too much time going through a full blown GUI.
It's not cheap - about $150/user - so if it's for personal use it might not be the best bet, but if you're looking for a solution for a team of developers then I've found it to be a good fit.
I use the time tracker plugin on Firefox. It tracks my surfing time of the whole day
I've been using Toggl for about a year now and I've found it to be spot on. It's simple to use and allows you to perform basic reporting against various criteria. You can either input time entries manually or use a stopwatch timer utility.
I tried out several applications before I settled on Toggl. For me, the intuitiveness of the Toggl interface was what decided it. I like my productivity applications to get out of my way and let me do my job and Toggl does just that.
There are various pricing plans, including a free one.

Resources