ROM 42 levels, 5 different ways to play!

October 21, 2008 by csfinch

Hi, I’ve been working on puzzle game that obeys 6 specific rules, and the main object of the game is to exit the maze.

First 5 levels of the game played and solved Silverlight 2 version.

This game has 42 levels, and will be ready for java supported cellphones, flash sites, xbox live arcade, and windows free market, and the zune player in 1 month. The current version is in beta and in Silverlight 2.0

The flash download (for all Os’s), xbox live arcade will have 255 levels for $4.99

The cell phone, and zune edition will support the first 100 levels for $1.99

and the free versions will be in Flash\Silverlight 2 online only first 42 levels (no download required)

Look for the free version of ROM November 7 08, and the $1.99 games to come out a week later, and the 255 levels come out November 21 08 a week before Thanksgiving!

We will also have a free map editor, and community forum for gamers who like ROM to share there levels with their friends, and have easy access loading/saving importing/exporting levels from any known device.

Enjoy ;)

Starting open-source project!

September 15, 2008 by csfinch

Hello to everyone again who is reading these blogs (5 random us teenagers who are inspiring to become game developers).  Yesterday was an important day for me as a programmer as I started an open-source cross-platform game development project with my good friend Wynter Woods who is 2450 miles away from me.

The game is Nano Ninjas we have a code.google page which I shortly post when it’s up and running, and a forum on my friends server that I would like the community to get involved.

NanoNinjas

Please check out the link above, register to become a nano ninja, a game developer for the community of the nano ninjas the open-source game development project that I hope many people will start to join in.

If anyone is interested in becoming an artist, web developer, game programmer, or just wants their input in the game for a couple of design concepts please visit the fourm sign up, and give us your input.

This will hopefully be a game that is universal on many platforms designed, and developed for the community by the community.

Thank you,

C.S.  Finch

Implementing SPriG using Tim’s SDL_Image Part I

July 6, 2008 by csfinch

This tutorial is simply going to show you how to implement the SPriG library using Tim’s SDL_Image tutorial that can be downloaded from www.sdltutorials.com in a two part series. This tutorial doesn’t resort as a step-by-step technical report on the ins and outs of SPriG, but a quick installation, and useful manual on how to implement SPriG using Tim’s SDL_Image tutorial in 2 parts using small examples, so you can study and use SPriG on your own free time.

I’m going to be using Code Blocks and MinGW compiler, since the SPriG tutorial is already in that format, and to make a Visual Studio compiler edition you would have to download the source file, and compile it using the Visual Studio compiler, or simply in Visual Studio switch your compiler to MinGW.

Installing SPriG

Like installing many of SDL third party libraries simply copy and paste the header files from the libSPriG folder in the include\SDL folder where all SDL header files resides on your hard drive. Afterwards, copy and paste the libSPriG.a file to the .lib MinGW, so CodeBlocks know where to look on your hard drive when using SPriG. Last, copy and paste the SPriG.dll into the WINDOWS\System32 folder, and you’ve successfully installed the SPriG library. In the folder there’s going to be a SPriG function list .txt file, for ease of programming I would stick that on my desktop, and resort to it when needed.

Implementing SPriG in CodeBlocks using SDL_Image Tutorial

Now that we have successfully told the compiler where the SPriG library is we can now tell the project where SPriG is, so we can use it. Open up Tim’s SDL_Image project, and go to Project > Build Options. Find the tab labeled “Linker Settings”, and click the add button. Simply add “libSPriG” and then click ok.

I’ll be adding or what is called implementing the SPriG library into Tim’s project using his CSurface.h file, so go there, and add the following.

#include <SDL\SPriG.h>
#include <SDL\SPriG_Inline.h>

These are the header files that loads all functions that SPriG has predefined for us to use. Without these header files if we tried to call a specific SPriG function we would get errors.

Example 1: Working with Primitives!

Let’s create a small example. In the CSurface.h file let’s add some static boolean functions much like his OnDraw functions that he calls in later source files.

Add the following after the static call of OnDraw in the CSurface.h file.

//Drawing primitives, transforming surfaces, and drawing polygons using  SPriG library
//Basic Primitives (You can draw more if needed)</strong>
static bool HorizontalLine(SDL_Surface *surface, Sint16 x1, Sint16 y,  Sint16 x2, Uint32 Color);
static bool VerticalLine(SDL_Surface *surface, Sint16 x, Sint16 y1, Sint16  y2, Uint32 Color);
static bool Rect(SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2,  Sint16 y2, Uint32 color);
static bool Circle(SDL_Surface *surface, Sint16 x, Sint16 y, float r,  Uint32 color);
static bool CircleFilled(SDL_Surface *surface, Sint16 x, Sint16 y, float  r, Uint32 color);

These are going to be the simple boolean calls we call in the CSurface source file that will draw the basic primitives we’ve selected that SPriG can draw on the fly.

Next open up the CSurface.cpp file, and the following lines of code.

/*===============================================================================
*Seperation from Tim's SDL_Image tutorial CPP file to Carl' SPriG source  file</strong>
=================================================================================*/
bool CSurface::HorizontalLine(SDL_Surface *surface, Sint16 x1, Sint16 y,  Sint16 x2, Uint32 Color)
{

if(surface == NULL) return false;

SPG_LineH(surface, x1, y, x2, Color);

return true;

}

bool CSurface::Rect(SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2,  Sint16 y2, Uint32 color)
{

if(surface == NULL) return false;

SPG_Rect(surface, x1, y1, x2, y2, color);

return true;

}

bool CSurface::Circle(SDL_Surface *surface, Sint16 x, Sint16 y, float r,  Uint32 color)
{

if(surface == NULL) return false;

SPG_Circle(surface, x, y, r, color);

return true;

}

The following adds the source of the Rect, Circle, and HorizontalLine function that we hadded in the header file. As I mentioned before I’m not going to write a full tutorial on SPriG, and teach you step-by-step, but simply by short examples teach you how to explore SPriG on your own by showing you how to implement this in Tim’s tutorials.

OK, so now let’s make a quick Test run. If you compile and run this you’ll simply get Tim’s old SDL_Image .exe file, for we changed the code, but haven’t modified the screen a bit. This is all building up on modifying the screen, and drawing our primitives on a fly, so when we need to do so we won’t have to work as much.

Drawing the Primitives

Now all we must do now is in the Capp_OnRender is call our functions we defined in the CSurface class, so we can have some nice primitives on the screen. I have made a significant comment after the surface displays on Tim’s project, and where he flips the screen for the double buffer, for organization purposes. So in between Tim drawing the surfaces onto the screen, and flipping the screen add the following code.

//================================================
//draw 2 circles one filled one non filled 50 pixels away from each  other
CSurface::Circle(Surf_Display, 250, 250, 5, 250);
CSurface::CircleFilled(Surf_Display, 300, 250, 5, 250);

//draw a rectangle
CSurface::Rect(Surf_Display, 100, 100, 300, 300, 250);

//draw a trigon "triangle"
CSurface::Trigon(Surf_Display, 100, 100, 100, 200, 200, 200, 250);

//===================================================

That’s going to be it for Part I of deploying SPriG using Tim’s SDL_Image tutorial. In part 2 I will transform surfaces by rotating and scaling surfaces while they’re being rendered, so they have the look of rotating in real-time. Until then…

A well deserved update.

July 2, 2008 by csfinch

My last post was May 14th and it’s July 1st, so a well deserved update is needed for this blog.  I’ve decided I have redesigned the general purpose of this blog, since I have found I lack motivation, determination, and the time required to update this blog as frequently as people would like.  I have been busy writing a couple of articles on using SPriG using the SDL library, writing WPF applications, Silverlight applications, WCF applications, and overall just admiring and learning the power of Visual Studio 2008.

I’m also in the middle of working on a website, which since it isn’t up there’s no need for any links, and a web developer in Asheville who I may become a good asset to, for a couple of development projects for his company.

Other than that nothing new.

This blog will now host as a monthly bi-weekly update of all projects, websites that I develop.  A poor man’s portfolio I would call.

regards,

C.S.  Finch

Setting up Allegro-4.2.2 in Visual C++ 08

April 25, 2008 by csfinch

     I have found a couple of people on www.gamedev.net having trouble installing Allegro in/using Visual C++ 2008 “Orcas” and since for some reason I have found an easy way of installing it I’ve decided to showcase a small article on how I installed the Allegro-4.2.2 library and having it accessible in Visual C++ 2008.

First the link to the Allegro-4.2.2 library can be found here Allegro-4.2.2 . Now let’s get through some easy quick instructions.

 

Installing Allegro-4.2.2 correctly on your system

  1. Unrar the folder Place this in a safe folder that you know won’t get deleted, or shifted around
  2. Start up Visual C++ 2008
  3. Direct yourself to Tools > Options
  4. Under Options > Projects and Solutions > VC++ Directories
  5. Direct yourself to “Show Directories for:” in the combo box look for inlcude
  6. Create new line click on the browse button and direct yourself to the allegro-4.2.2 \include directory
  7. direct yourself to “Show Directories for:” and look for lib
  8. Create new line click on the browse button and direct yourself to the allegro-4.2.2 \lib folder

Linking up Allegro-4.2.2 in Visual C++ 2008 & First Project

  1. Create New Visual C++ 08 Empty Project
  2. In solution Explorer right click on source folder Add New Item
  3. Add new .CPP file name it main
  4. Go to Project Properties > Configuration Properties > Linker > Input
  5. In Additional Dependecies add “alleg.lib”
  6. Copy and paste given source

 

#include <allegro.h>

int main(void)
{
	allegro_init();
	set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
	install_keyboard();

	//input for players positions
	while(!key[KEY_ESC])
		textout_ex(screen, font, "Allegro-4.2.2 working in Visual C++ 2008", 1, 12, 11, -1);

	//end program
	allegro_exit();
	return 0;
}
END_OF_MAIN()

 

Now Build and Run and you should have a window much like the image below.

Hope this helped!

Just a small mention to Allegro

Allegro is a game library supporting C/C++ distributed freely and their main site is Allegro Site where the library, documentation, source files, and much much more can be viewed, downloaded freely! Thank you for making and keeping Allegro a free game programming library!