Pages

Saturday, February 25, 2012

Thoughts on Blogging

     Over the last couple of weeks I have been having some trouble coming up with ideas for blog entries, but I have also spent some time thinking about blogging in general. So today I will talk about the ideas I have contemplated related to blogging. I guess you could say today that I am, blogging about blogging or, meta-blogging.

     In the past I have tried to start a blog but I had trouble getting into the habit of posting regularly. Then I started this blog, at the beginning of this semester, as part of a technical writing course. The instructor requires that I write a 26 blog entries before, April 11th, the end of the semester. The blogging component only makes up a small percentage of the course mark, but the goal is that I practice writing on a regular basis.

     Blogging is an activity that I never used to find interesting. However, since I have gotten in the habit of writing regular posts I have started to enjoy blogging. Based on this experience I could definitely see myself continuing blogging after I have finished this course.

     Starting a blog is simple, but generating ideas and getting people to read the blog are very difficult. In this blog I have talked mostly about some my of the games and graphics projects, but I doubt that I could sustain a blog on those topics alone. Secondly, the audience for this topic is also very small. I have had some success with one of my videos on YouTube which has currently reach close to 7000 hits, however my other videos have not been nearly as successful.

     This then got me to thinking about the kinds of blogs that I am most interested in reading. A common thing that I search for and read are tutorials. In order to write a successful tutorial I would need to write it on a topic that I am very skilled at. The two skills that immediately come to mind are game programming and making computer graphics. I am both very skilled at these and people are constantly asking me to teach them. For example, just this week at the first game developers meeting when were suggesting topics for meetings several of the members were interested in learning more about these two skills. As a result I have volunteered to give a couple tutorials.

     During the rest of the semester I will probably try creating a few video tutorials on YouTube and see how many views that I can generate. If any of these turn out to be particularly successful I will let you know in another blog entry.

Friday, February 17, 2012

XNA Game: RPG Elements


    The projects that I have talked about so far have been ones that I worked on in the past. Today I will talk about a project I am currently working on. It is called "RPG Elements" and is the third major iteration of an RPG game engine that I have worked on for just over a year, although this iteration was rewritten pretty much from scratch in about a month. Through building and rebuilding this engine I have created many interesting features and today I will talk about the most fundamental, and leave some of the more advanced features for another time.

    My goal for this project was to design a tool that could create a game with minimal effort required by the designer. I identified that most of effort is spent in designing the levels so I wanted to make this as simple and intuitive as possible. In previous iterations I had tried making a variety of different editors but I found this to be a lot of extra work. In this iteration I took a different approach, I designed the engine so that all of the data can be edited while playing the game using a console. My biggest surprise was that this console was very easy to implement because of the data structures I had used for storing my data. Then to make editing easier I added shortcuts and hot-keys for common console commands to make editing quick and intuitive.
A Logo Graphic I Designed

    To demonstrate this I will explain step by step the creation of a level. First the user types in the console "newmap" and the dimensions of the tile map. Then they draw background tiles on the map using the player as the cursor. Then, in the console they type "addmapobject" and the name of the object, such as tree or house. The player can then grab onto this object, walk around and drop it where they want.

    In this style of the game, the player walks around a virtual world and interacts with objects. These interactions are known as events. An event is composed of a set of actions that are executed sequentially. There are many different types of event actions, such as teleporting the player to another map, displaying a dialog box, asking the user for some kind of input, etc. Event actions have flow control in the form of "if" statements and loops and multiple events can also execute in parallel. As a result, events are implemented almost like a mini scripting language. Common events, like doorways that teleport the character between maps, have been designed to be especially easy to create since they are so commonly used.

    With these two fundamental features I can design most of what I need for my game, and my more advanced features are typically composed of or supplement these features.

    At this point my engine is in a fairly complete state and I am in the process of using it to create a game. In a future blog entry I may talk specifically about this game, in addition to some advanced features, but it is still in the very early stages.

Friday, February 3, 2012

XNA Game: Tactics Game


     After working on Crazy Party Fight I decided to give another shot at developing a game in XNA. This time I tried to find a couple of my university classmates to help me with a bit of the coding.

     We decided to make a tactical turned based strategy game. For those not familiar with this genre it is basically like chess but with custom pieces and other role playing game elements added. In our game each player would move each character individually during the movement phase and then if they were within range of another character they could attack during the attack phase. The goal was to defeat all of the opponents pieces.

     We decided on a couple of interesting design features for this game, one was the use of an isometric board. Isometric is a type of camera projection that in 2D games basically results in angled diagonal tiles. This makes movement a bit more difficult to deal with because it is on a diagonal but gives the game a bit more of a 3D art style. Another difficulty was implementing the opponents AI. One simplification that we noticed with other commercial games of this genre was that the player always moved each piece during each turn, instead of one piece per turn like in chess. This simplification allowed us to consider a reasonably good move for each piece rather than trying to figure out which piece would be best to move. Although our AI is relatively simple compare to  some chess AI, the strategy of a tactics games is more based on the comparative strengths and weakness of the pieces rather than their positions on the board. There are also elements of randomness thrown in to determine if an attack is successful or results in a critical hit.

     Unfortunately, my attempt at making a project as a group fell apart just as we had finished implementing the core mechanics of the game. The failure was probably a result of the other group members not feeling any real obligation to work on the project. However, convinced that we had created something interesting, I decided to continue working on the project to get it to a stage where it was presentable. I replaced all of our place holder graphics with new ones I made in Inkscape, and created all of the menus for choosing a level and positioning pieces.

Screenshots and Characters from the Game

     After finishing all this work I created the YouTube video you see at the top of this article. Surprisingly this YouTube video has attracted a large number of hits, about 5500 at the time of this writing, which is large compared to the one or two hundred hits my videos usually get. Clearly, this is a genre of game that is particularly popular, especially among indie game developers.

     The final result is still a work in progress. I would really like to continue and finish this project, especially considering the YouTube popularity. However I have always been to afraid to, since I have a vague memory of just how much refactoring is required, especially of the parts I did not write. Another factor that holds me back is the amount of art content that I would need to create. Being a programmer I am not most efficient artist, and yet I am also a bit of a perfectionist when it comes to my personal game projects.

Wednesday, February 1, 2012

Last Summer at SIGGRAPH

    Last summer I heard from my computer animation instructor that SIGGRAPH was coming to Vancouver. SIGGRAPH is the largest computer graphics conference in north America and this is the first time that it was being held outside of the US.

    Since I am really interested in computer graphics I thought it would be interesting to go. However, tickets to the conference are very expensive. Luckily, through my connections with the Game Developers Club I was able to get a ticket to the exhibition part of the conference.

    So that morning I took the train downtown to the convention center, not knowing what to expect since I had never been to anything like this before. At the exhibition all of the well known companies that had anything to do with computer graphics were there. There were large booths with people giving demos of their products and computer monitors everywhere playing videos. Its hard to put into words just how exciting it was for me. Basically, everything that I am interested in under one roof.

There were a few technologies that seemed to be a focal point. 3D printing was a big one, and there were several different companies showing off things they had printed in their 3D printers. Motion capture was also big, there were several booths with break dancers and ballet dancers controlling characters on a screen simply by dancing.

The biggest booths were those of the big name 3D modeling programs and pretty much all day they had guys giving demos where they would making some really cool 3D model using their program. They made it look so easy, and I spent hours mezmerized by their skills,  its a shame the software is more then I will ever be able to afford. Speaking of which, Blender also had a booth there, it was more modest though and there was not much to see.

    My favourite thing I got to try at SIGGRAPH though was a virtual reality demo. I got to put on this head set that had screens for each eye, so the image that you were looking at was in stereoscopic 3D. It also had four cameras mounted on poles in a square that you stood inside and when you moved the cameras tracked your movement and you would appear to move in the simulation you were viewing. The scene I got to try looked like the interior of an apartment. It was the most realistic simulation I have ever experienced, because of the 3D effect everything looked so real, and when I moved or turned my head the same thing happened in the simulation, and there was no noticeable delay.

    SIGGRAPH was really interesting and I am glad I was able to go. Part of the reason I am writing this blog entry now is that I recently heard SIGGRAPH will be coming back to Vancouver in 2014.