SQUARISM addicted to pixels

iPhoneDevCampDC 2009

Posted on August 11, 2009

iphonedevdc
Went to the first annual iPhone Dev Camp here in DC. It was a barcamp style event over two days. It was very enjoyable although there were quite a few heavy hitters there (I wasn't one of them). There were a few different types of people there and I was one of the ones who doesn't have anything on the app store and isn't making any money off iPhone dev. A few people there had apps I knew from the press as well as an author (Dave Mark -- who was great) that I've read quite a bit from.

What follows is some of the notes that I took at the conference. It's by no means a transcription.

Peter Corbett - Apps for Democracy

@corbet3000
He met with Vivek Kundra (CTO/fed CIO DC) and started a dontest for DC, open data. Citizens created "fix my city" type apps. 43 webapps created, $2.3 EST value, $50k cost, 5000% roi. Huge success.

A few examples:

  • areyousafedc iphone app - a tachometer as you walk, green = safe, red = danger. Pulls data from open city sources, crime reports etc. Very simple interface, pretty cool
  • wethepeoplewiki.com - structured wiki, real-time crime data. I didn't get this.
  • park it dc - very cool parking meter app. People report broken meters, displays broken meters on a google map mashup. City found their contractors were fixing their meters in avg of 7 days but their SLA was 24 hours. Broken meters not cities fault, app helped DC discover the real problem.
  • iPhone demo at DC311 - http://victorshillo.com/dc311/2/

Really good presentation. Peter is a cool guy. Nice, technical and well connected. Peter did another awesome presentation called No one cares about your crappy webapp at an Ignite Baltimore conference. I tried to tell him how awesome that was but it's hard to put into words.

Jonathan Blocksom - OpenGL

@jblocksom

http://www.gollygee.com/weblogs/jblocksom

Jonathan works at google. He had an android shirt on. It was pretty funny. I seriously think he was there to convert some people. :P He was really nice and I enjoyed talking to him about gamedev (even if most of my stuff has been in Java). He did a really nice overview of OpenGL, computer graphics and his game Bubbles. His game has been on the app store since the beginning of the app store opening.

  • Z buffering is checking if a pixel is behind another, won't render.
  • Use the iPhone boilerplate template to learn
  • Overview of the various buffers that the template creates.
  • You can use the bullet SDK, collada to import 3d models etc
  • You can use the Texture2D class to easily import textures from the apple Lunar lander sample code
  • You can use the touch fighter sample code. It shows how to overlay a high score list over opengl view
  • Don't mix OpenGL and cocoa views together for performance reasons
  • He gave an overview of his sales history which was interesting.

A lot of people showed their sales tapering off after an initial burst of sales. Sometimes press coverage or even competing apps would create another bust of sales.

Leon Palm - Computer Vision

Leon also works at Google (not that anyone is judging people based on their day job. Hey, google is a cool company (currently). He was a really smart and nice guy. Easy to talk to. Had a cool Sudoku solver app to demo. I thought I had seen his app covered in the press but that turned out to be a competing one (oops!). His presentation walked through how the app works. Some parts are super confusing and hard but he did a good job in breaking it down.

How his app works:

  • Evolution algorithm
  • RANSAC to find the line
  • Walk the intersection of the lines
  • Find 8x8 inliers in checkers, 7x8 in connect four
  • Have lines, apply transform matrix to rectify image
  • Get pieces is easy
  • Sample region at expected center, create int array for piece config
  • Use open source solver etc

Drawing the results back.
We have: piece colors, positions, sizes and warp matrix. Derectify image and draw over solution.

Conclusion: easy to do if task is broken down. Use existing knowledge (whitepapers). Filtering/tweaking is the most important part. You have to tweak it to work with cameras lighting and make it accurate. He said tweaking and adjusting took the most time. I believe it.

I have done some test type stuff with OpenCV but Leon had really taken this all the way to the finish line. It was a really in-depth talk that was academically the most complicated of all the talks.

Kiril - Working w Designers from Imagini Studios

Kiril is the artist that worked on Harbor Master. It's a "line drawing" game similar to Flight Control. Apparently it's doing very well on the app store. These guys were super pro. They had a great presentation, super personalities and they had found success being an indie game dev shop. I was really green but then I hadn't put in the hours etc.

Kiril talked about his mock ups, how he worked with the developers (2 of them) and showed his different iterative art pieces. He mentioned ffffound for art inspiration. And his most important advice to developers: don't think that mockups are the final product. He said many people can't make the jump from concept to final product.

Christopher Brown - App Store Data!

Christopher runs an analytics company called Tap Metrics. They had a super slick web app that scrapes data from the app store (I imagine only a few people can do this). He had run many reports and shared some interesting trends:

  • Most people that buy an app stay in that category and buy again
  • 94% of apps are in English, meaning German/English counts. Germany only counts wouldn't count. All -> EN -> DE, FR, JP
  • 1% conversion freemium rate free->pro. Meaning 1M free downloads.
    1.99 better segment, .99 is saturated

If I was on the store, I'd talk to Chris about metrics. I can't imagine anyone else having something similar in polish. I hope he gets some traction (if he hasn't already) on his work. It was impressive.

Dave Smith - Audio on the iPhone

Dave had a presentation that I really enjoyed having worked with various audio APIs. I asked the most questions on this one. He walked through his audiobook app (which was really neat). He was friendly to talk to (for further notice ... everyone was nice). He gave a good overview of real code and a real working audiobook app he works on. The app displays the text version of the audiobook while it plays and stays in sync. It's very polished.

Some random notes (I wrote as fast as I could):

  • AVAudioPlayer level above openAL
  • mp3 format is hw decompression, good for batt/performance
  • To get started, add AVFoundation, AudioToolbox frameworks to project
  • Make a pointer: AVAudioPlayer* player
  • - (IBAction)play:(id)sender; // methods for button actions etc
  • In interface builder, mapping actions using touchUpInside is the best option to capture user button push
  • Useful command line utility in OSX: /usr/bin/afconvert -iaf4 (convert aiff to compressed formats, pre-compress best for iphone optimization)
  • UInt32 category = kAudioSessionCategory_MediaPlayback // kAudioSessionCategory_* has many diff options

He always released his memory correctly. :)
[player pause]
[player release]
player = nil // nice GC technique

His start method created the player and played at the same time. Pause destroyed it. This might seem odd but he said, "don't keep player instances around for a long time, non deterministic things can start happening."

Sze Wong - $1M app

Sze asked the question "what would a $1M iphone app look like?". He also talked about enterprise development and asked if the iPhone could be a serious contender. He has a metric ton of experience doing enterprise and mobile development. He seems to like the iPhone (hey a lot of us are sick of doing J2EE) as a refreshing platform.

Sze had a really nice presentation that didn't materialize for me until he showed his demo. I can only describe it as Oracle Forms for the iPhone. He has a slick web ui that can generate custom forms for many different uses. His forms could even include a signature box that the iPhone can use to create a UPS type delivery board. It was pretty compelling and he had a lot of nice backend stuff (like JSON, RSS, XLS exporters) created in the web ui.

Other topics

Things wound down and at the end they had a panel of the experts there give answers to various questions by Dave Mark. It was really neat to see an improvised conference.

  • A lot of people mentioned the importance of Touch Arcade.
  • Someone mentioned nsfetchrequest for nstableviews?
  • Ad hoc distribution for beta testers? I need to research that.
  • Imangi Studios mentioned getsatisfaction, a customer support portal to outsource support

Fun conference. I hope to see them next year or sooner. I think ruby dcamp is next for me.

Filed under: Blog, Noteworthy No Comments

Making Tetris

Posted on June 22, 2009

tatris_03

Backstory

In my last job, I was a hourly contractor who had finished a project and was transitioning off to other things. By a chance of fortune, I had an opportunity to take some time off and do whatever. I had one week on, one week off for a period of over a month. I was extremely excited because I have a lot of hobbies that are bound by time and this was exactly what I wanted. Time to do whatever. I was curious to see whether I'd waste it or actually produce something. I'm happy to say that I did not waste the time I had and I produced the most intense gamedev learning experience I've ever had. By no means, am I claiming to be an expert. I'm just documenting a very large personal effort.

Ok, enough of all that personal crap. In reading game development community sites (like gamedev.net and idevgames.com), something that was a near cosmological constant is the post "OMG I wnt to make mmo, pls halp!". It's like a nuclear clock. Someone does some subscription revenue math, gets excited with dreams of being rich, tries to start something ridiculously complicated, gets stuck and runs to a forum looking for members or advice. On a forum like idevgames.com, there are exceptional members (who should be praised for their patience and humanity) that take the time to respond to this never-ending line of questioning. The most effective response is, "have you made tetris yet?". Usually the person has not made a simple game and I doubt that they end up doing so. However, eventually this idea sunk in and I realized: I do not want to make an MMO but I should make Tetris. Because someday I might want to make something more complicated (not an MMO). So let's do this.

The Plan

Firstly, I had been doing Java at my job for a while now and am fairly comfortable with it. Outside of this, I had been messing around with a project called Processing which makes graphics and generative art really easy. I knew this was going to be complicated so instead of diving into code, I made a plan first. I started breaking down what Tetris is and mapped out classes and responsibility. This planning bit I've always been bad at and I spent maybe a day thinking and writing down like "what a tetris piece is" and what minimal features there should be. The gameplay and design is already done and this fact is a big step compared to coming up with something by yourself.

For sure, the lesson I learned is: "it's just a plan". You can change it as you go and eventually it's best to throw it away after things are sufficiently started. As the code grew, the plan was put away; which is good because my plan wasn't really all that special or well organized. I had some ideas about pieces to be written and what the hard parts were but honestly the best lesson I learned was "it's just a plan". You're not going to pre-write and pre-solve all the problems.

Next was research and learning. I studied other processing games (like MonkeyPatrol by Joshua Minor) and white papers from university CS classes. I played Quinn (a mac OSX clone) a bit. I knew a few things to start with. For example, game objects should draw themselves. There are 7 piece types (which look similar to the letters: I L O J S Z T) and many things are similar between them so I planned for a base Piece class and named the pieces after the letters they looked like (IPiece, LPiece, etc). I collected some screenshots of existing games to use as inspiration.

Drawing a Piece

Ok, I had my plan and similar stuff done. Ok, where to start? I like to start from the top down. IE: from the interface backwards. So I start with a graphical mockup and then make the mockup actually function. So started out with drawing. First, I created a Block class. This is a single square with an x,y,height,width,color etc. It's a component of a Piece. Before going any further. I have to explain that I intentionally did not do Tetris the easy way. The easy way is having a bitmap style grid of blocks and simply moving the bits down and around. Then you just represent the bitmap with graphics. I did not do it this way because I wanted an excuse to do sorta a "2d model" where the piece is constructed from a central point, rotated etc more like what someone would do with a 3d model in a modern game. This single decision made things extremely complicated for me but it also made it a more useful learning experience for when I want to do something like a platformer or a shooter because these game types use collision detection in a 2d/3d space similar to how I did it. So a Piece consists of Blocks with a model describing the shape of the Piece. For example, an LPiece looks like this:

1
2
34

And the IPiece looks like this:
1
2
3
4

And the OPiece looks like this:
12
34

So I created all the Pieces and eventually had a test app that looked like this:
tatris_block_test

Next, let's move on to piece movement.

Animated Box

Posted on April 1, 2007

I'm very, very early on in the effort of this graphics/game test. But essentially I wanted to write down where I'm at with Xcode, OpenGL and learning C++.

Learning C++ by starting with OpenGL is very stupid. I admit this. It's the wrong way to start out. It's like learning how to walk by jumping out of a Dodge Viper. But I want to get beyond the Hello World books and after trying for two or three years in my limited spare time, I'm finding that being thrown into the fire is somewhat motivating. I learned Java the same way (not that I'm a master of that either), I gave myself a goal that I really wanted to accomplish and the rest just fell into place because I couldn't think about anything else.

Such is my animated box. I want to move a box in a really smart way. Not just some Box.setX(i++); Box.setY(j++) in the main() method but something smarter that would enable me to move two, four or one-thousand boxes in the future.

animated box

More coming...

xcode glclearcolor

Useful Crontab Header

Posted on November 12, 2004
#minute (0-59),
#|      hour (0-23),
#|      |       day of the month (1-31),
#|      |       |       month of the year (1-12),
#|      |       |       |       day of the week (0-6 with 0=Sunday).
#|      |       |       |       |       commands

Good for putting at the top of crontab files.

Filed under: Noteworthy, Unix Comments Off

samba, winbind and solaris

Posted on October 1, 2004

This is a repost for formatting

Winbind-Solaris Documentation
Naag Mummaneni getnag at rediffmail.com
Thu May 2 11:10:54 GMT 2002

Next message: Winbind-Solaris Documentation
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

--------------------------------------------------------------------------------

Hi,

I just configured my Solaris box to logon to my Windows 2k Domain after working on it for three days.I am sorry to say that I have found no documentation for setting up Samba-winbind on solaris.And I feel that a Prestigious opensource project like Samba shouldnt be blamed for this.So I modified the documentation that come with samba & prepared this one for "solaris" so that no other administrator will face problems that I did. I hope the Samba group will put this documentation part in the distribution.Please find the attached doc file for the documentation.

Thanks
Naag Mummaneni(getnag at rediffmail.com)
--------------------------------------------------------

10 Friggin Useful Linux Tips

Posted on April 9, 2003

A friggin run through 10 really friggin useful friggin Linux tips.