Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lost in the Catacombs of Game Development



Explosive Shell: Development Update

Posted by , 27 April 2013 - - - - - - · 461 views

After one month of development on Explosive Shell, the main engine components are finally in place. I reworked the inputMgr, screenMgr and sceneMgr completely. I have given some thought into the objectMgr I currently have in place and I think I may rework this to be component based rather then entity based through polymorphism. I would also then be designing some GUI for object creation based on component editing. I think this rework would be a lot of fun allowing Explosive Shell to be scalable and quickly editable farther down development.

On a second note, Explosive Shell is playable and I am currently writing the weaponMgr and animationMgr. I feel that the actual mechanics for controlling a ship has been ironed out and a few more days, with a little tweaking, the controls will be solid.

As far as the design document is concerned, I do not think that it is in a state to review to the public quite yet, but should be ready to go in about a months time. Much of my development has been put on hold because of my last semester of college but upon graduation, development should continue unhindered.

Happy Programming GameDev Community!


Explosive Shell finally under development

Posted by , 22 February 2013 - - - - - - · 697 views

Finally after a few years of thought, I am finally able to work on a project i have dubbed Explosive Shell. The game is a top down space shooter which is putting a new spin on space combat. Taking influences from league of legends, Asteroids and touhou I am hoping that this project will be fun to develop and play! I will be adding an entry to my jounal roughly once a week to discuss different aspects of the development process.

I am hoping that I can have this project in alpha by the middle of March so we shall see if I am able to stay to this goal! I will be posting pictures as well as videos on my facebook page located here: Explosive Shell FB Page

I should have the development document completed one week from now as well. Cheers to development!


It has been a long road

Posted by , 29 November 2011 - - - - - - · 519 views

I am going to be cliche when I say it has been quite a while since I have posted any updates; Sadly, it's true. My Junior year of college has, up to this point in time, been so overwhelming difficult that I have not been able to keep up with the little things that I used to enjoy very much. However, In my time away, myself and two of my really good friends have been working on a video game project for one of our computer science courses. We have come a LONG way since the start of the semester in September and I would like to acknowledged the project and the many hours we have put into the development of this project to get it to the state it is currently in.

We have dubbed our temporary union of development team broFist. The project we are working on is a side-scrolling puzzle platformer. I will not go into story or mechanics just yet but, I the project is programmed in C# with XNA game studio. Check out some quick screenshots in the slide show below. Bigger and better quality screenshots will be added later.

http://img190.imageshack.us/slideshow/webplayer.php?id=csc370leveleditormenu.gif


Scripting system - The development of the Parser from hell

Posted by , 23 April 2011 - - - - - - · 539 views

So I decided that I was going to start working on the scripting system for a FPS project my friend and I are working. I said hey, this should be relatively easy, at least until I started the project. . . Lets continue.

My thoughts that went into creating the scripting system.

Step1: Create a linked list class in which I could store all the script data
Step2: Write function to load in and store all script files in linked list
Step3: Iterate through the linked list and manage all the data that was acquired

This is what got me in trouble. Some questions arose while I was developing the linked list class.

How can i scan a directory and read in ALL script files in that directory?
In order to read in the files I need a text parser; not only to read scripts but to read in the script files, how do i do that?
What would happen if I changed my linked list class into a template class so I can use it anywhere I need to?

Anyways, this is what happened.

I scraped my list class and started using the standard C++ list class. This switch made writing code a lot faster because I no longer had to worry about adding functionality to my own class. I was merely writing my own class so that I could become my confident in my ability to use linked lists. I created a script template that my script files will follow. This was merely a step in creating something that I could work with once I started working on the parser. I decided to create a file called Script_Index.txt which would hold all of the filenames for the scripts that would be included in the engine. Yes, the filenames need to be added manually but this made my life easier and allowed me to stay away from the win32 API. Oh, did I mention that the Script_Index.txt file would support line and block comments because it will.

I then started writing the text parser.

Step1: Read in file
Step2: Parse file
Step3: store file
Step4: access file to begin loading all the scripts.

Okay, so step1 was simple enough. I created a fstream member variable called tempFile to open the required Script_Index.txt file in a stream. This allowed me to access the text contained in Script_Index.txt. Moving on to step2 was the hard part. I began by reading in the while file by iterating though Script_index.txt until the eofbit was reached. This caused multiple problems.

prob1: stored all carriage returns (\n) and white spaces.
prob2: All of the characters were appended to a string and thus, there was no formating and for the string to be parsed, i would have to scan through the WHOLE string
prob3: This method was very inefficient and I just simply did not want to do this.

So I created a solution.

Why not use the getline() function on tempFile to read in a line, then parse through the the string which would be stored in a buffer and all needed information would be taken out after the parsing was complete. This is exactly what I did.

My code is still a little broken but I will gladly share it with the world so that others can learn from what I had to go through.

bool ScriptMgr::ImportScripts()
{
	// Variables
	ifstream tempFile;
	string buffer;
	int count = 0;

	StringList::iterator listIter;

	tempFile.open("scripts/Script_Index.txt");	// Open the file Script_Index.txt
										// This file contains all the filenames for the scripts located
										// In the script folder. These filenames need to be added manually.

	if(tempFile == NULL)
	{
		cout<<"Cannot find file Script_Index.txt"<<endl;
		return false;
	}

	assert(tempFile.is_open());

	while(!tempFile.eof())
	{
		// Scan through Scripts_Index.txt until the end of file
		// This stores all the characters from Scripts_Index.txt into a buffer.
		getline(tempFile, buffer);

		if (buffer == "")
		{
			// continue to next line
			continue;
		}
		else
		{
			// parse the line
			for(int i = 0; i <= buffer.length() - 1; i++)
			{
				if(buffer.at(i) == '/' && buffer.at(i+1) == '/')
				{
					// we have reached a line comment, skip to next line
					buffer.clear();
					break;
				}
				
				else if ((buffer.at(i) == ' ') || (buffer.at(i) == '\n'))
				{
					// add the filename stored in buffer to the list
					cout<<buffer.substr(0, i);
					myScripts.push_back(buffer.substr(0, i));
				}
			}
		}						
	}
/*
	for (listIter = myScripts.begin(); listIter != myScripts.end(); listIter++)
{
    string currentString = *listIter;
    // print contents of list
	cout<<*listIter->data();
}
*/
	return true;
}


I want to leave this code with a notice, i have not figured out why the code inside the last else if statement is never run, and if you do decide to use this code in your own projects that you ask for my permission first. I will most likely say yes, but it is nice to know that someone else views your work as helpful.

Anyways, after writing the code, I realized that I do not really need a linked list containing the filenames of the script files, I can just use an array of strings to store all the filenames. During the initial loading of Script_Index.txt, i can iterate through the file line by line, ignoring line comments and box comments to count how many script files I need to store. I can then create an array of strings with the necessary amount of space needed to hold the filenames. This is also wonderful because after I read in Script_Index.txt and load in all the script files, I can extract the data needed, store it in the classes that require the data and then just get rid of the list all together. If you are wondering why I would do that, This is because the script files that I am loading in are not used during runtime, only loadtime when the engine/game loads at the beginning. The script files only contain information about a corresponding weapon and or a Main menu element for example.

More will be added soon; most likely after I fix my code and complete my simple text parser.

- BIASxENVY

As requested, the file that I am parsing at the moment looks like the following snippet. I have considered using Angel script and Lua but I decided to implement my own script. I figured this would allow myself to strengthen my use of C++.



/*
 Written by BIASxENVy
 Script_Index.txt stores all of the filenames for the scripts.
 ProjectFPS
*/
// System

// Weapons

Desert_Eagle.Weapon
Assault_Rifle.Weapon

// GUI
Main_Menu.GUI

// Players





Workable FPS Camera System template

Posted by , 26 January 2011 - - - - - - · 733 views

I was sitting in my common room and came up with an idea for a workable camera system controlled by the mouse and WASD keys. I know that this is probably a basic technique used in all FPS games but I just want to put this down.

Step 1:

Create a method to poll the X and Y coordinates of the mouse

Step 2:

Reset the Mouse to the center screen position every frame

Step 3:

Poll the offset of the X and Y mouse coordinates from the center of the screen

Step 4:

create a rotation matrix and rotate the lookAt matrix

Step 5:

Create a translation matrix and translate the cameraPosition matrix







PARTNERS