jump to navigation

Screenshots: Latest shots from a pre-alpha build of LotBM April 17, 2009

Posted by legendsoftheblackmoon in Uncategorized.
add a comment

The opening screen

screenie_1

Amazonia and Speller of Doom face off in a (not-for-release) PvP

screenie_4

Amazonia spearing the life outta the creepy spiders

screenie_2screenie_3

Photoshopping – Automation and Batch conversion April 11, 2009

Posted by legendsoftheblackmoon in Uncategorized.
Tags: , , , , ,
add a comment

So, ive got a handful of sprites, coutesy my group members and their exploits in Blender, and

http://reinerstileset.4players.de/.

But, i dont need the weirdly coloured backgrounds accompanying the images. So wat do i do ? Manually open them in Photoshop, eliminate the background. Save as PNG ? Hell no, for each character i will need 10 or more images, and since i have a life ( course i do , wat do u mean i dont , so wat if i am making a game ) .. Adobe Photoshop has a nifty feature called Automate:

File > Automate > Batch

Step 1: Alt + F9 to open the Actions Panel ( ref. the first image)

Step 2: Click on the button beneath the red circle CREATE NEW ACTION

Step 3: Now, this is akin to the MS Office macros, afaik. So go ahead, Open an image, carry out the stuff u wanna replicate.

I did an Open, Select, Delete, Save As.

Once done with recording the macro, (actions to be repeated) click the STOP button.

Step 4: Save all the images for Batch Editing/Conversion in one folder. And then go to File > Automate > Batch, refer   settings in the second Image.  Hit OK.

Tip: You might want to set an output folder as i have done ( Demo )

Animating a Sprite Sheet April 9, 2009

Posted by legendsoftheblackmoon in games.
add a comment

O_o .. interesting part now, gotta animate the stilllife all around. Its really quite simple, what i did that is:

Assuming all the animations are laid out neatly ina  sprite sheet, we have a table.

With rows and columns, so any algo would read thus:

1.  Get Row of Anim

2. Get Column of Anim

3. Get Anim : Height & Width

4. OnAnimStart() – Load source image from sprite sheet as a rectangle with

Height = Anim Height

Width = Anim Width

Position = (X,Y)   :  (0,0) Initially:

5. For subsequent frames,

increment Position.X by Sprite.Width times

And here’s the code

//Animation variables
protected int currFrame = 0;
protected int currRow = 0;
protected int currFrameSpeed = 0;
protected int animeThreshold = 8;

public Rectangle rectSource;
public Rectangle rectDestination;

/**Animate Sprite**/
if(currRow == 0)
{
if(this.currFrame < 6)
{
this.currFrameSpeed += 1;
if (this.currFrameSpeed == animeThreshold)
{
this.currFrameSpeed = 0;
this.currFrame += 1;
}
}
else
{
this.currFrameSpeed = 0;
this.currFrame = 0;
}
}
else
{
this.currRow = 0;
this.currFrameSpeed = 0;
this.currFrame = 0;
}

rectSource = new Rectangle(currFrame * this.spriteWidth, currRow * this.spriteHeight, this.spriteWidth, this.spriteHeight);
rectDestination = new Rectangle((
int)this.position.X, (int)this.position.Y, this.spriteWidth, this.spriteHeight);

Additionally i found the need to control the speed of the animation, this was accomplished by adding a control variable

currFrameSpeed

i kept on incrementing it till it reached a predecided threshold.

:D Simple ha, of course this is just a simple and ok,ok way of doing it

Follow

Get every new post delivered to your Inbox.