Is there a way to bake materials/textures, that use nodes, into materials/textures that can be used in the game engine? I am using some fairly irregular shapes, and most of the tutorials I have found have been about baking cubes or rectangular prisms, and I can't get that to work with my shapes, or have been about Blender Render. The objects that I wish to bake are pictured below.



It is supposed to be a building, and there are two rectangular prisms joined to make it. The prisms have been aligned face to face and edge to edge so I know there is no gap or anything between them. The same goes for the door and door frame. The top of the larger of the rectangular prisms has a knife project on it so I can easily remove a section of it and add things on the inside of the building. There is nothing inside it yet as I want to bake it first. 

Thanks in advance to anyone who helps, and if there is any information you might need that I have not supplied please tell me.

UPDATE: I tried the solution offered by @pycoder and I got an error saying that there is no active image found in one of my materials. Is this something that is required for baking?
Nothing really changes from a rectangular baking tutorial to anything else except for the UV mapping. Try using "Smart UV Project" to unwrap a complex object quickly, then go through the baking steps.


Add the image texture that you want to bake to in all of your materials (on the object that you are baking).
Setup the bake settings (depending on what you want to bake), then hit the bake button.
Save the baked image.