Saturday, December 12, 2009

Out with UDK, in with OGRE

After dicking around with the Unreal Development Kit, which was released for free a month ago, I've come to the conclusion that it's not what I want. There are a bunch of reasons for this. I'll list some pros first. In no particular order:

Unreal Pros:
  • UnrealScript is pretty similar to C++ and Java. Not hard to pick up.
  • Lots of nitty gritty stuff is handled for you. Things like rendering a level and letting you use the built-in UT character models is trivial.
  • OK documentation for getting your project up and running initially.
  • Powerful tools for doing animation and stuff inside the editor.
  • Kismet (graphical flowchart programming tool) is awesome.
  • Network support.

Unreal Cons:
  • Unintuitive directory structures for projects. You need to put your code beside the Unreal Tournament code? Huh?
  • Compiler for UnrealScript often crashes instead of giving a meaningful error, usually caused by malformed statements.
  • It's really aimed toward FPS and other shooters, with network support. Other gametypes are certainly possible, but you have to rewrite a lot of the framework in unintuitive ways. For example, detecting a click still uses the "StartFire()" function even when your game has nothing to do with guns and firing.
  • Poor API documentation. You're forced to dig through the code, and search on forums for help.
  • No official support for a lot of popular 3d modeling programs. They support 3dsMax and Maya, but not Blender. A cool dude made a Blender exporter plugin in his spare time, but it's far from complete.
  • If you make money from your game above $5k, you need to pay 25% royalties to Epic Games.
Summary:  It boils down to lack of support for modern free tools, and having a bunch of unintuitive API humps. I assume most users of UDK before Epic Games released it for free lurked the forums all the time to learn tricks to use Unreal Engine. That or they worked alongside Epic Games developers and so got special support while writing. Not to mention that they get the full Unreal Engine written in C++ if they can afford the license.

Now, why OGRE?
  • Very intuitive if you know C++, have a basic understanding of graphics systems like OpenGL, and have worked with any sort of game engine before, like pygame.
  • Great documentation and tutorials.
  • Support for Blender.
  • Use C++ directly. Meaning you can use Visual Studio or whatever full-featured IDE.
  • Plugin system to integrate with other great tools, like CEGUI, a GUI manager.
  • Just as easy as UDK to get your first project running, thanks to the Ogre AppWizard for Visual Studio. It does all the standard boilerplate for you for new projects.
  • Open-source under LGPL with some (good for developer) exceptions. So I can look at the engine code and change it if necessary, as long as I provide the source code of changes along with my product. Starting version 1.7 which isn't out yet, it will be licensed under MIT license which is even less restrictive than LGPL. (Steve Streeting explains why he made the shift to MIT license.)
  • Recently ported to iPhone and iTouch. Although, a tad late considering Android has been stepping up the competition considerably.
Also in a previous post I mentioned wanting to use Irrlicht. But I moved away from Irrlicht before even starting using it, so I can't compare OGRE and Irrlicht. However judging by Internet people's comments, OGRE is more powerful with higher learning curve, which I don't mind at all. Also it's been proven successful commercially with Torchlight, which is hugely motivational.

Tuesday, November 17, 2009

Set up SVN on hostmonster

Here's a very simple guide to getting SVN up and running on

Basically just run a script and it's all set up. Also comes with a script to quickly add new user accounts to SVN.

One thing you shouldn't do--don't change the versions from those in the script. I tried grabbing the latest SVN (1.6.6) and APR (1.3.9 or something) but they turned out to have broken dependencies. So just stick with what's there in the script, and it works great.

Sunday, September 6, 2009

Gave away my baby

I just open sourced my past month's project, an Android app called "reddit is fun". The license is GPLv3. It's up on github now:

A month doesn't sound like a long time for a software project, but I spent quite a bit of time on it and it definitely felt like more than a month. Oh well. Now I gave it away, and I'm coming out of the project with much improved Android programming skills and a better understanding of the different open source licenses (Apache, GPL, MIT, BSD).

Now, time for school! And on the side, hopefully more fun programming projects for Android, PC, and whatever. Oh yeah, I'm signed up for a game development class this semester. Let's see if that helps me with any side projects.

Sunday, July 26, 2009

Blender and Irrlicht

After finishing going through The Red Book and trying to start writing a small interactive scene, I immediately knew that raw OpenGL would take way too long to use in a game. I'd need an engine instead. For one thing, trying to create detailed models and scenes in a graphics API like OpenGL is probably impossible, not to mention really stupid, what with all the powerful tools out there. It'd probably take a month to perfect a single model that way. And no, I never seriously considered doing so.

So I knew I either had to use an engine made by someone else, or make my own. From looking at some game engines that other people have spent some time on, and discussions on the Internet among game designers, I know that as a graphics and game design noob, creating my own engine would be purely educational. Meaning it would inevitably suck. Now I'm glad I learned the basics of OpenGL, since it taught me a bunch of important 3d graphics concepts. But it's one thing to learn basic concepts and another to spend months of my life trying to piece together a decent 3d game engine. Since my goal is to be creative rather than travel these much trodden roads, it wasn't a hard decision to use someone else's engine.

I'd heard of the 3d engine Irrlicht before, and it seems very simple to use. So I'm gonna do that. Another one is OGRE, which sounds more powerful but with a higher learning curve.

More important is the ability to import 3d models into the engine, definitely one of my favorite features. The free 3d design program Blender is quite popular. It falls under the category of apps like Maya and 3d studio max but is free. And there's a really nifty tool called irrb which converts blender scenes and data to Irrlicht format. Perfect! (I used Blender to make the crappy "yo man" pic at the top of this post, following the "Blender 3d: Noob to Pro" tutorial. It didn't take very long at all. I have to say, though, learning Blender requires patience, as the interface is loaded with options and hotkeys and it's important to memorize these things.)

Furthermore, there's an effort to port Irrlicht to the Wii -- Wiirrlicht. Sweet.

Unfortunately on platforms like Android, it's gonna be a little harder to find a free engine to use, so I'll probably have to end up hacking together a simple one when I get serious about coding for that. I think iPhone has a few 3d engines to choose from though. Hopefully following the release of the Android 1.5 NDK, we'll see more useful engines ported over.

Friday, July 10, 2009

Light exercise while doing other things

The past few weeks I've been noticing myself fall into the same sort of pattern I seem to follow every summer. That means getting used to a lack of daily activity aside from commuting to and from work. You may know the feeling of descending into slothfulness, where each day you have less and less energy and you can practically feel your muscles atrophy. You also lose mental capacity in the areas of concentration and creativity, and of course get fatigued more quickly.

I began to wonder why, even when I controlled my diet somewhat well and went to the gym 2 or 3 times a week (for mostly weightlifting), I could still be affected by this malady after as little as a week of my sedentary behavior. People say you have to work out just a few times a week to stay healthy, right? However, I suspect the issue is that my downtime is generally less active than most people's. I won't go into detail here....

So this past week, on a whim, I started making small changes to work some light exercise into my daily routine. That means that at work, where I'm protected from prying eyes by my cubicle, I use the computer standing up half the time and do some frequent small motions like hopping and squatting and balancing. And a lot of stretching. I think I got a lot of the movements from the Tai Qi or Qi Gong classes I took before. Oh yeah, in case you're wondering, I have a laptop stand, so I don't have to lean over while standing.

At home, while reading an ebook, I walk around and do the same thing. When I feel a little sleepy at night sitting in front of the computer, I exercise a bit and can stay awake longer. In the morning, I roll out of bed and do some push ups and other random things to stress my muscles a bit and raise my pulse. I've also started having breakfast. A fruit and a waffle usually. Ah, and I've also cut soda (free cans at work) from my daily diet.

The result? I can concentrate so much better at work that I really can't believe it. Programming a set of functions that might have taken me a week to write before, I did in a day and a half. Ideas are so much clearer in my mind, and I no longer feel like falling asleep after lunch. When I come home I no longer feel a need to rest my brain by just sitting and watching videos and reading humorous Internet articles. I have enough energy to do creative things, like programming and drawing. When I breathe, I can feel the beauty of summer and life and the universe with every inhalation. I feel more positive and relaxed the whole day. I even feel a bit more sociable and have been more conversational with coworkers and my family the past few days since I've started on this regimen. (Well, that's also because of the weather, but whatever.)

Diet and exercise, Banzai!

Tuesday, June 30, 2009


Rotating cube
I finally got around to learning OpenGL in earnest. My two resources are The Red Book (old online version) and NeHe's OpenGL Tutorials. I started looking at OpenGL stuff several months ago but got caught up in school and things.

If you take a look at NeHe's guide, don't be scared away by the first tutorial, which is more of a Windows lesson than an OpenGL lesson. The subsequent lessons are shorter and more pertinent to OpenGL.

I'm reading through The Red Book right now. Since it seems more organized than NeHe, I want to use it to get the concepts down before doing NeHe's tutorials. I'm on chapter 3, dealing with the modelview and projection matrices. I decided to take a diversion halfway through the chapter and write some small functions involving changing the view based on polar coordinates. It took awhile to get it right, despite the book itself being written well enough to grasp the concepts fairly quickly. Here I remind myself of the first rule of a CS degree: Never stop coding. And going through these tutorials I recognize the importance of thinking on my own and writing code aside from what's given in the tutorial. Otherwise a lot of time would be wasted later, when I'd have to go back and reread things more closely.

Probably what made me go back to learning OpenGL was knowing that I could do some OpenGL stuff on Android. Android uses a special version of the OpenGL API called OpenGL ES, catered toward embedded systems. I also know that the Wii and Nintendo DS homebrew libraries have OpenGL-like graphics APIs. In fact tons of platforms use similar APIs, so it's definitely worth learning.

Saturday, June 27, 2009

Internet Addiction

When I take a step back from all my distractions, the effects of computer addiction become clear.
I think that sometimes, simply knowing that I'm plugged into the Internet is enough to distract me from what I'm doing. That ethernet cable gives me the feeling that I'm missing something going on in the world, even without any little notifications reminding me so. It's much worse when I install programs and Firefox extensions designed to alert me with every little update -- things like Gmail Notifier, TwitterFox, and such make the problem several times worse. Of course, when I first installed those programs, I thought they were really cool and would help me keep on top of things, but I've gradually come to the realization that they just pull me further into a lifestyle that I don't want.

Which brings me to the problems of being distracted all the time. Is there anything inherently wrong with multitasking all the time? Some psychologists think so. They say that the idea of multitasking is an illusion, since the brain expends cycles "context switching" (to borrow a computer science term) between one topic and another. It's very taxing on your brain to do this sort of thing. However, having gone to school with many brilliant minds for a few years, I know that some people are very gifted and can handle this multitasking apparently very gracefully.

I'm not that gifted. Sure, I can handle doing several easy things at once, like browsing the internet, reading and responding to emails, coding a little, watching videos, whatever. It's the standard these days for people to always have at least a dozen tabs open. When collecting information, this is pretty effective. So I feel that the "news blogger" personality is very suited to this form of multitasking which involves a large volume of information retrieval, organization, and dissemination in a new and hopefully more digestible form for others.

But say I don't want to do that. I've done enough information regurgitation the past 17 years of school. When I want to be creative, I need to focus. Well, maybe not focus to the degree of zoning in on what I'm working on and completely blocking everything else out, but I need some space for my mind to work. It may just be my personality type, though. I'll admit that when in large groups of people where everyone's talking about their own thing, I have trouble keeping up and participating in conversations. I like to keep it to fewer threads, so talking to a few people or having organized discussions isn't a problem. I have a feeling this issue is very common among engineers. Anyway, in order to design something, including more thoughtful writing, I need space. Maybe move to a new locations. Right now as I write this, I'm disconnected and sitting over on my comfy couch away from my usual computer spot. I feel so calm!

A big problem nowadays seems to be kids substituting computer time for social time and outside time. Of course, when the weather's nice (which seems rarer these days, but that's a different story) the outdoors is more inviting. But there's so much to do on the Internet, and it requires absolutely no effort, so lazy kids with busy or lazy parents flock to it. On the Internet, the ratio of people needing to provide content versus people who consume it is very, very low. The Internet makes it mind-bogglingly easy for the same piece of information to be reused over and over (information being videos, articles, jokes, what have you). Laziness never lived in a better era.

I'm not writing to say the Internet is necessarily inherently bad. It has enabled more positive events than I can believe. It helps people build relationships, believe it or not; it helps connect people looking for specific skills and interests; it helps promote many worthwhile causes; it helps keep people informed of things like large political movements (Iran), scams and corrupt practices in our own country (certain "religious groups", big banks--Goldman's name has been brought up a lot recently, and of course, too many government officials).

But let's get real. There is way too much distracting material out there. Too much fun. Too many videos of cute animals, which I won't link to. So many horror stories of people who don't leave their rooms, who don't shower, who die in front of their computers. On the other hand, most of my current coworkers, all of whom are more experienced programmers, are great reminders that it is possible to achieve balance in your life. They show me that it's possible to evade this mental black hole. Maybe living around Massachusetts or New Hampshire makes it easier.

I need to interject here, though. Something that I am unsure about but have been suspecting for a long time, is that people's inclinations will automatically change with age. That is, for instance, as they get older, individuals will necessarily desire an outlet for self-expression, and hence a need to get away from distractions like the Internet, without anyone having to tell them that they should feel this way. So, many of the things we like as kids may naturally change, because we're programmed that way. We want and likely need some distractions when we're young, when we're still forming our opinions and knowledge of the world around us. Will adults regulate their own behavior when they see something's wrong? Will they identify the source of the problem as being the Internet? I very much believe that kids should be disciplined enough so they don't become fatties by sitting in front of the computer all day, but beyond that, is there that much wrong with the Internet in its current form? If humans are naturally able to help themselves--and find the valuable examples that other Internet addicts post on the Internet--then maybe we're OK. We just need to ensure that people actually have something besides the Internet in their lives.

Hmm, but then again, look at how many drug addicts know they are addicts and still cannot be helped. Welp, there goes that theory. (Nah, I actually believe that most people are able to pull themselves out of a rut when necessary. Unfortunately among certain groups, the prevailing attitude seems to dictate otherwise.)

Sunday, June 21, 2009

GraphicsGale, Awesome free sprite editor

The Internet has once again shown me a cool free software product. GraphicsGale is a really nice piece of software to let you edit pixels easily, very useful for DS homebrew, Android, etc.

It's got all the basics: a palette editor, a pen tool for drawing individual pixels, a bucket fill, selections, cut/paste, rectangles and ellipses, and text input. It also has layers, frames, and such for making more involved images. Animated gifs and icon files are only available for the paid version (1995 yen = about $21). But the free version has all the features I need at least. It's much quicker and simpler than using GIMP or Photoshop for such tasks.

I still gotta get used to using layers for everything though. Since I've been an MS Paint user for a long time, remembering to use layers takes some getting used to.

Sunday, June 14, 2009

Personal site versus fun site

Right now I'm waiting for my hosting with hostmonster to expire. I'm sharing an account with my friend Dokyun ( I want a separate plan for to make things a bit more convenient. Hostmonster is a pretty good host, I haven't had trouble with them and their rates are pretty good, so I'll most likely stick with them.

Anyway, I decided to register and put it on Google Sites for now. I somehow feel I don't even need anything beyond that for my personal site. Google Sites is really fast for just making pages, having a decent default look-and-feel, and linking pages together with a consistent template. And this blog is also hosted on blogger and accessible via

Maybe once I get more content I can worry about where to host everything. For now my plan is to have the more boring personal info and rambling type of blog associated with, and to put the fun stuff on Fun stuff includes programs, stories and shared content from other authors, and whatever else. Yeah... best to come up with content before spending too much time deciding how to split the content up between a personal site and a fun site.

In the end, I'm thinking that from the visitor's perspective, a site called "cocosoco" is simply catchier than a personal site named after its owner. That's one thing that becomes obvious to web users, that when content has your real name all over it, it's got to be sober and digestible so real life acquaintances won't be scared shitless and whatnot.