Several parameters for projecting a 3D object onto a 2D view

FOV (Field of view)Manipulating the FOV property value can make 3D display objects appear larger up close and smaller at a distance. The FOV property represents an angle, between 0 and 180 degrees,...

Flash

Game Design and the Six Human Needs

I’ve spent a great deal of time thinking about video games — far more than just from concept to completion. Whether making them, playing them, or taking part in community discussions, I’ve realized there are some things I want to share. Game design is both organic and emotional, and structural and rational. The more I’ve dealt with the process and the results, the more I’ve realized that there are hidden core values in game design, values tightly bound to the six human needs. The more a game aligns with these values/needs, the better a game it is, subjectively speaking. Level 1: Needle in a HaystackAs you probably know, an enormous number of video games ship across many platforms, and the number grows every day — and every day it gets harder to find a game you’ll love. On Steam, for example, games are sorted by “Featured”, “Popular”, “New Releases” and “Recently Updated”. Dig deeper into the search options and you’ll find genres, user tags, ratings, user ratings, and unique features and categories. That’s all well and good, but it’s absolutely not as good as just telling me which game I’ll love. At best, it’s a careful guess.

Flash

Using terrain in the Tiled map editor

Starting with Tiled 0.9.0, a new tool was added that makes it easier to edit terrain transitions in tile maps. There are many ways to handle terrain transitions between tiles in a tile map, but Tiled’s terrain tool supports transitions between tile graphics whose corners are all well-defined, which is also the most common approach. Now let’s demonstrate how to use this tool and the steps for setting up terrain information, by working through the desert.tmx that ships in the example directory of the Tiled installation package. Creating a new tile map and tileset Create a new map with a tile size of 32x32:

App Development

First impressions of OS X 10.9 Mavericks

This afternoon I upgraded to OS X 10.9. After spending just a short while with it, I’m disappointed. I complained a lot to Baozi. When Finder is in column view, sliding the Magic Mouse left and right produces this ghosting issue. That first impression did serious damage to my feelings for 10.9.

Entertainment

Started tinkering with Raspberry Pi, PD7 is out, Leap isn't any good.

I’ve started digging into the Raspberry Pi these past few days. I bought a book on Amazon and found it way too basic, but it works well as a table of contents. That’s good enough for me. There are ...

Entertainment

From AS to cocos2d-Action

I used to be an ActionScript developer. Last year I started working with Objective-C, and this year I got into cocos2d. I’ve had some insights during the learning process, so I’m looking back and sharing them, as a report and reference for more fellow developers who want to move from Flash development to cocos2d. Learning cocos2d has been a pleasant process, because switching from Starling feels incredibly convenient—like back when I moved from PureMVC to Robotlegs, that feeling of meeting too late. This article records a short summary of what I learned about Action in cocos2d. Actions in cocos2d are similar to motion tweens in Flash, but they’re more powerful. In Flash, everything you can do with motion tweens, including position, rotation, scale, color, and opacity, can also be done with Actions in Cocos2D. But in Flash development, relying only on changes in position, rotation, scale, color, and opacity isn’t enough to make an interesting game—these are just animations. More comprehensive actions are what make various values change, and they come in two types: instantaneous changes and changes over time. In Flash, I generally use GTween to control changes to various values. Here’s an example: say you’re making the resource amount display text in StarCraft. When you spend or gather some resources, the resource amount text doesn’t change directly; it ticks over time. So I usually create a custom TextField, implement a pair of getter and setter, and use GTween to change their values, adding easing. Many effects can be achieved this way. You can even ease through texture swaps according to certain rules.

App Development

Minecraft's Summer Blockbuster Movie and Game Trailer Supercut

Now that’s real talent and creativity!

Entertainment

Food Match-3 Launched

A single-player iPad game I developed in my spare time. My wife loves match-3 games, so I started with a match-3, and since food is adorable, I went with a food theme. Development plus assembling ...

App Development / Works

To Old Bai's New Owner

I’m Laobai’s older brother. Laobai treats me like his own brother, so I’m begging you — please take good care of him. We even took a family photo together, and I once vowed to look after him into ...

Personal

Apple's new ad – Our Signature

The day after WWDC MMXIII wrapped up, I was watching the official Podcast on iTunes, and the ad at the end hit me right in the feels — I was deeply moved. It reminded me of the line from the iPad ad “If you asked,” released before Steve Jobs passed away: “If you asked us, we’d say: ‘This is only the beginning.’”

Entertainment

ANE for opening the native Maps app and navigating on iOS 6

cn.flashj.ane.ios.OpenMap is a native extension for iOS that does one very simple thing: jump to the system’s built-in Maps app and navigate to a place. It provides 2 methods: openMap.routeFromSourceToDest(source, dest); navigates from source to dest. openMap.routeToDest(dest); navigates from the current location to dest. The source and dest parameters are both cn.flashj.ane.ios.MapItemVO, a class with three fields: latitude, longitude, and place name. Example usage:

App Development / Flash

Error when packaging Adobe AIR with an ANE from an external SDK

Symptoms: Our project needed the ANE QR code scanning feature. After writing it in XCode with ZBarSDK and publishing it as an ANE, packing it into an IPA with adt threw this error: Packaging failed! Packaging error message: Compilation failed while executing : ld64 Packaging output: ld: warning: ignoring file /var/folders/l5/kql7svqx5j93vwg65tj3pt_c0000gn/T/8e0d5504-ffea-41da-a45b-22cfe260a197/libcn.flashj.ane.ios.QRScan.a, file was built for archive which is not the architecture being linked (armv7): /var/folders/l5/kql7svqx5j93vwg65tj3pt_c0000gn/T/8e0d5504-ffea-41da-a45b-22cfe260a197/libcn.flashj.ane.ios.QRScan.a Undefined symbols for architecture armv7: “_QRScanExtInitializer”, referenced from: _g_com_adobe_air_fre_fmap in extensionglue.o (maybe you meant: _QRScanExtInitializer_name) “_QRScanExtFinalizer”, referenced from: _g_com_adobe_air_fre_fmap in extensionglue.o (maybe you meant: _QRScanExtFinalizer_name) ld: symbol(s) not found for architecture armv7

App Development / Flash

Inspire people, don't judge or give advice

I remember someone once told me: when you keep a cat, you have to remember to discipline it. Don’t let it develop bad habits—if it does something bad, you have to hit it. Spoiling it and pampering ...

Life Insights

Beat StarCraft II: Heart of the Swarm

I finished Heart of the Swarm. The Zerg always struck me as filthy, cruel, bloodthirsty, and heartless. This expansion, on top of showing their take on life — constant evolution — also lets a hint...

Video Games

The first instant of thought ≠ the first idea

Last night after finishing a phone call with my mom, combined with some of the wisdom Lukia had shared with me before, I had some insights. I wrote them down during the night and organized them this morning. The master says: Whether you’re chanting Buddha’s name or handling affairs, always use the first thought, not the second thought. The true first thought is not the first idea that pops into your head — that first idea is just the consciousness of human nature’s curiosity. Like how many children’s first thought upon seeing ice cream is “I want to eat it,” but eating it might give them a stomachache. The consequences aren’t necessarily something they can afford. The master explains: “More often than not, it’s greed, it’s delusion. Don’t get it wrong. The so-called first thought is seeing your original nature, it’s the outflow of your true mind, your original face. Thoughts of craving food, craving comfort all belong to the deluded mind, the greedy mind — not the true mind.” There is a big house. In the basement of the house lives a giant dragon. It is the owner of the house, but it has been sleeping all along. The house has many servants and stewards. Under the head steward’s leadership, everyone keeps repairing and expanding the house, living their lives in perfect order. The owner has been asleep the whole time — all matters big and small are handled by the steward. As time passes, the steward mistakes himself for the owner and forgets that the true owner is sleeping. The steward is like our consciousness; the dragon is the original face (or you could say, the soul). Many people practice spiritually precisely to awaken the dragon, to recover true insight — only then can the first thought emerge.

Life Insights
1…56789…28