Engine Update 001

Tuesday, 28. September 2010

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

Monday, 27. September 2010

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

VS2010 Extension – Better Fix Mixed Tabs

Monday, 27. September 2010

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

Saturday, 18. September 2010

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.)

Linking libraries in code with MSVS

Wednesday, 15. September 2010

If you use visual studio, you can use a #pragma to tell the linker to link in a library. This way, you don’t have to screw with project settings if you just want to quickly test something.  For example, if you wanted to link in the winmm.lib import library, it is done like so:

#pragma comment (lib, "winmm")

Header Guards

Wednesday, 15. September 2010

A lot of people don’t know this, but #pragma once is actually an optimization. It is faster than using the #ifndef blocks.

But you’re in luck because you can safely write portable code with it, in case the compiler doesn’t recognize #pragma once by doing this:

#pragma once
class Classname
    int member;
#endif /* HEADERFILE_H */

Books I’ve read before 2009

Monday, 13. September 2010

3/5 – Introduction to Game Development
This books has a little to say about a lot of the different areas of game development. If you don’t know anything about the game industry or how things work, it would probably be a very good read. The sections that helped me personally were the physics and the programming sections. The rest were not interesting to me. I’m sure they would be interesting to the people that took interest in those sections, obviously.

5/5 – Get in the Game! – Careers in the Game Industry
Goes over in depth of how a game dev studio works internally and what each position entails. If you’re trying to break into the industry, I would definitely recommend this book.

5/5 – Unix for Dummies
If you’ve never used linux or unix before, this is a good book. It’s easy to follow and is actually a decent reference. Although it doesn’t have advanced things, which I wouldn’t expect it to. For getting acquainted with linux/unix, it’s very good.


Corporate America == lack of morality

Thursday, 9. September 2010

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.

Books I’ve read in 2009

Tuesday, 7. September 2010

4/5 – Advanced Lighting and Materials with Shaders
Discusses a ton of different BRDF’s that I never knew existed. This book is really book and meant for advanced graphics programmers. There are a couple of things I dislike about the book: 1) Math formulas are glazed over and never really discussed, so you have to figure them out for yourself, which isn’t necessarily the end of the world. 2) Spherical Harmonic Lighting section was confusing. I’m not sure it was the books fault though because the concepts are really advanced. I just wish they were discussed in more detail. I had to read the section like 3 or 4 times and I’m still not 100% clear on some aspects. Overall, if you are into graphics, I highly recommend this book.

3/5 – Focus on 3D Models
This book is a little bit dated unfortunately. I’m not sure why it bothered discussing the obj model format, I feel it’s pretty worthless. You can be the judge though as the model formats it discusses are as follows: md2( quake 2), obj, milkshape 3d, 3ds, mdl (half-life), md3 (quake 3). I was looking for a good model format and so far I’ve settled on a possible few: milkshape 3d, x format, or possibly md5?  Milkshape 3d seems to be a good general one that can easily be converted to and from others.

5/5 – Programming Interviews Exposed
I learned quite a bit from this book, like solutions to problems that I’ve never really come across before but that could perhaps be useful in the future. Unfortunately, a lot of the questions are simple of you know the “trick.” Otherwise, it’s a good exercise and refresher if you’re rusty. I felt that this book helped expand my mind and helped me start thinking outside the box.

Joomla to WordPress migration

Monday, 6. September 2010

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.

Software I Use

Monday, 6. September 2010

I am always on the lookout for the latest and greatest tools and evaluating and testing some of the best to make my life easier and my work go faster. The following tools are the ones that I find most valuable and useful for me. Almost all of this software is free except for a select few tools.

  1. Notepad++ – All around good editor with syntax highlighting
  2. FileZilla – a good stable ftp client
  3. SugarSync – backup files on the cloud, share, etc.
  4. Gmail – Email
  5. Visual Studio 2010 – Not free
  6. ViEmu Extension for VS2010 – Not free
  7. KeePass (use with sugarsync) – Manage passwords, cd keys, login information, etc.
  8. LogMeIn.com – Remote access your computer from any other computer through internet
  9. AntiVir Antivirus – Free and good
  10. Google Reader – Keep up on the latest
  11. Google Docs – Your docs can be accessed anywhere
  12. Nirvana (Nirvanahq.com) – Task management system. Get stuff done
  13. Google Calendar – Can create events and be notified on your phone.
  14. Local Website Archive – Save a single webpage for later
  15. WinHTTrack – Save an entire website for later
  16. CCleaner – Remove junk files from your computer from lots of different areas.
  17. f.lux – Adjusts monitor’s temperature according to daylight, makes easier on eyes.
  18. Secunia PSI – Finds all software on computer that has a security vulnerability
  19. Areca – Backup software, free
  20. Windows Grep – search inside of files for a specific word or string
  21. Directory Compare -
  22. Restoration – Allows you to possibly recover a file after deleting it.
  23. CPU-Z – Displays all sorts of information about your cpu, memory, motherboard..
  24. GPU-Z – Displays lots of info about your gpu, temps, etc.
  25. CPUID Hardware Monitor (HWMonitor) – Small, fast temperature monitor for your computer
  26. Input Director – Allows two computers to require only one mouse and keyboard.
  27. Startup Delayer – Makes startup faster by allowing you to schedule WHEN a startup app launches.
  28. Everything (http://www.voidtools.com) – Extremely fast and small file indexer, allows you to locate files instantly. Much better than win7 solution.
  29. Unlocker Assistant – Allows you to unlock files if their handle hasn’t been released by some program. Mainly for xp, I haven’t needed this on win7 a whole lot.
  30. Diskeeper 2010 – Not free, but the best defragger I’ve ever come across.
  31. RegAlyzer – A free more advanced registry editor. The main thing I use is the dropdown text box, so I can copy and paste entries from the internet into the box easily without having to navigate it manually.
  32. XML Notepad 2007 – Visually inspect and edit xml files.
  33. Google Chrome

Chrome Extensions:

  1. Google Shortcuts – Official firefox port
  2. Sexy Undo close tab
  3. Download All
  4. LastPass
  5. Google Mail Checker
  6. Neat Bookmarks
  7. FreshStart – Session Manager
  8. Speed Dial – An empty page has links to the most used pages you probably want to access.
  9. Xmarks – keep your bookmarks on the cloud and access them anywhere while keeping them synchronized.
  10. ReaderPlus
  11. Super Full Feeds For Google Reader
  12. RSS Subscription Extension (By Google)

I didn’t bother listing any of the reversing / assembly tools that I use as there are so many. You can find sites that has a list of tools that are popular.

Free Books Online

Monday, 6. September 2010

CG Tutorial
GPU Gems
GPU Gems 2
GPU Gems 3
ShaderX Series
GameDev.net D3D Book
The 3D Graphics Pipeline
Linkers and Loaders

C++ Casting

Sunday, 5. September 2010

Read more

Books I’ve read in 2010

Sunday, 5. September 2010

4/5 – How to make people like you in 90 seconds or less

This book is a pretty good book because it talks about things I probably wouldn’t have ever thought of. It can be used to network, get a date, or enhance your current social life. The book isn’t very long and at first the book didn’t seem to be that great. By the time I got to the end I was pleased with what I had read overall. I gave it 4/5 because I didn’t think the book was super awesome in any way, but I thought it was worth the read if you want to improve your social skills when meeting new people. I honestly don’t know what would make this book a 5/5 though since I’m not into reading these types of books very often.

5/5 – Game Development Essentials: Game Industry Career Guide
A very good book about preparing to enter the gaming industry. I wish I would have read this while I was actually in school.

5/5 – Pragmatic Programmer : Journeyman to Masters
Lots of really good general coding practices that I should have been taught but was not. All coders should read this to avoid sucking at their job.

4/5 – Effective C++
Although I knew quite a bit already, this book clarified the why’s. A good book overall. I still learned quite a few things.

3/5 – More Effective C++
Taught me why C++ sucks. Has solutions for things that I felt were hackish or incomplete (reference counting solution for example). At least take note of the table of contents. Worth the read if you plan on coding in C++ for your job though.

4/5 – Effective STL
Taught me all the problems the STL has. Basically, if you do advanced things with the STL, either know the STL inside and out, or avoid doing advanced things because it may cause you headaches. It discusses lots of STL special cases. My opinion after reading this book: the STL sucks because it requires a book to explain it and to discuss it’s pitfalls and problems. If an api/library is well written, it shouldn’t need a book to discuss all of its pitfalls and workarounds. Although, the STL is still better than whatever solution you could possibly come up with by yourself. For general coding it’s good, for advanced stuff, well…. you were warned. A lot of special cases are discussed by this book though, so if you plan to do lots of STL stuff, this book is definitely worth the read.

5/5 – Introduction to 3D Game Programming with DirectX 9.0c A Shader Approach
If you’ve never used D3D before, get this book. Although lots have changed since DX9, it still has lots of concepts (and more advanced things like skinning) that are still very much applicable. I wish I would have read this book a long time ago instead of fumbling through the API’s documentation (which is a good reference though.)


Sunday, 5. September 2010

Azeem Khan wrote a script that allows the user to export data from joomla and move it over to wordpress.
Unfortunately it didn’t work with the latest: Joomla: 1.5.20 Stable and WordPress: 3.0.1.
So I extended it, you can find the script here: Joomla2WordPressV4

Azeem Khan’s site is here: http://azeemkhan.info/