Saturday, January 30, 2016

Progression update: Unique ships, background redesign

It's been awhile since our last update, but worry not. We've been working on Twelve non-stop, and we've made some notable additions to the game, including adding a ton of new gameplay content, and aesthetic improvements.

First off, the most easily visible change is the background,

which used to look like this:


but now looks like this:


As you can clearly see, it's no longer a repetitive slew of white dots on a pure black backdrop. As you may not see, is the fact that we now have two layers of star backgrounds (with a good portion of them individually and painstakingly drawn manually by me the poor artist) which move at different speeds relative to your ship's movement. This is called parrallaxing, and we've employed it here to show a sense of real depth in the endless void of space.

Another thing we've just recently implemented is the inclusion of multiple music tracks, which you may have heard part of in our trailers and gameplay videos. We're planning on having a multitude of music tracks to go along with you great conquest of the galaxy.

And at last, the most exciting feature that we've been working on is the ship Overclock! (official name pending)

Essentially, each different type of ship will have their own unique ability, ranging from defensive abilities, stealth abilities, offensive abilities, or even a little mix of all of them. However, not every ship is created equal, and the more expensive ships will not only have better stats, but more powerful Overclocks.

To give you an idea of what you may be looking at, take a look at this extremely poorly made and cheesy video which showcases the great Squid and it's ability; Bending all of space-time

At the moment we have 10 unique ships each with their own abilities. But keep in mind that both allied and enemy ships have access to these ships as well. And you may very well find yourself facing a challenge far greater than you expected as a lone enemy suddenly grows massively in size, multiplying it's damage and health stats to unreasonably immense numbers, making what once was an easy target, a dangerous threat.

Just remember, YOU can change the war.

Thanks for supporting Twelve,

-Brendan

Tuesday, November 3, 2015

Twelve has been greenlit!

As of October 31st, Twelve has been officially greenlit by the steam community. We'd like to thank everyone for their support and votes, we're very excited to continue working towards completing this project. Expect updates within the following months, unfortunately school has been taking up a lot of our time so we won't be able to do as much work on Twelve as we'd like.

We have some exciting new features in the works and will be showing them off the moment we finish working on them. So far all our game's testers have loved the gameplay, and we've taken their feedback to improve the experience even more. 

Thank you for following along on our journey, look forward to Twelve coming out on Steam. 


Friday, August 28, 2015

The ships and stations of Twelve

Since our submission of Twelve on Steam Greenlight we've been continuously working on adding content. If you looked closely at our release trailer and gameplay trailer you'll notice there isn't more than 4 ships in the hangar. Since then we've gone over each one and have implemented 10 ships in total, removing or changing some that we weren't happy with. Aswell as adding in 11 more stations, for a total of 12.

With a total of 12 stations, each faction will have now a unique station. That is, until you capture it and make that station yours.


Each station sprite will have a hitbox which matches that sprite exactly, so as long as the ship is not touching the station there will be no collision registered.


As you can see, a smaller ship can actually be inside the center of this station because of their accurate hitboxes.

We've also added in more ships, for a total of 10 ships as of now.


Since we've added this many ships, we thought it would be a good idea to elaborate on the differences between ships, how they'll vary in-game, and how many we plan on having.



Each ship will have different stats, for example, some will be quicker and smaller but have lower hull. Some will be slower, but have high damage and hull. Each catering to different playstyles any player might have. The ships won't all be equals, some more expensive than others depending on their stats and other factors.

The hitbox on each ship matches their sprites, so a smaller ship will have a smaller hitbox and therefore be able to dodge lasers more easily. However, crashing into another ship at full speed deals damage to both the player and the AI. Since the player has more hull, most of the time the AI will be killed and the player will survive, making ramming a viable strategy for offense. The drawback being that the player sustains damage aswell the player being able to ram both enemies and allies, so it's an offensive strategy that's to be used carefully. Of course bigger ships will have an easier time doing this due to their larger hitboxes.

The total amount of ships we plan on having is unclear, but each ship will have their own unique special ability called "Overclock" which gives them a temporary but powerful advantage on the battlefield. We'll be talking about those soon as we implement them one by one, stay tuned for more info and details on these abilities.

















-Brendan




Wednesday, August 26, 2015

Twelve is now officially on greenlight!

Twelve is now officially on Steam Greenlight! If you enjoyed any of the content in this blog, consider voting "yes" to make our game a reality and have it approved on Steam.

Here's a brand new gameplay trailer with a more in-depth exposition of Twelve's gameplay:


Thanks for taking the time to read through our blog, and we hope to keep updates coming about the greenlight and more development.

Friday, August 21, 2015

Drawing: The Falcon

Hey everyone, Brendan here. I'm the artist for our game called Twelve and today I want to share the process of creation for some of the HD art involved with the game. I thought, since I am the artist and since my work is essentially completely visual, that instead of telling you how I did it I would simply show you in a sped up process video.


I plan on going more in-depth about the artistic process if anyone is interested and/or wants to know more details about it. Feel free to ask any questions and stay tuned for more updates.

-Brendan

Wednesday, August 19, 2015

Twelve: Official Trailer



The official trailer for Twelve is finally here! Don't forget to sign up to our mailing list to be notified when Twelve releases. 



Subscribe to our youtube channel for the latest videos and send us a tweet for any questions or comments

Tuesday, August 18, 2015

Projectile Interception

Warning: this post is math intensive so if you’re not interested in math and/or programming you might not enjoy this.

In an earlier post Brendan had mentioned how the AI utilize an advanced algorithm for shooting targets. This post will explain how AI in Twelve are able to consistently land shots when the lasers they shoot have a significant travel-time. It describes the interception algorithm used to determine where the AI should shoot. This is intended to benefit other developers trying to program a similar algorithm for their games.

The math used in this post does not exceed a high school level education (at least that’s the level of education I’m at). It's linear algebra that should be simple enough for most programmers to follow.

When designing an algorithm it usually helps to explicitly state the problem being solved. In this case, we're trying to make AI that can shoot a moving target. This is hard because the shots the AI takes do not travel instantly. For a shot to hit a target it has to be fired towards the target’s future position rather than their current position.

A simple example is the rocket launcher in most first person shooters. Unlike bullets, rockets take time to travel distances. To hit a target the player must lead their shot by a certain distance to compensate for the speed of the rocket. The purpose of this algorithm is to precisely determine the direction a shooter needs to shoot for the projectile to intercept the target.

Given the position of the shooter, the position and velocity of the target, and the speed at which a shot travels, we want to find a unit vector that is the direction the shooter needs to shoot to hit its target.

Here’s a diagram representing an example scenario:


For simplicity we'll assume that the unit of distance is meters and the unit of time is seconds. The blue spacecraft is the shooter and the red spacecraft is the target. The green vector is the velocity of the target. The unit for velocity is meters / second so its magnitude represents how many meters the target will move in 1 second. The dotted line represents all the future positions of the target (this assumes it travels at a constant velocity). We can predict exactly where the target will be after any amount of time using the following relation:


The shooter’s projectile travels at a specific speed, which means the time it takes for the projectile to travel between where the shooter shot from and the target will depend on the distance between the two. In short, the travel time of the projectile depends on the distance it needs to travel. If we know this travel time, we can predict where the target will be after that amount of time, and we can come up with a vector pointing from the shooter to the future position of the target. Here’s a diagram to better illustrate the problem:


Each purple line represents a possible path for the projectile to take. A projectile that travels instantaneously would take the path on the very left. A projectile that travels slower would need to take a path more towards the right to compensate for its slower speed. It’s easy to see that for a projectile of speed x, there's only one possible path that it could take ensuring it will hit the target. Each of these paths has a different length, which means a projectile of the same speed will have a different travel time along each one.

Now we have simplified the problem. We know that we’re looking for the travel time of the projectile so that we can know where the target will be and determine what direction to shoot. The new problem is that the travel time depends on the distance the projectile is traveling. This distance depends on how much the target has moved, which in turn, depends on the amount of time elapsed.

To determine the travel time of the projectile, we will consider the diagram a triangle (3 points):

The first point is the current position of the target. In the example this is at the top left.
The second point is the position of the shooter. In the example this is at the bottom.
The last point is the point at which the hit occurs. This is a point along the dotted line.


This triangle is useful because the length of the right side is the distance the projectile needs to travel. Knowing the distance, we can simply divide it by the speed of the projectile to get the travel time.

Now we have simplified the problem even further. Finding the direction to shoot is the same as finding the length of the right side of the triangle. To find this length, we will use the law of cosines:



Side (a) is the length we are looking for. This is the side on the very right. We will consider the top side to be side (b) and the left side to be side (c). We can see that side (c) is constant; it’s simply the distance between the shooter and the original position of the target. Since (A) is the angle between side (b) and side (c), this is also constant. Since the angle is constant we know that -2cos(A) will be constant. We can simplify the equation by expressing it with the constants:


Side (b) is not a constant size. The length of this side is a function of the time elapsed (as we saw in the very first equation). The length of side (a) is also not constant, it’s a function of the time elapsed. We can express these sides as:



Where (s) is the speed of the projectile, (||v||) is the speed of the target, and (t) is the time elapsed since the shot. We can now express the whole equation as a function of (t):


Now we can clearly see that the relation is a quadratic equation where (t) is the variable and all the other values are constant. Solving for (t) is trivial and it gives us the elapsed time. Since this equation is quadratic there will exist two values of (t), one that's negative and the other that's positive. Since in real life time can only progress forward (at least until the device is complete), we're only interested in the positive value of (t).

Edit: As many readers have pointed out, this is only true if we assume that the projectile has a greater speed than the target. If the speed of the projectile is less than or equal to that of the target, the algorithm must be extended to handle each of the two new cases.

Once we know the elapsed time we plug it into the original equation:


This will give us the future position of our target. Then we can simply subtract the shooter’s position from the target’s future position to get a vector pointing towards the target’s future position. Normalizing this vector gives us the direction the shooter needs to shoot. Assuming the shooter can shoot in that direction, and that the target’s acceleration remains null, after (t) seconds the target will be hit.

Here is an example of an implementation in C# straight from Twelve’s codebase:



That concludes the explanation of the interception algorithm used in Twelve. Since the direction of the vectors themselves is not too relevant and we're mainly focused on the length of the sides of the triangle, if you’re really clever this algorithm can easily be extended to function in a 3D environment. Hopefully this helps other programmers struggling with a similar problem.


-Michael