More selected projects

The Poker World

The Poker World is a playable installation based on Xbox Kinect v1 inspired by the Red Queen effect from the book "through the looking glass" by Lewis Carroll.

produced by: Ning Sun


This is a Kinect-based game running in the Openframeworks. The player data is get by Kinect and processed in the Openframework with the OpenCV addons. Players are supposed to get more poker cards to make sure their shape would not be too small so that eliminated by the game.


  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
Concept and background research

"Now! Now!" cried the Queen. "Faster! Faster!" And they went so fast that at last, they seemed to skim through the air, hardly touching the ground with their feet till, suddenly, just as Alice was getting quite exhausted, they stopped, and she found herself sitting on the ground, breathless and giddy.

The Queen propped her up against a tree, and said kindly, "you may rest a little now." Alice looked round her in great surprise."Why I do believe we've been under this tree the whole time! Everything's just it was!"

"Of course it is," said the Queen." what would you have it?"

"well, in our country," said Alice, still panting a little, "you'd generally get to somewhere else if you ran very fast for a long time, as we've been doing."

"a slow sort of country!" said the Queen. Now, here you see, it takes all the running you can do to keep in the same place. If you want to get somewhere else, you must run at least twice as fast as that!"

(Lewis Carroll, Through the Looking Glass, 1946)

The concept that people have to keep going running so that they could keep still is quoted as a hypothesis in evolutionary biology by Leigh Van Valen which proposed that species must constantly adapt, evolve, and proliferate in order to survive while pitted against ever-evolving opposing species. This hypothesis against Charles Darwin's natural selection hypothesis. The former one proposes that one species could survive only if it has a faster-evolving process than other opposing species.

I referred to this concept in my experience design, the experiencer has to move their body to keep going collecting the poker cards so that they could survive in this game, otherwise, their shape would decreasing with the time elapsing.



The basic game mechanism is that the size of the player avatar would increase when it eats porker card while it decreases if don't with the time elapsing. Players are supposed to move their body and collide with as many cards as they can. If the size is smaller than a constant size it would disappear and if it is large enough it would collide the cards automatically and the player does not even need to move anymore. it metaphors the biology world if the species do not evolve fast than other competitors they would die out and also our human society that if you do not move faster than your opponent you will be eliminated

The scenes are designed to change when player get the porker and also moving their body which is mapping to the evolutionary biology world when one species evolves would rebuild the environment for their natural predators and prey or their competitors.

Some elements like ticktock are designed to create a tense atmosphere.



The xbox Kinect v1 is applied to get the data of the position and contour of the player. The contour data is well collected by setting a suitable threshold in Kinect which should be reset with the environment situation such as the range of space and the distance between the player and the Kinect equipment.

The contour data is processed in openframeworks with OpenCV addon. To keep the consistency of the design, some art effect is added in ofxCvContourFinder to achieved the art direction.  The position of player data is collected by Kinect and processed in openframeworks which is mapping from 2d to 3d space. It is really complexed at the beginning because the coordination of 2d and 3d space is quite different and the y-axis is the opposite.

There were unforeseen circumstances that happened when I was going to take a video. The live people shape is flipped. It almost burns me out when I taking video because there is no difference from what I did when testing. It takes me a long time to figure out the reason. The graphic of contour I get when plugins the Kinect device on the right side of the mac port is in a reversal of when I plugging it in the left side.

Future development

There are still several issues I am not satisfied with:

1. the collider detection rule is not clear enough for the player, it is hard to know how far the avatar shapes away from the flying poker cards. it may because the coordinate in the 3d world is not mapping to the real world. so in the next step, the coordinate set in the scene would be improved. The movement of the poker card could be tracked by adding some tracking line.

2. the way I detect if people collide with the card is to measure if the midpoint of the card is in the range of a people-sized rectangle. The best way is to measure if the midpoint is inside the contour.

Further idea exploration:

1. More player could be involved in the game in further development. They are going to hold each other up or mutual promotion.

2. The scenes could generate more elements such as the rabbit in the Alice story which has one in my scene but I did not finish it.

Self evaluation

Overall, the outcome is satisfied my expectation and am really happy with that. The whole process is really tough because of too many technical problems to achieve the concept but I enjoy the moment when I overcome them.

In the beginning, I come up with plenty of ideas which is more interesting than this one, I am too ambitious to add everything to my project, I imagine the different way people could interact in the virtual world. However, it would be complex for players to get to know how to play which may wear their patient. So I decided to simplify the interaction and make it very clear to play. The player would learn how to play when they start the game.




ofxAssimpModelLoader by Jeremyabe

Workshops In Creative Coding 2_week 18_ "Goodbye Stephen Hawking!"


Special thanks to Max Jala for giving me a guide to the Kinect and Cheng Yang for taking part in the video documentation.