qtjs Code
Brought to you by:
philipashmore
File | Date | Author | Commit |
---|---|---|---|
html5 | 2011-08-17 | Philip Ashmore | [d9349b] Version 0.10-04 |
qt | 2011-08-17 | Philip Ashmore | [d9349b] Version 0.10-04 |
sudoku | 2012-02-13 | Philip Ashmore | [09538d] Version 0.10-05 |
ChangeLog | 2012-02-13 | Philip Ashmore | [09538d] Version 0.10-05 |
LICENSE.txt | 2011-08-17 | Philip Ashmore | [d9349b] Version 0.10-04 |
Makefile | 2012-02-13 | Philip Ashmore | [09538d] Version 0.10-05 |
README | 2011-08-12 | Philip Ashmore | [87a098] Release 0.08-06 |
TODO | 2011-08-17 | Philip Ashmore | [c0172e] Release 0.10-02 |
gpl.txt | 2011-08-17 | Philip Ashmore | [d9349b] Version 0.10-04 |
Storyboard ========== It's registered in SourceForge as v3c-storyboard due to a name clash. Directory layout ================ storyboard (you are here) |- html5 | |- sudoku | \- timeline |- qt | |- c++ | | \- html5-capture | \- images \- sudoku (the "c" solver) So, in the context of this project what is a storyboard? A storyboard is a sequence of commands, or timeline. The commands might specify the actual story time at which the event it describes takes place (as it does in the Sudoku project below) or the timeline might simply indicate a relative ordering of commands. What do these commands look like? Well, for a general dependency graph, for example, we have declarations 1. entity declaration an entity is something of interest 2. entity relation declaration a relation describes a relationship between entities 3. modifier declaration these change or delete an entity or relation In all cases these commands are context methods, changing the state of the context. The context here is something that implements a "dependency graph" interface. In the case of a context recorder, this state change is the addition of an object that describes the context method call. Replaying this context means supplying another context for it to play into - also a context method, but a method of the context recorder interface, a derived interface, or an alternate interface in case of a method name clash. Usually the timeline isn't played to the end, but to a particular point according to some constraint. In Sudoku there was an implicit context with a current or timeline time. Duration psuedo-entities were used to change this timeline time and subsequent entities picked up this time attribute, defining a time relationship between the two sets of entities, before and after. On the Sudoku board context, these entities created sprites that played on the board and also modified the numbers on the board. Event objects were retrieved from the timeline and played into the board context until the timeline caught up to the current play time. In timeline/pixel, there was an explicit context - the drawing context. The timeline in this case had an "end" attribute which placed an upper limit on the number of drawing events to replay. In v3c-schema, the schema "script" described a series of structure/member definitions with relations. So the context there was 1. the schema context for structure and attribute declarations This could change to a structure context when it met a structure declaration. 2. a particular structure context for attribute and member declarations Here an "end-structure" command pops the context to the schema context. projects ======== Storyboard currently contains the following sub-projects html5/sudoku ------------ I wanted to publish a c/c++ class library with demos but then I got sidetracked with html5 which turned out to be a short-cut to grappling with storyboards core concepts - timelines and nested stories. The result is a mostly working demo that shows a "master" story (the timeline) controlling a nested story (the Sudoku board) which has it's own stories - the span and number sprites. I did all my development and testing in Google Chrome on Debian GNU/Linux amd64. You'll need to add --allow-file-access-from-files to the google-chrome command line if you want to run them locally from the expanded project tar-ball available at http://sourceforge.net/projects/v3c-storyboard/ and using the "git" version control program with git://v3c-storyboard.git.sourceforge.net/gitroot/v3c-storyboard/v3c-storyboard (read-only). I case you don't have a browser capable of seeing this demo in all it's glory, I posted some YouTube videos at http://www.youtube.com/results?search_query=v3c+storyboard&aq=f html5/timeline -------------- The "timeline" in the sudoku example is so cryptic it's downright encrypted! I was looking for a way to get html5 to show a view into a large graph, with zooming/panning. Now it looks like I'll have to re-implement the scroll functionality I can see in the text editor (KDE3 Trinity/kate on Debian AMD64) I'm using to write this - scroll bars. It's mostly done, but what does this say about software re-use? qt/c++/html5-capture -------------------- This is a QT program that by default opens the local html5/sudoku web page. It synthesizes timer events and captures the web page as a QImage. It then renders this image into an ffmpeg buffer. It does this as fast as it can to "render" the web page animation into a video file. You will need a recent ffpmeg GIT snapshot (0.7.1 or later) installed for this to work. sudoku ------ This contains sudoku-solver.cpp, the source for a command-line program that uses SpiderMonkey, Mozillas JavaScript engine. This program uses SpiderMonkey to traverse the puzzle specifications looking for "board" declarations. It uses these as input to its solver algorithm to solve the puzzles. On my system (Intel dual core 1.867MHz) it takes about 0.15 seconds to solve all the puzzles - except the empty one, that is. This is to demonstrate just how much slower JavaScript is to C/C++. JavaScript takes a few minutes to find all 1 solutions to just one puzzle. JavaScript is still sweeter for rapid prototyping, though ;) Feedback ======== All feedback should be through this projects support web page http://sourceforge.net/projects/v3c-storyboard/support . I've added a help, open discussion and a mantis bug tracker there. Finally, do send me an email to let me know what your thoughts are on v3c-storyboard!