Friday, September 28, 2012

Digital Illustration Workflow

Even well-painted digital artwork can tend toward a certain 'slick' or affected look. Rigidity can set in when programmatic shading tools are used or when the software tries to mimic the natural interactions of a physical, painted medium. If however the program takes no steps toward blending painted strokes together, a greasy look can result. Because unmodified digital inputs can be ugly under scrutiny, artists use special methods or make custom brushes to cut back on that harshness. Traditional paints and washes on the other hand have a natural complexity that makes them interesting to look at and which lends a feeling of substance to a piece; but they are especially unforgiving and time consuming to employ.

In the image below we see the extremes: the one on the right is easy to create digitally but nearly impossible using brush and ink, the one on the left is made quickly with a physical brush but would not really be achievable digitally. Both effects are desirable in different situations. 
Left: Ink and Paper  Right: Photoshop Gradient Tool
If you set out to work alla prima you will probably create something that betrays the medium you use, but if you work carefully you can get traditional methods and digital methods to strengthen one another, creating something that exists more 'in a style' rather than 'in a medium'.   

Professor Cramwell's History called for a few environment illustrations. When making these backgrounds I tried to combine the strengths of a traditional method with digital processes. The character of the illustration is in the brushwork, but the colors can be dealt with more precisely on the computer, perfect edges and gradients can be made in-software, and the whole thing can be tightened up with software as well. The below image was used for the 'Modern Culture' topic as a background and to create it I digitally colorized an ink and acrylic underpainting before continuing with Photoshop brushes. I was able to bring the whole thing together fairly quickly and I felt it struck just the right balance between realism and illustration.
  

--Andrej

Wednesday, September 26, 2012

Music History

Just as a quick aside, before the blog becomes completely technical, I want to point out some elegies from the 15th and 16th Centuries. When these great musicians' masters died they were really able to put together incredible pieces in honor of their teachers:

Ockeghem's death and Josquin's response.

Tallis's death and Byrd's response.  

--Andrej

Recent Update: Speed Fixes

Android Programming War Story -- Professor Cramwell's History Upgrade 1

After we began testing Professor Cramwell's History on a number of devices we noticed that there were performance problems on low-end, single core smartphones such as the LG Optimus 1 (a 2-year old phone, but one we still wanted to support). On this particular phone the time between one question being answered and the next to fully appear was around 13 seconds, totally unacceptable.

After analyzing the data it became obvious that the problem was long running operations on our Sqlite database.

I realized that I had mistakenly left one of the database update operations on the OpenGL Graphics thread. Shunting that operation to the background thread cut the wait time in half, but that still wasn't enough.

Part of the problem may have been that the thread was relatively low priority, but that thread has to be low priority to keep the Open GL Thread running at full speed so the graphics stay as smooth as possible. So changing the thread priority was not an option.

Finer grained analysis of the database operations led to the isolation of the problem to a key query that set up stats and another query that selects questions based on the user stats. I disabled these two queries for single core phones, putting in substitutes that rely on randomness instead. While not ideal, speed was more important in this case. This optimization is only active for single-core phones.

Final Time: 2 seconds between questions on a 2-year-old,single-core smartphone running around 600mhz.

int AvailableProcessors=Runtime.getRuntime().availableProcessors();
--Tomaz

KIIBO LAUNCHES PROFESSOR CRAMWELL'S HISTORY SEPTEMBER 2012

Here's the press release for our publicized launch

September 26th, 2012- Kiibo has launched the android app Professor Cramwell's History on the Google Play store. Running on versions of Android 2.2 and above, the game is designed to take the player on a mind-bending journey through time, intelligently guiding them through major topics of World History.

Players match wits with Professor Cramwell across thousands of questions and 46 challenge topics, all illustrated and animated with hand-drawn graphics. Users fill in nodes on their historical chart to keep track of their progress. Intuitive gameplay coupled with the portability of Android offers users a unique play experience on one of the world's most popular platforms. The app also interfaces with Amazon to provide the player with quick suggestions for further reading on any given topic.

The game is intended for all ages, for beginners as well as history buffs, and was released at 2.99 USD. A free demo is also available.



 


For further information, inquiries can be directed toward info@kiibo.org





Saturday, September 22, 2012

Java and Understanding Programming for a Non-programmer

Professor Cramwell’s History is currently only available on Android, that means that its written in Java. Java is a workhorse language: used, loved, and loathed by programmers the world over. If you have never programmed before you may be under the impression that all programming is basically the same thing; that writing a program to run an industrial machine, a pacemaker, or something on the internet is basically the same. If so, you are correct, but in a way that is entirely misleading.

There is a mathematical proof  (which I don’t  really understand) which has the consequence that every type of computation which can be written in one logical language can be written in another.  A famous thought experiment in the field deals with a robot that moves up and down an infinitely long track and in doing so produces many diverse  and wonderful effects.

This thought experiment can be used to prove that all languages are the same from a formal standpoint. While theoretically correct, it is practically misleading.

Practically, languages are less like like infinitely long tracks, and more like airplane cockpits. A thousand different tiny controls, many of which, if set improperly will cause a difficult to diagnose crash. But they aren’t really standardized to any great extent , though they have many common elements; each language is its own standard. And they evolve and change, and have the equivalent of vestigial organs (switches that should never be touched).

All common computer languages are completely precise. Expressing anything in any of them takes a lot of time and effort. A simple statement in english--get the letter, search the letter for the word Dr. Smith, replace it with Dr. Smithy, and send it to Dr. Smithy’s secretary--can take many millions of instructions to a machine. But it doesn’t take millions of lines of human generated code.

Describing these instructions directly to a machine is too hard. Programming was done that way in the early days; and this type of machine instructional description is the end result of every computer program. But it is not written by people anymore.

Consider a small child who repeats “wa-wa” over and over again; his mother understands that he wants water, she asks her husband to go to the drink-stand; he goes and selects a bottle of water, requests it from the cashier, pays the cashier, delivers the water to the child. The water had previously been bottled and ordered by the manager of the store. And had at one point been filled into the bottle.

This is also how computer programs attempt to work. The programmer writes something simple (she is the child), the simple statement is transformed by other programs into more and more complex and specific statements (which are physically represented in the machine by electrical changes), and eventually an effect is produced for the programmer.

No program or system of programs has been built yet which can come close to robustness, fault tolerance and flexibility of the family in search of water for their child. But within very constricted domains, such as search, we see this type of flexibility becoming a reality.

All computer language designers unconsciously struggle to capture the expressive power of natural language given the constraints of machines. Most programs are attempts to codify simple concepts.

So what does Java bring to the pool of programming languages? The big idea behind java is that it is easier to reason about things if they can be put into a logical hierarchy. So the structure of Java encourages the programmer to deal with hierarchies to solve problems. So if you were writing a program for people and you wanted to write part of it especially for people in Botswana:
1.) you would write the portion that applies to all people
2.) you would write the portion that applies to all people in Africa and including the portion that applies to all people.
3.) you would write the portion that applies to all people in Botswana including the portion which applies to Botswana

Therefore a person from Botswana in your java program would have all the characteristics of a person from Africa and any person in the world.

This type of an approach works ok, but in reality its very hard to design a hierarchy and to decide which aspects should be reflected in which portion. Most programmers work by iterating toward a solution, meaning that hierarchies grow in a process which resembles the natural growth of a bush. This makes hierarchies less likely to reflect original logical assumptions and more likely to reflect the problem space; which in turn seriously compromises their ability to aid in understanding.

So, if thats the case it makes more sense to use flatter hierarchies, or even to dispense with hierarchies and to have different independent portions of the program interact with one another, in the style of the family above.

-Tomaz

Tuesday, September 18, 2012

Making Education Asynchronous

Some parts of life are highly asynchronous. You send an email, you go do something else; the person on the other end replies whenever she wants etc. You take your car to the mechanic, leave it there, later in the day he fixes it. After he finishes he calls you, and you come and pick it up when its convenient for you.
There is a decoupling between events that makes it possible for two independent actors to organize themselves according to their own priorities. They only need send messages back and forth to plan exchanges.

But other things are synchronous: a conversation, a meeting, a phone call. Even for two people to meet sometimes requires difficult scheduling. Increase the number to more than 7 and scheduling becomes exponentially difficult.

So to deal with this exponential difficulty you drop people. The Baltimore Orioles do not phone all of their fans to schedule a baseball game at a convenient time for everyone. Whoever can come, comes. Whoever can make it, makes it. Whoever can’t, too bad. It works well for a baseball game. 

Lets imagine the situation in a typical college semester. Classes are scheduled like baseball games. Testing is done similarly. If something else comes up during the semester--sickness, death of a loved one, lack of money--too bad. Its up to you to negotiate to save the work you’ve put in.

We accept this system because it is proven. But imagine the advantages of an asynchronous system. Pick up and leave off wherever you want. Take a break in the middle of the semester to work at an interesting temporary job. Stop studying a topic to dive into more interesting topics coming back to the original topic with more knowledge and learning it well instead of poorly. It sounds like a nice daydream.

Its not. Its possible within the boundaries of technology today. Its possible within the education systems we have to day. It would be possible to design and gradually transition to such a system today.


The most convenient parts of life are highly asynchronous. Education should be too.

-Tomaz

Monday, September 17, 2012

The Neglected Importance of Ordering


I knew very few historical dates before I started developing Cramwell’s History, even now as I play it the date questions are hardest for me (as I think they are for almost everyone). This may be, at least in part, because in our history classes in high school (as I think happens in many American high schools) rote memorization took a backseat to a qualitative understanding of certain parts of history. This was better than the alleged, ye olde way of schooling in which a stern headmistress (or, even worse, severe nun) would pound fact after fact into the malleable but ever too loose minds of uninterested pupils, for what purpose she knew not. And then drill them, forcing the intellect into the role of relational database in which the primary motivation for memorization was... …fear. This may be hyperbole. I have no idea if this ever actually happened anywhere, but faint hints of it echo through the halls of education as an implicit justification for datum-frei history.

The problem is you do lose something of an understanding of time when you don’t know the dates of things, and you lose all of an ability to reason logically about the consequences of societal actions if you don’t know the ordering of events. Dates are important. Ordering is important. Professor Cramwell’s History is a good way to learn them both along with the qualitative and event-oriented aspects of history which in the last analysis are always found to be prime. 

-Tomaz

Educational Philosophy Underlying Professor Cramwell's History


Professor Cramwell’s History intends to do 2 things:
 A) Be fun and interesting to play
 B) Impart the player with a skeletal but comprehensive understanding of history

After playing this game you should be able to order many major events in history both absolutely and with respect to each other. Gaining this knowledge will then further allow you to place all subsequent reading you do within a mental framework and should reinforce whatever new knowledge you learn and whatever old knowledge you already have; nothing will stand alone.

The questions are written to give both an absolute knowledge of history (i.e. dates, ordering) and a qualitative understanding, with facts reflecting the zeitgeist of an era.

The way the first type of question operates is obvious. But perhaps the second type of question is even more important because this type of question contains seeds of vast knowledge within its very statement. For example, take a very trivial question like this one:

How many animals were sacrificed when Caesar became Emperor?

Think about what knowledge is linked to this trivial question for someone who doesn’t know anything about history:
1) There was someone named Caesar
2) He became an Emperor of something
3) In that empire they sacrificed a lot of animals

By just reading the question you get a lot of information. This is the point of many of the questions; to impart knowledge this way. When you get a further question that explains that Caesar was emperor of Rome you already have an idea of what Rome was, at least in part: you know it was an empire at some point, you suspect it was brutal.

Thus someone with no knowledge of history can learn history simply by playing a game.

The great advantage of a game with properly written questions over a book (at least for initial learning of simple facts) is that knowledge validation and knowledge transmission are performed simultaneously and that feedback is instant. Of course this only works up to a point, eventually you have to move beyond knowledge that can be game-ified if you want to truly master a subject.

So, if I was playing the game for the first time, I wouldn’t try to just finish all the challenges immediately, I would just meander through history in my few spare moments and soak up information slowly and widely. Enjoying the experience of learning, because (at least I think) learning is fun, facts are fun, because reality is just very interesting.

-Tomaz