Archive

Archive for the ‘Blog’ Category

Tsunami texture mapping at long last

November 8th, 2010 No comments

I added texture mapping and blend mapping to Tsunami. The textures aren’t mine, they’re from a book and it’s associated tutorial. It looks much better now than the bland triangles from before. There isn’t a whole lot else to say about this except that I still need to add in the material system, which is next on the list.

I was able to add in a blend mapping. It just takes 3 different textures and blends them together based on what is defined in the blend map. These textures were also taken from a book’s tutorials because I don’t really care to make the textures or the blend map for that matter.



Two dropbox instances for one Win7 user

November 7th, 2010 No comments

I’m always afraid of websites randomly disappearing, especially when they have useful information on them. I happened to stumble across a website that explains how to set up multiple dropbox instances on a windows 7 or vista machine. I’m going to briefly just copy that info here for my own reference ( and yours :-) )

  1. Setup dropbox like normal with an account.
  2. Create a second user on your windows machine with a password.
  3. Login as that second user.
  4. Install dropbox again for that user and set it to synchronize a folder that both windows accounts can access.
  5. Log back into the original windows account.
  6. Find the dropbox.exe in the other user’s folder that you just created: c:\users\<username>appdata\roaming\dropbox\bin\dropbox.exe
  7. Make a shortcut to that .exe file somewhere.
  8. In the shortcut’s properties, change the “Target” field to something like this: runas /user:<username> /savecred C:\Users\<username>\AppData\Roaming\D ropbox\bin\Dropbox.exe
  9. Double click the shortcut, type in the password, and it should be working.
Categories: Blog, Tips 'n Tricks Tags: , ,

Lighting for Tsunami

November 7th, 2010 No comments

I managed to get some lighting into Tsunami in the form of point lights, spot lights, and directional lights. Currently it only supports one light, but that will change. The next step I need to do is create a material system because, as of right now, there isn’t one and it’s a serious pain to pass stuff into the shaders manually.

The lighting in this image is vertex shaded lighting with ambient, diffuse, and specularity. The image is just a single spot light emanating from the camera in the direction of the camera, so it acts like a flash light. Wherever I point the camera, the light shines in that direction.

I’m not really sure if this is considered phong lighting/shading. I don’t really care that much since I’ll probably implement it later, but it seems that when people refer to phong lighting, they mean it’s per pixel, and the normals are interpolated and then renormalized on a per-pixel basis. These normals aren’t renormalized, but they are interpolated, since it’s a vertex shader that’s doing the work, but that’s about all. I’ve mentioned before that I planned on implementing a bunch of different lighting algorithms in the vertex shader and then doing the same for pixel shaders and then place them side by side to compare them, so eventually I’ll implement phong.

The next step on this ridiculous quest is to add texture mapping and the material system. For texture mapping, I’m just talking about basic diffuse texture mapping to at least make the ground plane look decent. I want crates too.

Categories: Blog, Other Projects, Tsunami Tags:

How not to suck at interviews

November 5th, 2010 No comments

I have been on multiple in-person interviews and, although I still don’t do very well at interviewing, I have picked up quite a few interview tips along the way. The main idea is: Interviewers are looking for any reason to reject you. Don’t give them that reason. This list will help you avoid common reasons for rejection. Some of these items might be completely wrong and may screw up your chances. If you think so, let me know and we can discuss it. After all, I said I wasn’t very good at interviewing. I will add more to this list when I think of them though too.

I have labeled each item as E – “Easy”, M – “Medium”, D – “Difficult”. Most of the difficult/medium entries are labeled as such because you have to remember to do them during the interview and you may be required to train yourself to stop doing bad things, which will require days, weeks, or months to get right. These difficult items are indeed difficult because there is already a lot going on during the interview.

Read more…

VS with diffuse and ambient lighting

October 25th, 2010 No comments

This is just an update, not really meant to show how awesome it is or anything.  I managed to implement diffuse and ambient lighting (which I’ve done like 1000 times but can’t seem to locate the shaders for). I’ll get in specularity after a while with both vertex and pixel shaders. I’m also debating on implementing specular maps. There is an obvious tradeoff. If I eventually get my material system up and running, the object will be able to specify whether or not to use spec maps or have spec calculated.

Did implement a cool little pyramid object in the background though. I’m planning on working in lots of different lighting algorithms as well. Phong is popular, but the interesting thing is that they can all be per-vertex or per-pixel. So I will be implementing both so you can see side by side comparisons.

Categories: Blog, Other Projects, Tsunami Tags:

Captcha for comments

October 20th, 2010 No comments

I had to add a captcha to my comments because I was getting way too much spam, but I guess that means it’s searchable from google.  A little status update, I’m a programmer on the Duke Nukem Next Gen project and we were able to obtain a non-commercial license from gearbox to develop the game. We’ll be using the UDK and I’ll mainly be scripting, so if you want to check out the coolness, go here: http://www.dukenextgen.com

I’m still trying to find time for my main engine project Tsunami.

Categories: Blog Tags:

Sine wave with Tsunami

October 9th, 2010 No comments

Sine wave

Sine wave using a vertex shader

Look kids, math.  Done using sine wave where the distance from the center is passed into the sine function (along with some other stuff). It animates with time too, but I didn’t feel like putting up a youtube video. I’ve wanted to make this for quite some time but I’ve just never gotten around to doing it. I always thought this looked cool though. May build off of this for a water scene in the future, but we’ll see. It used to have color associated with the height of each vertex, but I removed the colors and just made the height get darker. You can see the valleys get lighter in color.

On a side note, I’ve decided to keep posting the progress of my engine (which I’ve decided to call Tsunami). Mainly for myself to see where I’ve been because it’s kind of nice to see the progress I’ve made.

Good vertex buffers gone bad

October 5th, 2010 No comments

I encountered a particularly interesting bug, I thought I’d post it here. It’s actually fairly easy to reproduce. As you can see from the screenshot, my scene is all screwed up. I’m attempting to draw a triangle grid. I know it’s being generated correctly because it was displaying earlier, but as you can see, it’s interesting because I’m drawing in wireframe. The real reason is because I have a memcpy() going on that is copying a vertex from 1 array to another (for various reasons). When I did this, I was copying only 3 vertices ( and forgetting about the 4th color), and overwriting the 4th element (the color) with the next vertex component (x value).  Note the vertex positions are capped along the x,y, & z. This is because I am giving (what I thought), each vertex a red color. This red color stomps all over the vertex positions in the array. The reason it caps the x,y,z is because the red has a max value of 255.

Besides that, I finally got my camera operational. I’ve done cameras in the past, but I had a bit of trouble with this one because I was hazy on my transforms.. After brushing up, I was trying different things such as using Quaternions, giving the camera a model world matrix and just inverting that for the view transform. Calculating the view transform myself by using only cross products or by using the Grahm Schmidt rule. For the mean time, I opted not to go with Quaternions even though I wanted to because I don’t have my quaternion library fully operational yet. So I decided to use spherical coordinates.

This worked better than expected, but there are a few corner cases. Looking straight up or straight down results in a division by zero so the screen goes blank. Also, you can flip the camera completely around so the controls are backwards. For example, if you were to look up, and then keep rotating your head so that you’re head is upside down and you were looking behind you (don’t try this at home, or anywhere else for that matter, you might scare people). This was really irritating for me, but clamping the latitude value between 0 and pi for the camera orientation solved all 3 cases.

clamp( latitude, 0 + delta, pi - delta );

Where delta is some small value.

Engine Update 001

September 28th, 2010 No comments

I’m in the process of redoing my “testing” engine. I hope to make it robust, scalable, modular, while supporting a lot of other different technologies. This is the start of it using D3D9, but don’t worry, I’ll eventually port it over to d3d11. I’m going to skip 10 though. I have lots of things in the works for it too!

As you can see here, I have a few simple cubes and a triangle grid. Most likely the grid will turn into terrain. I haven’t decided what I wanted to name the engine yet. I’m leaning towards “Tornado.” I remember looking into a physics engine a while ago named “Cyclone” and I thought the name was interesting.

How to become great

September 27th, 2010 No comments

I was reading an aigamedev.com article about the gaming industry and I stumbled across a piece of knowledge that I feel was very valuable. It’s something I try to do everyday and I believe you should to if you want to become good at what you do.

“Embrace diversity, and  try  to  find  something useful  and  worthwhile  everywhere, from  every  person.  Make  an  effort to understand what they are saying, deeply,  and  incorporate  it  into  your own  way  of  thinking,  so  it  can expand.  Keep  your  own  opinions and  convictions,  but  relish  every opportunity to learn.”

-Paul Tozour

Categories: Blog Tags:

VS2010 Extension – Better Fix Mixed Tabs

September 27th, 2010 No comments

I frequently deal with code that has tabs in it that needs to be converted over to code without tabs, preferably without losing any formatting. Unfortunately I have yet to find an extension to do this. I thought an extension called “Fix Mixed Tabs” would do the trick, but it only untabifies or tabifies the beginning of a line, so I wrote this one which can be found in Microsoft’s Visual Studio 2010′s gallery.

It can convert between tabs and spaces, it doesn’t go just one way.

Title: Better Fix Mixed Tabs (because Fix Mixed Tabs doesn’t do what I needed)
Link on Microsoft’s site (recommended): Better Fix Mixed Tabs

Adding “edit with” to context sensitive menu

September 18th, 2010 No comments

I manually installed notepad++ into my dropbox folder so I could use it anywhere. Unfortunately, it didn’t add the “Edit with Notepad++” entry for the context sensitive right-click menu. This trick works for almost any application that accepts a file name on the command line as the first argument.

To see if your application has this ability, open up a command prompt (start->run->cmd). For example, lets see if notepad has this ability. In the command prompt, type “notepad.exe file.txt” without the quotes and where file.txt is some text file in the directory the command prompt is currently in. Notepad will launch with file.txt loaded and showing. If you can do this with other apps (such as Notepad++), then you are good to go.

So to add the “edit with” menu option manually, you have to create a text file and add this to it:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Edit with Notepad++]

[HKEY_CLASSES_ROOT\*\shell\Edit with Notepad++\command]
@="\"E:\\DropBox\\toddseiler\\My Dropbox\\Apps\\Notepad++\\notepad++.exe\" \"%1\""

Replace the path with wherever you installed the application you want to launch (in this case, it was notepad++.exe).

Two things of note: Make sure the path has double back slashes between each directory “\\” and make sure that after the “file.exe” file name, there is a trailing “\”. In this example it says “…\notepad++.exe\” This must be there.

You can make it say whatever you want in the menu by editing the words “Edit with Notepad++” to whatever you want.

Save the file with a .reg extension. After you do this, the file should have have an icon with little blue building blocks on it. Double click it, windows will ask if you really want to enter this into the registry, click ok/yes.

You now should be able to right click on any file and have the menu option come up. Clicking it will result it the application launching with the “clicked on” file loaded (if the application developer implemented this.)

Categories: Blog, Tips 'n Tricks Tags:

Corporate America == lack of morality

September 9th, 2010 No comments

I’m going to rant because I’m pissed off. I’m going to talk a little bit about how large companies and corporations hide behind their contacts to avoid having any moral obligations. What pisses me off is that when a company does something that’s morally wrong, or just not nice, no one individual or group at the company takes responsibility. They just say, “well it’s in the contact,” or “it’s the company’s policy.” Even if it is in the policy / contracts, that doesn’t make it morally ok. Apparently companies of all sort thinks it’s ok screw people and do wrong things because they have contracts and policies to hide behind that can make them feel better to do the wrong thing. Of course it’s easy to say: “Well it’s not me that’s doing the wrong thing, it’s the company, or it’s the company’s policy.”

When an honest person makes an honest mistake, the corporation implies penalties with no remorse. If a person forgets to pay rent, they’re immediately evicted, charged for every day they’re late, etc. etc. All because a person forgot, a natural human tendency, not because the person didn’t have the money. If that person was dealing with an individual human though, the story would be different. People would not be pissed off, the landlord would understand (unless they’re as crooked as a corporate policy), because perhaps they also forget things in their life. The landlord would get their money and both parties would feel like they morally did the right thing. (reminding leasee to pay, paying to stay there). When a person deals with a corporation though, the human gets screwed because no moral boundaries exist on the corporation’s behalf because the corporation is like talking to a brick wall, there’s no emotion, and it can’t be judged. When that person confronts someone at the company about it, they just point the person to their policy and contracts as an excuse to screw the client and pawn their moral obligation off on someone else. That someone else being something that can’t have any notion of morality.

It’s like shooting and killing a robber and then saying “It’s ok, he was a bad guy anyway.” That person is just hiding behind a wall that doesn’t really exist to make themselves feel better for doing the wrong thing. When you have two people, there’s give and take. When you have 1 person and 1 company, there’s no give and take. If the customer gets screwed, the company loses their client, which usually doesn’t matter for the company because they are a company, and thus, probably have lots of clients/customers.

I think I’m going to start seeking out mom and pop shops from now on. This has pissed me off way too much.

Categories: Blog Tags:

Joomla to WordPress migration

September 6th, 2010 No comments

I moved my entire website over from Joomla to WordPress because I find wordpress easier to use. The interface is a lot cleaner and elegant. With Joomla, for example, I kept getting confused between a “section” and a “category” and it REQUIRES you to use both. WordPress just has “categories” and that’s all I need because you can make subcategories and subcategories within those subcategories. I also think it’s a bit faster too, but I also changed my hosting provider too from goDaddy. goDaddy used to be pretty good, but their website is a horrendous mess and my website was so unbelievably slow I wanted to throw stuff.

Anyways, wordpress is really nice because there are lots of ways to customize it easily, like with the addition of plugins. There are tags (which I didn’t have before), and for some reason, google didn’t really like my site when it was on joomla. I don’t think it was being indexed properly because Google only was able to pick up my main page. The only problem I had was the migration from Joomla.  I did find a tool, but it was for an old version of wordpress & joomla. It wasn’t too difficult to fix, but it did take a day or two. I reposted it under my “other projects” area though, the author didn’t seem to care. I was hoping he would repost it on his site, but he hasn’t contacted me back yet.

I did find some bugs in the tool regarding quotes in strings. That was a major pain because the quotes were ultimately going to be in the sql statement. I already had a lot of posts, and most of them looked ok, but only a handful of posts didn’t and I didn’t know why. After a little research I realized that, for some reason, I had uncommon characters in my post. Basically sql choked on these characters (i.e., didn’t say a thing and just died.)

Other than that, a lot of site specific stuff needed to be fixed. It probably isn’t all fixed, but periodically you may find stuff in the site that has the string “{jcomments}” in it. This was a thing in Joomla that allowed me to insert a “comments” plugin. So I had to through and fix a bunch of that kind of stuff. There were also some formatting issues that caused the entire site to blow up. There weren’t too many issues, but overall, it took about 20 – 40 to get things running smoothly. I still was hoping to check out a bunch of other cms’s, but as soon as I tried wordpress, I fell in love.. :)

Overall, the style of the site currently is Ok. I had to edit some stuff to get it to look the way I wanted though with the current theme, which I like with a few tweaks.

As a side note, I have support for LaTeX.  See math equation below for an example.

Now that the site migration is practically finished, I can get back to work.

Categories: Blog Tags: , , ,

Effective STL – Scott Meyers

July 31st, 2010 No comments

I finally got through Scott Meyers’ Effective STL book. After reading that book, I came to the realization just how problematic C/C++ is and how crappy the STL really is. His book teaches you a lot about the STL, but it also teaches you just how many “special cases” there are when using the STL. It seems like a good majority of the book is simply avoiding the STL’s pitfalls and special cases that screw something up. Since the STL is written in C++, i came to the conclusion that C++ is crappy, just like the STL.  Yes, it is powerful, but there are inconsistencies, and other issues I hate. A couple of them are 1) Multiple inclusion of header files. 2) Stuff not compiling because you included things in the wrong order. 3) Using “.” or “->” depending on whether it’s a pointer or not.

I’ve noticed after reading that book that all of these issues are nonexistent in C#. Unfortunately, C# doesn’t really have a separation of interface and implementation and it also requires the .NET framework. At least I only know of one C# compiler and that’s Microsoft’s. On the other hand, I really like C++’s ability to manipulate bits and bits and the like which is really helpful.

Overall, the book is pretty good. I wish there were a condensed version of his book though that just had the “what” with the brief explanations without all the “why.” Most of his book consists of the “why.” You could just read the table of contents, but you might not understand it completely based on the chapter titles.

The conclusion I came to is: the STL is crappy because it needs a book (ie, this one) to tell you what to avoid, and where it’s pitfalls are as well as how to use it. It should be easy to use, like any API, but the STL is well tested, and works pretty well as long as you don’t get too fancy with it. If you get fancy with it, either 1) be prepared for some headaches, or 2) know everything about the components you’re working with and their downfalls.

Categories: Blog Tags: ,

Shortcut drive fixer

July 31st, 2010 No comments

I made another one time use utility. I call it the “Shortcut Drive Fixer.”

After naming it that, I realized I should have named it “Shortcut drive changer”. Basically, I ran into an issue where I upgraded my computer and I wanted my games to be placed on my faster drive. I could have changed the drive letters around, but I wanted to take my games off of my slow drive, so if I changed the drive letters, other stuff would have broke anyways. So i made this simple little utility that reads in a directory (possibly containing subdirectories), and changes the shortcuts to point from one drive, to another.

It fixed all of my shortcuts in one go. You made it a little user-friendly (though still command line). I’m sure you could break it if you wanted to though.

You can grab it here.

Categories: Blog Tags:

Everything Search Engine

July 24th, 2010 No comments

I first started with a tool called locate32. But the only time it indexes is on startup and searching was fast, but indexing was not, even though it said it was. So I decided to give windows 7 search a try. It is awesome when it works, but for the life of me, I can’t get it to work at home. So after a lot of frustration with windows search, I decided to give it up. Instead I found a search tool that actually works which is called “Everything”. It is fast, small, and pretty much what I wanted. You can get it from http://www.voidtools.com.

Categories: Blog Tags:

Getting access to hidden windows 7 settings

June 26th, 2010 No comments

There are a couple of things I recently stumbled across that gives Windows 7 users access to a ton of useful settings.

1) Make a folder on your desktop and name it: Everything.{ED7BA470-8E54-465E-825C-99712043E01C}

2) Click run and type in: gpedit.msc

If I come across any others, I’ll post it here.

Categories: Blog, Tips 'n Tricks Tags:

Port Scanner Proggie

June 11th, 2010 No comments

I created a little port scanning program in C# today. I found a tutorial on how to do it. It’s really easy. But it wasn’t multithreaded, so I made it multithreaded to keep the UI responsive. You can find it here.

Categories: Blog Tags:

Testing and Engineering

April 25th, 2010 No comments

Well, I began my job as an SDET at Microsoft as a subcontractor. It’s been a few weeks already. One thing I’ve come to realize is that when you have testing on your resume, recruiters automatically try to “pigeonhole” you into a testing position regardless of what your objective says. It’s already hard enough to try to get an engineering position in the game dev field. Even though I have testing experience, I think it’s almost more valuable to take that testing experience off of my resume. The problem is the gap in time that it leaves.

Categories: Blog Tags: