Monday, August 17, 2015

How it's made: Sound effects

Sound technician kicking in, this post is going to explain how the sound effects are created in Twelve


Sound effects are created using a base sound, usually a weird sound coming from someone's mouth, and adding onto it audio effects such as flangers, phasers and many more. The raw sound is imported into Ableton Live 9 and then those effects are added and tweaked until a desirable game-like sound effect is created. Finally, the sound effect is exported into a .wav file and sent to the code monkey.


Here’s an example:


I will attempt the make a laser sound effect. Keeping that in mind, I record a sound that very roughly resembles the sound a sci-fi laser might produce.



This does not sound very much like a video game quality sound effect. To change this, I add a Frequency Shifter with a low frequency oscillator. This allows me to shift the frequency down to 68 Hz and add a square wave oscillator at a rate of 1/16 bpm. In addition to the Frequency Shifter, I add a phaser and reverb to the sound, which makes the laser sound more lively. Since this is going to be a low frequency laser sound, I add an equalizer and filter off the high frequency noise and clean out the sound. Finally, I add a compressor to amplify the sound.




Basically my role is to make funny sounds with my mouth until someone approves of it. Keep an eye out for a future post where I explain how the soundtracks are produced.

-Sami

Monday, August 10, 2015

How enemies and AI work in Twelve

The AI in Twelve is a crucial part of the game, perhaps one of the most important aspects beyond the very ship you control. These non player characters are programmed to be either ally or enemy to the player, however all AI behaves identically in Twelve.

    (Pictured here is the player [purple] being attacked by enemy AI [blue] in their sector)

In this game there's an emphasis on equality between the player ship and the AI ships, which means they had to appear to be as powerful as the player. Now of course there are differences, notably the player's HP is greater than the AI, that was necessary for the player to be able to play and survive for longer periods of time than the enemies. Which lends to the fun of the game and the conquest of other factions. 

Territory is divided by 12 different factions, each controlling their own bit of space. The sectors at the edge of borders are potential targets for invasion, this will occur every 6 seconds where one of these sectors will be invaded and taken over by it's rivaling faction. 


The image above represents the possibilities for the middle sector to be invaded, it is only affected by the adjacent sectors and itself. The percentages in the image determine the possibility of the middle sector to be changed or to remain to that colour. Since there are two blue sectors adjacent, there's a 20% chance this middle sector is invaded by blue. However there are two red sectors adjacent aswell as the middle sector being red, which adds up to 80% chance of the sector remaining under red's control. All this allows for the universe to function and simulates the constant warfare between the factions. 


AI are programmed to constantly scan ahead and detect the nearest object, they then calculate and adjust their trajectory to avoid collision with said object. To shoot, they will pick a random target that is not of their own faction and pursue it until that ship dies or they do, if no targets are found they wander aimlessly in their original spawn area. AI will spawn randomly near the player offscreen, and de-spawn when too far from the player. The game makes sure there is always the right amount of AI that spawns by comparing the amount of currently present AI and spawning new ones when the player moves around. They will most likely be the same colour as the sector you're in, however some will spawn as surrounding sectors' colours. Similar to how territorial invasion works (as explained above), the colour of a spawned AI depends on the current and surrounding sectors, with possibilities varying by amount of a certain colour. 



AI will generally try to avoid the player and any other ships, they will shoot at their chosen target until they get too close, then they will turn back around to a further distance before beggining to shoot once more. They will begin to flee when their target chases them to avoid collision and being shot, but return to shoot them once their target faces another direction. When in a sector that belongs to the player's faction, also known as a "safe zone", the AI that spawn will most likely be of the player's faction. Which means they will be allies. Allies will act exactly the same as enemy AI except they will not target the player and cannot hurt the player by shooting. They'll instead aim for enemy AI, and in the end aid the player significantly by both being an alternate target and disposing of enemies aswell. 

The AI utilize a very precise algorithm which takes into account it's target's speed and the speed of it's laser to ensure a direct hit. That algorithm is mostly comprised of linear algebra, a bunch of boring numbers and lines that were bred from the blood, sweat, and tears of the poor, poor programmer. 

Ultimately, the AI is programmed to shoot enemies while being smart enough to avoid collisions. This makes them a threat and even challenging for the player to defeat, but still useful when the AI is allied to the player. The collision avoidance, targetting system and territorial invasion of AI all contribute to the challenge of Twelve, and allow the player to feel the true conflict in the universe while capturing territory of their own. 

We hope to have you explore Twelve's expansive universe soon. 

-Brendan

Sunday, August 9, 2015

Alpha gameplay video


This is a video showing off many aspects of Twelve including: 

-Combat
-Capturing stations and control points
-Mining
-Ship purchase
-Pilot commissioning

~Enjoy!

Thursday, August 6, 2015

Welcome to the World of Twelve!

Welcome to the development blog for the indie rogue-lite space conquest game, Twelve! In this game, you play as an army exploring and defeating enemy factions in the vast emptiness of outer space, purchasing and upgrading different spaceships as you progress.

Twelve features a galaxy under constant war, with many features such as factions capturing bases from each other without remorse. The enemy ships in this game are extremely smart, and make every attempt to outmanoeuvre and defeat you.

This blog is here to help you, the reader, understand and be up to date on all of the latest developments in the game, as well as respond to any questions you may have. On the part of the developers, we wish you good luck conquering the galaxy!

-Ariq

How Twelve was Developed

Lead artist and game designer checking in!
I thought I might provide a bit of info about our development process and how we came to develop Twelve. I have been in constant contact with Michael (programmer) and unfortunately he won't be able to write many if any blog posts at all because he's too busy actually working on Twelve.

Twelve started out as an idea for a multiplayer space shooter two years ago in 2013. Michael had started coding a long time ago and by then we were already coming up with wild video game ideas, little did we know, video game development is very difficult. We had definitely already tried and failed to make other games, we were simply too inexperienced and never planned ahead. Twelve seemed like a relatively simple concept, a pixel art style and simple mouse controls with thrilling competitive multiplayer action. That was the problem though, multiplayer. From what I understand (as someone who never codes), networking is a very difficult task, not to mention the cost of servers involved. We created 10 different ship drawings and drew planets and asteroids. All we did was make the ship fly around and shoot, and then Michael lost interest.


Since then we've attempted even more projects, not all games, but when they were games I would gladly provide the artwork needed. We've even experimented with mobile applications, and earlier this year had actually published our very first game on the google play store. It was a very simple game that had tons of art and very little gameplay, but we finished it and published it and that was the most important part. Now I'll refrain from actually naming it for fear of being associated with that (monstrosity of a) game. Though we may come back to mobile games in the future, our focus turned to one or two other projects and ideas before Twelve again crossed our minds.

The issue on our previous attempts was always that our games didn't feel fun, and that is why Twelve is different than those failed projects. Michael had decided to use the same old ship designs from the original attempt and make a very simple functioning demo, where all you could do was fly around and shoot an enemy ship. This got him thinking about computer artificial intelligence, and how he was going to code NPCs, which, with greater experience and skill than before, he accomplished quite well. This new AI allowed the game to feel fun, the player controls a ship with their mouse and clicked to shoot, and the AI's behaviour allowed for a great experience.


Since we finally had a small bit of fundamental gameplay done that actually felt fun, we decided to move the project forwards, but this time we wanted to finish it more than ever. We both knew that we needed to make a plan in order to organize our ideas and make our project doable. These projects always seem to be much more difficult to complete than previously anticipated, largely due to our overlooking details that should not have been forgotten.

This time we set more limits to our vision, and even though it's all great and wonderful to have crazy ideas and big dreams, when it comes to development it's better to take it one step at a time. So we decided to limit our game to singleplayer only, and attempt to make good use of our fun gameplay mechanic while figuring out what kind of game we wanted. When we saw that we could make our AI just as skilled or even more so than the player, then came the idea of having them be on some sort of "even ground". Quickly we formulated the concept of and open world game, then we decided this would fit well in a conquest styled game. We wanted to make the enemy ships as alive as the player is, and so the concept of territory control was a perfect way of implementing this.



We decided to have 12 different races that were all disputing over territory, each owning a part of the universe and each capable of growing their territory. The NPC races will automatically capture each others' sectors at random intervalls, each time with certain odds of success depending on multiple variables.

We are now around 2 months into development, which we're hoping to get through greenlight on Steam. And we're very excited to have a very fun game that we didn't immediately give up on. We now have a team member making music and another for additional design input. The music so far is phenomenal and the game details have been thoroughly thought out, and we still plan on adding more.

Stay tuned for the eventual release of Twelve on Steam.

-Brendan

You can follow our Twitter account for screenshots, gifs, and videos and any questions you may have.