Life and Code

Project First: Jupiter-C

by karl.lockhart on Jun.02, 2009, under Code

 
Leave a Comment :, , , more...

Project First: Space Race Simulator Project

by karl.lockhart on Jun.01, 2009, under Code

I loved Buzz Aldrin’s Race into space when I first played it several years ago. The things I wish I could change about that simulator are the things I am attempting to put into my own idea of a space race hot seat simulator. For example in BARIS, launches played the same videos over and over again, in a modern sim, there is no reason why these launches could not be dynamically simulated based on the current tech level. Even on a modest computer, using modern graphics techniques, it should be possible to create a compelling sim with dynamically generated and simulated mission launches. I am testing this concept with my Project First, I want to see how cool of a Space Race launch I can simulate with XNA.

I have started with a simple goal for now, model the crafts and locations to dynamically generate the Explorer I mission, not necessarily to real life spec. But to a decently realistic and good looking level of detail. To this end, I am working on modelling the Jupiter-C launch vehicle :) using correct dimensions weights etc. I will use this to create a pretty basic simulation in XNA and build on it adding stuff like the engine sounds I am also working on :) Here is a preview of some of the stuff I have coming :)

Audio:
The audio was created in Audacity using a high pressure cigarette lighter as the base sound, then I pretty much massaged it down a bit to get a nice roar. The start just uses reverb and amplitude changes to give the feeling of that initial surge at rocket startup. Pretty simple sounds to create so far. Kinda fun to be playing with audio again :).
Engine Start
Engine Run

 

 

Images:

Jupiter-C RocketDyne Booster Tail Section

Jupiter-C RocketDyne Booster Tail Section

 

 

 

 

 

 

For fellow BARIS lovers, the game has been open-sourced and can be found here

1 Comment :, , , , , , , , , , , , , , , more...

Playing with XNA

by karl.lockhart on May.17, 2009, under Code

 

GVSS - My First XNA attempt

GVSS - My First XNA attempt

So, once again I have started playing with a new technology, Microsoft’s XNA. Thus far, I think it is one of the cooler things I’ve played with.

The download was pretty painless and after a few community tutorials, I have a decent grasp of the power that XNA gives the developer. XNA seems to work with both the Direct X ‘.x’ format as well as Autodesk’s ‘.fbx’ both of which Blender 2.49 exports. Blender, being free, is the perfect complement to XNA. I will definitely post more experiences later.  

My Toolset

  • XNA framework 3.0
  • Blender 2.49
  • Audactiy
  • Gimp

I am still working on finding a free physics package I can use on XBOX360 as I am now seriously considering getting a creator’s club account. So far, I have no complaints.

Edit: Added Video

Leave a Comment :, , , , , more...

This is the end, my friend…

by karl.lockhart on May.14, 2009, under Uncategorized

Not of my blog… I just realized that I have not updated this in a bit too long. Short story is I am being outsourced… That said, the blog will continue… I will be writing soon of my adventures with XNA… Another paradigm shift :)

1 Comment :, , , , more...

My Quick Eclipse C++ with X-Plane Plugin SDK Recipe

by karl.lockhart on Jan.20, 2009, under Code

1. Open Eclipse C++
2. File->New->C++ Project
   i. Enter your Project name
   ii. Select Shared Library
              o Empty Project
   iii. Click Finish
3. In the Project Explorer, right click on your project select Properties
   i. Select C/C++ General
             Paths and Symbols
             a. On the Includes tab add the paths to the CHeaders\XPLM
                and CHeaders\Widgets folders using the 'Add' button and
                checking 'Add to all configurations' and 'Add to all languages'
             b. On the Symbols tab add the IBM=1 symbol by using the 'Add'
                button and checking 'Add to all configurations' and
                'Add to all languages' setting the Name: IBM and Value: 1
             c. On the Library Paths tab add the path to the Libraries\Win
                folder using the 'Add' button and
                checking 'Add to all configurations' and 'Add to all languages'
   ii. Select C/C++ Build
              Settings
              a. On the Build Artifact tab select Configuration: [All
                 configurations] set the Artifact name to what you
                 would like your plugin's filename to be.
              b. On the Build Artifact tab select Configuration: [All
                 configurations] set the Artifact extension to 'xpl'
              c. On the Build Artifact tab select Configuration: [All
                 configurations] you may delete the output prefix
              d. On the Tool Settings Tab for MinGW C++ Linker
                                               Libraries
                 Add XPLM and XPWidgets to the Libraries(-l) box.
5. Create <YourProjectName>Win.cpp containing:
#include <windows.h>
#include <stdio.h>

BOOL APIENTRY DllMain( HANDLE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
      )
{
    switch (ul_reason_for_call)
 {
  case DLL_PROCESS_ATTACH:
  case DLL_THREAD_ATTACH:
  case DLL_THREAD_DETACH:
  case DLL_PROCESS_DETACH:
   break;
    }
    return TRUE;
}
4 Comments :, , , , , more...

Blind Monkey IT (How to be Outsourced in 10 days)

by karl.lockhart on Jan.15, 2009, under Code, Life

I drafted this a while back. I think it is interesting now so publishing (5/19/2009):

In my opinion, one of the biggest worries of any IT organization is what I refer to as ‘Blind Monkey IT’. What this leads to in my limited experience is a lack of initiative and a ‘blind action’ mentality. Perfect examples of this are the pc support tech. who can’t fix your problem because it isn’t in his script. I know right now every manager is shaking their collective fist at me, but this seems to be the perfect way to make your team redundant. Ever wonder why the off-shore csr with the bad accent insists your problem is on his script. Now, don’t get me wrong documentation is a good thing but there has to be a stopping point.

Leave a Comment :, , , , more...

Very Basic Logging for C++

by karl.lockhart on Jan.04, 2009, under Code

I am always in need of very basic logging for my projects, here is the logger I wrote for my XPFF project, remember this code is as-is as the project is still very active:

/*
 * Logger.h
 *
 *  Created on: Jan 4, 2009
 *      Author: Karl
 */
#include <iostream>
#include <fstream>
#include <string>
#include <time.h>

#ifndef LOGGER_H_
#define LOGGER_H_

class Logger {
public:
	static Logger* Instance();
	~Logger();

	//Logging Levels
	const static int LOG_LEVEL_NO_LOGGING = 0;
	const static int LOG_LEVEL_FATAL = 1;
	const static int LOG_LEVEL_SEVERE = 2;
	const static int LOG_LEVEL_WARNING = 3;
	const static int LOG_LEVEL_INFO = 4;
	const static int LOG_LEVEL_CONFIG = 5;
	const static int LOG_LEVEL_VERBOSE = 6;
	const static int LOG_LEVEL_VERY_VERBOSE = 7;

	//Logging Targets
	const static int LOG_TARGET_FILE = 1;
	const static int LOG_TARGET_STDOUT = 2;
	const static int LOG_TARGET_BOTH = 3;

	void SetLoggingLevel(int);

	void SetLoggingTarget(int);

	void Log(int, std::string);

protected:
	Logger();
	Logger(const Logger&);
	Logger& operator= (const Logger&);

private:
	std::ofstream file;
	static Logger* pinstance;
};

#endif /* LOGGER_H_ */

/*
 * Logger.cpp
 *
 *  Created on: Jan 4, 2009
 *      Author: Karl
 */

#include "Logger.h"

Logger* Logger::pinstance = 0;
int loggingLevel = 4;
int loggingTarget = 1;

Logger* Logger::Instance()
{
	if (pinstance == 0)
	{
		pinstance = new Logger;
	}
	return pinstance;
}

Logger::Logger()
{
	file.open ("logger.log");
	Log(LOG_LEVEL_INFO, "Log Opened");
}

Logger::~Logger()
{
	file.close();
}

void Logger::SetLoggingLevel(int logLevel)
{
	if ((logLevel >= LOG_LEVEL_NO_LOGGING) && (logLevel <= LOG_LEVEL_VERY_VERBOSE))
	{
		loggingLevel = logLevel;
	}
}

void Logger::SetLoggingTarget(int logTarget){
	if ((logTarget >= LOG_TARGET_FILE) && (logTarget <= LOG_TARGET_BOTH))
	{
		loggingTarget = logTarget;
	}
}

void Logger::Log(int logLevel, std::string logMsg)
{
	if (logLevel <= loggingLevel)
	{
		std::string msgToWrite;
		time_t rawtime;
		struct tm * timeinfo;

		time ( &rawtime );
		timeinfo = localtime ( &rawtime );
		msgToWrite += asctime(timeinfo);
		msgToWrite.erase(msgToWrite.end()-1,msgToWrite.end());
		msgToWrite += " - ";

		switch (logLevel) {

		case LOG_LEVEL_FATAL:
			msgToWrite += "FATAL - ";
			break;
		case LOG_LEVEL_SEVERE:
			msgToWrite += "SEVERE - ";
			break;
		case LOG_LEVEL_WARNING:
			msgToWrite += "WARNING - ";
			break;
		case LOG_LEVEL_INFO:
			msgToWrite += "INFO - ";
			break;
		case LOG_LEVEL_CONFIG:
			msgToWrite += "CONFIG - ";
			break;
		case LOG_LEVEL_VERBOSE:
			msgToWrite += "VERBOSE - ";
			break;
		case LOG_LEVEL_VERY_VERBOSE:
			msgToWrite += "VERY VERBOSE - ";
			break;
		default:
			msgToWrite += "UNKNOWN LEVEL - ";
			break;
		}

		msgToWrite += logMsg;
		msgToWrite += "\n";

		switch(loggingTarget){
		case LOG_TARGET_FILE:
			file << msgToWrite;
			break;
		case LOG_TARGET_STDOUT:
			std::cout << msgToWrite;
			break;
		case LOG_TARGET_BOTH:
			msgToWrite += "\n";
			file << msgToWrite;
			std::cout << msgToWrite;
			break;
		}
	file.flush();
	}

}

Example Usage:

Logger *logger = Logger::Instance();

.

.

.

logger->Log(logger->LOG_LEVEL_INFO, “Starting the Plugin”);

 

 
1 Comment :, , , more...

Concept

by karl.lockhart on Dec.19, 2008, under Code

Well I have finally decided on the concept I will move forward with as the game I will develop. This decision has been a long time coming. I think the genre I have decided on is rather underused and the game will be fun above all else. The work required is not too bad either, I will disclose more after I have fleshed out the design documents. A page here is forthcoming as well.

Leave a Comment :, , , more...

Pics I Didn’t Get to Share

by karl.lockhart on Dec.16, 2008, under Life

Here are a few pics I didn’t get to share (sorry for quality both iPhone camera)…
The Server, Ares, rides again
The Server, Ares, rides again
The Moon looked awesome

The Moon looked awesome

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...