Digital Dave

Musings on projects, business and life.

Icon

Senior Project(s) Win! Graduation Saturday.

We had our final presentation yesterday and ended up impressing the professor.   He awarded us extra credit (rare) for our effort and the success of the project.  I’m incredibly happy and proud of the other guys for their commitment.  It has to be one of the best team-work experiences that I’ve dealt with while I’ve been here at Kansas State.  Each of us averaged 70 hours of work, ranging from design, implementation, and testing and close to 400 LOC delivered from each of us.  I came in at 75 hours and 487 LOC.

Good stuff.

I still have more time to work on my next project, so this none of this is final.  But I thought I’d share.

I have one more presentation on Monday which is for my game programming class.  I’ll be presenting my map toolset that is based on the relatively new .NET 3.5.  This project has been very interesting.  While I’m not where I thought I would be (bzzt. shock), I’ve got the pipeline in and functioning on an event-driven basis.  I wanted to implement a plug-in that actually adds something to the toolset, but I just don’t have the time to do something extensive.  So I have plug-ins that actually show off the architecture.

A user can open a window which loads all of the discovered plug-ins into a list.  From there, the user can click on the plug-in to find out a little more detail.   The user can choose to activate the plug-in, which will give the user a visual indication that it’s good to go.

So, for now, this activates a plug-in for the tileset domain. You can divide your application up into different domains, so you can focus your plug-ins, and sandboxing.  An event handler is set for this plug-in, and simply gets what tile was selected, and returns it.  I could be doing work on the other side, and returning the work.

Another feature that I implemented is an XML validator.  I’ve created an XSD (schema), and when an XML map is loaded, I check it against the schema.  If it fails, I produce an error for the user so they can fix it.

 And some other functionality that I have working is zooming, moving around the map (wasd, arrows), drawing tiles.

 

Inspiration for this editor came from several places (Thanks a lot!): XnaFantasy, XNA RPG Development, RPG Maker

Clearly, my core belief is extensibility (and to learn: xna, xsd, plug-in architecture), not just to make “another” editor.  Software needs to adapt, and it shouldn’t be solely on the main developers shoulders.  If I can provide a toolset that other developers can expand, that is much more powerful. It’s a challenge that I’m willing to at least try to accommodate.

But for now, I’d say I’m definitely testing the waters.  A lot of this is still confusing due to the complexity of how to handle all of the elements.

Lynx 6 Robotic Arm Senior Project

The team that I am on is kicking some major ass with this particular project.  I thought I’d share some progress.

The red ring on the can denotes that it is the top end of the can. Taking multiple shots of the field-of-view was beyond the requirements of this particular project. Since our team was the first to mess with this robotic arm, we didn’t have any prior code base to work from.

This first video is our simple case. Simple in that we don’t need to do any manipulation to set the can upright.

Here, the top of the can is facing the arm. Since the arm can only rotate it’s gripper 180 degrees, it needs to do an initial move so that it can proceed with setting the can upright.

I really wish I had more time to devote to this project, but I have so many other things that need my time. I’m not happy with the vision processing. I’m happy that it works, but I want it to be faster. While there are a few ways, I don’t have the time to devote to implementing a new strategy. We finished up the C0 testing today, and have a few more things to do before our final presentation. Oh, and we get to give another presentation on Test Driven Development. :) They have me to thank for that one, but I’m sure they’ll like it.

Note: In respect to the other members on my team,  I will not pass over the source code to this project or release it as open source.  There are code samples on the companies website that you will find helpful.

Plug-In Based Architecture for Application Tool Development

So for the past week or so, I’ve been really crunching down on two different plug-in architecture with C#: Reflection and System.AddIn.

Why?

Well, I want to create a much more robust 2D RPG editor than I’ve done in the past.  I want to give people the foundation to build off of while allowing me to learn how to make a dynamic tool that can continue to grow beyond what I do to it. And Jeff motivated me to do it.

I decided not to use Reflection because I really didn’t want to sit here and spend time creating all kinds of security links between my application and the plug-in.  While System.AddIn is incredibly tedious, I feel that it will be worth it in the long term.

So to get my hands dirty with the AddIn framework, I developed a plug-in based calculator prototype.

Prototype Plug-in Editor

There are 3 different development pieces that construct the ‘pipeline’ between the application and the plug-in. The project structure is pretty strict. You can see that, here.

The Contract 

  • Contract – Isolates the Plug-in for better sandboxing and robustness of the host application. Think of this as the formality that the HOST and the PLUG-IN must adhere to.

The Host:

  • View – Defines how the HOST application sees the ADD-IN
  • Adapter – Converts the CONTRACT to the HOST view
  • Application – Your application

The Plug-In

  • View – Defines the base class for the ADD-IN.  This is what you distribute to people, to build their plug-in from.
  • Adapter – Converts the VIEW to the CONTRACT
  • Implementation – Your plug-in

As far as plug-in development goes.  The only concern is with the AddIn view, which will be provided.  In it, we have our abstract class.

using System.AddIn.Pipeline;

namespace AddIn.View
{
[AddInBase]
public abstract class AddInView
{
public abstract int ComputeNums(int x, int y);
public abstract string GetSign();
}
}

Which can be used to actually define our method declarations.

using System.AddIn;
using AddIn.View;

namespace Addin.Addition
{
[AddIn("Addition Plug-In",
Version = "1.0",
Description = "Add 2 Numbers",
Publisher = "David McGraw")]
public class Addition : AddInView
{
public override int ComputeNums(int x, int y)
{
return (x + y);
}

public override string GetSign()
{
return “+”;
}
}
}

The application is build to search the plug-in directory for *.dll files, and will load them if they match the contract. As a plug-in developer, this is little of to no concern as long as you followed the view.

Play with the prototype here, if you want. I hold no promises that it won’t blow up your computer.  Feel free to implement divide, I provided the source for plug-in development.

StackOverflow public beta

So I’ve been helping (private beta) the guru’s over at StackOverflow with their latest endeavor – a free programming community wiki + experts exchange + digg like system.   It’s awesome, trust me.

Literally, you can go on the site and ask any technical question that can be answered, not just discussed, and your question will be answered within a minute.  Even if it is a tricky question, people will start jumping to try to provide some insight.

The system is based on reputation.  You ask a question, and if it’s a good question, people can mark it up (+points) or mark it down if it’s a bad question (-points).  If you answer questions, the same thing happens (+/- points).   They’ve also added a badge system to reward people for learning their way through the system.

But anyway, go check it out. You’ll like it if you’re a tech head like me.

http://stackoverflow.com

Source Engine

My department got a license to issue out the source engine to the students in my game programming class… Oh, dear…

New Semester. CSSBuilder V.1.Console Release

We started up a new semester, and my final, here at Kansas State University.  I love this school. Awesome atmosphere, people, faculty.  It’s hard to believe I’m nearly done.

My final semester.

  • Creative Writing: Fiction
  • Independent Project
  • Game Programming Project
  • Software Engineering Project

I debated on if I should stick with the game programming project, or to take a course in internet security.  Or even just adding it to my schedule.  But I decided to wait until graduate school.

And, finally, here is the CSS Builder.

Download Version 1 with Source

View a compiled output file

I included the source in the case you wanted to modify something. And you can view an example of what the output will look like. You can flag whether or not the header shows, or any of the comments. Some day I’ll wrap this thing up with a GUI, but until then I just wanted to get it out for those that wanted it.

Steps:

  • Put the CSS files you want to merge inside the \DATA folder.
  • EDIT project.csb
    • If you don’t want the header: set ‘headercomment’ to false
    • If you don’t want file comments: set ‘filecomments’ to false
    • Edit ‘buildfile’ if you want the output file somewhere else other than the default data folder
    • For each file, add the path and description
  • Run Builder.exe, or set your development environment, to run with the parameter of the project file
    • Example: c:\builder.exe project.csb

iPhone Development, Job Hunting, and California

The first rule in iPhone development is apparently that you don’t talk about iPhone development.  It’s still ‘hush-hush’ in apple land when it comes to their fancy touch technology to the extent that they try to rip down anything that is put up. That is, if they find your stuff of course.

So, not only am I still getting used to using a Mac (dear God…), and Objective-C (God?), but I’m developing a rather simple game that I’ve made before in C++ back in the day, and adding some twists to it.  When I get some more progress on it, I’ll fill in the journal space.  I really hope to get this thing done by the 25th (school starts), but we’ll see.  I’ve decided to work on an iPhone game for my next semester independent project.  I have so many ideas on iPhone applications that it isn’t even funny.  The beautiful thing is that these things are all casual.  I love casual games.  I hope I can get some distance with this thing.  Independent game development FTW.  I deployed a test version of my game to the iPhone today (what a pain-in-the-ass process) and it blew my mind. Very cool.

I have a programming test with a company next week, so I’ll have to spend some time getting ready for it. It’s an in house programming test and I’m not looking forward to it at all… Well, I am… But I just fail pretty hard (depending on the structure) with exam-like conditions which makes this job hunt that much more interesting.  I wish I’ve been programming for 10+ years, but that just isn’t the case.

Speaking of the job hunt.

I’m starting to get denied from places out in California due to the distance between Kansas – California… It’s only 1,550 miles (I know, I’ve driven it in (almost) a day *yawn*). Anyway, I might have to move out there for a few months if things don’t look to be going my way.  Luckily, I know 2 people in San Diego, 1 in Burbank, and 1 other in long beach. I wish I knew somebody from the bay area… But that won’t stop me from camping out in a Hostel ($12 a night! Pfft.).  I want a job in California if you couldn’t tell.

CSS Builder, iPhone, Interviews

If you’re a web developer and you find yourself dealing with a crap load of CSS files, you’ll probably find some use for this new application.  A buddy of mine fell in this pit, and needed a solution.  So, I opened up C# and whipped him up something.  It’s pretty simple.  It will build a CSS file from a bunch of other CSS files based on a build file.  It’s similar to JS Builder, which groups together java files.  It’s open source, and I’ll get a download to it soon.  If you need it now, find a way to contact me and I’ll hook you up.

Pending that things don’t continue to get in my way, I’ll be fiddling with developing iPhone applications. I got my hands on a Mac finally.

Dealing with interviews. Not the most exciting thing in the world.  Well… It really is, but I’m so massed in stress that I can’t really think of enjoying the opportunity to turn to a new page of my life. But reality is what it is… I suck at exam like interviews. Unless they’re more of an implementation project, but that’s rarely the case.

PyAdventure Release – Game – Source

I blew past the 5 days that I wanted to take to complete this game, but considering the time spent on actually developing it (7 days), through all of the distractions, it still works for me. I’ve been traveling up to Kansas City (on my second trip now), and I spent a week playing phone tag with a company that contacted me for employment. I’ve got to say that it’s really nice that companies are coming after me, instead of just me applying to companies. Unfortunately, things didn’t work out with that interview, but things happen for a reason. It’s just nice that people are finding me, and from what I can tell, they are hitting my new portfolio site.

So, PyAdventure.

It’s an XML based adventure game. I wrote the maps that are composed of tiles. In the script, I run through the files and build objects from them. I don’t look for any files, except for the base file ‘DeathForest.xml’ in the source code. So you could build on, and on and on because the script loads the file you specify in the base file (yes, there is a performance hit, but we’re not dealing with huge maps. Nor do I have the desire to adventure around on a huge map). The code could easily be modified to enable you to initialize a file from a given settings document. You could change the structure of the XML files and write a new adventure game just by changing them. Or you could build a tool to do it for you.

Here is the structure of a tile.

Situation: What happens when I step on this tile?
Start: Does the player start on this tile?
Items: Item on the tile
Object: The ‘actionitem’ means that a player must have that item in order for this object to work. You can link this object to an NPC by specifying the ‘actionlink’ as the npc name.
Npc: Like the object, if an ‘actionitem’ is needed, it will not greet the user.





























If you’re interested, feel free to download the game. Try it out, and provide me any critical bugs that you may have found. If you want a spoiler, just look in the map files.

Run PyAdventure.exe from the console for a better experience. Otherwise, the console will close on you when the game ends.

[Game] Download PyAdventure Game

[Source] Download PyAdventure Source Code

[Text File] View Spoiler

A Couple Programming Notes

Well, the research project is being a typical research project… It’s slow going.  Reason being is because my professor and I have to dig through current research studies to find something to replicate. Which, isn’t exactly fun because we’re trying to stay away from the incredibly complex studies (we don’t have a whole lot of time here).

I should also note that I have a twitter account, and that I’ve got myself hooked on it.  It is a lot more interesting than I thought it would be.  You can even grab twhirl that is powered by Adobe AIR to monitor your account on your desktop. My fiancee still gives me crap about using it (I think she still fails, or denies, to know that I’m a computer nerd…), but I consider it blogging on a micro level…  It seems like there are a lot of coders on it, which gives me a fun look into their daily work schedule.

This most recent ‘tweet’ came through: “figure out the least we can possibly do, then implement those basic features with as much attention to detail as we can.”  Sounds like the fun just got blown out of that project. ;)

Twitter must be doing okay… They just spent $15 million aquiring Summize, which is basically a data crawler to sift through all of the tweets.

In other news, I’m tinkering with Python.  What’s college free-time without tinkering?  I surely need to get something out of this summer if I can’t even get this research project going.

Since I’m completely new to Python, I figured I’d create an adventure game with it out of the gates.  Python + XML = $$$.  Well, minus the $$$.  I’m just having fun with it. I enjoy tinkering with languages to see how they work.  I’ve already got a good learning foundation going with Python, and it has given me some painful moments… Like the IDE that comes packaged with it… That thing is junk.  I finally ended up using eclipse since I’m somewhat familiar with it.  I should note that I have 63 hours left before this self challenge is over (making this game).

Oh… And I have a friend moving out to California before me… That doesn’t sit well- I need to graduate.

David McGraw

Founder of iGotIt Games. Trader. Runner. Warrior. Motivator.