Stacking Layers and Player Characters

   So today marks a landmark development in the game’s 20-day life span (yeah, I know, sounds like I’m exaggerating): I have a controllable character in-game. The hardest part of this, for me, was the camera tracking. For those who don’t know, camera tracking is coding the camera to follow (or “track”) the player. At first I tried using 4 boolean variables for my 4 directions, but that was too complicated. After dinner I just came up with a solution; it’s amazing how food can do that to you. One second, you’re sitting here, staring at a computer, frustrated; the next, you’re coming up with solutions for all kinds of problems.

The controllable player character in-game.

   Anyway, I also added visibly stacking layers. What does this mean, exactly? Well, when you’re working in the editor, the layer you are currently working on will appear in solid color. Layers below appear with a solid dark tint, to visually show that you can lay tiles over them. Layers above appear with a transparent gray color, to show they are on top of the layer you’re currently working on, and also so you can see the tiles you’re adding even if they’re under higher layer tiles.

   As this is an ongoing project, I’m always open to suggestions. Any ideas you can give to improve the editor will be welcomed. I’m sure there are scores of things I’ve forgot to include; I’m only one person. If you want to give XNA a try yourself, you should – it’s a great learning experience. Of course, having a background in other languages is always helpful. Since I worked in VB (I made Frogger and a Mech Assault-Kirby hybrid) and C++ (worked to create a RTS game in the console window..boy that was tough), I picked up C# in a day’s time. But if you’re new, I suggest learning the core aspects of programming first before delving into XNA. Try looking at some basic C# tutorials first; learn the language XNA runs on, then aim for the stars. You can always surprise yourself.

Advertisements

~ by IG on June 17, 2008.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: