Sunday, November 1, 2009

Halloween Wolverine

I dressed up like Wolverine. The kids loved it. Most parents however didn't know who I was. WTF?


Saturday, October 10, 2009

Apocalypse Update

The team has been working along quite well. He have the starts of a basic menu system in place and a leveling system that shows the concept. The art is in the middle of states unfortunately, I'm trying to get some normal mapping to work, which isn't as easy as I was hoping. Good stuff to learn.

I was hoping to get into shaders a bit to do the shields but I went with a sprite approach. I simply draw 50+ sprites in a circle around the planet. It works, and I can control their vertical size to reflect the shield capacity. Worked like a charm.



Friday, September 18, 2009

Asteroids and Relfection


I added an asteroids class to the game and got them working. You can shoot them now too and they disappear and your bullets bounce away. I'm having some problems with the reflection vector, where the reflection appears to be mirrored. It's late though, and I just want to post a picture.


Tuesday, September 15, 2009

Asteroid Apocalypse Template


I spent the better part of the evening yesterday getting this project running. It's an empty shell really, but it has some art assets from Blender (via a slightly modified FBX python exporter), rotating earth and asteroids too. It allowed me to get the scene setup with a configuration I like. I'm using a tight FOV (XNA uses the horizontal to define their FOV setting which is new to me) so the 3D models are subtle and feel smaller.


Monday, September 14, 2009

Combine Dodge, aka Henry Rain


I took the modified RockRain XNA game project I've been working on and deployed it on my Xbox 360. Pretty neat. Henry made me change it from Aidan's face to his face. Plenty fun though none the less.


Thursday, September 10, 2009

XN-Yay!

Well, it isn't the best but the basics are there to demonstrate the concept.
Essentially you are looking at XNAMentor's Space Invaders project modified with our game concept in mind. I also got the Blender to XNA FBX pipeline working so I'm feeling pretty confident we can pull this off.

Additionally, I've been reading Beginning XNA 3.0 Game Programming and I've got one of the "games" working. It's originally a meteor dodger game where meteors fall and you have to avoid them. I modified the art so instead of a spaceship, you are combine harvester that dodges my son Aidan's face. This was a big hit with my son Nate.


Monday, September 7, 2009

GSP, XNA, and SVN Oh My

I bet I'm not going to get any readers based on that title, but I don't know a better way to sum this up.

My first week of GSP-360, Applied Development Project, ended Sunday and it was a roller coaster ride. First off, the class is more focused on documentation than development and strongly suggested we do a "mod" instead of a "from scratch" project. I was very disappointment but with the professors approval, I recruited a team to make a game from scratch using the XNA Game Studio framework.

The week started off rough, being that our communication needed to be ironed out. That, and I was somewhat stressed because I'm new to C# (the programming language) and XNA (Microsoft's branding for game related software and development stuff). I didn't really know what I was getting into. However, after we got together and chatted using Google Talk, we settled on a concept.


I suggested a game and the team was willing and eager. The concept is a simple arcade style shooter, similar to asteroids in design but instead of trying to blow up asteroids, you shoot them to change their course and steer them away. I put the concept art above together to help communicate the idea and I think that helped.

Additionally, I set up a SVN repository for us to work in. This is especially important for programmers. For those who don't know, SVN (aka, Subversion) is a Version Control System and that means that we can work on projects together, but a master repository holds all our stuff. If we make changes to something, we check it in and others will get the changes. It should help us work together easier because it mandates document control. An easy way to imagine it is if your team had to work on a letter together. Most teams divide out the sections and then put it together, which can work fine. But having one document that we all work in and change, almost like a shared file system, makes it so we all can contribute to every section.

I plan on writing up an SVN tutorial in the next couple days to explain what I did and how.


Friday, September 4, 2009

Onward to Education

I got my grade for GSP-410 (Software Engineering for Game Programming) today. Was excited to see I got an A.

I'm a week into my other classes now and things are going well. I'm taking a career development class, CARD 405. That is a real snooze so far. All about interviewing and the job market. Which would be good, if I didn't have a job.

The other class is GSP-360, Applied Development Project. The intent of the class to my dismay isn't to develop in the sense of software, its to develop a mod with focus on the documentation. The concept, game design, technical design, project design, etc. documentation. They suggested using Torque, which I was not a fan of modding to. We had to form teams, so I recruited 3 others to work an XNA project. I'm the lead. We'll see where we go.

Our first assignment, the Concept Document, is due on Sunday and we haven't decided what we are going to make yet.


Tuesday, September 1, 2009

XNA C# Gotcha #1

Thought I would post a problem I encountered and the solution I figured out.

Given:

A class, mySpriteClass, with method:

public Vector2 position { get; set; } // Sprite position on screen


And trying to update position in the game update loop with the following line:

mySprite1.position.X += 1;


Gives the error:
Cannot modify the return value of 'mySpriteClass.position' because it is not a variable


Change
mySprite1.position.X += 1;

to
Vector2 Position = new Vector2(mySprite1.position.X + 1, mySprite1.position.Y);
mySprite1.position = Position;


I thought I knew what is going on here, but when I tried to explain it, it got out of hand. Its something to do with value types vs. reference types.


Monday, August 31, 2009

XNA, GSP and Me

My new classes have started for Session B this semester. My GSP-360, Applied Development Project is shaping up to be interesting. It's designed more to be a modding class, but I don't want to use Torque (suggested) or mod a different game. So I proposed a XNA project. I managed to find 3 other people willing to give it a shot, with me as leader.

Hopefully we can pull it off. I tried to recruit capable programmers, but thus far they have been pretty unresponsive beyond expressing interest. Though, it is only day 2 of class. I'm just uber excited. Given that, I've already jumped into some XNA projects. Hopefully I'll have something worth sharing in a day or so.


Wednesday, August 19, 2009

Quickcam Pro Webcam Installed without Crappy Logitech Software

My computer at work went bust (thanks to an IT push) and I needed to have an admin reinstall the Logitech Quickcam Pro drivers. Unfortunately, the little driver for the camera comes with a 85 Mb download including some intrusive software that is always running. Why do these little peripherals have this crap?

Anyway, I was determined not to install this crap again so I scoured for other drivers without much luck. So I tried opening the 85 Mb EXE (downloaded from Logitech) with WinZip and what do you know, its an archive. So I extracted it, plugged in my camera and navigated the hardware wizard to the extracted drivers directory and now my Quickcam Pro 4000 works without their "software".


Monday, August 17, 2009

Face Detection ala OpenCV


I found this cool tool called OpenCV, which stands for Open source Computer Vision. Its a library for programming computer aided vision stuff, such as with a web cam. I got the face detection algorithms working and as you can see, we're having a little fun with it.

The little red circle on my forehead is the brightest spot in the image. The software will detect any number of faces, circling each. I'm going to make a "temperature" plot based off a target color to help diagnose finding a green laser dot.

I know that although this may sound simple, I'm going to have a lot of problems with color and balance considering the lighting situations I have.


Saturday, August 15, 2009

A Nearest Color Algorithm

I've been developing this software at work to take an image from a video stream (a webcam in this case) and detect if a green laser dot is present. After spending most of my day getting a project to compile and a program to recognize my webcam as a stream, and being distracted by numerous other projects and co-workers, I just wasn't at the top of my algorithm development game to detect the green dot. Combine that with office lighting and you know my dilemma (fluorescent lighting is often green tinted and throws off a white balance.)

I start by stepping through each pixel in the source and check its color. If you take the pixel's colors from each channel and find the average you've essentially got a gray scale value. This doesn't work so well since some shiny metal might throw off the detection (like a ring). If I wanted to find the brightest spot, this is a good approach, but I needed to emphasize the green. At first I added a weight to the green channel by simply doubling it. So now the average is calculated as (R+G+G+B)/4, counting the green channel twice. This was better, but also prone to problems.

At the end of the day I had a basic project setup and working with some hit or miss detection. I had invested over an hour into multiple approaches and although my algorithms for color matching were working somewhat, and I knew there had to be a better approach.

What dawned on me later was something I should have noted much earlier. I know that the RGB color concept is essentially a three dimensional array, but since it is color I'm used to thinking of it two dimensionally like you see in an image editing program. Once I visualized it as a 3D space, a big cube made of blocks so to speak, I knew my answer.

You know the shortest route from A to B is a straight line right. This is easy to calculate in 2D using the Pythagorean Theorem as you probably recognize:

a² + b² = c²

This also applies in 3D space, which is exactly what RGB color is. An RGB value is a point in a 3D space. The Theorem applies like this:

a² + b² + c² = d²

The obvious solution was in front of me but I didn't see it. Euclidean distance would give me exactly what I needed. I needed to treat the color difference as a distance.

r² + g² + b² = d²

For instance, say I wanted to find the closest pixel in the supplied source to a target color RGB 128, 255, 128. I check pixels against my target color by finding their channel distance. So imagine I have a black pixel of 0, 0, 0. My distance is calculated as:

r = pixel_color - target_color = 0 - 128 = -128
g = pixel_color - target_color = 0 - 255 = -255
b = pixel_color - target_color = 0 - 128 = -128

d = sqrt(r² + g² + b²) = 312.7

What if I have a pixel with color 0, 0 255, or a pixel with color 0, 255, 0. Which one is closer to my target? If I calculate the average, they are the same. But by distance, the green pixel is closer to my desired.


Monday, August 10, 2009

Your Controls a-Splode


Splosion Man, a XBox Live Arcade game that is pretty fun (especially according to my 6 year old) has a lot of humor. For instance, this menu allows you to remap the button controls. However, your choices are limited to the following: SPLODE. As you can see, I've remapped each of the buttons to the available options.

This is just the trail version, so perhaps they actually do do more, but this made me laugh non the less.


Guerrilla Self-Esteem Promotion

Recently, in my neighborhood, the roads re-surfaced with tar, then with small loose gravel. This sign used to say "Loose Gravel" but some awesome, yet unknown, neighbor decided to change them into something much better. This is the "Be Happy" version, the other 3 signs were changed similarly, with 2 others saying "Laugh Often!"

It was a good day.



Tuesday, August 4, 2009

PdaNet for Android Doesn't Work For Me

I follow a number of tech blogs, game blogs, fun blogs and serious code blogs, and then some, and the best time for me to do it is at work. Granted, much of it is personal interest, but it turns out my work is often very related. This was working fine and although they block everything cool or interesting on the main network, they didn't on the guest network so I was free to roam via my laptop. Until Monday that is. They have now installed the worlds most ridiculous, draconian, big brother web blocking scheme imaginable to guests. Game is a four letter word. Storage sites like imageShack are blocked, no questions asked. Absolutely no streaming anything, including YouTube, Viemo, and a sad consequence is the Ted presentations. This from a company that is shouting (though its up-to-the-era internal message systems, such as that paper newsletter we can pick up near the door or get in our mail box) how innovative and cutting edge we are.

Damn it pisses me off. The internets is video and they block it. The internets is streaming and they block it. If I try to search for something graphics or programming related, it often ends up blocked, flagged as game or hacking or forums. Forums and IRC and newsgroups are off limits, good thing this isn't where the answers to common questions are easily found. The company is digging themselves a grave IMO; a shallow grave of cold old technology to cuddle up with and wither away as the world passes them by and their employees dream of greener pastures.

Anyway. For mostly personal reasons I was trying to find a way to bypass their guest internets connection all together so I looked to my G1 phone and found an app called PdaNet. It basically tethers a Smart Phone to a PC via USB and the phone acts as a modem, using the 3G (or Edge I guess) network to access the internets. The install is one of the best I've seen and was painless. The software is easy to use and has user controls where they should be (it only runs if you ask it to). But the problem is that although I'm able to see the internets unfiltered, much of it just doesn't load or times out. Gmail and Reader fail to load, as did a few others I tried. Other sites opened fine, but it was of little consequence since my main hope was to bypass the filtering so I can read the blogs I like as they are intended, with images and video.

One of my objectives at work is to stay up to date on relevant technology. I can't do that at work now. A project I'll soon be working on will incorporate interactive technology, which is impossible to research at work because of the blocking. To me, this is basically guilty until proven innocent shit that is going to hurt them more than help.

BTW, if you want to e-mail me at work, don't put swears in the e-mail because I won't get it. That's right, they filter my e-mail and if it has a naughty word in it, they swat it down.


Sunday, July 26, 2009

C++ Wisdom

An object encapsulates state and behavior. Abstraction is the means by which the state and behavior of a class are derived from the many specific instances of things that the class is said to represent.

Object oriented (OO) programming is a tricky devil, especially someone like me who was self taught BASIC when I was 9. Reading the above gave me one of those light bulb moments that helped me break through some of the OO jargon and C++ I'm working with.


Saturday, July 25, 2009

iPhone Card Game Art


I'm working with another iPhone developer for a card game. Here's what I have so far for the cards.

I was trying to go for a more modern theme, hence the shiny look. It looks good on the phone. Oh, the characters are part of the theme too.


Thursday, July 23, 2009

How Far We've Come


It's been 40 years!
via Bad Astronomy


Wednesday, July 22, 2009

I updated my iPod Touch for Free

F! Apple. Why would they charge iPod Touch owners $10 to upgrade to the new 3.0 firmware but its free for iPhones. It's another example of their smarmyness. You can buy a brand new iPod Touch, get home and find out there's another $10 fee to get it to be current.

Regardless, I've been adamant about waiting until the price dropped to free before upgrading but circumstances required I upgrade. I started working with a developer who's targeting the new 3.0 and his app wouldn't install. I went to the internets for options.

I found many sites listing how to upgrade for free which sounds great but the comments are sprinkled with many fails. After a few fails of my own, and a restore or two later, I managed to get the 3.0 Firmware onto my iPod Touch 2G without shelling out $ to the man. Here's how:

1. Be sure you have iTune 8.2 or newer. This is one of the big problems I suspect since the 3.0 Firmware will not work in older iTunes and the error it gives is confusing.
2. Go here http://www.felixbruns.de/iPod/firmware/ and download 3.0 firmware. If you have a 2G Touch, get the 2G ispw file.
3. Start up iTunes and plug in your iTouch.
4. Select it in the iTunes devices list.
5. Click on “check for update”. It will go to the sales pitch but just click cancel on the borrom left. It will return to the devices page and “check for update” should change to just "update".
6. Hold shift and click “update”
7. Select the ispw file you downloaded.
8. let it run its course like normal.

This should update the firmware and you wont lose any files.

I've only done this with my iPod Touch 2G. If you're wondering, the 2G Touch has physical volume control on the side and speakers, whereas the 1G has no physical volume control and requires headphones.


Saturday, July 18, 2009

Week 2, GSP 410

Week 2 has been a slow start. That is not entirely true, as I had an incredibly busy week with XNA, working late and other obligations, but I've finally sat down to do the reading and homework.

As much as I appreciate DeVry's online classes, I have a real hard time dedicating any time to the forums. Essentially, each week we (the students) are required to post at least three posts on three different days, with at least one before Wed. This usually isn't a big deal, as I manage to shake something out quick. But the content of this class is so serious, it's becoming arduous.

Regardless, I've found some of the reading lately very interesting. I may have to blog about that some. FYI, the book is Software Engineering for Game Development by John P. Flynt.

Interestingly, my curmudgeony attitude about installing Smart Draw and its use in this class struck me in realization that the demo comes with the book. Doh, no wonder we are using it in the class.


Tuesday, July 14, 2009

I Need a Cool Business Card



Right now I'm thinking paper robot.

These are cool too.



Thursday, July 9, 2009

Week 1, GSP 410

Wow. I mean, wow. I'm having a really hard time not being cynical about my first assignment for this semesters class.

First off, I had to install another program and I really dislike doing that. Especially demo trial-ware of a program I've never heard of and I'm unlikely to use. The program is called SmartDraw, and though it has some decent looking features, it isn't the sort of thing I do every day. The extent of what we did could be done in Word, or Powerpoint, two much more logical choices in the long term. Plus, it bothers me a little that the class assignment is to download and use and turn in work done with a trial demo software. I wonder what the SmartDraw people would think of DeVry using their software this way?

Here's the instructions as I saw them, the the bad grammar, spelling and missing instructions as is.



And this is what I had to do to it.



That's it. Well, that's one third of the assignment, though it was just as simple. Basically select the shape and then fill in the wording as it appears in the book. I hope I can actually learn something from this class. Something outside the "discussion" area, where in my experience to date, little has be learned.


DeVry again

After a much enjoyed and much needed 2 week break from classes, I'm back at it. I'm now enrolled in GSP 410, Software Engineering for Game Programming. So far, the reading has been so dry I can't get through it. Although I think it has some good points, I just seem to have a problem with non-fiction.

Anyway, I'm downloading SmartDraw for my first assignment. We'll see how it goes.

On an aside, I decided to try and link with my professor on LinkedIn, he wouldn't be the first. Unfortunately however, he was unwilling to do so. I don't know why this bothers me, as it doesn't really matter. I guess I just don't like the rejection. Obviously its his profile and he can link with who he wants. Maybe its for the best though, since his profile picture makes him look like a weird stalker.


Tuesday, June 30, 2009

Don't You Be My Neighbor


The DEA was out in force today in my back yard. Turns out for the last few years we've had our own weed house in the neighborhood.

This really creeps me out. So close.

On Sunday Gail and I noticed some strange behavior over at this house. We were on our deck and we noticed the neighbor was pulling dead plants out their backyard basement window. We commented on it jokingly, as they must be cleaning out the weed. We don't really know these neighbors, having never taken the time to try and get to know them. I couldn't identify them if I needed. Last night we watched the Season 5 premier (onDemand FYI) of Weeds on Showtime too. Then today DEA raids the house.


Sunday, June 28, 2009

Dean's List

Grades are in, I'm on the Dean's list again!

I was worried going into the final for GSP-380, but once I started it was a breeze. Some of the questions were wonky to try and trick you. Or maybe just poorly phrased to try and be different, but a strong A pulled through.

My next class is GSP-410, Software Engineering for Game Programming. Hope this class rocks. I'm taking it alone so I can give it some focus (and take some pressure off during the summer).


context is king

context is king



Friday, June 26, 2009

ARhrrrr


ARhrrrr is an Augmented Reality thingy for mobile devices. I can't wait for this sort of stuff to become more common place.


i'm good at golf

I'm good at golf



Thursday, June 25, 2009

i'm golfing

I'm golfing



Wednesday, June 24, 2009

O-Force


via Lysol-Jones Deviant Art


Yes, that is Obama with a gun wielding statue of liberty robot.


Friday, June 19, 2009

Nailed to the wall

Railway spike gun used against ghoul. Decapitates it and nails its head to the wall. Fallout 3 is amazing.



Sunday, June 14, 2009

Week 7 GSP 380 Ends, Final Begins


I finished my week 7 GSP 380 homework with flying colors I think. This week was about animation and inverse kinematics. The lab had us calculating the bones of a two jointed arm to find the appropriate angles and then animate them. It was very interesting, although pretty easy since it was really all spelled out. I went above and beyond the assignment and added some controls to adjust the length of the arms and the rate of animation. I also added error checking in the event of unreachable positions so the arms would still do something appropriate.

FYI, the lab's in this class generally comes pre-packaged with a basic skeleton of a program and then we, the students, have to add the guts. In this case, the window with camera controls and a white sphere were starters and we had to add the arms and do the math.

This is the first class I've had some struggles with. I've stayed in the A range most of it, though I really messed up one quiz with a 40%. I learned that I should prepare a little better and not make overarching assumptions regarding similarities between OpenGL and DirectX. This puts me at a B if I don't get above 80% on the final. I get 3 hrs to do the 300 point final, which consists of 21 multiple choice questions and 5 essay questions.


Friday, June 12, 2009

Where has my head been?


I rented Fallout 3... And after 6 late nights with the game, I had to returned it. I'm going through withdrawals wishing I hadn't taken it back. Oh well... I was at Target today and I would have dropped the $60 on it had I not already ordered it online a few days ago. It won't be here for a couple days unfortunately. It's probably for the best since I've got assignments due and a final next week.


Tuesday, June 2, 2009

E3 Day 2

I don't know if I'm biased or what, but I still think Microsoft did a bang up job with their press conference this year. It seemed that in response to Project Natal, Sony announced their own form of motion control, though it uses the Eye Toy and some wand controllers.

I do think some games could be great with this concept, but Natal shows so much more promise IMO.

Nintendo also announced something like a dozen new Mario games, so not big deal there. Their new Metroid game though shows promise, regardless of its awful name.


Monday, June 1, 2009

E3 Day 1, Microsoft

I just watched G4's coverage of the Microsoft Press event and the most pressing question I have is what can Nintendo and Sony do to top it, if even match it? It reminded me of last years event but with less stuff I could care little about (You're in The Movies, Lips) or feel remotely embarrassment for the presenters.

Of course the games are a big deal. The Left 4 Dead sequel, Modern Warfare 2, Splinter Cell and Final Fantasy XIII interested me the most, but it was Project Natal that had me really thinking. I've been predicting to friends, family, co-workers and even in my classes, that the next big thing will be no controller. I even mentioned today the idea of being able to drive without a controller by just by holding your hands in the air.


I also realize that the internets are going to be very skeptical about this too. They will undoubtedly say Microsoft is copying the Wii, but I honestly think its the next step. One that Nintendo could hardly make (with their lackluster system IMO and lack of real Online capabilities, etc.)

As I was watching Peter Molyneux present Milo I got excited thinking of the game possibilities. Seriously, here's the perfect interface for an honest to goodness story based game, a mystery exploration game, the next evolution of text based adventure into a fully imagined, 3D world. Granted, its about the programming and the AI, but with the loss of a controller it becomes something so much more.



Saturday, May 30, 2009

Texas Storage

It's a box... you put stuff in it.

Sister gets married

Who's taking whose picture?



Sunday, May 24, 2009

Nap

Posted via Pixelpipe.


Friday, May 22, 2009

Taco Taco Juan


Here's a character I'm working on for an upcoming iPhone application.


Monday, May 18, 2009

Star Trek, Logical Smogical

Why such a big red ball when a little one would do?
Why are Romulan mining ships so bad ass?
Why be so vengeful when you could go save your planet?
Why bother with ships if you can teleport across the galaxy?
Why a giant red crab monster on an ice planet? And why not very coordinated on ice, its only lived there its whole life.
Why drill a hole to the core when you don't need to?
What would happen if the whole ball went up? Oh... just that?
Who's going to save the whales now?
How did, a group of miners on a mining ship mind you, they know when Spock would arrive through his time travel trip through a black hole? Is there some standard function for determining when he would arrive?
Where do you hide a ship for 25 years so the federation can't find it?

BTW, I really enjoyed the movie. It was great, even with these nagging questions.


Sunday, May 17, 2009

Two Weeks of Class

The week before last, Week 2, in my GSP-380 class we had to get OpenGL to render a rotating diamond shape with a light source. The image shows the result with a function being called to draw the triangle normals.


This last week was about DirextX. I don't know if I like DirectX. I think I approached it wrong, since I have some experience with OpenGL it seems really foreign. Regardless, for the assignment I had to get three spheres rotating around each other, like the sun, earth moon.



Thursday, May 14, 2009

4 wheels

Grandpa and Grandma got the boys a four wheeler. Its a little too fast or underpowered though, depending on the speed controll, but Aidan still liked it.



Thursday, May 7, 2009

Sales Slump

The idea that you can just drop your game in the iTunes App Store and make millions is probably a fallacy. Perhaps with the right marketing, and a good circle of friends and family, and a little luck, it is possible. I think we may have lost our chance for momentum. To my credit, I haven't done this before.

Here's a little detail on how the game, Board@Work, is doing. Its not as hot as I had hoped it would be. I found this cool website called MobClix that does some tracking. Below is a picture of it, along with our sales figures.



Apple takes a day to let you know about sales, so I'm hoping this gives a little insight into the future. Essentially, after a big slump on the 5th, we've started to climb. According to the ranking, its higher than previous so hopefully that trend will continue.

I think its a fun game, but I can understand why people might not give it a chance. I think

I've sent some free codes to some of the podcasts I listen to and enjoy the most, hopefully that will pan out. I've sent codes to Chad and the gang at the Video Game Show and Lono at his new gig, Respawn Radio. If we get mentioned, we may be able to get some traction.


Monday, May 4, 2009

LOD Calculations

The other day a coworker was asking me some modeling questions and I started spilling my philosophy like usual. He said he aims for 5 LODs (Levels of Detail) on his models. In my opinion, in the work we do, 5 is overkill. In fact, having too many LODs can hurt performance because that's 5 checks per model to determine which LOD to use (unless its a hierarchy driven LOD system, which maybe I'll get into in another post).
The basic idea of LODs is that as a model moves further away from your observer, the model's complexity decreases so you can gain some performance.
We eventually started talking about how to model smartly with appropriate LODs. I asked him what distances he was using in relation to his polygon counts.

The most basic concept for an LOD is that you switch a High Level Of Detail (HLOD) model with a simpler, lower detail model (fewer polygons generally speaking). The switch is usually instantaneous at a specified distance from the viewer. For instance, you may have a tree which is HLOD close to the camera. At 100 feet say, the models swaps out with a simpler model. And so on as you move further away. Eventually you can't see the model at all, so it can be completely hidden. The question you are probably asking is, how do you know when to switch those models?

The answer I've come up with requires some assumptions, some math and some basic information about your scene setup. I generally aim for 3 LODs at most, but this is arguable depending on model usage. Personally, I think less is better because it makes the modeler do more with less so to speak.

Here's what you need to determine:
- What is your desired Field of View (FOV)?
- What is your screen resolution?
- What is the size of your geometry?
- How big should the model be on screen when it switches LODs?

What is your desired Field of View (FOV)? I wont get into what FOV is here, but its basically the "zoom" of your camera. A narrow field of view, or smaller number, means the view is more telescopic, like binoculars. A large value, less than 180 degrees, is like a fish eye lens. To put it in perspective (no pun intended), in the first person shooter Call of Duty 4 the default FOV is 65 degrees. Call this value F.

What is your screen resolution? We could get fancy here, but I'm only interested in the horizontal number of pixels. A HD monitor would be 1920 pixels wide. Call this value R.

What is the important size of your geometry, S? Now models are not square, so what do I mean by size? Well, that's sorta up to you. Personally, I usually take into consideration how I expect to see the model. An airplane for instance might be long and wide, but not much height. Personally, I usually just take the largest value in relation to how I expect to see the model. For an airplane in a dogfight game I would use the wingspan, but for a game where you are on the ground, I would use the height since at larger distances that's how you'll most likely see them. Call this value S.

When should the LODs switch, or to put it another way, at what pixel width do you want the model to switch out? Call this value P.

Now here is the math part, I'll use a 25 foot tall tree with a diameter of around 8 feet as an example. The important size is its width because that is the bulk of the model, so S = 8. We'll start out by determining when can we hide the model completely? Let's assume we want to see that tree model until its screen presence is only, at most, 2 pixels wide. At that distance, we feel we can remove the model from the scene completely. At what distance would that tree model be represented by, at most, 2 pixels on the screen? Here's how you determine that distance:

Distance = S * R / ( P * 2 * tan( FOV / 2 ) )

For our 25 x 8 foot tree model:

Distance = 8ft * 1920pixels / ( 2pixels * 2 * ( 65deg / 2 ) )
Distance = 6028 feet

Wow! That's really far. So do you really want that tree to be visible up to that distance? If so, what does the model need to look like to represent that tree at that distance? Not much, its only 2 pixels big at this distance after all. You'd have a hard time distinguishing a 500 polygon model from a single triangle. Ultimately that's my point. In my experience, people model their low level of detail modes with too much detail. This method allows some insight into how to model as well as determining LOD ranges.

So now what? You need to determine the amount of detail you want on the screen and at what distance it is important to show it. If your LODs aren't constructed this way, you could be wasting a lot of performance.

For the tree, I assumed that when it reached 10% of the screen width (192 pixels), I want it to be its highest LOD. That corresponds with roughly 60 ft distance. From there to 2.5% screen width (50 pixels) is the medium LOD at 250 ft. The lowest LOD goes from there to 5 pixels, turning off at 2500 feet. Its debatable if you would want to divide this 3rd LOD further, vs trade polygons between the bottom two LODs. What I mean is that as the lowest LOD fades out to the distance, its polygons are less important. Depending on how you expect to see and use this tree model, you may want another LOD, or alternatively you can make the middle LOD last longer, essentailly allowing you to drastically reduce the lowest level of detail.

That brings me to my other point. This formula can also provide a modeler with a sense of what is important. Details that a modeler may include can be justifiably removed if their size in relation to their screen presence proves them useless, especially regarding reduction for LODs.

Of course, many engines today do more than just calculate specified distances. They can balance based on performance, allowing more detail if the frame rate doesn't suffer.


Sunday, May 3, 2009

GSP 380 Week 1 Complete

I just finished my homework for week 1 of GSP 380, Multimedia Programming with Lab. This week it was pretty simple though I'm really looking forward to the weeks ahead.

This week I had to get VS 2008 Express and the DirectX SDK installed and then compile and run two programs, one using DirectX and one using OpenGL.



For the OpenGL assignment we had to modify the program, which is why you see a different color and an extra triangle.



More Board

Ben wrote on the Touch Arcade Forums something that I think is worth sharing, and getting it out so it doesn't get buried in a forum post.

Quote:
Just wanted to give a little background on the game... When we set out to make this game, we fully realized that there were a ton of match 3 style apps in the App Store. But, we didn't feel that any of them took it to the next level of fun... Some of the match 3s out there feel more like a chore than a game.

So, Ryan and I each came up with a ton of ideas on what could make such a classic game style (match 3) as fun as possible. We tested out a lot of different game play methods and different power-ups, and ended up getting rid of a lot of our ideas as they didn't add to the fun or strategy. What we ended up with was a bit of Tetris, in that the blocks keep coming at a set interval, mixed with name your favorite match 3 (Bejeweled, Trism, whatever), but with power-ups that actually are useful and make sense. We feel the useful/strategic power-ups (office supplies) are a very unique feature in the match 3 genre - not many have power-ups and those that do seem like they were an afterthought in the development of the game...

We also brainstormed on a lot of theme concepts - Ryan started off with a design concept of the game as if it were played on graphing paper, which got a lot of discussion started, but we went through a few different concepts that were more iPhone-standard design concepts, where the artwork would look great, but wouldn't have done anything to set it apart. Then we hit upon an epiphany based off of Ryan's initial idea and our thinking that there wasn't enough humor found in the App Store. So, we ended up with an "office" theme that we feel (obvious bias) fits well with both the game and the humor element. We took inspiration from some of our favorite movies/shows such as Office Space and The Office as far as the style of humor goes.

We had the game play code and 90% of the graphics finished almost two months ago, and could've submitted to the App Store then, but we just didn't think we had the game balance just right nor the game's polish completely right. Basically, the past couple of months has been spent getting the balance right and really make the theme fit and add the polish to the finished product we wanted. We could've released it a couple of months ago, but it wouldn't have met the goals that we had when we set out to make the game - taking a classic game play genre/style (match 3) to the next level while adding some serious strategy elements and having a solid theme...

We're quite proud of this game and so far the feedback we've gotten has been even more positive than we expected... The best compliment we've received so far is, "Wow! didn't think I could get addicted to a game like this but i keep saying "one more time" i'm having a hard time putting it down - thanks!" The negative comments have been almost exclusively about there not being tons of players in the multiplayer mode, but it did just come out today...

Anyway, sorry for the long post, but just wanted to let everyone know what went into the game and our thought processes and goals. Maybe it sells 10, maybe it sells 1,000,000, who knows?

If you have comments or constructive criticism, please email comments@spigotgames.com and let us know... We're always looking for constructive criticism to make our games even better - we may even make you a beta tester in the future...

Thanks again,
Ben


Saturday, May 2, 2009

Don't be Bored at Work with Board@Work

It's on!

The game Board@Work for iPhone is available at the Apple App Store.

App Store


Friday, May 1, 2009

Bad Advertising

As seen in my Google Reader Slashdot feed, some poorly placed advertising.

Link to Slashdot article.


Thursday, April 30, 2009

8bit

Google Reader is exploding on me. I've found a few cool blogs and my feeds just keep expanding and expanding. Today I found a link to a cool video but its really the music that caught my attention. See the funny?



Monday, April 27, 2009

Sound Served

At work I played around with our sound server and sound messaging and I was excited to get variable engine sounds working working. When we first started doing sound on the PC, the system couldn't keep up with the simulation and play the sound at sync. None of us had any sound programming experience and could not get it to work well. We had some balancing issues so we made a sound server that could run on a remote machine where the processor wasn't consumed. This was good for a lot of reasons, but ultimately is ugly today IMO because it adds complexity and lots of messaging. Hopefully I can integrate sound directly into our simulation this summer. Meanwhile, since we are simulating some boats I added the ability to control volume and pitch and volume on indexed sounds that are attached to vehicles, and send messages with the corresponding values. The code looks something like this.

pitch = 0.75 + 0.5*currentSpeed/maxSpeed;
volume = 0.50 + 0.5*currentSpeed/maxSpeed;

//send message "vehicle index soundname x y z h p r volume pitch"

Its pretty simple and it works quite well. Essentially as the vehicle increases in speed the volume and pitch of the motor sound increases. It proved the concept, which I'm sure is how some games do it. Next I want to add an idling sound and modify it something like this.

if currentSpeed < 0.25*maxSpeed {
volumeIdle = 1.0 - 1.0/0.25*currentSpeed/maxSpeed; //goes from 100% to 0%
volumeEngine = 0.5 + 1.0*currentSpeed/maxSpeed; //this should max at 0.75
}
else{
volumeIdle = 0.0;
volumeEngine = 0.75 + 0.25*currentSpeed/maxSpeed;
}
pitch = 0.75 + 0.5*currentSpeed/maxSpeed;

//send message "vehicle index soundnameIdle x y z h p r volume pitch"
//send message "vehicle index soundnameEngine x y z h p r volume pitch"

This should let the engine idle sound be heard when the vehicle is not moving, or moving very slow. I don't know if this will work, but I bet with some tweaking it will sound ok.

Also, since this is for a boat it makes sense as there is no shifting or gears; the engine just ramps up. But if I want to apply this to another type of vehcile with a more complicated engine, it could be modified this:

pitch = 0.5 + 0.25*gear + 0.75*currentSpeed/maxSpeed;
volume = 0.5 + 0.75*gear + 0.25*currentSpeed/maxSpeed;

Where gear is used to make the sounds see-saw some for that vroom-vrooooom-vrooooom sound of changing gears.


Wednesday, April 22, 2009

DeVry Spring 2009A Completed

I hadn't written anything about my current courses lately because they bore me severely. It was bad enough trying to participate in the forums and do the homework. No doubt I got A's, but I don't think I learned all I could have. Regardless, I just finished both my finals.

My classes were CIS-246, Connectivity with Lab, and PSY-C305, Motivation and Leadership. 246 was a lot lamer than I expected. I had hopped it would involve some programming, getting some communications going across computers but that wasn't the case. It was more like IT. Make a new user, put them in this group, change their password, etc. I've done most of that before. I've done my time in DOS and VAX and Unix, and I've had a home network since 98, so this was cake. In 305 I actually had to think and think differently. I learned some interesting traits about people and how to lead and make good teams, though I have no real way to apply it currently. I much prefer technical mumbo.


Tuesday, April 21, 2009

Game For Review, Board@Work

Ben submitted our iPhone game on Friday last week. He expects it to take about a week to be released, since his last game took about that long to be approved. Since then, we've made a video to showcase some of the gameplay.


I also helped him update his website. I'm not one much for web design, because its often frustrating and time consuming, but I think simplicity is nice. Hence, the design of his site conforms to that. You can check it out, along with info about the game, at SpigotGames.com


Saturday, April 18, 2009

Technology Rocks

DVD Wall


Mom's away, so I packed the kids along with some toys and headed to my parents new (and empty) house for the night. I packed a laptop and a projector and we rented a couple DVDs. But the laptop, being from 2000, didn't have DVD player software on it. There wasn't an unsecured network to be found either and I thought all was lost. Then I remembered my phone, the Google Android G1. I did a quick search through its browser and was able to download VLC, a 17 MB file, then transferred it to the laptop. Problem solved. Technology sure is neat.


Wednesday, April 15, 2009

New Logo for Spigot Games


I offered to make Ben at Spigot Games a new logo for his game company. It was selfish of me because I didn't like his existing logo very much. This is an improvement.

The drop shadow one is the one he is using. It helped give it some depth I think, though I'm 50/50 on which one I like more.


Friday, March 6, 2009

Board@Work

Board at Work
The game play is coming along nicely. The game is really fun to play. Game balancing and design is really an interesting subject, one that is undoubtedly overlooked by players. If we do this right, this should be one of the highest scores ever! (Only because the game score vs. time balance is in the works.)

FYI, Photo taken with my G1, ha.


Wednesday, March 4, 2009

Welcome to the Light Side


I own a iPod Touch now. Here you can see a development version of the game I'm working on. It's been really exciting. Ben at Spigot Games is really open to my suggestions and thoughts; its really awesome. So much so that I've earned myself a game design credit in addition to graphics. W00t!

My wife is a little bothered by the purchase and rightfully so. Hopefully this gig will pay out well enough to pay for my purchase.

What do I mean by "Welcome to the Light Side?" Well, certain people who know me know my issues with Apple. I applaud them for their success and innovation, but I'm disgusted by certain sales tactics. Case in point, the iPod touch doesn't use a standard USB interface. If you want to buy White cables to match your iPod, they cost 10x as much as the black ones. In all actuality though, the iPod is impressing me in certain ways. It's snyc with iTunes is pretty cool and easy (though iTunes is a weird application IMO). It also suffers a little compared to my G1 with its "keyboard". I can type 100x faster on the Android G1. See this.


Tuesday, February 24, 2009

DeVry Fall 2008-2009 Over

Last night I took the final for GSP-280, Simulation Design. It took me 30 minutes of the hour allocation. I need 49% to get an A. Interestingly, the professor e-mailed me today and said that the final was increased to 3.5 hours and that I could retake it if I wanted. I responded with a no-thank-you.

My other class, GSP-130, System Architecture and Assembler, was a different story. This class was a little more challenging. The logic of programming isn't hard, but the syntax of registers and the little gotchas were often frustrating. Regardless, I took the final tonight, going into it with 667/1000 points. The final worth an additional 300. I need at least 203 points to get an A.


My wife thinks I'm obsessed with getting A's, but I just want to know that I'm capable to my max.

Next semester (Spring 09) I've registered for something a little different.

CIS-246, Connectivity with Lab. This is essentially a networking class.
PSY-C305, Motivation and Leadership. Name says it all.

I had intended on taking something else, but when I called to register for it the adviser said I already took it. I hadn't, but my transfer credits counted towards it. My original adviser had misinformed my of my transfer credits. This advisor however made it a point to update the DeVry online information, "My Degree Navigator". A year plus and their database was out of whack. The whole time I just thought the tool was useless, but apparently it has some value. (Note a degree of sarcasm here. This is why I don't do any registering or bill paying online because what it says online hasn't yet meshed with reality.)


Monday, February 23, 2009

Back in the Box

My 360 is home now. It came back on Friday, but I had lent all my games and controllers to a co-worker since I wasn't going to get much use out of them. Thus, I wasn't able to play again until today.

The system is working well it seems, though my licensed downloads are acting funny. Braid for instance lost its saved games. Haven't tested much else. Far Cry 2 works and now that I've tasted of it again, its difficult to shelve it until after finals and my iPhone work is done.

I'm going to take my final in GSP-280 now, should be a breeze. I'm at 101%, so the 200 point final should be easy to blow through.


Board@Work

We came up with a game name, I think it really works too.

Here's one of the prototype icons for the game.


Wednesday, February 18, 2009

XBox Repaired

Now it just has to come home.


Saturday, February 14, 2009

iHeart Valentines

Though I think my "partnership" with the iAlleyBall iPhone developer fell flat, my postings led me to another. I'm working on some block game related art for another local developer. This icon seemed pretty topical for today.

This plastic concept was rejected though, but rightfully so.


Things are going very well with this new developer. He was very open and up front about our working relationship, which I appreciated very much. I think it is going to be good.


Tuesday, February 10, 2009

Arcade Progress



XBOX Box

Red Rings of Death means the warranty kicks in. I reported the problem and Microsoft sends you a box to ship your XBox in.

I have more free time now.