Showing posts with label Game Development. Show all posts
Showing posts with label Game Development. Show all posts

Tuesday, December 13, 2011

Model Viewer in WebGL

As HTML5/WebGL was picking up some momentum earlier this year, I started experimenting with it, naively thinking that it would be the new standard for browser gaming. Little by little I added some code to the small project whenever I remembered it. However it has been sitting on the back burner for a few months without any update. Now that Flash 11 has been release, it's finally time to part with this little project, which could be viewed with Firefox (not guaranteed with any other browsers). External Link Here

Usage: AWSD to move the camera and mouse drag to rotate it.

How it is done:
First I found an open source linear-algebra library called glMatrix.js, which serves as the foundation to all math done here. JSON is a no-brainer for the mesh format because Javascript supports it natively. Pretty much everything else is built from scratch, for example shaders.

A few reasons that HTML5 might not be very feasible for gaming:
1. Lacks a comprehensive IDE for development such as Flash Builder, and thus
auto-completion and spelling check(in Javascript spelling something wrong is fatal)
2. Cross-browser compatibility has a huge question mark(it's still called experimental-webgl), with IE falling behind.
3. Performance concerns. Flash is compiled while Javascript is not, and how(if any) the browsers speed up this is totally up to them.
4. Javascript as a language sucks.

Added May/7/2012

Let's see how Epic's Tim Sweeney sees Adobe Flash and HTML5:
So what about the browser? That's something that relates more to something specific that you guys are working on with Unreal Engine. Where do you see the future of the browser in games?

TS: Well, we would like to see the web browser as another platform. You should be able to take any game -- a PlayStation 3 or iOS game, for example -- and just go to that and play it from any web browser.
We're slowly heading in that direction as an industry. One thing that's happened recently is Adobe Flash. For a decade or more, Adobe Flash was a little scripting language for creating more interactive webpages using a proprietary browser plug-in, but more recently Adobe created a translator.
You give it any C++ program, like Unreal Engine 3, and it translates it to a platform-independent application that can run within Flash, within any web browser or on any platform where Flash runs.
And so now any browser that supports Flash can play any web game that's built with Unreal Engine 3, or any other engine that's cross-compatible with Flash. That's an awesome breakthrough; it shows you the possibilities.
But I think the next step in that is cross-compiling games from C++ or whatever and directly running them as native HTML5 and JavaScript applications within any standard web browser. And you can do that in theory today, but it ends up being slow and unstable just because of the early state of JavaScript implementations, and limited performance, and current web browsers.
In another few years, I think that's going to be a very realistic scenario. And so the web will generally be a platform, and you can have a real application with a full feature set that runs within a web browser; that'll be very welcome. The web is a fairly awkward experience when you use a platform that's not the majority of the install base, and I think we're going to see big improvements 

Thursday, February 3, 2011

Proof of Belief

Here let me quote my own words : "Finally in hindsight, the lessons I learned from them is that the most successful teams would not make things from scratch, given how short the duration is, and should also stick with tried-and-true concepts.".
Time flew by, with Global Game Jam entering its 3rd year. I showed up again at 721 Broadway building as I always had, with same passion and same perseverance. The only difference on me is the added experience from last 2 years, the one of defeat. So I decided to try something that I never before had, which is to be more conservative and less ambitious. This may sound a little pessimistic, but come on~ we only have 48 hours to finish the whole thing.
With that new disposition, I set out to explore the Flixel engine 3 days before the event, and luckily I got all the content creation pipeline pinned down, and by the midnight of the first day I laid out a very simple backbone for my awesome teammates to spend their time with(while I showed up late). On day 2 we not only agreed on using the same technology but also worked with a single goal, that is, put out one game that's playable and tons of fun.
Things were going too well, and by the end of the 2nd day we already had something playable, so basically the final day was all about fixing bugs and adding some finishing touch to the game(music, sound, menu...etc.). During the demo session, however, our presentation was kind of rushy, with only 2 of the maps shown to the audience(plus we didn't have very impressive graphics either!). All of us felt doomed, but not until the staff announced the winners did we realize that we got 3 grand awards.
According to Randall, one of my teammates, even if you think your game is damn good you still have to hear it from the mouths of others, because a game is meant to be played! So while we are preparing for an exhibition at Babycastles and the notification that we won another award in Europe, I cannot help myself but say: "Ned, you really suck the boredom out of my life"

Tuesday, July 20, 2010

iPhone Game Development in a (Coco)Nutshell

    Recently I gave myself a quest to build an iPhone game and have it published, so I converted myself into an Apple cultist by buying my first Mac, and then started learning Objective-C and Cocoa Touch framework with almost no experience under my belt. But soon I was amazed at the simplicity of the framework and the language itself, especially the delegate design pattern, which goes hand-in-hand with the smalltalk-inspired message passing feature of obj-C.
   Now a little bit on the process of game development on iPhone. There are currently a plethora of engines to aid the creation of 2D/3D games, such as Unity3D and Cocos2D. The Cocos2D is an open-source project aiming to provide the indie community with a better environment for making simple 2D games. There are also tons of helper tools that generate files Cocos2D could read in the form of XML.
   Since the kind of game I am going to implement is quite similar to a platformer in many ways, I decided to begin the journey from there. The pipeline I picked was a popular one : Cocos2D for rendering, Box2D for physics, Tiled for level editing, Zwoptex for exporting spritesheets.(and perhaps Particle Designer in the future).
   Here you can watch the video: (and please do support my game when it's realsed lol)

Saturday, June 19, 2010

Water shader

    Up until a month ago I had been from time to time wondering how the great effects are done, especially the water. Thanks to the indie game group I joined, I finally had a reason to implement that myself. So the code was based on Riemer's XNA Tutorial, which has lots of resources regrading shader programming. The initial goal is to generate ripples on the water surface where the ship passes.



    However the organizer decided to have our prototype redone in an open source XNA game engine, for a more reliable environment of content creation, so the development is paused temporarily (i.e. summer vacation :p).

Sunday, June 13, 2010

Anyone can make games

If you have never heard about Global Game Jam, it's an indie game making event hosted in dozens of countries and span more than a hundred locations worldwide, starting 2009.
There is basically no rule at all regarding how a team is made or what genre a game must be, except for a few topics that one should keep in mind while building the game. Although anybody is welcome to join, a required property of each person is "Passion", since it only lasts 48 hours from the beginning to the end, and there is no prize other than honor itself, so to speak.
In 2009 we had a game developed in XNA, because back then we had 2 programmers already knowing the basics of it, thanks to the class. So the idea is you have a pendulum dangling from above with an object attached to its end, and you only use one button to release the object, in order to form a barricade to shield the poor human beings from harm. But during the course you might kill them if it hits them.


Although we got very close to the mechanics we had wanted, there was no time left for fine-tuning the physics elements, which was one of the uncertainties that one must face.

And yes in 2010 I returned to the game jam and of course had a good time. This time we chose Flash as the platform that the game runs on, simply for its ubiquity on everybody's computers. The central concept is to use all sorts of sound effects to torture a prisoner, without telling the player what to do, hence I would rather call it a gadget rather than a video game.



Finally in hindsight, the lessons I learned from them is that the most successful teams would not make things from scratch, given how short the duration is, and should also stick with tried-and-true concepts. But being less adventurous, on the other hand, does not manifest the spirit of GGJ.

Thursday, June 10, 2010

Games for grades

  If you are not fortunate enough to get matriculated into CMU's ETC or USC's Gamedev program, and you still want to feel what it's like to do game projects in a course, there are lots of schools/developments that offer similar courses now.
I will simply embed a youtube video about what I have helped make here:



  According to my previous experience if you don't have dedicated artists in your group(like us), it's a lot easier to just "borrow" some assets from other sources, and remember it's always the idea that counts but the degree of polish(especially when you don't have too much time to finish the work).
  The first game was made for an individual homework, to test how fast one can familiarize himself with XNA environment from zero understanding. It turned out to be a smooth experience(a couple days). But the 2 more ambitious group games following that weren't as easy to implement, because XNA is nowhere close to being a game engine, but rather just a loosely coupled toolset itself (A reason my current project is being redone with a game engine instead of built from scratch).