Friday, June 23, 2017

Cosmoteer 0.12.0 -- Missiles, Fires, and more!

This past Wednesday I released live to the world version 0.12.0 of Cosmoteer, and oh boy was this a big release! It's got new weapons, new defenses, a new game mechanic, and some great user interface improvements.

Missiles

Probably the most exciting new feature is missiles. Missiles are long-range homing weapons that do high damage in an area-of-effect wherever they hit.




Unlike the other weapons, which require line-of-sight to their target, missile launchers can be safely tucked away on the sides of ships, thanks to the missiles' own homing and obstacle detection systems.

Similar to the cannons, missile launchers require their own kind of munitions -- that is, "missile parts". These missile parts are manufactured in a "missile factory" and then each missile part is hand-carried by the crew to the missile launcher.


Each individual missile is made out of four individual missile parts, and each crewmember can only carry one missile part, so it takes a lot longer to load a missile launcher than it does to load a cannon.

If you take a close look at the missile launcher itself, you might notice that there are only two possible locations for doors, and they're on the sides of the launcher instead of in the rear as one might expect. The "in-fiction" justification for this is because crew have to be able to reach the missile tubes to load them and therefore the only place the control panel could go was against the back wall. But there's a also a game design reason for this: I like to make different ship modules have various different sizes and door access locations so that you, the player, have to think more about the layout of your ship. I want designing a good ship to be a lot like solving a jigsaw puzzle, trying to get all the pieces to fit right. If all modules were the same size, it would be a lot easier to design a perfect ship.

Point Defense Systems

While very powerful, there is one major disadvantage of missiles: They can be shot down by the new "Point Defense Systems" that were also added in 0.12.0.



Point Defense Systems (PDS) are tiny automated gun turrets. They can't damage enemy ships, but, unlike other weapons, they can shoot down incoming missiles that come too close to them. PDS fire rapidly but are fairly inaccurate, and so it is often a good idea to cluster several PDS together to create a "wall" of gunfire which can shoot down almost all incoming missiles.

A ship without any PDS will be very susceptible to long-range missile fire from enemy ships.

Electro-Bolt

The missile launcher isn't the only new weapon in 0.12.0 -- it also adds the "Electro-Bolt". This is a short-range weapon that fires bolts of electricity. While this electricity does little damage to enemy ships, any systems that get hit by an electro-bolt will be drained of some of their power. As such, electro-bolts are an effective counter against enemy energy weapons (laser blasters, ion beams, and other electro-bolts) and shields (when the electro-bolt hits the energy field it's treated as-if it hit the shield generator itself), but not effective against projectile weapons like cannons and missile launchers.


Fire

Version 0.11.4 added a feature where reactors and some other modules would cause collateral area-of-effect damage when destroyed. 0.12.0 extends this feature such that these modules also often start fires on the ship when they are destroyed. Additionally, cannons can also cause fires when their super-heated ammunition rounds are able to penetrate inside enemy ships.


Once a fire starts, it will continue burning until the module that is on fire is destroyed or the fire is put out. While crew can still walk through fiery areas, they do so much slower than normal and, worse yet, have a chance of being killed.

If a fire is not put out quickly, it is likely to spread to neighboring rooms. Fire spreads through open interior spaces and doors, but it cannot spread through walls or armor, or over exterior structure. Because fire will spread through doors but not walls, it may not be such a hot idea (pun intended) to put doors everywhere you can, because you will be helping fires spread faster.

In order for your crew to put out a fire, your ship must have a Fire Extinguisher, preferably one close by to the fire.


Your crew will automatically go pick up a fire extinguisher, bring it to the fire, and use it to put out the fire. Fire extinguishers only have limited use, so it can help to have several fire extinguishers handy to put out big fires.



Conveyor Belt

A Conveyor Belt is a transportation system that helps crew move around large ships more rapidly. The conveyor belt moves only in one direction, and as long as a crewmember walks in the same direction as the conveyor belt, they will move 50% faster than normal. But if the crewmember walks in any other direction, they will go at only 1/4 their normal speed.


Because a conveyor belt only helps movement in one particular direction, it is not generally advisable to put them in 1-wide corridors, because any crew returning down the corridor will be slowed down to 1/4 speed, as well as impeding the speed of everyone else trying to go the "correct" direction. Conveyor belts are however often great for ships that are large enough for double-wide corridors, so that one side can travel in one direction and the other side can travel in the opposite. Crew are generally pretty smart about pathfinding and will almost always use the correct side of a double-wide corridor.

Because crew are pretty smart about picking the fastest path to get from point A to point B, you can also use corridors as a form of "indirect control", influencing the paths that crew will choose to take to and from their destinations.

Aesthetic Armor Pieces

For the past six months or so, Cosmoteer has had a little 1x1 triangular half-sized armor piece. Since it's half the size of regular armor, it doesn't have great protective value, but it's nice when, for aesthetic reasons, you want to make a ship with semi-rounded corners or diagonal edges. Version 0.12.0 adds several new shapes of armor to give even more aesthetic variety to ship shapes:


The first of these is an even-smaller quarter-sized triangular armor piece that's useful for adding details or for when you want a pointy tip on the front of an odd-width symmetrical ship.

The other two are both 1x2 triangular armor pieces (which are mirrors of each other) that are useful for making gentler or sharper slopes than the 1x1 triangular armor. There's two of them because, unlike the 1x1 triangle, there's no way to rotate a 1x2 triangle so that it looks "flipped" either horizontally or vertically.

Mirror Mode

For a long time, players have been asking for an easier way to create symmetrical ships, generally a "Mirror Mode" that would cause any changes on one side of the ship to be reflected on the other side as well. I'd been somewhat resistant to this idea, simply because the game already had a "copy & paste" feature that supported mirroring when pasting. However, watching videos of the game Navalia, which does have a mirror mode, convinced me that it was a feature worth spending a couple days to make work. And so 0.12.0 adds a mirror mode to Cosmoteer's ship designer, which works with all ship construction tools (including copy & paste!) and is available in both the floorplan designer and the exterior painter.



Mods

Lastly, I want to mention that Cosmoteer now has official support for "mod packages". This isn't actually a new feature of 0.12.0 (it was launched in 0.11.7), but I haven't talked about it yet.

Cosmoteer stores all of its game data inside easy-to-edit text files in its "Data" folder. These text files allow almost all game rules to be tweaked and for new ship modules and weapons to be added. However, until mods were introduced, player-created additions to the game required destructively editing the files in the Data folder. This made it hard to install (and uninstall) mods, and any game updates would erase any changes made by mods.

The "mod packages" introduced in 0.11.7 solved both of these problems. Mod packages are self-contained folders that contain special code to "edit" the base text files in-memory after the game is loaded without actually modifying the files on-disc. Since each mod has its own folder, and the text files in the base game aren't ever actually modified, it's very easy to install and uninstall mods.

Cosmoteer even has its own "Mods Manager" for installing and uninstalling mods and turning them on and off:


Monday, May 8, 2017

Cosmoteer 0.11.4 - A Universe of Particles!

Last week, I released version 0.11.4 of Cosmoteer. Despite only being a minor bump in version number, this release has lots of new stuff! The changelog lists all of the many improvements and bug fixes in this version, but the ones I want to talk about here are the greatly improved visual and particle effects.

In order to realize my vision for how I wanted the visual effects to look, I knew that I would first need to completely rewrite Cosmoteer's particle code, because the existing particle code was both slow and too inflexible. By using some very low-level C# code (utilizing some great new C# 7 features), I was able to create a new particle system that is not only more flexible than the previous version, but it is also much, much faster. The new particle system can handle about 100 times the number of particles as the old system while maintaining the same framerate.

The new particle system has allowed me to create much more interesting and exciting visual effects for weapons, thrusters, and explosions.

The first visual effect I upgraded was for the thrusters:


This is a pretty big improvement from the previous thrusters, which for performance reasons had far fewer particles. (The quality of these GIFs aren't great -- you should load up the latest version of Cosmoteer to check out all the new effects for yourself!)

Then, I upgraded the visual effects for when the various weapons fire:




It's hard to see in the above GIFs, but the appearance of the laser and bullet projectiles has also received a significant upgrade.

Lastly, I upgraded all the various weapon impact and part explosion effects:




(You may notice in that last GIF that, when the reactor is destroyed, the explosion also destroys much of the surrounding ship parts. This "collateral damage" is a new gameplay mechanic intended to make you think more carefully about where you place reactors, ammo factories, and cannons, all of which cause collateral damage when destroyed.)

If you're worried that your computer can't handle all the new particle effects, then fear not, I have a trick up my sleeve! Most of the particles you see above are actually "pre-rendered" as simple sprite frame animations. The sprite animation serves as the "core" of the effect, providing most of the visual punch. On top of the core sprite animation, extra particles (such as debris pieces and smoke clouds) are created to give it more visual interest and variety. But these extra particle are entirely optional and can be turned off by disabling the "Fancy Particles" option in the game settings. With this option turned off, Cosmoteer actually renders fewer particles than in previous versions while still looking significantly better.

Thursday, April 6, 2017

Cosmoteer 0.11.0 -- Fog of War & U.I. Improvements

Last week I released version 0.11.0 of Cosmoteer. It, and version 0.10.7 before it, add some significant new features and improvements to the game's user interface.

The most important new feature in 0.11.0 is the "Fog of War":


If you play RTS games, you are likely already familiar with the basic concept. Your ships can only "see" so far away, and anything farther than your ships' sight range is hidden in the "fog of war". In the above screenshot, the darkened areas of the background indicate areas that are too far from your ships to see.

Currently, the locations enemy ships that are outside of your own ships' sight will still be indicated with pulsing red dots, which you can see in the lower-right corner. These tell you where you need to go to find something to fight, but offer no additional details such as the size or armaments of the enemy.

The Fog of War changes gameplay, because now there's some risk involved in choosing to fight an enemy. It may turn out that the enemy is too powerful for you to defeat, and you'll need to run away. Occasionally needing to run away also has the added effect of making fast and maneuverable ships more important.

Version 0.10.7 also added a "Minimap":


The minimap is a long-requested feature that provides a simple overview of the locations of friendly and enemy ships. Unlike most RTS games which are played on a fixed-size battlefield, the playing area in Cosmoteer has no walls or borders and is infinite for all practical purposes. Therefore, the minimap automatically adjusts to show an area containing all of the ships in the game. The grid in the background always maintains the same spatial distance between lines, and so you can use the grid to estimate distances between ships.

Version 0.10.7 also added what I call the "Miniview":


The miniview is basically a "picture-in-picture" view of a single ship, allowing you to view one ship in the main view and another ship in the miniview at the same time. My hope is that it solves one of the biggest usability problems that Cosmoteer has had up to now, which is that during combat you can't watch both your ship and the enemy ship at the same time without zooming out and losing a lot of the important simulation details.

The miniview also isn't just for show, either -- you can also hover the mouse cursor over ship parts to see their health and right-click on them to target, all without having to move the main camera.

The miniview is customizable, but by default, it is automatically displayed during combat and will show either your ship or the enemy ship -- whichever one you're not looking at in the main view. When displayed, the miniview replaces the minimap, which is generally less useful during combat anyway. Both the miniview and the minimap can be resized as desired to take up more or less space on your screen.

Monday, April 3, 2017

Cosmoteer Gameplay Trailer

Today I made a little gameplay trailer for Cosmoteer! Pretty much my first time putting together a trailer, so the editing and footage is a little rough.


Sunday, February 26, 2017

Cosmoteer 0.10.5 -- User Interface Refresh

Cosmoteer 0.10.5 is out! While there aren't any major new gameplay features per se, the changelist is still among the longest to date!

The biggest and most obvious change is that the user interface has received a complete visual overhaul -- gone are the boring gray boxes, replaced with a spacey blue-and-green theme complete with sound effects and animations.

Before
After
Aside from the visual changes, there are also some small-but-important changes to the actual functionality of the user interface.

First, the player can no longer (by default, although this can be reverted in the settings) simply click on or drag a box around specific parts to select them -- the player must now hold the Ctrl key while clicking. This is because my playtesting showed that many new players would accidentally click on parts of their ship and then be unable to give their ship orders, which was confusing and frustrating for them. By requiring the Ctrl key be held, it's now almost impossible to accidentally select parts without meaning to.

Second, because you can't upgrade your ship until you repair it, the game now only shows either the repair button or the build button, never both at the same time. (When your ship needs repairs, the repair button is shown in the place of the build button.) In some playtests, players got confused about why they couldn't press the build button, and so this change should hopefully make that more obvious.

Lastly, turning on "blueprints mode" is no longer a strange toggle that appears next to the build button after pressing it -- it is now a simple checkbox item in the '...' menu, and the game now remembers your preference.

Saturday, January 28, 2017

Cosmoteer 0.10.0 -- Bounty Hunter 2.0 and FTL Drives

Yesterday, I released Cosmoteer 0.10.0.

This is a big release, and it features a ton of little improvements along with two big, related features: a revamped "2.0" Bounty Hunter game mode, and F.T.L. Drives for ships.

Bounty Hunter 2.0

For about the past year, the standard mode of play, "Bounty Hunter", has been pretty simplistic. You, the player, start with a single ship and destroy enemy ships in the immediate vicinity to earn money which can then be used to upgrade your own ship or purchase additional ships. As you destroy enemy ships, additional enemies spawn nearby, and as your own ship or fleet increases in power, the larger, more powerful enemies swill spawn as well.

This simple kill-reward-upgrade-repeat loop has been fine for testing and iterating on the core ship construction and combat gameplay mechanics, but it honestly wasn't very engaging for the player. Killing an endless stream of ships over-and-over again in the same location with little choice gets repetitive really fast.

Bounty Hunter 2.0, while not solving all of the issues of Bounty Hunter 1.0, seeks to create a much stronger foundation upon which further improvements can be built. Instead of playing in a single location with an unlimited supply of respawning enemies, the game is now played across a large galactic map:


Each location in the galaxy map (the green icons) has only a handful of enemies, and they don't respawn as you destroy them. Instead, once the player destroys all of the enemies in a location, they must move on to another location. Each location has a small colored "shield" icon that indicates the strength of enemies present there:


In Bounty Hunter 1.0, the game itself determined the difficulty of enemies that the player would face, which meant that for many players the enemies were either too easy or too difficult. This new system gives the player a degree of choice in what strengths of enemies they will face, and lets the player pace their own difficulty curve.

More importantly, this new galaxy map now provides a strong foundation on which more gameplay can be added. In the future, as the player explores the galaxy, they will encounter space stations to trade with, pirate bases, asteroids to mine, vessels in distress, and more. These features will be added to the game over time as they are developed.

The galaxy map itself is procedurally generated, usually with 4-6 solar systems full of planets and moons. Each location is "attached" to a nearby planet or moon, which then appears in the background during gameplay to give visual variety and a better sense of location. The planets, moons, and stars themselves are procedurally generated using Perlin Noise. Blue, red, and yellow nebulas also abound in the galaxies, which determine the color of the background during gameplay.

F.T.L. Drives

In order to move from location to location within the galaxy, the player must construct at least one F.T.L. (Faster Than Light) Drive on their ship. Once constructed, the FTL drive allows the player to perform jumps to other locations.



Jumping, however, is not free. F.T.L. Drives use a new kind of "fuel" resource. Like credits, fuel is earned from destroying enemy ships, and then it is spent to perform an F.T.L. jump. The amount of fuel spent is determined by the distance of the jump, the size of the ship(s) making the jump, and the efficiency of the ship's F.T.L. Drives.

Efficiency is a new concept in Cosmoteer that determines how much fuel is used when an F.T.L. jump is performed, and its gameplay purpose is to make the number and placement of F.T.L. Drives on a ship a strategically important decision. When adding an F.T.L. drive to a ship, the game displays a green/yellow/red overlay indicating which areas of the ship are close to an F.T.L. drive (green) compared to which areas are far from one (red).


The farther (more red) areas greatly increase the amount of fuel need to perform an F.T.L. jump. And so to minimize the amount of fuel used, the player will want to place multiple F.T.L. drives around their ship in a variety of locations, making as much of the ship green as possible.

If the player ever runs out of F.T.L. fuel, they can purchase additional fuel for credits, but doing so is extremely expensive, and so it is almost always preferable to improve the efficiency of one's ship.

Because the amount of F.T.L. fuel earned from destroying enemies depends on the size of the enemy ship, as your own ship(s) grow in size, it becomes much less cost-effective to battle enemies that are smaller and weaker than yourself. (If you spend fuel to jump a very large ship to a location with small enemies, it is unlikely that you will earn enough fuel to recoup the fuel that you spent getting there.) My intent when balancing fuel costs vs rewards is that a ship with 75+% efficiency that fights ships its own size will generally break even on fuel.

Saturday, August 20, 2016

Cosmoteer 0.9.7 - Customizable Controls & More!

Yesterday I released Cosmoteer 0.9.7. There's not much super exciting in this release, but it still has a couple notable improvements worth talking about. (Don't worry, I'm hard at work on some big gameplay improvements, but I'm not ready to talk about those yet because I'm still figuring out what exactly those will be!)

Customizable Controls

I love PC games, and one of the reasons that I love PC games is because, at their best, they're very customizable. But it really bothers me when a PC game (frequently ports of console games) lack what IMHO are pretty standard PC gaming features; things like borderless window mode, support for computers with multiple monitors, support for high-resolution displays, triple-buffering, and good alt-tab handling, all of which Cosmoteer does well. But there's one standard PC gaming feature that Cosmoteer hasn't had (which I've been a bit ashamed about, as an avid PC gamer), and that is customize keyboard controls.

Until now!

Cosmoteer now lets you customize pretty much every control in the game. Want to change the hotkey for opening build mode to Shift-B? You can do that! Want to set Q as a shortcut to select the Crew's Quarters in build mode? You can do that! Want to make shift-tilde-apostrophe act as a left mouse click? Well, you're insane, but you can do that! There are currently 134 different actions that can be assigned to keyboard keys or mouse buttons, and each action can have two different key/mouse button combinations set to it.


Customizable controls are great for those of us who really like to personalize our gaming experiences, but they're also really important for making the game accessible to people who have physical disabilities; customizable controls allow them to tailor the game's controls to their own abilities so that they can still play and enjoy the game, even if the default setup doesn't work for them.

Oh, and also, by popular demand, WASD is now supported by default (in addition to the arrow keys) as a way of panning the game view. (And some existing shortcut keys got moved as a result.)

New Main Menu Design & Layout

The Main Menu has received a bit of an overhaul:


Now, the most-commonly-used options (New Game, Load Game, and Exit) are at the top of the screen, while lesser-used options are at the bottom. The primary purpose of this change is to create more room for options to be added as the game expands. I've already used this newfound room to add a "Community" button, which takes you directly to the online forum. Eventually I may add more options, such as multiplayer and mod settings.

Multi-Language Technology

Until this release, most of the text displayed by the game was written directly into the game's source code. This worked fine while the game was in the prototype stage, but it made it impossible to translate ("localize") the game into other languages. So I spent a couple days building a system to allow all of the game's text to be loaded from an external file, which can then be translated into other languages. While currently the only included language is English, it's now possible to translate the "en.txt" file into other languages and simply drop them into the "Data/Strings" directory. The game will automatically detect the additional languages and allow the player to switch between them in the Settings menu.

Here's an example of what the "en.txt" file looks like: