Wednesday, 30 May 2012

Blog Fail

I did do some more backgrounds, and concepted another, but it won't upload any images so yeah.. not much to say without the images.  I'll try Dropbox (They're still WIP so dont hate)

Sunday, 27 May 2012

More progress on the background, undecided whether or not to have the sheets etc included in the image, so I've upload some of them to Dropbox with a plain background image.

This is what it looks like with the plain background without decals or background objects.


Art Gubbins (pt_2)


I've upload this image to the Dropbox with all the assets in one image, just to have them up asap.  Saving them all as individual assets so I'll upload when its finished.



3D renders

I started on the background, it's pretty basic at the moment but I'll chuck the png up anyway so its available to use.


The chain segment is included in the asset image as well, did a render of what it looks like when its joined.

Still WIP on the whole level with all the assets together, here's what it looks like currently.  Anything I do from now on I'll upload to Dropbox as I go.


Friday, 25 May 2012

Art Gubbins (Pt_1)

Decided to blog this in multiple parts because some of what I wanted to upload is unfinished.  This is all for the industrial section, I still need to render it all from the right perspective before I upload anything to dropbox, should be ready over the weekend, if not, by Monday.

Chucked a few of the models together with the finished textures, some of the assets, like the ladders and spikes etc still need textures so I haven't included them in this blog post.

It should give you a basic idea of the art style though.


The platforms I'll have to blog in the next part, but heres one finished one.  It's not the best example because I could of pretty much just painted this in photoshop, so the the 3D was kind of pointless here.  The others platforms are multiple models though, so hopefully they'll look more like actual 3D renders.


Got a little sidetracked on making smaller assets, which I'll use to make up machines and such.  Slowly working through all these, unwrapping and texturing (Zzzz).  I figured it would be best to have a few different textures for each model, greys/bronze and wood colours, to keep with the steampunk feel.

Threw some of them together quickly to get a feel of how they'd work out.  So a 3D concept of the backpack, which I scrapped and remade (next post).  And also that reminds me, I realise there is no cogs here, and a small amount of pipes and whatever other steamy parts.  I will get around to adding them or it just wouldn't feel steampunk enough!


I included some of the UVWs just to show the style of how I was painting each part, I usually try and bake the highlights and shadows into the texture where I can.






 Making up a few more parts using the models from the previous images .

Heres the brush I use for texturing if anyone wants to use it.  You can open it in photoshop and go to Edit > Define Brush Preset to use it.

Should have more level assets ready to use by next production so they can start being used in the editor, working on the backdrops for the industrial zone too, so I'll include them in the next blog post.








Thursday, 12 April 2012

Particles!


Took a small break from XNA to look at java for a while, and swiftly returned to C#.  Though it was helpful in learning programming patterns and other generally helpful techniques.

Also started to mess around with some side projects to find the best way of implementing gameplay mechanics, and particle effects.  Aside from that, nothing much.  Heres a picture of a pixel flamethrower and some zombles!




Tuesday, 6 March 2012

Programming and SpriteSheets

Been working on a Class to handle spritesheets and textures for a side project. It holds all textures required for the game to save loading and passing them around all over the place. At the moment it doesnt have a simple load class for a single image, e.g. a background or gui, but its not too hard to add that, which is the next step.

As it stands, it holds textures as Texture2d[], taking a spritesheet and chopping it up into smaller images, defined by the int w, h parameters, and can then be used from anywhere else through the Art instance i. E.g sprites[4](below) would return the 5th 'chopped' image on the sheet. The 4 can be incremented for animations, or cycle through a list of ints for custom animations.

(1, 2, 3, 2), which would draw boxes 0,1,2,1... etc rather than 1, 2, 3, 1, 2, 3....

Personally I find it a lot easier to use this method rather than source rects, due to the fact of collision boxes, origins having to be readjusted (Collision box would use the whole texture width when using a source, although an easy fix).

Also saves from passing in textures to each class, or having them need their own Load methods.

May be worth returning a Texture[,] rather than a Texture[], however, it seems to work fine as it currently is.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;

namespace NameSpace
{
    public class Art
    {        
        //instance
        public static Art i;
        private static ContentManager c;

        public static void Init(ContentManager content)
        {           
            c = content;
            i = new Art(); 
        }

        //Texture Arrays

        public Texture2D[] sprites = LoadAndSplit(@"Sprites\SpriteSheet", 48, 48);
        public Texture2D[] tiles = LoadAndSplit(@"TileSets/Tileset1", 48, 48);

        //Loads and Splits the texture into a Texture array
        public static Texture2D[] LoadAndSplit(string name, int w, int h)
        {
            Texture2D image = c.Load (name);

            int xSplit = image.Width / w;
            int ySplit = image.Height / h;

            Texture2D[] r = new Texture2D[xSplit * ySplit];
            int datePerSplit = w * h;

            Color[] originalPixels = new Color[image.Width * image.Height];
            image.GetData(originalPixels);

            int index = 0;

            for (int y = 0; y < ySplit * h; y+= h)
                for (int x = 0; x < xSplit * w; x+= w)
                {
                    Texture2D split = new Texture2D(image.GraphicsDevice, w, h);
                    Color[] splitPixels = new Color[datePerSplit];

                    for (int sy = 0; sy < h; sy++)
                        for (int sx = 0; sx < w; sx++)
                        {
                            int splitIndex = sx + sy * w;

                            if (y + sy >= image.Height || x + sx >= image.Width)
                                splitPixels[splitIndex] = Color.Transparent;
                            else
                                splitPixels[splitIndex] = originalPixels[(x + sx) + (y + sy) * image.Width];
                        }

                    split.SetData(splitPixels);

                    r[index++] = split;                   
                }                     
                        
            return r;            
            
        }       
       
    }
}

Friday, 2 March 2012

Animations

Added the Animation class (animated by frame using spriteSheets). The Character class holds the animations by Dictionary (animations and string name), so it can be changed according to the playerstate.