Pages

Saturday, May 12, 2012

Universe within launched on App Store for the iPad!

We released our Global Game Jam game "universe within" on Apple App Store for the iPad! (My first ever app on the App Store!!)

It's much better to play the game on the iPad making use of the accelerometer (than trying to til your Mac book). Also the screen resolution made it a natural fit for the iPad. A tweaked iPhone version may follow later.

You can find in on iTunes here - http://itunes.apple.com/us/app/universe-within/id523392835?ls=1&mt=8 - or search for "universe within" from App Store on the iPad.

As I had mentioned before I had played around with porting a HTML5 canvas based game onto iOS using AppMobi's open source DirectCanvas. This time I went all the way and ported our game to the iPad and released it on the App Store. Also this time it was a slightly more complicated application using the accelerometer and touch for the menu but it was fairly straightforward to get the code working with DirectCanvas.

I haven't had the time to post any of the technical details of the porting process. Drop me a line if you are interested in knowing more about it.


Friday, March 23, 2012

the universe within... - released on the Chrome Web store!

After polishing our Global game jam game a bit we have finally released it on the Chrome webstore!

If you are not using Chrome just check out the latest version of the game at http://www.universewithin.net 


Tuesday, January 31, 2012

Global Game Jam 2012 : The Universe Within ...

Wow! That was a crazy ride the past weekend. I had just enough time to recover from the Babycastles game jam few months back and it was already time for the Global Game Jam. I was there just to have some fun and it turned out to be a whole lot of fun plus a few pleasant surprises.

This is the game we made - withinuniversewithin.appspot.com and this is the story of how we made it.




First and foremost, a game jam is not a competition. It's a place where people who are passionate about making games get together to stretch their minds - Part of it is by making your own game but the rest of it is watching others make games.

Every game jam has a theme and the theme for this years global game jam was Ouroboros. The theme definitely provides good boundaries for people to stay within.

Forming Teams
Forming teams in a game jam is a very awkward proposition for me, but I am amazed I have found the right teams both times I attended a game jam. The best tip here(as I first heard from Ben Johnson) is to just go with your instincts and not think too much about it. Of course this time I decided to play it safe by sticking with people I know - GJ and Brian and that too works I guess (but the previous game jam which was my first, I went with my gut feel to team up with GJ and that worked out very well).

Coming up with the game idea (Friday 8PM - 11PM)
This is the most difficult part. Most of the initial keynotes were about coming up with ideas and more importantly deciding on an idea as a team. In our case we jotted down the 3-4 overall themes and we talked about various loops we can explore which would portray the Ouroboros. Here are the ones I remember...

1. Brian and GJ had already come up with the idea of Powers 10 and idea of an image zooming into itself.
2. We discussed about a game of trying to break out of a loop like Everyday the same dream
3. We also thought about gameplay ideas where the first attempt at a level affects the next one (A good game in the NYU game jam which did use this effectively was - What kills me makes me stronger)

We had sort of settled down on the first idea because the idea of zooming seemed very intriguing. The Ouroboros was worked into it by thinking of a possibility that when we zoom into atoms it goes into another universe of its own - Thus looping infinitely. As GJ put it - sort of like the last scene of MIB.

At this point we just had a theme but no concrete game play ideas. I was suggesting a maze exploration game that you navigate by zooming through the different places. And if you took a wrong turn you would end up in a level higher up. Or there could be a key at the atomic level that you would pick up and come to the universe level to unlock something - again navigating by zooming. This was when we were joined by Shawn and Jordan. Shawn sort of liked our idea but was suggesting an obstacle avoidance game play set as a side auto-scroller. Jordan was also not feeling the whole maze exploration thing. I was against a side auto-scroller because that sounded like our previous game jam game. This was the most tense part of our whole game jam experience :) There was sort of a deadlock for almost an hour as we tried to come up with the one grand idea.

Finally in an exasperated effort to bring everything together I suggested making a collision avoidance game where there was zooming in place of side scrolling. That seemed to go well with everyone - at least well enough to start work on the game. They say that designing by committee is not the best strategy but in our case it worked out okay. A leader who can just be the decider is good but maybe not be absolutely necessary for the game jam. Whatever method you choose it's essential that you have everyone committed to the idea before starting on the actual game.

So Shawn and GJ were going to be the artists, Brian the designer/level scripter and me and Jordan the programmers.

Brian made the decision of going for the game jam diversifier of drawing all the art by hand and scanning them. I was sort of intimated by the idea to start with but at the end of the game jam it proved to be a great decision. Did we know that then? Nope. The only thing I can probably say here is that you really have to know your limits and push against it in the right manner. If not, you would probably learn it the hard way anyway and its a good lesson to take with you.

Next we discussed about the tools. I told them that I already had experience working on the previous game jam using HTML5 canvas and we can just continue using that. I am not a big fan of game engines for a game jam because I believe you tend to be influenced by the tool rather than the other way around. The experience of the last game jam was definitely helpful(and the stupid mistakes I made like trying to code an entire collision detection system). Things like animation code could just be taken from the previous one and put into this one. My game jam code is probably evolving to be the best engine I can use, in a game jam. Jordan hadn't worked on Javascript before and I gave him a crash course on it. He knew C++ well and picked it up quite quickly.

Making the game : Day 1 (Saturday 9AM - 11:59 PM)
The main part in actually making the game is probably dividing up the tasks neatly and working independently without disturbing each other frequently. A main person to see the overall progress would probably be useful - And Brian and Shawn did that for our team.

I was so relieved to have another programmer in the team and it made things so much easier than the last game jam. Jordan suggested we setup a SVN repository and we spent about 30 minutes setting one at code.google.com. This saved us a huge amount of time since we could work on features/bug fixes separately and merge code without much pain. Actually the SVN client on my Mac was wonky and wouldn't sync the levels folder - but even with that we saved a lot of time overall. Incidentally having a repository also provides a nice history of development of our game. When I get some time I am going to put together a video of how our game looked at every hour of the game jam (I should be able to write a script to do this...Hmmmm).

We decided to just use circle based collision since that's the easiest thing to do and just had circles for our objects till we had some art to use. We just kept working on one feature at a time and commit it to the repository as soon as it worked.

Brian worked with Shawn and GJ to figure out the various scenes while we were programming. Shawn and GJ themselves were working separately and didn't try to sync up too much with their styles - which probably gave the the game a unique feel to it (Half the levels are B/W while the other half is in color :) They were just producing amazing hand drawn art.

Brian did some audio recording of real world traffic and people sounds for some of our levels. He was also ready to do some level designing but was blocked by our inability to get the level parsing and rendering code done. We could have probably planned it a little better - but I am not sure whether the time spent on planning would have been worth it.

At the end of day one we had built the basics of the game and part of the art integrated into it. We had no sounds and the level parsing was just starting to work. There were lots of bugs including on where the size of the obstacles were too small.

I went back home that night and was thinking of doing something cool with the input. I had heard of DepthJS which would interface Kinect with Javascript in the browser and was trying to figure out whether we could add that to our game. In the end it turned out to be too difficult to setup. In sheer desperation I started looking for ways to integrate webcams with Javascript when I just happened to come across a site which mentioned how you could integrate the accelerometer to your Javascript web app. I was able to add the five lines of code which integrated accelerometer to the game. I was sort of disappointed that this wasn't cool enough but it turned out to be the best five lines of code I wrote for the game jam (explained later).

Lesson: Good feature doesn't have to involve lots of code. Stepping back and thinking in between your coding about what neat things you can do can go a long way.

On a different note take some time in between to go around and see what others are doing. After all that's why you are at the game jam and not in your basement coding.

Making the game : Day 2 (Sunday 9AM - 3:00 PM)
We still had majority of the levels to design and the art to incorporate on day two. Jordan was doing amazing work taking over the levels part and doing all the nitty gritty stuff and working with Brian on getting it right. I was working on the animation and the levels transitions. Jordan implemented the really helpful feature of skipping levels by pressing "1" (It's still in the game if you want to try it out :). This helped us to skip levels and test out different levels. It also helped us demo the various levels to people without having to wait for them to go through all the levels. Brian did a great job with the level design - tweaking the difficulty of the levels so that they weren't too easy. This was something I wished we could have gotten to early since we spent too little time in our previous game jam too. Oh well - Maybe in the next game jam.

The sounds got pulled in at some point again with the code I used for the previous game jam. We just did simple looping of sounds. The looping wasn't perfect but we just patched it quickly with some fading at the beginning and the end.

Once the levels were looking acceptable we were taking it a bit easy and just made sure our core mechanics was working. There were some bugs that we just deemed not too important for the demo. We just didn't want to be scrambling in the last minute to fix things that completely broke the game. Or maybe we were just too tired. Either way we didn't want anything badly broken just before the demo.

The last thing left was to name the game. Various names were thrown around - including "Our porous ouroboros", "Milky snake" (don't even ask) and "Soroboruo" (Sounded like "Sorry bro"). Finally we settled down on "the universe within...". It seemed to reflect the recurring universes within each level and the concept of one universe being inside another in an endless loop.

Showing the game and Surprizes!!
Once the game was done we had to set it up to show it to other people. There was a panel of judges from the NYU Game Center who were going to select best games for few categories - like best visual, best audio and best gameplay and best overall game. This was just a gesture of encouragement to the participants. Our team didn't have any high hopes of winning any prizes. The array of games made were just amazing - My favorite was Horse Beatoff EXTREME! with simple yet unique beat based gameplay. And then something happened.

People were drawn to the hand drawn art, enjoyed the levels,  using the "1" cheat code was just what we needed for a demo and the mere fact that they now knew that Mac books had an accelerometer which could be used was thrilling to them. They got the idea of the recursive worlds and really liked the zoom feature but also the simple gameplay of avoiding things. Each one of us had contributed major parts to the game that people liked and without us realizing we had just ended up being a great team.

Frank Lantz saw the game and he got it immediately. He said he liked the way the accelerometer fitted nicely in the game and didn't feel too gimmicky (Totally accidental. I was going for more gimmicks than that). This was when it hit us that we had something in our hands. Sure - there were bugs in the game but people were willing to look past it into our ideas. We didn't talk to people as much but we felt we had communicated (Did I just pick that up from the trailer of "Indie Game: The Movie"?).

At the end, we were given the best overall game at the NYU game center!! That was definitely a great feeling but the best memories we will carry will be the time we spent building a game together along with so many other people.

The next day we were featured in Kotaku - http://kotaku.com/5880467/this-72+hour-game-lets-you-fly-through-the-galaxy-and-into-one-mans-mind. We are totally honored that they decided to pick us to represent the global game jam. There were so many more amazing games made in the game jam - So definitely keep watching out for them at https://twitter.com/#!/globalgamejam. Or go through the whole list at http://globalgamejam.org/games

Conclusion
In closing I just want to thank the folks of Global Game Jam, NYU Game Center and my team mates for an amazing experience! It was an exhausting weekend but I learnt so much about myself with regards to making games.

I have rambled a lot but if you reading this and are still thinking of joining the next game jam - Just do it. It will be one of the best experiences you will have as an independent game developer.

(Version 2: Fixed some errors. Might need one more pass to fix it completely.)

Thursday, December 22, 2011

Porting our HTML5 canvas game to mobile devices using AppMobi's DirectCanvas

So I had worked on "go away, norman" as part of the Babycastles game jam. I wrote it in HTML5 directly using the Canvas and Audio APIs without using any of the game engines. But now I wanted it to run it as an App on Mobile devices - mainly iOS and Android. There are already frameworks like PhoneGap which allow you to package HTML5 games as an App on mobile devices. These frameworks just wrap the WebView inside an App and provide extra APIs to access native device features(like accelerometer etc.). So it should be easy to port my game to the mobile device, right?

Wrong - the problem is that the game uses HTML5 Canvas and the default implementation of Canvas in the iOS and Android browsers(and hence the WebView) is pretty bad. Even though the speed of Javascript has been improved in these mobile platforms the performance of Canvas has not improved by much.

So how does one get their HTML5 Canvas game involving lot of drawing and fast action onto mobile devices?

Enter DirectCanvas from AppMobi.

DirectCanvas from AppMobi provides an HTML5 runtime environment with an OpenGL accelerated Canvas implementation(plus a better Audio implementation based on OpenAL and a native Box2D implementation for Physics simulation).

The iOS implementation of DirectCanvas was recently open sourced by AppMobi(A big thanks to them!). So I downloaded the DirectCanvas source from github and after a week of hacking was able to get my game working on the iPad (Most of the time was spent on getting it to work in landscape mode and understanding the sandboxed Javascript context for DirectCanvas - More on this in the next post). DirectCanvas provides almost a drop in replacement for the HTML5 Canvas and Audio API. Also my game had regular HTML elements for the very basic UI I had implemented and Canvas for the game area. DirectCanvas allowed me to use the accelerated Canvas as well as a WebView for the regular HTML elements (with some caveats - Again in the next post)

I ran the ported App on a first generation iPad running iOS 4.3. The performance boost was huge compared to the mobile browser!! The game was very  responsive and played just like a game written as a native App. I don't have FPS numbers but the video at the end of this post should make the performance boost very clear.

I am really excited about the future of DirectCanvas for indie game development not only because it works but because it is open source! (The Android implementation should also be going Open Source soon according to AppMobi) Any framework out there which allows you to develop cross platform and especially on mobile devices costs some non-trivial amount of fixed or recurring amount of money. I can probably afford it but it definitely cuts off some other people from developing cross-platform (Students, people in countries with unfavorable exchange rates etc.).

More than the cost, open source means faster improvements to the framework. I can't wait to see what people will do with this. Here is my list

  • Port all sorts of free HTML5 game engines to run on it and now you can automatically run them on the iOS (and soon on the Android)
  • Get Processing.js running again on iOS using DirectCanvas and allow sketches to be published to the App Store without running into restrictions by Apple.
  • Add WebGL support to DirectCanvas and get three.js running on it - How about some HTML5 3D action on mobile devices ?!!

If anyone is interested in collaborating on the above projects drop me a line here or on twitter(@vikerman).

(And if you do have some money to spend and not so much time do checkout AppMobi's XDK - It provides an easy way to develop your games using the ImpactJS game engine and build and publish it on different platforms without the hassles of going through the SDK for each platform)

And now here is a badly recorded video that shows the performance boost I got on my iPad by using DirectCanvas. The video shows how the game was unplayable on mobile Safari (which is what I would have got with something like PhoneGap) but plays smoothly as an App powered by DirectCanvas.



(I should have captured more time towards the end when the game was getting a bit faster to show that the performance and responsiveness does not drop - but I was having a difficult time playing the game and shooting it through the phone camera). I will try to upload a better one in the future - I just couldn't wait to share this with everyone!!

Sunday, November 6, 2011

Go away, norman at Babaycastles!

The nice people at Babycastles called us to setup "Go away, norman" as part of their closing party on Friday along with the winning games from the Parsons game jam. It was a pleasant surprise and I was totally kicked to show the game at Babycastles! (If you don't know what Babycastles parties are about here is an article from someone who can explain it much better - http://www.diedagain.com/a-laymans-take-on-babycastles)

We got one of the cabinets to setup our game and we hooked up my laptop to the monitor and one of the gamepad controller they had to my Mac. Made some last minute fixes to the code so that the game is centered on the screen and we were ready to go. Everything was looking ok when someone found a bug - if the mouse went off the screen on the right the game was essentially on a never ending loop and it could be easily reproduced. I had to go behind the cabinet and fix it in 'vi' to add  the extra check in the javascript. There is a charm with working with these physical things and hacked up code. Makes you feel more like Steve Jobs and Wozniack hacking on their first computer.

The party was a blast! There were performances by Ava Luna followed by the legendary Wu Tang clan. It was such a great feeling to see people walk up to our game and play it. The best part was when people actually got excited as they were almost caught by norman. We have some ways to go before it becomes a proper game - but it was nice to see people enjoy for what it is currently.

Thank You Babycastles.



































Thursday, November 3, 2011

go away, norman


Back from the dead. After two exciting years find myself in a different job and New York. A new start. Hopefully will not ignore my game creation itch this time.

It got rebooted thanks to the amazing folks at Babycastles and Parson school of design, who organized a game jam about a week ago.

Teamed up with the amazing geejay who handled everything from art to sound to level design as I floundered to finish the game code in 48 hours. I knew writing code from scratch in a game jam was bad idea - but I didn't have time to prepare on anything else. So just Javascript and HTML5 canvas it was. Spent a stupid amount of time on the collision detection. If I did it again I would probably just figure out some engine with basic collision detection before the game jam.

The theme of the game jam was any tweet from @Horse_ebooks and we picked "Solution to Cat behavior problems" and "It will catch up with you". So here it is our game - "go away, norman"


You can play it here.

We are continuing to work on it - Expect a more official release soon...

Sunday, January 17, 2010

Game Project update

Been long since I updated this blog with any details. Work on my next game has been spotty over all, but it has picked up in the last few weeks. Hopefully I can maintain the momentum. I have been playing around with new ideas and been learning quite a bit in the process. I have also solidified broad ideas for the game. For now I can tell you it's going to be a narrative game with story telling - Something other casual games have shunned but has been my interests - And probably leaves an opening for something to be explored.

Here is an updated screenshot from the work in progress (With clues on its internal name). Good to see it has come some ways from the last one but clearly I could use artists. For the next next game maybe...