Archive

Archive for the ‘Code’ Category

XNA Game Demo Update 2

April 23rd, 2010

Yay for insomnia I guess, woke up early this morning and worked on my demo. The previous game projects have really given me a good idea of what I need to do to get to a running state. I was pleasantly surprised by how quickly I was able to start getting my basic framework in place. Today, I worked on base objects for cameras and lights as well as managers for both. Also built some more basic framework functions, like translation class.  Also started building my base game components like my base physics object. So far progress is looking good.

Interested in XNA here is the book I learned alot from:

Beginning XNA 3.0 Game Programming: From Novice to Professional

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , , , , , , ,

XNA Game Demo Update 1

April 22nd, 2010

So once again, I know, I am going down the building a game demo route. This time using one of my all time favorite games as a target for emulation. I do have alot of stuff going on, with contract work, freelance work, Android dev and everything else. But I know that if you love doing something you should actually do it and I miss some good deep programming and problem solving.

Here is the obligatory tech details post:

Platform: Windows, XBOX 360 (future)
Graphics etc: XNA
Physics: JigLibX

The plan is to do this to work on this project when I need a break from everything else. I am already enjoying it because ‘research’ is fun, see pic below. My goal is to actually put this one out there as an XNA indie game. I promise I wont keep it locked away in my collection of fun stuff I have made for me to play around with. I am looking forward to playing this game myself :) and that is a good sign.

Research is fun!!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , , , ,

Simple Configuration Manager in Java

October 27th, 2009

I have decided to share a configuration manager I wrote. I use this to maintain configuration files for my projects. Remember, as usual this code is as is, and written for my uses, I only share as it may be useful to others. See the software links on the right for download.

Read more…

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , , , , ,

I call it LazyLib

September 10th, 2009

You know sometimes you write code that really changes the world, and then there is LazyLib. LazyLib is my collection of web design code that makes web design, well…easier :D . I found this snippet and had a little bit of a laugh, right before I included it on the website I was building. So here is a snippet of LazyLib.

 function getCopyright($copyrightHolder){//Copyright Start Date
$buildDate = 2009;

if (date(‘Y’) > $buildDate)
{
  $copyright = ‘Copyright © ‘.$buildDate.’-’.date(‘Y’).’, ‘.$copyrightHolder.’. All rights reserved’;
}
  else
{
  $copyright = ‘Copyright © ‘.$buildDate.’, ‘.$copyrightHolder.’. All rights reserved’;
}
  return $copyright;
}

Very simple code that means on Jan 1, 2010 I won’t have to mess with this webpage. The rest of LazyLib isn’t this trivial. It actually contains everything I need to build a simple page with PHP includes. But I thought I would share.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , , , ,

Embedded: Finally tangibility in coding

July 31st, 2009
ATMega168 MCU as setup for Nerdkits.com

ATMega168 MCU as setup for Nerdkits.com

There is a thrill that is hard to explain the first time you burn your code to a microcontroller. Excitement and apprehension abound as you plug in the power supply for the first time. My first solo microcontroller (MCU) experience came recently, and something has changed inside of me. As with everything, the best place to begin is at the beginning.

I had been tracking the box all day online, and the text that had once said ‘at unit’ was finally replaced with ‘delivered’. I knew that this was something I wanted, and it was finally here. I pulled up in front of my mailbox and got the key to the package locker. The key stuck a little and I smiled to myself at the metaphor; I had spent this long to open this part of my feild and the only thing holding me back was a sticky lock.

I had decided to go with the kit provided by nerdkits.com, mostly because I had heard nothing but good stuff and they seemed to be pretty helpful to the MCU noobs. I registered quicky on their website and downloaded their users’ guide. In about an hour, I had the device wired up in their original configuration, i.e. MCU and LCD wired together. Holding my breath, I connected the battery for the first time and the LCD spit out a nice message from the nerdkits.com team.

It all started that day, and this has been one of the biggest revolutions in my programming since I learned object oriented programming. I am loving good olde procedural c, yup c, programming. At d+21, I am still enjoying this quite a bit. I have started messing with the pulse width modulation function of the MCU to drive servos as well as play music on the provided piezo buzzer. I have used the analog to digital converter to measure temperature and do rangefinding using a Sharp IR sensor. In short, I am feeling very engaged in this and wish I had picked it up before. I love the idea that I can program a circuit to do complex behaviors. In the 19 years since I first played with BASIC, I have always wanted something tangible from my programming. I believe I have found it in embedded.

I will post my experiments and experiences on here as I play with new stuff.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , , , ,

Project First: XNA meets Jupiter C

June 3rd, 2009
XNA Model of my Jupiter C

XNA Model of my Jupiter C

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , ,

Project First: Jupiter-C

June 2nd, 2009
 
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , ,

Project First: Space Race Simulator Project

June 1st, 2009

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

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , , , , , , , , , , , , , ,

Playing with XNA

May 17th, 2009

 

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

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , , , ,

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

January 20th, 2009
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;
}
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Code , , , , ,