Sunday, April 6, 2014

Closing Days in Korea

I'm starting to wrap up things here in South Korea. I've been working here as an English teacher for 6 and a half years. Now my wife and I are moving back to America in a couple of days. I'm going to miss it here, but I'm looking forward to exciting new challenges in America. I want to start a programming business and do a little freelancing on the side. I've started Squared Programming and I'm working on a game Auxnet: Battlegrounds.

South Korea is a very nice country. I'd recommend it to anyone. Don't worry about North Korea. It's very safe here. South Korea is a very wealthy country and you can find just about everything that you'll need here. I've been living in Anseong which is a small town about one hour south of the capital. If you have any questions about teaching English here, just let me know. I only have one regret and that's that I didn't keep a travel blog, but I still have a lot of teaching materials that I'd like to share. I had been working at the same private English academy my entire time here. If you can find a good school to work for, you'll love it here. I have heard and seen other teachers have problems so it's important to ask good questions before you accept any position here.

Right now, I've been putting a lot of time into developing my 3D game engine and also my AI system. On the plane ride back to Maryland, I'm sure that I'll do a lot of programming. I'm working with a good team and we want make a nice professional quality game. I'm working on the website now and hope to have it set up within the next few days. You can follow our progress. I have a Google+ page, a YouTube channel and I'm also on Twitter now. We really want to succeed so just following us and helping us get out the word will help us a lot. I really want to get 50 followers on Google+ and 50 subscribers on YouTube. I think if we can just get that many, things will start to snowball and our popularity will really increase.

Tuesday, March 11, 2014

Building My AI Engine

These days, I've been turning my attention towards AI. In the past, I spent so much time working on graphics components of the engine in the past, that I've never put the effort into building a good AI system. When I was developing Genesis SEED, I wrote a complex AI system, but it was too unwieldy and complicated so I decided to start from scratch when working on the AI system that would go into Auxnet. It’s still in its beginning stages but in the long term, I’d like to release the AI system as an open source project. I want to build a general AI framework that will work on many different game types.

How and why do I want to make a general AI framework? I want to build this game engine in a modular way to allow for future expansion. To achieve this modular approach, the code will naturally take a framework with attached plug-ins design. I know that AI is very game specific, but what I want to do is provide a collection of techniques that the AI agents can have to complete their task. After that, the main architectural design issues will come down to how to separation of responsibilities between the AI engine and the game engine. I'm not an AI expert, but I have experience in designing architectures and feel that I'll be able to put together a good system.

The AI system will have three main parts, the engine, worlds, and agents. The engine holds the worlds and is responsible for initialization and the destruction the system. Multithreading support will also be handled in the engine. Worlds contain agents and also the navigation system and world geometry. Keeping separate worlds will an application to use one AI engine to process the AI for agents in unrelated and unconnected areas. Agents are the actual AI entities and are connected to an entity in  the game engine. There is no direct link between game engine entities and AI system agents in code so the agents will need to store copies of some of the the game engine entity's data such as position and health information. I've given a very simple UML diagram below with some of my current thoughts. This will grow by leaps and bounds by the time end of the project.


I want to model my AI system like other middleware SDKs. I've used many different kinds of middleware including, graphics APIs, physics SDKs, networking engines, and scripting languages. Of all of the different middleware libraries that I've used, which system is most like the AI engine that I want to build? Believe it or not, this system will be most similar to a physics engine. Think about it, in a physics engine, first, you should set up the world or scene, then add actors and physics bodies. After that you run the simulation, checking to see the new position and orientation of your actors and then updating them in the engine. An AI engine in many ways is quite similar. First you have to setup the world and tell the AI engine how the level is laid out and what potential colliders and dangers are in the world. Then you should create AI agents that are connected to game entities to populate the world. The AI engine will run the simulation, and then the entities in the game engine should check their AI components to see what state changes have been made. That's the entire system in a nutshell.

For this to work, I'll need a very simple interface. The AI engine will be responsible for all decisions. It will tell the game entity to do simple task like move forward, turn, or shoot, and then game engine should do task and tell that AI engine when it has completed the task. The task that the AI engine will relay to the game engine should be simple enough to not need any complex intermediary AI. For example, if the AI engine returns a "go to" command, the entity should be able to go to that point by walking in a straight line and without worrying about path finding. For complex paths, the AI engine should give a series of “go to” commands until that agent has reached its destination. In this way, the AI engine will be the brains and the game engine will act like the nervous system and make the agent's body move. So the game engine to receive instructions from the AI engine, and for the AI engine to receive position information and whether or not the instruction has been completed. This information will not need to be sent back and forth every frame, but either as needed or at set regular intervals as decided by the developer. Game engines that used a component-based entity system can add an AI component to process instructions from the AI engine and to pass on the entity's location information to the AI engine. The game engine should also be able to send events to the AI engine that are not directly tied to a specific entity such as level events, so the AI agents will be able to respond to those events as well.

There's no way I'll be able to program all types of AI algorithms so the AI engine will need to not only be flexible but expandable. I'll have to build it so it can take add-ons written in either C++ or in scripting languages such as AngelScript and Lua. The add-on system should not be limited to giving support for different types of levels and path finding. There should be a way to make add-ons that will affect how decisions are made so there should be add-ons for using Ad-hoc rules, finite state machines, behavior trees, neural networks, and so on. Once a large library of add-ons has been created, building complex AIs will be a matter of choosing the proper base AI architecture (Ad-hoc rules, finite state machines, etc), adding skills, and performing some game specific tweaking. These are my AI goals.

To help me build all of this, I've created a small 2D game with a little robot that should navigate through a simple maze. I'll develop this demo more and more and post updates on my blog and on YouTube.


Thursday, February 13, 2014

Indies--Stop Treating Your Ideas Like Classified Secrets


I'm an aspiring game developer. I've been programming for many years, I've gotten a degree, and I've worked professionally doing project management and IT security for the government, but I'm still working on my game development breakthrough. I've learned quite a few things working on various indie game development projects though. One of the most important lessons that I've learned is indies shouldn't be concerned with keeping their game ideas secret and that it's much better when indies let others know about their ideas.

Secrets aren't Necessary

I know what many of you are thinking now. "What do you mean? If I don't keep my idea a secret, some big company is going to steal my idea." Well I'm sorry to break this to you, but no one wants to steal your idea. Even from a business point of view, it doesn't make sense to steal your idea. I found a very interesting article over at Kotaku.com that estimates the budgets of some AAA video games. The cost for some of these games are astronomical. For instance, Borderlands 2 had a budget of $30-35 million and Star Wars: Clone Wars: Jedi Alliance had a budget of $15 million. Even if part of the cost went to marketing, those are still huge numbers and they're not even the most expensive. Call of Duty: Modern Warfare 2 had a budget of $200 million which includes marketing and global distribution. Why would a large company want to sink millions into a design by an unproven developer's idea. Even if a large company or maybe even another indie studio does steal your idea, what are they really stealing? Maybe just the genre and some game play elements. Unless the idea is extremely simple, once they mix in their own artistic and designer creativity, they'll end up making a very different game.

Another reason why people don't want to steal your ideas is related to why they want to make games. Many have decided to go into game development because they initially had a game idea that they wanted to make. This is exactly what inspired me. Now I have many game ideas that I'd like to implement. We don't want to make your ideas, we want to make our own. If you only have an idea and want your game made, try to find a developer willing to do it. They'll make it for you, but only if you give them money to do so.

But some may point out some examples of stolen game ideas. An easy example of this would be Flappy Bird and its copies like Flappy Bee and Flappy Plane.(npr,org) You can look at an even older example. The popular game Street Fighter II had many clones. One was called World Heroes. (Kotaku.com) But even though these games were copied, there is one interesting commonality. An unproven idea was not copied. A complete and successfully made game was copied. This is a key point so I'll repeat it for emphasis. A complete and successfully made game was copied. An idea has very little value. You may think it's good, but until it has been completed or at least play-tested, there is no way of knowing if those ideas will translate into a good game. A game idea gets value after it has been implemented. Don't overestimate the idea and in turn underestimate the work of the programmers, artist, level designers, and all the others who work to make the idea a reality.

When I look back, this "ideas are like gold" mentality has cost me and my team a lot of problems. Probably the biggest issue with it was it actually stopped us from finishing any games. This would always happen. We'd start making a game with a nice story and suddenly one of us would say, "this could turn into a really good game, but we don't have the resources to do it justice. Let's make a different game first to make some money and then we'll go back to the original game." Eventually we'd get so enamored with our "quick development" game that we'd stop making it as well because "it's such a good idea, we wouldn't be able to do it justice with our limited resources." We had one game called "Cybernetic Dawn" that had levels, AI, music, menus, etc. It wasn't the greatest game, and the AI needed work, but we were so worried about the idea, that we couldn't see that we just needed to polish and release it.

Sharing is Beneficial

There are more benefits from sharing your ideas than there are disadvantages. As I said before, at one time I was fixated on ideas and kept them secret, but as I've gotten older I've realized something. We are just indie developers and indie developers need to think and act like indies. Community support is needed to stay focused and motivated. Once people know about your ideas, you'll feel pressure to finish it. This is one of the reasons why I feel it's necessary for indies like myself to talk about our games. Motivation can be a project killer, but if you have people that are following your project, their energy and positive comments can help. Interacting with people and talking about your game will keep you interested in finishing it.

Also, earlier I said that developers will only work on your ideas if you pay them. While this is true for professionals, some indies and hobbies may be willing to help you if you show progress. If you have a website, screenshots, and are actively talking about your game on forums, you may be able to find good people that can support you. However, if you go on a forum and ask people to sign a NDA (non-disclosure agreement) before you let them know your big idea, you won't get any good responses. People will want to know more about the project before committing to it.

Another big benefit is sharing early means advertising early. The best games still need marketing and advertising. Imagine there's a person who has been following your project for months. Later you decide you want to try Steam Green Light or crowd funding. Well, if you've been telling people about your project, you'll already have potential supporters. If you work hard to build a following for your game, while you're developing it, when it comes time to release your game, your fans will have been waiting for it. This will greatly increase your chances of success. These days crowd funding has also become a valuable tool for developers. Early advertising by telling people about your game can help you.

There aren't any good reasons for indies to hide their projects. Being secretive about your projects will do more harm than good. It would be much better to be open about your projects and get help from the development community and from your potential fans. This will improve your chances of being a success story.

Tuesday, February 11, 2014

Greetings

I've decided to start another blog that'll be separate from the other information on www.squaredprogramming.com. The squaredprogramming.com website deals more with technical articles, my current development projects, and my freelancing and consulting work. I thought it would also be nice to have a blog that's dedicated to my just my thoughts on game development, business and technology. I hope to post many articles here and I really want them to be useful to people. Most of the things that I'll talk about will have a game development spin on it, but they should be useful for other ventures as well.