Archive for programing

13 Sep 2011

Playing with “Game Feel”

No Comments Examples, Games, Research, Unity3d

I am currently taking on the dual task of researching “game feel” for a Game Modding class at NYU’s Game Center, and teaching myself Unity3d. As part of my course work, we have been asked to read “Game Feel: A Game Designer’s Guide to Virtual Sensation”.

In this book, the author talks about 3 specific areas that effect the “feel” of a game. He describes feel as being, “Real-time control of virtual objects in a simulated space, with interactions emphasized by polish”.

Real-Time Control
This is comprised of a interactivity between at least tow participants. Each participant actively communicates with each other though a combination of input and output feedback. Bellow, Swink describes this process as it pertains to computer games and their participants.

The user has some intent, which is expressed to the computer in the form of the user’s input. The computer reconciles this input with its own internal model and outputs the results. The user then perceives the changes, thinks about how they compare to the original intent, and formulates a new action, which is expressed to the computer through another input.

Simulated Spaces
These are are comprised of physical interaction that take place in a virtual space. Through the use of level design, collision detection, and physics, the game designer is able to give meaning to the games movement. The surrounding visuals offer a frame of reference for the player to get the impression of speed. “Using the avatar as a channel for expression and perception, we experience game worlds at the tactile, physical level of the world around us.”

Polish
Polish is comprised of all this tiny details that “artificially enhance” a players interaction without changing any of the games core functionality. Examples of these could be dust particles on ground, sound effects, camera shakes. These effects, add the games overall appeal and allow for the game to seem more “real”.
Read more

Popularity: 2% [?]

27 Sep 2010

Prototyping a Networked Family

4 Comments Design, Education, Examples, Physical Computing, project, Social Media, Technology

Being a first time dad has been the most amazing experience of my life. Watching my daughter grow, and witnessing her constant exploration of the world around her has been extraordinary. Unfortunately when Mondays roll around, it is time for me and many other parents to drop off our kids at the babysitter.  The amount of time we get to interact with each other is very minimal, and pretty sad.

In a world where we all feel so “connected”, the people that matter most have no method of remotely interacting with us.  My 1 1/2 year has no twitter, or Facebook account to update.  She doesn’t check into fourSquare every time we go to grandma’s house. Even with mobile phones and Skype video conferencing, there is no direct method of me interacting with her without the assistance and supervision of an adult. So basically, we could only interact with each other when another adult has both the time and is willing to put in the effort to set up an environment for us to communicate.

This got me thinking “how can my daughter and I interact during my work hours?”  The first thing I did was identify the main characteristics of my daughter, back when I first started working on this project:

  • My daughter was one year old.
  • Her vocal communication ability was in the preliminary stages of development
  • Her motor skills where still not fully developed, so complex tasks like using a keyboard or mouse where not possible.
  • She needs adult assistance to use our everyday communication tools that available to us (moble and land-line phones, computers, etc).

At this young age, children are extremely dependent on their parents and other adults for just about everything.  However, there are also several activities that come as naturally as breathing and eating to a child. Two of those activities that i observed where exploration and play, many times triggered by a common catalyst of curiosity.

Children gradually explore their environment and toys and interacted with them, mastering the new skills that they learn along the way. Quickly they are able to identify all sorts of toy input locations which triggered various types of output, such as audio and visual feedback.
Read more

Popularity: 6% [?]

01 Sep 2010

Using getDefinitionByName() with External Library SWCs

2 Comments Flex/Flash, programing

In a recent project I was forced to dynamically generating UI Elements in flex from Strings. This is typically done using getDefinitionByName() as shown bellow. Although this works, in my app I never really know what the string is, nor do I know what the Class is named or where it is located. This becomes an issue since you must make reference to the Class somewhere in your code before it is available to the Flex framework.

This example shows the typical use of getDefinitionByName() with out any external SWC. Notice the imports and class references on the top of the Script block.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
< ?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:controls="com.controls.*">
 
	<mx:script>
		< ![CDATA[
			import flash.utils.getDefinitionByName;
 
                       //You must import the classes and instantiate them
			import com.controls.TestControlA;TestControlA;
			import com.controls.TestControlB;TestControlB;
 
			private function loadTestClass(name:String):void
			{
			var ClassReference:Class = getDefinitionByName(name) as Class;
           		var s:DisplayObject = (new ClassReference() as DisplayObject)
           		testContainer.addChild(s);
			}
		]]>
	</mx:script>
 
	<mx:vbox id="testContainer" />
 
	<mx:hbox id="buttonBar">
<!--You have to place the entire package location in the string-->
		<mx:button label="Test A" click="loadTestClass('com.controls.TestControlA')" />
		<mx:button label="Test B" click="loadTestClass('com.controls.TestControlB')" />
	</mx:hbox>
</mx:application>

This won’t work since I need to make a reference to Classes that I won’t know the names of till run-time. My first step was to move a control into an external SWC, however I still am forced to make reference to the class so it becomes available, or I will get an error. This is a no go.

Read more

Popularity: 7% [?]

18 Aug 2010

Handling External SWF Events in Flex using SWFLoader

6 Comments Examples, Flex/Flash, programing, Uncategorized

It has been a while since i’ve written about Flex development so I figured i would post up some useful code for anyone interested. Recently I have been dealing with a lot of 3rd party code which relies on a huge amount of external SWF assets which load into Flex using SWFLoader. The issue i ran into is that the developer getting access to <mx:Application /> from external SWF using the MovieClip(root) approach. This approach is a slight change to the old _root of the gloomy AS2 days. This created an extremely tightly coupled app, with mysterious methods scattered around the Flex project. There was no way of knowing who was calling these methods, if they where deprecated, or if it was actually being used by some external SWF. Did I mention that there are 60 SWFs all with code in the timeline. It is like finding a needle in a haystack. Unfortunately for me, I wasn’t aware how tightly coupled these external swfs where and quickly proceeded to break the application whenever I attempted to refactor any code.

Obviously, calling <mx:Application /> to fake the old _root method of communicating with nested SWFs is not exactly the best way to go about this. Instead I favor using and Event driven approach.

This the code to create a simple external SWF with 5 textfields. Each textfield is clickable and will dispatch a custom event which broadcast the value of the textfield.
Read more

Popularity: 17% [?]

05 Jun 2010

Lessons Learned: Designing Toys for Children 7months-2yrs

1 Comment Design, Education, Physical Computing

I have spent the past few month deconstructing the cognitive, emotional and social attributes of children under the age of two. I have been particularly interested in understanding why children are more responsive to some toys, then they are for others. What makes a successful toy, and why? What strategies could be used in the development of a toy to foster learning opportunities, along with several other question regarding this ripe age and this medium.

This age is quite interesting since you are not only designing for the child, but also for the parent, who acts as the gatekeeper. This adds an additional level of complexity, and understanding that needs to be understood. So the first question I asked myself was, “What does a parent look for in a toy?”

According to the book, “The Blockbuster Toys”, parents look for toys that;

  • Child’s Safety
  • Child’s Continued Enjoyment (play value)
  • Child’s Creativity
  • Child’s Mental & Physical Development
  • Child’s Success
  • Child’s Health
  • Child’s Love

I added some additional bullets that I’ve noticed parents, including myself look into when purchasing a toy: Read more

Popularity: 4% [?]

05 May 2010

Multi-Master Arduino Setup using i2c

1 Comment Examples, Physical Computing, programing

I working on a project, I was faced with a challenge of creating a serial bus via multiple Arduino which could communicate with each other. My first intuition, after a little push in the right direction by Tom Igoe, was to create a Master/Slave setup where a Master micro-controller polls all the slave micro-controllers, and dispatches an action. Although this answered one of my question, polling didn’t allow for complete 2-way communication. It tuned out that the answer was mainly an oversight of my interpretation of the Wire documentation.

From Arduino Site:

Wire.begin()
Wire.begin(address)
====
Description
Initiate the Wire library and join the I2C bus as a master or slave.
====
Parameters
address: the 7-bit slave address (optional); if not specified, join the bus as a master.
====
Returns
none

I interpreted this explanation as Wire.begin(SomeAddress) would default as a slave, and not be allowed to be a Master. Being as curious, and stubborn as I typically am, i decided to forget what I thought I was being told, and instead try to break the library, so I could then see where it broke, and attempt to adjust it in a way that better suited my need. Surprise, surprise, it worked, and not need to change anything at all! The address parameter is optional and defaults as a master role if no address is set. However if you do plan on sending messages to the master, you could switch speaker and listener roles via a slaves Wire.onReceive(handler) rather then polling using onRequest(handler). Read more

Popularity: 8% [?]

12 Apr 2010

Why I make “Native Mobile Apps” not “Native iPhone Apps”

2 Comments Mobile, Technology

A little over a year ago, I was drawn to this marvelous device, named the iPhone. All the possibilities that it could bring opening up another outlet for me to develop applications for. Seeing the possibilities, like many developers, I ran out to the nearest Barnes & Noble and bought an “Introduction to iPhone Development” book. I diligently went though each and every chapter, getting acquainted to Objective-C and the iPhone development environment. Then it hit me! Do I want to be an iPhone Developer or a Mobile Developer? What happens when Android gains market share? What about Windows and BlackBerry? iPhone’s reign could only last for so long, and the pack is slowly creeping up.

The iPhone revolution placed blinders on us all, and many of us forgot the obvious. Remember years ago, when you would go to a site only to be greeted with a “Sorry we do not support your current browser, this site is optimized for IE 6″, you would be forced to close you current session on the non-IE browser and open up IE to view the site. What a pain! Eventually, javascript libraries like JQuery, and the adoption of CSS standards have made that less of an issue, although you still see this once in a while. The main difference however between the browser wars, and mobile wars is that browser all interpreted HTML and CSS, with only slight differences. Mobile phone native coding language on the other hand are extremely different. iPhone coding looks very different then Android, which look different the Windows Mobile. That means more resources need to be allocate on a project, costing the perspective client more money. Not exactly a smart investment, and unfortunately there is no “Export to Android” option in Apple’s XCode software.
Read more

Popularity: 4% [?]

27 Mar 2010

Sensing Child’s Play: Examining 7 toys from the toybox

No Comments Design, Education, Physical Computing, Technology

I have always had a fascination with trying to understand how the things around me work. It just so happens that after having a child, most of the thing around me are toys. Large toys, small toy, blinking lights, sounds, singing, haptics, interactivity, it is all pretty darn amazing when you sit back and really look at how much technology my little one year old daughter navigates and interacts with during play. Many time when we think of children and technology we automatically think of desktop computers and video game consoles. Although all of these are examples of technology the only interaction my daughter has with them is me telling her, “don’t touch”, and handing her a toy to distract her attention.

I decided to take a trip to my daughter’s toy collection to examine some of the sensing capabilities that her electronic toys offer. I will specifically focus on the toys input capabilities:

(At the end of the post there is a video of me trying to figure out how the LeapFrog Tag Jr works. Let me know your thoughts.)

Fisher-Price Elmo Live Encore

This is by far one my daughters favorite toys. The toy is modeled after Elmo, a Sesame Street character, which most children a quickly drawn to by his bright red color, large eyes, and youthfully fun voice.

Inputs

  • Push Buttons: Typically buttons on toys are visually obvious, however Fisher Price decided to create an exploratory interaction by spreading out four button throughout the plush doll. Three of the buttons are hidden under the fabric, on the toe, chest, and back, and the final button switch is closed by squeezing his nose.
  • Tilt Sensor: One of the nice additions that the creators added to the toy was integration of a Tilt Sensor. When Elmo falls on his side, he politely ask for help to stand backup, which is sometime accompanied with a joke.



Read more

Popularity: 3% [?]

20 Mar 2010

Initial Test of my Expandable/Interchangeable Circuit

1 Comment Examples, Physical Computing, programing

So what do i mean by expandable? Basically the idea is that I would like the cheapest possible way to be able to create a circuit that I could chain sub circuits too (those are the 2 sub circuits in the video). After lots of trial and error, I was able to put on my crafty hat to make these darn electrons work the way I wanted them too.

In the accompanying video, I give a quick run through of how the circuit works. Essentially, the main goal that I was able to achieve was that I would be able to clone one the inner circuits and add it right in the middle. All I would need to do is connect them to the 2 digital pins, 2 analog pins, one ground, and one 5V series, and it should work without any additional rewiring (although the idea is to make the sub circuits slightly different in their interaction, yet the same in their communication), asides from programing the EEPROM (I used the 24LC256 from SparkFun for $1.95) to contain a unique identifier. The secret to success…diodes..lots of them.

I based my code on a great snippet of code to help me get the I2C communication working on my EEPROMs. I also checked out a helpful tutorial which also helped me out substantially.

One quick tip: Keep in mind that Arduino has an EEPROM mounted on the chip. I intially made the silly mistake of using the EEPROM code that is found on the Arduino tutorial page. This code was reading and writing data on my Arduino’s board mounted EEPROM, which i quickly realized once I realized that the unique data I was writing on each external EEPROM chip did not seem to be working properly.

So why go through all this extra effort? Read more

Popularity: 3% [?]

26 Feb 2010

Update Twitter Status w/ Arduino & Processing

8 Comments Examples, Physical Computing, programing

The next phase of my project was to send the serial communication from my Arduino, over to Processing, which then would formulate a status update based on the button you pressed and send it over to Twitter. I’ve worked with several Twitter API’s in the past, so I decided to go with Twitter4J, the “J” in this case stands for Java, which works perfectly with Processing.

Bellow is an updated version of my previous Arduino coding. I plan on switching the status updating to the Processing side, instead of the Arduino side. If this where to be a real product, it would be easier to download a software update, then to have to reprogram the toy itself. I will add that to my todo list, once i get all the major Read more

Popularity: 12% [?]

Get Adobe Flash playerPlugin by wpburn.com wordpress themes