Using Integers as Boolean Flags


Something I find handy while programming is being able to use the bits in an integer-type variable as boolean flags. What I mean by that is, let’s say you have an INT that is 4 bytes in size. Each byte consists of 8 bits so this INT contains 32 bits in total (4 bytes * 8 bits in a byte). If we have a program that has 32 different boolean variables, wouldn’t it be more effective to store all of them in a single integer variable? This would especially be helpful when you want to keep your networking packets small. 32 booleans in 4 bytes instead of 32 bytes! Ultimately, it’s up to you to decide how to use it; I’m just here to show you how.

Read the rest of this entry »

2014 Update


It’s been a long time since I’ve written a post and it’s long overdue. A lot has happened over the past year so this post is more about what I’ve been up to and less programming related. :)

Read the rest of this entry »

How to fix: File in Use – Personal.xlsb is locked for editing


I recently added some macros into my PERSONAL.XLSB file for Excel and started getting these annoying pop-ups saying that it’s locked for editing. This file loads in the background every time you open a copy of Excel. The point of it is to give you a place to save commonly used macros that will then be loaded and available to you in whatever workbooks you open. The problem with this is that if you open multiple copies of Excel, they all ask the operating system for write permissions in case you want to update the file.

This article explains how to fix this issue depending on whether you want to keep the file or get rid of it.

Read the rest of this entry »

Browser Automatically Blocks Ports


While working on an ASP.Net project at work, I found a strange “feature” (I’m more inclined to call it an annoyance) that is built into certain browsers. It seems that Firefox and WebKit have automatic port blocking built into them for specific ports. I was specifically trying to use port 6000 (a seemingly random, easy to remember port) but couldn’t access the web server. After a little searching, I managed to find some information and thought I’d share it.

Read the rest of this entry »

Tiling Script in Photoshop


Our artist has been working hard drawing all the graphics for our new game (more info to come on that front). She’s been working on the main character’s animations recently. These are complex animations with many frames and, to ensure they line up properly, she draws all the frames within a canvas the size of a single frame and separates the layers into layer sets. This is to ensure that the image for each frame of the animation aligns correctly with the frame before it.

However, our animation system in the game requires that each frame is drawn separately from left to right. Even with the layer sets, it’s still a lot of annoying manual work to move and align each frame while ensuring they’ll draw the same as they did in the single-frame-sized canvas. I recently found out that you can script for PS and so this set me thinking: there must be a way to write a script that can do this!

If you’re interested in the script click on.

Read the rest of this entry »

Latest Posts



Post Calendar

November 2014
M T W T F S S
« Sep    
 12
3456789
10111213141516
17181920212223
24252627282930