Thursday, March 8, 2012

Parallaxing backgrounds!!!

So yeah, parallaxing backgrounds are pretty nifty! Nice little trick to make a flat 2d game have some feel of depth. Plus it can also be funny to set the different parts of the background to ridiculous speeds. Basically you take your nice background and split it up into various different elements/layers. So a layer for the foreground, clouds, etc, etc. Speaking of backgrounds I've also finished all the different level's backgrounds.

I was actually surprised how simple it was to implement the parallaxing background. I thought there would have been some special function, but nope just creating multiple background variables.

CODE:

// Parallaxing Layers
Background bgLayer1;
Background bgLayer2;
Background bgLayer3;
...
//Initializing the backgrounds
protected override void Initialize()
{
PositionMenu.X = 0;
PositionMenu.Y = 0;
// TODO: Add your initialization logic here
bgLayer1 = new Background();
bgLayer2 = new Background();
bgLayer3 = new Background();
game = false;

base.Initialize();
}

...
//Loading in the files into the game world used for the backgrounds
protected override void LoadContent()
{
device = graphics.GraphicsDevice;
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
screenWidth = device.PresentationParameters.BackBufferWidth;
screenWidth = device.PresentationParameters.BackBufferWidth;

mainmenu = Content.Load("mainmenu");
dashboard = Content.Load("dashboard");
// Load the parallaxing background

bgLayer3.Initialize(Content, "bglayer2lvl1", GraphicsDevice.Viewport.Width, -2);
bgLayer2.Initialize(Content, "bglayer1lvl1", GraphicsDevice.Viewport.Width, -1);
bgLayer1.Initialize(Content, "mainbackgroundlvl1", GraphicsDevice.Viewport.Width, 0);

...

//Then ya need to actually draw and update them :D


I don't know why I thought it would be more complex than just putting in more background variables, but sure it ended up being just that simple. Despite being straight it does actually look rather nice. Here is a video of it running. Graphically I think the game is coming along nicely, still have to figure out how to get the sprite sheet working to animate the players.



Saturday, March 3, 2012

I'm bad at updating blogs

Yeah as the title says, I'm fairly bad at updating my blog :P. Oh well.

Anyway down to business. I'm pretty much finished the graphics end of things and have been looking at the coding aspects of implementing the graphics into the game world. Our group found a lovely little tutorial that explains everything really straight forward.

Anywho my next post will go into the coding aspect more but for now I'm just going to throw up the sprites and backgrounds and stuff we may be using. I'm still finding it hard to actually get the sprites to look glowy for the tron look but sure not the end of the world.







Thursday, February 23, 2012

Sloooooowpoke is slow






















Yeah I've been very, eeerr well slow/lazy about updating this blog. But I have been working! I'm about 90% finished off all the sprites so happy days! I'm probably going to change a few things still on them but they are basically all finished.

I still have to do the pick up that boosts your abilities though and a background but I don't think they will take me all that long. Also I need to find a way to make everything glowy. I'm not too happy with the fuel can either as I kinda rushed it, but it is getting there.

To do list:
  • Finish background

  • Finish power pick up image

  • Make everything glowy

  • C# to implament the graphics



  • Tuesday, February 14, 2012

    Helicopter goes pew pew

    First main post with actual work in it! Within the group I will be mostly taking care of the graphics side of things. So actually creating the various sprites within the game and learning how to implement them into the game world via C#. Unfortunately I'm not great at drawing, but sure how and ever!

    Anyway, I've decided that before I even start at the C# code I'd actually design some sprites in the first week. Although with that said I've been doing research on putting in animated GIF's as a world background, which I think would be quite cool. As a team we have decided to go for a semi-futurist/tron look, so lots of bring glowing colours hopefully. Weather that will be possible to do or not I'll find out over the next week.

    I always liked the Metal Slug helicopters so I have a sprite made in that design, different colours though. Below is one that is just brightly coloured, and then one that looks like its glowing. I don't really think the glowing one looks that great but sure it's a start.








    Next thing to do, animate the GIF's so the helicopter's blades spin.

    Sunday, February 12, 2012

    Games Fleadh 2012 or bust

    This blog will document my experiences, problems, successes, etc throughout the course of the next few weeks, as myself and four others attempt to build a game to enter in to the Games Fleadh.

    Now, time to learn C#!