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

Advertisements

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.

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

Characteristically speaking February 1, 2009

Posted by legendsoftheblackmoon in games.
add a comment

Woah, its been months since my last post, but hey, LotBM is moving ahead with full steam.

Finally got down to the gruelling task of coding the actual game, and.. well waddayaknow – time to select characters

Dunno, some where between new Character(), i was like, this guy (dont ask me why not gal ) shud be a mage, spellcaster, now, ahaa… ,

“Now introducing .. from the Hogwarts Adult School of  Magic, with a degree in Defence Against the Dark Arts, i a proud to announce – The Speller of Doom” 

**Drumroll**

Now, this fella’s gonna be the yardstick for the rest of em, with common features like:

characterName, characterStatus, etc.. and methods like move(), fight(), interact().

 

Soon, new character classes to come. Keep watching this space

Modelling October 8, 2008

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

A pre requisite for any software project is, design of the project, more so in a game, when state transitions and entity moniring etc. are to eb kept tarck of. And before coding, one will need to know what to implement, its mor eof, translating the story line into concrete “real world” entities, that is, craetign classes and abstracting the design.

Activity Diagram

Activity Diagram

Data Flow Diagram

Data Flow Diagram

State Diagram

State Diagram

Key to succesfully coding, is obviosuly design. with a diagramatical rep of the system, its easy to visualize, implement classess, and of course makes for easy understanding of the project by the non technical team.

Project Report for 11th Oct, 2008

CHaMe on this file August 19, 2008

Posted by legendsoftheblackmoon in tips, xna.
Tags: , , , , , ,
add a comment

Had a bunch of CHM’s .. C# tuts, and was about to take the plunge, well, more like, brush up some C# stuff,when *poof*, none of them wud open, i just , just the tree navigation on the left was visible, but no luck on the right hand side. Now, frustration, its 2 am, i ain’t in a charitable mood, so, now just about to delete the whoel lot of em, when i said, wait a  sec, this aint the right thing, poor files, no one harmed them, why consign them to the erased sectors of my hard disk for time immeorial.. okay, enuf  with the dramatics… heres the solution

Your CHM files are stored in the folder with ‘#’ (hash) character in the path
Many C# developers discovered that their documentation and e-books in CHM format cannot be read because they were storing their CHM files in the directories like ‘C:\E-books\C#\’
The hash character signifies an anchor in HTML so the CHM viewer fails to resolve the path properly and to retrieve the content.

Solution: Remove the ‘#’ (hash) character from the directory name. Also avoid using ‘?’, ‘&’, and ‘+’ characters in directory names.

Presenting : Legends of the black moon August 17, 2008

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

So , 4 days to go before our first real, report is due to the ommitee at Uni, we have to show them what we’ve “researched” and seen in the past month or so. Well, i decided to make a presentation for the same, pretty neat, photoshopped some fancy slide background images, and a cool watermark, and a not-so-impressive opening screen, bit what the heck, oh wait, 10 marks are at stake over hear.

Check out the ppt here ..presentation_1-22nd-august-2008

A game witha VIEW .. August 12, 2008

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

Legends of teh Black Moon, is moving into design phase .. but, wait ..

.. the most important aspect currently in discussion is, what kind of view, dats possibly the USP besides the theme , and game story and, well ok, .. i shortlisted 3

  • Isometric
  • Side Scrolling
  • Top View

Isometric, is well, you visually represent a 3D dimensional object, in 2D. You display the game stuff on the X,Y,Z axes. Makes for lotsa room on the screen, and lotsa more stuff can be done.

Side scrolling, every1’s gotta have played Mario, its a typical side scrolling 2d game, simple to implement, collision detection, no worries, etc …

Finally, top view, GTA II was top view, u see very little of the character you control, and not a very pretty sight, although, from my point of view, its rather simple.

Gotta decide, within a few days or so, what kind of view we gonna be implementing, in LotBM …

What factors come in to play would be:

  1. Framework support
  2. Coding feasibility
  3. Calculations expected
  4. posiblility of sprite positioning
  5. etc ..

Let’s see what i come up with .. keep this post updated till then

Rock Rain – The pirated Demo July 11, 2008

Posted by legendsoftheblackmoon in games, tips, xna.
Tags: , , , , , , ,
add a comment

Soo .. after a week of toil .. i have a small game, if u may call it that. Its a simple enough concept actually, the player controls a spaceship ( more like a UFO ), and the objective is to navigate through a meteor shower. The speed of the meteors approaching is controllable, programmatically :p Calling it pirated, because i kinda didnt design it myself, just got a few tut’s together, and played it blind with a load of personal mods.
Made a game class :
Game1.cs – Main class that .. acts as the engine, controlling the sprite drawing, game logic and handling the GameComponent‘s.
Ship.cs – The class that describes the player controlled Ship, its size, sprite location, speed and movement, also, its gotta check for movement of the ship, so that it stays within the Window bounds.
Meteor.cs – The meteor class, similar to ship to CS, exception is that the meteor’s created are automated, fixed stuff, placement, initially is random, with the rocks accelerating towards the bottom.

Game Logic : The sprites are loaded, meteor and ship share the same Texture2D, that is, the meteor and spaceship are in one image, just the particular region is selected by the respective classes.
The game engine checks for collisions’, and creates the GameComponents, namely the meteors, and the player ship. The scoreboard was not properly implemented, and i/ or i got bored. Lolzz..

Download the Game Here ( with Source Code )

Tips / Hints / Tricks while programming in XNA + C# July 4, 2008

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

Error Handling  – Using a MessageBox

Do this … in

Step 1 : Filename : Program.cs

add this, which will allow you to access the WinAPI

using System.Runtime.InteropServices;

Step 2 : now .. inside the static class Program declaration ..  add this .. which allows u to link to the WinAPI dll, and specify the function ..

[DllImport(“user32.dll”, CharSet = CharSet.Auto)]
public static extern uint MessageBox(IntPtr hWnd, String text, String caption, uint type);

Step 3 : and this allows you to do a try-catch .. and thus add a cool ( read .. helpful) MessageBox

try
{
using (Game1 game = new Game1())
{
game.Run();
}
}
catch (Exception e)
{

MessageBox(new IntPtr(0), e.StackTrace, “My Game Made a BooBoo”, 0);
}