Jump to content

  • Log In with Google      Sign In   
  • Create Account

Aurioch

Member Since 19 Jun 2012
Offline Last Active Oct 02 2014 05:49 PM

Topics I've Started

Got offer to create music for my game, how to respond?

02 August 2014 - 09:54 AM

Hello

 

Few days ago I got a private message on IndieDB from person who was interested in making music for my game.

He/she stated in private message that he/she is interested in my game and looks for some working experience, thus is offering to produce some assets for me for free, while also sending me link to his/her showreel.

 

In my response, I included a question about licence on his music. What I could understood from his/her second answer is:

  • He/she keeps a copyright on all created music and sound
  • I do not pay upfront, but he/she gains royalties from sold copies of game (amount not stated)

 

Those terms seem fine for me, as I get solid background music without paying immediately as I don't have any money, while he/she gets rewarded for his/her work. However, as it's my first time dealing with such things, I wanted to hear thoughts from more experienced people.

 

Also, if we get to the deal, what is usually the correct procedure?

 

Thanks for your time.


I'm saving a monster

04 March 2014 - 07:28 PM

Ok. I honestly though I got out of this phase.

        private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
            List<int> wallX = new List<int>();
            List<int> wallY = new List<int>();
            List<Color> wallColor = new List<Color>();

            List<int> spikeX = new List<int>();
            List<int> spikeY = new List<int>();

            List<int> switchX = new List<int>();
            List<int> switchY = new List<int>();
            List<Color> switchColor = new List<Color>();

            List<int> laserWallX = new List<int>();
            List<int> laserWallY = new List<int>();
            List<Color> laserWallColor = new List<Color>();

            List<int> laserX = new List<int>();
            List<int> laserY = new List<int>();
            List<Color> laserColor = new List<Color>();
            List<bool> isHorizontal = new List<bool>();

            int ballX = -1;
            int ballY = -1;
            Color ballColor = Color.Transparent;

            int exitX = -1;
            int exitY = -1;

            for (int x = 0; x < tiles.GetLength(0); x++)
                for (int y = 0; y < tiles.GetLength(1); y++)
                {
                    switch (tiles[x, y])
                    {
                        case Tiles.GrayWall:
                            wallX.Add(x);
                            wallY.Add(y);
                            wallColor.Add(Color.Gray);
                            break;

                        case Tiles.CyanWall:
                            wallX.Add(x);
                            wallY.Add(y);
                            wallColor.Add(Color.Cyan);
                            break;

                        case Tiles.YellowWall:
                            wallX.Add(x);
                            wallY.Add(y);
                            wallColor.Add(Color.Yellow);
                            break;

                        case Tiles.MagentaWall:
                            wallX.Add(x);
                            wallY.Add(y);
                            wallColor.Add(Color.Magenta);
                            break;

                        case Tiles.GrayLaserWall:
                            laserWallX.Add(x);
                            laserWallY.Add(y);
                            laserWallColor.Add(Color.Gray);
                            break;

                        case Tiles.CyanLaserWall:
                            laserWallX.Add(x);
                            laserWallY.Add(y);
                            laserWallColor.Add(Color.Cyan);
                            break;

                        case Tiles.YellowLaserWall:
                            laserWallX.Add(x);
                            laserWallY.Add(y);
                            laserWallColor.Add(Color.Yellow);
                            break;

                        case Tiles.MagentaLaserWall:
                            laserWallX.Add(x);
                            laserWallY.Add(y);
                            laserWallColor.Add(Color.Magenta);
                            break;

                        case Tiles.GraySwitch:
                            switchX.Add(x);
                            switchY.Add(y);
                            switchColor.Add(Color.Gray);
                            break;

                        case Tiles.RedSwitch:
                            switchX.Add(x);
                            switchY.Add(y);
                            switchColor.Add(Color.Red);
                            break;

                        case Tiles.BlueSwitch:
                            switchX.Add(x);
                            switchY.Add(y);
                            switchColor.Add(Color.Blue);
                            break;

                        case Tiles.GreenSwitch:
                            switchX.Add(x);
                            switchY.Add(y);
                            switchColor.Add(Color.Green);
                            break;

                        case Tiles.Spikes:
                            spikeX.Add(x);
                            spikeY.Add(y);
                            break;

                        case Tiles.Exit:
                            exitX = x;
                            exitY = y;
                            break;

                        case Tiles.GrayBall:
                            ballX = x;
                            ballY = y;
                            ballColor = Color.Gray;
                            break;

                        case Tiles.RedBall:
                            ballX = x;
                            ballY = y;
                            ballColor = Color.Red;
                            break;

                        case Tiles.BlueBall:
                            ballX = x;
                            ballY = y;
                            ballColor = Color.Blue;
                            break;

                        case Tiles.GreenBall:
                            ballX = x;
                            ballY = y;
                            ballColor = Color.Green;
                            break;

                        case Tiles.HorizontalGrayLaser:
                            laserX.Add(x);
                            laserY.Add(y);
                            laserColor.Add(Color.Gray);
                            isHorizontal.Add(true);
                            break;

                        case Tiles.HorizontalRedLaser:
                            laserX.Add(x);
                            laserY.Add(y);
                            laserColor.Add(Color.Red);
                            isHorizontal.Add(true);
                            break;

                        case Tiles.HorizontalBlueLaser:
                            laserX.Add(x);
                            laserY.Add(y);
                            laserColor.Add(Color.Blue);
                            isHorizontal.Add(true);
                            break;

                        case Tiles.HorizontalGreenLaser:
                            laserX.Add(x);
                            laserY.Add(y);
                            laserColor.Add(Color.Green);
                            isHorizontal.Add(true);
                            break;

                        case Tiles.VerticalGrayLaser:
                            laserX.Add(x);
                            laserY.Add(y);
                            laserColor.Add(Color.Gray);
                            isHorizontal.Add(false);
                            break;

                        case Tiles.VerticalRedLaser:
                            laserX.Add(x);
                            laserY.Add(y);
                            laserColor.Add(Color.Red);
                            isHorizontal.Add(false);
                            break;

                        case Tiles.VerticalBlueLaser:
                            laserX.Add(x);
                            laserY.Add(y);
                            laserColor.Add(Color.Blue);
                            isHorizontal.Add(false);
                            break;

                        case Tiles.VerticalGreenLaser:
                            laserX.Add(x);
                            laserY.Add(y);
                            laserColor.Add(Color.Green);
                            isHorizontal.Add(false);
                            break;
                    }
                }

            using (BinaryWriter writer = new BinaryWriter(File.Create(saveFileDialog1.FileName)))
            {
                writer.Write(tiles.GetLength(0));
                writer.Write(tiles.GetLength(1));
                writer.Write("#");

                writer.Write(ballX);
                writer.Write(ballY);
                writer.Write(ballColor.ToArgb());
                writer.Write("#");

                writer.Write(exitX);
                writer.Write(exitY);
                writer.Write("#");

                writer.Write(spikeX.Count);
                for (int i = 0; i < spikeX.Count; i++)
                {
                    writer.Write(spikeX[i]);
                    writer.Write(spikeY[i]);
                }
                writer.Write("#");

                writer.Write(wallX.Count);
                for (int i = 0; i < wallColor.Count; i++)
                {
                    writer.Write(wallX[i]);
                    writer.Write(wallY[i]);
                    writer.Write(wallColor[i].ToArgb());
                }
                writer.Write("#");

                writer.Write(laserWallX.Count);
                for (int i = 0; i < laserWallColor.Count; i++)
                {
                    writer.Write(laserWallX[i]);
                    writer.Write(laserWallY[i]);
                    writer.Write(laserWallColor[i].ToArgb());
                }
                writer.Write("#");

                writer.Write(switchX.Count);
                for (int i = 0; i < switchColor.Count; i++)
                {
                    writer.Write(switchX[i]);
                    writer.Write(switchY[i]);
                    writer.Write(switchColor[i].ToArgb());
                }
                writer.Write("#");

                writer.Write(laserX.Count);
                for (int i = 0; i < laserX.Count; i++)
                {
                    writer.Write(laserX[i]);
                    writer.Write(laserY[i]);
                    writer.Write(laserColor[i].ToArgb());
                    writer.Write(isHorizontal[i]);
                }
                writer.Write("#");
            }
        }

Code is pretty much self explanatory (I hope). And no, I have no idea in which state my mind was when I wrote that.

 

Now, if I don't get that under 30 lines of maintainable code...

 

EDIT: I did it. 18 lines of code. Slap me.


Level file creation

25 July 2013 - 04:42 AM

Hello

 

Following my code refactoring spree for Battle City, I'd like to improve loading and storing of levels. After some limited searching (I'm on vacation with limited access to the Internet) I couldn't find anything that I could use.

 

Currently, my levels look like this:

[Level1]
S0W0000S0000W0S
000000ttt000000
0MGM000h000MGM0
0GGG00ygl00GGG0
0MGM00BBB00MGM0
000000BWB000000
GGGGGGGWGGGGGGG
WWWWWWGGGWWWWWW
GGGGGGGWGGGGGGG
000000BWB000000
0MGM00BBB00MGM0
0GGG00s0a00GGG0
0MGM0000000MGM0
000000fhd000000
00W001kCj200W00

Which is simple: read with double For loop char by char and create tile which that char represents.

 

There are few problems with it that I notice :

  • Amount of characters I can use for that is limited. Tiles like brick wall require not 1 but about 13 - one character for each variation of the tile.
  • Approach is ok for 15x15 tiles, but it may cause problems if I ever expand to a variable dimensions (with 15x15 being minimum). Not only the text file will become huge or at least wide, reading each level will become painfully slow with current system.

So, my questions are:

  1. Since I use XNA, is XML good enough for storing level data? I'd like to store tiles as either list of "type subtype position" or "type position_rectangle source_rectangle". I've been searching Internet a little and found a way to do a variation of that but for single level only, is there a simple way to do that for all levels in one file?
  2. This is probably too broad question and too low-level for C# - if I decide on writing a custom level data type, what are the general ideas behind it? I couldn't find anything or the Net (or my searching skills suck) and with my knowledge I only though of creating the binary file and write in it what I need or want.

Maybe I'm just thinking too hard.

 

Thanks in advance, even if the answer is just "search better" :)


Games by younger me

30 June 2013 - 09:09 AM

Well, I've found my old projects and, naturally, couldn't comprehend my younger self's way of thinking. I wrote an entire journal entry about that so I won't ramble about it.

 

However, I want to highlight one particular insanity I produced... not that long time ago, actually. While my first game's code is bad because... well, I was about 15 years old at that time and didn't know much about programming (I was self taught), this abomination was written about 3 years ago when I entered faculty (college).

 

Behold, the Uruk-Hai of programming:

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Mlin
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        // Graphics specific variables
        public Texture2D Board;
        public Texture2D Figure;
        public Texture2D Background;
        public Rectangle BoardRect;
        public Double GraphicScale;
        public Vector2 FigurePosition;
        public Vector2 FigureOffset;
        public string Gamestate;
        public Color Player1Color;
        public Color Player2Color;

        // Game logic variables
        public Char[,] FigurePlacement = new char[7,7];
        public byte PlayerTurn;
        public bool PositionPhase = true;
        public byte FigureCount1 = 0;
        public byte FigureCount2 = 0;
        public bool Selected = false;
        public byte SelectedPos;
        public byte x, y;

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
        }

        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            graphics.PreferredBackBufferHeight = 800;
            graphics.PreferredBackBufferWidth = 800;
            graphics.ApplyChanges();
            IsMouseVisible = true;

            PlayerTurn = 1;
            Player1Color = Color.Red;
            Player2Color = Color.Blue;

            base.Initialize();
        }

        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            Board = Content.Load<Texture2D>("Images/Board");
            Figure = Content.Load<Texture2D>("Images/Figure");

            // Setup
            BoardRect.Width = graphics.PreferredBackBufferWidth;
            BoardRect.Height = graphics.PreferredBackBufferHeight;
            BoardRect.X = 0; BoardRect.Y = 0;
            GraphicScale = (double) graphics.PreferredBackBufferHeight / Board.Height;
            FigureOffset.X = Figure.Bounds.Center.X; FigureOffset.Y = Figure.Bounds.Center.Y;
        }

        /// <summary>
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// </summary>
        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
        }

        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (Keyboard.GetState().IsKeyDown(Keys.Escape))
                this.Exit();

            // TODO: Add your update logic here

            if (Mouse.GetState().LeftButton == ButtonState.Pressed && PositionPhase == true)
            {
                #region Positions
                            // First line
                            if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[0, 0] == '\0') { FigurePlacement[0, 0] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[0, 0] == '\0') { FigurePlacement[0, 0] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[3, 0] == '\0') { FigurePlacement[3, 0] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[3, 0] == '\0') { FigurePlacement[3, 0] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[6, 0] == '\0') { FigurePlacement[6, 0] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[6, 0] == '\0') { FigurePlacement[6, 0] = '2'; ++FigureCount2; PlayerTurn = 1; }

                            // Second line
                            else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[1, 1] == '\0') { FigurePlacement[1, 1] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[1, 1] == '\0') { FigurePlacement[1, 1] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[3, 1] == '\0') { FigurePlacement[3, 1] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[3, 1] == '\0') { FigurePlacement[3, 1] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[5, 1] == '\0') { FigurePlacement[5, 1] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[5, 1] == '\0') { FigurePlacement[5, 1] = '2'; ++FigureCount2; PlayerTurn = 1; }

                            // Third line
                            else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[2, 2] == '\0') { FigurePlacement[2, 2] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[2, 2] == '\0') { FigurePlacement[2, 2] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[3, 2] == '\0') { FigurePlacement[3, 2] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[3, 2] == '\0') { FigurePlacement[3, 2] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[4, 2] == '\0') { FigurePlacement[4, 2] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[4, 2] == '\0') { FigurePlacement[4, 2] = '2'; ++FigureCount2; PlayerTurn = 1; }

                            // 4th line
                            else if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[0, 3] == '\0') { FigurePlacement[0, 3] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[0, 3] == '\0') { FigurePlacement[0, 3] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[1, 3] == '\0') { FigurePlacement[1, 3] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[1, 3] == '\0') { FigurePlacement[1, 3] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[2, 3] == '\0') { FigurePlacement[2, 3] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[2, 3] == '\0') { FigurePlacement[2, 3] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[4, 3] == '\0') { FigurePlacement[4, 3] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[4, 3] == '\0') { FigurePlacement[4, 3] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[5, 3] == '\0') { FigurePlacement[5, 3] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[5, 3] == '\0') { FigurePlacement[5, 3] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[6, 3] == '\0') { FigurePlacement[6, 3] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[6, 3] == '\0') { FigurePlacement[6, 3] = '2'; ++FigureCount2; PlayerTurn = 1; }

                            // 5th line
                            else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[2, 4] == '\0') { FigurePlacement[2, 4] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[2, 4] == '\0') { FigurePlacement[2, 4] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[3, 4] == '\0') { FigurePlacement[3, 4] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[3, 4] == '\0') { FigurePlacement[3, 4] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[4, 4] == '\0') { FigurePlacement[4, 4] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[4, 4] == '\0') { FigurePlacement[4, 4] = '2'; ++FigureCount2; PlayerTurn = 1; }

                            // 6th line
                            else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[1, 5] == '\0') { FigurePlacement[1, 5] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[1, 5] == '\0') { FigurePlacement[1, 5] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[3, 5] == '\0') { FigurePlacement[3, 5] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[3, 5] == '\0') { FigurePlacement[3, 5] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[5, 5] == '\0') { FigurePlacement[5, 5] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[5, 5] == '\0') { FigurePlacement[5, 5] = '2'; ++FigureCount2; PlayerTurn = 1; }

                            // Last line
                            else if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[0, 6] == '\0') { FigurePlacement[0, 6] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[0, 6] == '\0') { FigurePlacement[0, 6] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[3, 6] == '\0') { FigurePlacement[3, 6] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[3, 6] == '\0') { FigurePlacement[3, 6] = '2'; ++FigureCount2; PlayerTurn = 1; }
                            else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale)) && PlayerTurn == 1 && FigurePlacement[6, 6] == '\0') { FigurePlacement[6, 6] = '1'; ++FigureCount1; PlayerTurn = 2; }
                            else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale)) && PlayerTurn == 2 && FigurePlacement[6, 6] == '\0') { FigurePlacement[6, 6] = '2'; ++FigureCount2; PlayerTurn = 1; }
                #endregion
                if (FigureCount1 == 9 && FigureCount2 == 9) PositionPhase = false;
            }
            if (Mouse.GetState().LeftButton == ButtonState.Pressed && PositionPhase == false)
            {
            #region Selection decider
                if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale))) {SelectedPos = 1;}
                else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale))) {SelectedPos = 2;}
                else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(175 * GraphicScale)) && Mouse.GetState().Y < ((int)(325 * GraphicScale))) {SelectedPos = 3;}
                else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale))) {SelectedPos = 4;}
                else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale))) {SelectedPos = 5;}
                else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(375 * GraphicScale)) && Mouse.GetState().Y < ((int)(525 * GraphicScale))) {SelectedPos = 6;}
                else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale))) {SelectedPos = 7;}
                else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale))) {SelectedPos = 8;}
                else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(575 * GraphicScale)) && Mouse.GetState().Y < ((int)(725 * GraphicScale))) {SelectedPos = 9;}
                else if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale))) { SelectedPos = 10; }
                else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale))) { SelectedPos = 11; }
                else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale))) { SelectedPos = 12; }
                else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale))) { SelectedPos = 13; }
                else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale))) { SelectedPos = 14; }
                else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(925 * GraphicScale)) && Mouse.GetState().Y < ((int)(1075 * GraphicScale))) { SelectedPos = 15; }
                else if (Mouse.GetState().X > ((int)(575 * GraphicScale)) && Mouse.GetState().X < ((int)(725 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale))) { SelectedPos = 16; }
                else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale))) { SelectedPos = 17; }
                else if (Mouse.GetState().X > ((int)(1275 * GraphicScale)) && Mouse.GetState().X < ((int)(1425 * GraphicScale)) && Mouse.GetState().Y > ((int)(1275 * GraphicScale)) && Mouse.GetState().Y < ((int)(1425 * GraphicScale))) { SelectedPos = 18; }
                else if (Mouse.GetState().X > ((int)(375 * GraphicScale)) && Mouse.GetState().X < ((int)(525 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale))) { SelectedPos = 19; }
                else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale))) { SelectedPos = 20; }
                else if (Mouse.GetState().X > ((int)(1475 * GraphicScale)) && Mouse.GetState().X < ((int)(1625 * GraphicScale)) && Mouse.GetState().Y > ((int)(1475 * GraphicScale)) && Mouse.GetState().Y < ((int)(1625 * GraphicScale))) { SelectedPos = 21; }
                else if (Mouse.GetState().X > ((int)(175 * GraphicScale)) && Mouse.GetState().X < ((int)(325 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale))) { SelectedPos = 22; }
                else if (Mouse.GetState().X > ((int)(925 * GraphicScale)) && Mouse.GetState().X < ((int)(1075 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale))) { SelectedPos = 23; }
                else if (Mouse.GetState().X > ((int)(1675 * GraphicScale)) && Mouse.GetState().X < ((int)(1825 * GraphicScale)) && Mouse.GetState().Y > ((int)(1675 * GraphicScale)) && Mouse.GetState().Y < ((int)(1825 * GraphicScale))) { SelectedPos = 24; }
            #endregion
            }
            base.Update(gameTime);
                         
        }     
 

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: Add your drawing code here
            spriteBatch.Begin();
            spriteBatch.Draw(Board, BoardRect, Color.Yellow);
            #region Figure drawing

            // First line
            if (FigurePlacement[0, 0] == '1')
            {
                FigurePosition.X = (int)(250 * GraphicScale); FigurePosition.Y = (int)(250 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color , 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[0, 0] == '2')
            {
                FigurePosition.X = (int)(250 * GraphicScale); FigurePosition.Y = (int)(250 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 0] == '1')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(250 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 0] == '2')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(250 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[6, 0] == '1')
            {
                FigurePosition.X = (int)(1750 * GraphicScale); FigurePosition.Y = (int)(250 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[6, 0] == '2')
            {
                FigurePosition.X = (int)(1750 * GraphicScale); FigurePosition.Y = (int)(250 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }

            // Second line
            if (FigurePlacement[1, 1] == '1')
            {
                FigurePosition.X = (int)(450 * GraphicScale); FigurePosition.Y = (int)(450 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[1, 1] == '2')
            {
                FigurePosition.X = (int)(450 * GraphicScale); FigurePosition.Y = (int)(450 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 1] == '1')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(450 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 1] == '2')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(450 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[5, 1] == '1')
            {
                FigurePosition.X = (int)(1550 * GraphicScale); FigurePosition.Y = (int)(450 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[5, 1] == '2')
            {
                FigurePosition.X = (int)(1550 * GraphicScale); FigurePosition.Y = (int)(450 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }

            // 3rd line
            if (FigurePlacement[2, 2] == '1')
            {
                FigurePosition.X = (int)(650 * GraphicScale); FigurePosition.Y = (int)(650 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[2, 2] == '2')
            {
                FigurePosition.X = (int)(650 * GraphicScale); FigurePosition.Y = (int)(650 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 2] == '1')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(650 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 2] == '2')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(650 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            } 
            if (FigurePlacement[4, 2] == '1')
            {
                FigurePosition.X = (int)(1350 * GraphicScale); FigurePosition.Y = (int)(650 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[4, 2] == '2')
            {
                FigurePosition.X = (int)(1350 * GraphicScale); FigurePosition.Y = (int)(650 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }

            // 4th line
            if (FigurePlacement[0, 3] == '1')
            {
                FigurePosition.X = (int)(250 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[0, 3] == '2')
            {
                FigurePosition.X = (int)(250 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[1, 3] == '1')
            {
                FigurePosition.X = (int)(450 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[1, 3] == '2')
            {
                FigurePosition.X = (int)(450 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[2, 3] == '1')
            {
                FigurePosition.X = (int)(650 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[2, 3] == '2')
            {
                FigurePosition.X = (int)(650 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[4, 3] == '1')
            {
                FigurePosition.X = (int)(1350 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[4, 3] == '2')
            {
                FigurePosition.X = (int)(1350 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[5, 3] == '1')
            {
                FigurePosition.X = (int)(1550 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[5, 3] == '2')
            {
                FigurePosition.X = (int)(1550 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[6, 3] == '1')
            {
                FigurePosition.X = (int)(1750 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[6, 3] == '2')
            {
                FigurePosition.X = (int)(1750 * GraphicScale); FigurePosition.Y = (int)(1000 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }

            // 5th line
            if (FigurePlacement[2, 4] == '1')
            {
                FigurePosition.X = (int)(650 * GraphicScale); FigurePosition.Y = (int)(1350 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[2, 4] == '2')
            {
                FigurePosition.X = (int)(650 * GraphicScale); FigurePosition.Y = (int)(1350 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            } 
            if (FigurePlacement[3, 4] == '1')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(1350 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 4] == '2')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(1350 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[4, 4] == '1')
            {
                FigurePosition.X = (int)(1350 * GraphicScale); FigurePosition.Y = (int)(1350 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[4, 4] == '2')
            {
                FigurePosition.X = (int)(1350 * GraphicScale); FigurePosition.Y = (int)(1350 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }

            // 6th line
            if (FigurePlacement[1, 5] == '1')
            {
                FigurePosition.X = (int)(450 * GraphicScale); FigurePosition.Y = (int)(1550 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[1, 5] == '2')
            {
                FigurePosition.X = (int)(450 * GraphicScale); FigurePosition.Y = (int)(1550 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 5] == '1')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(1550 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 5] == '2')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(1550 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[5, 5] == '1')
            {
                FigurePosition.X = (int)(1550 * GraphicScale); FigurePosition.Y = (int)(1550 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[5, 5] == '2')
            {
                FigurePosition.X = (int)(1550 * GraphicScale); FigurePosition.Y = (int)(1550 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }

            // Last line
            if (FigurePlacement[0, 6] == '1')
            {
                FigurePosition.X = (int)(250 * GraphicScale); FigurePosition.Y = (int)(1750 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[0, 6] == '2')
            {
                FigurePosition.X = (int)(250 * GraphicScale); FigurePosition.Y = (int)(1750 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 6] == '1')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(1750 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[3, 6] == '2')
            {
                FigurePosition.X = (int)(1000 * GraphicScale); FigurePosition.Y = (int)(1750 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[6, 6] == '1')
            {
                FigurePosition.X = (int)(1750 * GraphicScale); FigurePosition.Y = (int)(1750 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player1Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            if (FigurePlacement[6, 6] == '2')
            {
                FigurePosition.X = (int)(1750 * GraphicScale); FigurePosition.Y = (int)(1750 * GraphicScale);
                spriteBatch.Draw(Figure, FigurePosition, null, Player2Color, 0.0f, FigureOffset, (float)GraphicScale, SpriteEffects.None, 0);
            }
            #endregion
            spriteBatch.End();

            base.Draw(gameTime);
        }
    }
}

And the result?

Spoiler

No wonder I gave up on it.

 

If I would write it right now, I would make field on board as its own class. That way, in main code I can simply hold a list of fields and manipulate with it, instead of... doing... what I did.


Pixel Art feedback for newbie

27 June 2013 - 11:08 AM

Hello

 

So, I've been working on upgrading the art for my game and, due to its relative simplicity and my very low artistic skills, chosen pixel art. Another reason is to make it a little retro.

For that reason I turned to Riuthamus for some help and he helped me greatly. Thanks to his help, I managed to create few good powerup icons and tiles. Game looks much more appealing now.

 

However, I need a feedback and a little more guidance. I don't want to bother Riuthamus constantly, he has his life and job, so I came here for some tips smile.png Of course, I won't stay idle and work on it more, and I also have other things to fix (found few major bugs in the game) and draw.

 

What I'd like to ask is some feedback about the tiles - how do they look and what should I improve.

  • Tanks are made by Riuthamus, I just did the shading. Outline around first and second tank is supposed to be protective shield.
  • Concrete blocks are simple squares with applied Noise filter to get rough concrete-like surface.
  • Bricks were made with Texturize filter. I'm satisfied with effect.
  • Water... eh, the one in 2nd row I made by myself but I cannot make it look good. I've looked at few pixel art tutorials and followed them, but the result isn't satisfying. Water below it is downloaded from the Internet and I'd like to keep it but it won't follow the theme.
  • Trees I made entirely by myself using the example Riuthamus provided me.
  • Fort... bleh. I have no idea how to make it appealing nor how to shade it. I wanted to base it off this but spectatularely failed.

In addition to that, I have a question (I don't know if I'll phrase it right): how often should I consider using Photoshop filters? I used Noise and Texturize because I though I'd get the result I want and wanted to speed up the process when I can.

 

Thanks in advance smile.png


PARTNERS