Saturday, July 17, 2010

Hypershift Screens and Map Objects

Your first look at the game is today! Finally, I can show you some screenshots. Keep in mind that this is a very early alpha build (not yet playable) and the game may look a lot different than this when it's done. Most likely, though, it won't look that different.

This first pic is the campaign selection menu. First, you choose what difficulty you want to try. The options are Easy, Normal, Difficult, and Expert, and correspond to how many dimensions (from 2 to 5) are available for the entire campaign. More dimensions means more multitasking and keeping track of different types of creeps. However, it also means more towers and other weapons (more on those later) you'll have at your disposal. Once you move the mouse over the difficulty you want, you can select from three different campaign lengths: short, full, or extended. This is how many levels total are in the campaign. Short means a quick, fun playthrough for maximum enjoyment and minimum time. The short campaigns will contain more timed levels, meaning you'll have to make faster decisions and destroy more creeps in the same amount of time. On the other hand, you'll start off with more money. By contrast, the extended campaigns may involve slightly different strategies, such as having to manage money between levels, making more high-level decisions such as which way to go in your overall galactic conquest, or enduring endless waves of creeps with few resources. At the higher difficulty levels, this disparity becomes a lot more pronounced.

Next up is a screen of the gameplay HUD, as well as a few towers. You can see a dark tower, a light tower, and a gamma tower. In later posts, I'll talk more about what the towers do, their specs and special abilities, and how dimensions affect them.

The subject of this post is to introduce another key gameplay element: map objects. They are fairly uncommon in the tower defense genre, but in this game it will be vital to use all the tools at your disposal in order to triumph.

Map objects are things that can be found in outer space, such as dying stars, red giants, or asteroids. You may begin to wonder what exactly these objects can do for you to help destroy creeps.

Take asteroids, for instance. They can be used to mine for additional mass. Remember from the first post that mass functions as money in Hypershift, and is used to build and upgrade towers. If the current map contains one or more asteroids, for instance, you can build mining facilities (one on each available asteroid) to give you a slight mass bonus. Mining facilities generate mass at a low, variable rate, which can give you a slight edge for that final push, or a lull in high-yield creeps.

One thing to remember about map objects, however, is that they are much more expensive than towers. It's an investment, and one that might not pay off if you can't fully afford it. Most map objects also require a lot of energy to create, so think carefully before building one. Also, you need to consider when to build it, since most of the time you will only have one or two available. After you use up the available map objects, you can't build any more, so it wouldn't make much sense to waste one at the beginning of a level, when you don't really need it, and you barely have enough resources to afford it anyway. You might want to wait until that final, super-tough wave of creeps before giving up so much mass and energy. On the other hand, most of the map objects are permanent, so getting one right at the start of the level, while sacrificing a few extra towers you'd otherwise get from your initial resource allotment, means you get a lot more time-usage out of the map object.

You may notice from the campaign selector screen that there are twelve possible campaigns. This is no mistake. As developers, Green Lightning Software, and its various affiliates, put a lot of time and effort into making quality games for your enjoyment. Some, like Hyperblob, are free. This one, however, will be commercial, so we want to make absolutely sure that it's worth the price, or more. There will also be a free demo, and it will contain a decent amount of play time as well.

Finally, an update as to what I've been working on. The campaign menu is the main thing, as there were many troublesome bugs that seemed to love the campaign menu. I'd fix one thing and something else wouldn't work. It reminded me of those cartoons where a character is trying to keep something from leaking; when he plugs one hole, another springs open. When he plugs that one up, three more begin spouting water. But rest assured, I triumphed and it works smoothly now. Let me tell you, if you don't like challenges, game development is not the career for you!

The tower placement system also took a bit of coaxing in order to work properly. Part of the problem is that the older tower sprites (the boring ones that I drew, lol) were a different size than the main grid. This wasn't causing too many problems in itself, but just made fixing other problems a bit more difficult. Luckily, the game now has excellent, animated tower sprites (I'm truly sorry you can't see the tower animations in the screens, as they're pretty neat). There's also a lot of other effects that can't be seen, such as the stars winking in the background, or the campaign boxes gently fading in and out of view.

The main menu is also finally, miraculously, done. The old animation that sat in the middle of the screen was taking up way too much space and resources, as it was a series of 72 high quality Photoshop renders, taking up around 8 megabytes. Now, after much work on my part, it takes up barely one megabyte and runs very smoothly. It's also no longer entirely an animation, though it might look that way at first. (I didn't post a screen of this as it's quite possibly the coolest part of the game, and I didn't want to spoil it for you. Hey, I have to keep the suspense up somehow!) The "work" involved splitting apart the layers in Photoshop and animating each one separately, then using Game Maker's own collision detection to fire some of the animations. Altogether, the main menu animation has taken more time and work than the rest of the game put together! At least my time and work, anyway, and I've done most of the work thus far.

Last, but not least, was the most pesky bug I've ever encountered in my entire career in software development. The tower tooltips (I call them towertips for short) were being drawn underneath towers and other stuff, which was quite annoying. Once again, I somehow managed to fix the bug and everything works fine now. That was actually the first bug I encountered, and had been there until the very latest version of the game.

Just recently I haven't been doing a LOT of work on the game, mainly because there's a lot more graphical stuff to design, and my limited graphical skills have been basically spent on what's already done. I will get around to it eventually, or have someone else do it for me.

What's left to do now, you ask? Designing the messagebox graphics, the in-game and options menu, fix up the display options (the game will be able to run in fullscreen, fillscreen 800 x 600, or windowed 640 x 480), design the map objects, implement the rest of the towers and get them working, designing the bonus system and other game modes, a ton of level design, and finally, designing the credits. And possibly, based on beta testing, a profile system with automatic game-saving, or just basic game saving functionality. I'm leaning towards using the profile system, as it's more professional and seems to be more and more common in modern games, especially smaller titles.

Stay tuned for more info on towers and unlockables!

Tuesday, July 13, 2010

Hypershift - Engine Nearing Completion

I'm back, folks, with another update. I hope you like good news, cause this post is full of it!

The game engine for Hypershift is nearing completion. What does this mean for you, the player? You'll get to try out a demo sooner than you might think. Let's talk about what exactly a 'game engine' is for those who can't picture a logical machine that makes games work when it's oiled properly and in the right gear.

Most games have a basic set of mechanics (a fancy word for rules) that need to be followed in order for the game to work. For tower defense games, like Hypershift, those rules are fairly simple. Creeps must stay on the path, towers must fire at creeps, and so forth. Now, these rules don't enforce themselves. There have to be systems in place to keep track of everything and make sure it's running the way it should be. These systems are collectively called the game engine.

For example, the wave system keeps track of the creeps, places them on the map or level, and makes sure they don't all enter the map at the same time, which as you can imagine, would be disaster for even an experienced tower defender. It's not exactly an easy job, to be honest. Many a good wave system has cracked under the pressure.

In addition to the wave system, there is the tower placement system, which allows the player to place towers, but also prevents them from being placed on top of other towers, outside the level or map boundaries, or on the path itself. Another system is the projectile system, which keeps track of the bullets, and uses trigonometry (a specific field called ballistics, actually) to make sure the bullets actually hit the targets. Remember, if you fire at the spot that a creep is now, two seconds later when the bullet arrives, that creep will have moved, and the bullet will be way off. Ballistics makes sure the bullet is shot towards the creep's anticipated location, taking into account its current speed and direction. Of course, if the creep rounds a corner just after the shot, the bullet will most likely miss anyway.

That's just a handful of the many other systems involved in a game engine. To put it bluntly, the game engine itself is a lot of work. But once it's done, the rest of the work in making a game is simply designing levels, images, music, sound effects, and fitting it all together into a cohesive experience. Then beta testing makes sure that it's a fun experience, and your game is ready to show to the world.

Whew! You learned something new today. How about that. Game design is a fascinating subject, as is software development in general. Being a software developer, however, I doubt I could ever think otherwise.

Anyway, on to some more juicy game details! (Boo to all you cheaters who scrolled down just to read this part). You've waited over a week, and here's your reward. The next few elements of gameplay.

Since you're probably most curious about the multi-dimensional part, I'll start there. Hypershift doesn't really use five dimensions, as you might have guessed. It's hard enough displaying three dimensions on a flat, 2D monitor. (Although Miegakure boasts that it's a 4D platformer, which I'm quite excited about). Anyway, in Hypershift there are five dimensions, you just can't see them all at once. In fact, you can only view one dimension at a time.

Dimensions add a whole, dimension to tower defense. That is, they add variety and a bit more strategy to the mix, and that is what makes Hypershift unique. Creeps come in several varieties, but all of them belong to one dimension or another. Now, they can be seen in any dimension but the one they belong to. Confusing? Here's an example...

You're looking at the light dimension. Some dark-colored creeps begin to trundle nonchalantly down the path. You can see them, of course; they're from the dark dimension, so here they stick out like a sore thumb. If you were to swap visors and change to the dark dimension, however, they'd disappear. That's because, well, they're the same color as that dimension -- black. Starting to get the picture?

Swapping dimensions efficiently will comprise a good deal of gameplay. It also adds an element of strategy not found in other TD games. Do you stay in one dimension long enough to kill all the creeps you can see? Or do you let a few of them survive so you can damage other creeps that are slipping by in another dimension? It's all up to you.

On the other hand, there might be certain towers that can help you out with this...

Ah, but I've said too much for one post. Next time: SCREENS!!

Monday, July 5, 2010

Hypershift - Multidimensional Tower Defense

Anyone out there a fan of tower defense, or TD, games? You won't have to wait much longer. Hypershift, a new commercial game, is coming to PC soon. It is currently under development by Green Lightning Software (primarily myself) and Q-Soft, Incorporated (primarily my brother), and this blog will cover its development phases. Here I'll post weekly progress reports, explain what I've been up to, and in general, let you know how it's coming along. Unfortunately, it'll be a while before a demo is available, but the moment it is, I will post it.

So far, it's about 20% done. There is a lot of work ahead; yet most of it is the easy stuff. The game engine is nearing completion. The tower placement system works well, the HUD is very fluent and responsive (and, I think, looks pretty good for having been made entirely by me). For those who are curious, I'm using the Pro version of Game Maker 8 to develop Hypershift. Most of the work ahead will consist of level design, music and sound choice, licensing, and/or composition (as I am also a composer), and turning all my ideas into sprites and objects in the game, which should be fairly straightforward once the engine is finished.

You want gameplay details? There'll be more to come in the weeks to follow. Right now it's mostly ideas, and they may or may not pan out in actual gameplay. To whet your appetite, I will now tell you about the resource system.

Much like in the Supreme Commander, a massive-scale RTS game, from which the idea came, the resources in Hypershift are mass and energy. It makes sense in an era of technology when the only useful conversions are between those two substances. Plus, I like the simplicity and elegance of it.

Here's how it works - mass functions as money, essentially. You get mass from killing creeps, and you can use it to buy and upgrade towers. You can also salvage unwanted towers for extra mass. Energy, on the other hand, is a little trickier. It functions as lives, resources, and tower efficiency, all at the same time.

Basically, if nothing is happening, your energy output will stay at 100%. When towers start firing, they use up energy at different rates. However, energy recharges at a low, fixed rate, so assuming all goes well, you'll gain it back at some point. On the other hand, each creep that makes it to the end is automatically transported back to the start. This transportation uses up a lot of energy. If your energy falls below 50%, your towers may become less efficient, depending on how much energy they require (they will fire less often, do less damage, and so forth). If this goes on long enough, and your energy drops to zero, you lose.

There's a lot more to it than just resources, however. There are a lot of different towers you'll have to choose from, as well as some other goodies. In addition, the multi-dimensional aspect adds quite a bit to gameplay. I'll talk a lot more about that in later posts.

As far as development goes, I've been going crazy on it the past few days. It jumped from 0% to about 5% in a day, then to 20% over the next couple days. There's only been a few major problems thus far, and I've solved most of them. My remaining time off tomorrow will be spent trying to solve those problems, and get more towers made. I only just added the use of Game Maker's inheritance system (an object-oriented concept) and it has worked great so far.

My main problem is the title screen animation. It took me 6 hours, and it's quite large. There are 72 individual sprites, each one a high quality Photoshop render. The trouble was getting it to animate in the game at a decent speed. It looked great, but the resource footprint was far too high, surpassing that of some finished games with only its main menu and that animation. So I dumped it, then threw the images into a Windows Movie Maker project and gave them all the smallest time slice available, a measly 8 FPS. It's animating and takes up barely 2 KB, but I'd like it to look a little less choppy than 8 FPS. That's terrible even for a low quality animation.

Next in the lineup of problems needing fixed is the tooltips I wrote a script for. They won't behave like they are supposed to, being drawn on top of everything else. I've changed the drawing depth but it does no good. It seems to ignore the depth and the things that get drawn first end up on the bottom, the very problem that the depth variable is there to fix.

Finally, the tower placement system is a bit glitchy. That's likely because the towers are 18x18 while the rest of the game uses 32x32 sprites and grids. However, I'm perusing and sampling from a tower defense games guide when necessary, which so far hasn't been much. It helped a lot with the bullet system and ballistics calculations, but the tower placement system is a bit lacking, mainly because the guide's code is hard to adapt to what you want. I've patched things up the best I could, and redesigned part of the placement system that didn't quite work the way I was using it.

If you have an idea for the game, if you want to know more about it, if you like what you see, or even if you don't like it, feel free to shoot me an email. I am usually good about replying quickly to emails, especially since I receive so few of them.