Friday, June 30, 2006

black art book on bungie.net

the black art of halo mods is currently featured in the home page news on Bungie.net.

here is a quote from the news story:

"The Black Art of Halo Mods by Stephen Cawood is packed with info on both the basic and advanced techniques of Halo CE customization. Included in the book is a crap load of tutorials and information on everything you can think of. Weapons, vehicles, bipeds, levels; you name it, it's got it. The most important parts of the book are the extensive chapters on the undocumented features of the Halo Editing Kit."

Wednesday, June 28, 2006

halo2ce deserves credit

I would like to properly acknowledge the Halo2CE team. I mentioned their Halo 2 mod for HaloCE in The Black Art of Halo Mods, but I didn't list the full team on the credits page.

this team has done some great modding and also written a number of tutorials. thanks guys, and sorry about not giving you your due credit.

Hal02CE team:
NiTrOuSoXiDe
rec0
Kerr Halla
Farsight
Kornman00
ZexGX
Mrs Doublefire
Supreme Taco
JamesD
Stefander
Madrox
Cold Fusion
Lightning
00dave

Tuesday, June 27, 2006

buzz about halo black art book

note: this book is about HaloCE. there is nothing in this book that will help anyone cheat on Xbox Live. modding != cheating.

a couple of posts announcing the release of The Black Art of Halo Mods....

the most popular halo fan site: halo.bungie.org

the most popular halo modding site: halomods.com


Friday, June 23, 2006

not so beautiful game

first of all, I'm a big fan of football (that's 'soccer' for us north americans). I played the game for many years and I still like to watch it. however, watching the world cup games, I am disgusted that there hasn't been more a clamp down on the pathetic acting and whinging that goes on.

why is it that these athletes have absolutely no tolerance for contact? rugby players seem to be able to play their game without rolling around on the turf every time someone looks at them the wrong way.

fortunately, it seems that a lot of people are fed-up. I found this blogger talking about the phenomenon.

give it up boys, how about you start acting like men.

Thursday, June 22, 2006

violent games debate explodes

unless you don't watch or read the news, you're probably aware that the debate about violent video games is heating up again. hmmm, just in time for an election in the states... how convenient.

http://news.google.com/news?complete=1&hl=en&q=violent%20video%20games&sa=N&tab=wn

I would love to compare the voting records of politicians who supported banning games with their records on voting for the questionable war in iraq. I'm positive that the record would show that the politicians are more likely to support actual violence than simulated violence.

Thursday, June 15, 2006

faster downloads... no, really

in a world where every ISP wants you to believe that they offer the fastest connections possible, and the net is pockmarked with ads for accelerator software, it's remarkable to find that there are actually methods of getting faster downloads.

Internet Download Manager is one such method. IDM will automagically detect when you are downloading a file and it will open multiple connections (typically seven). this speeds up the download considerably. also, the software can pick up where a failed connection left off. so, if you're finding that a download is timing out, this tool will preserve your sanity.


- Internet Download Manager progress window

the only issue that I've found with the software is that some sites do not allow multiple connections. this is rare and usually happens with sites that exist specifically for hosting files. so most casual net users would never encounter the issue. when this problem occurs, you need to temporarily disable IDM so that you can use the standard turtle-paced download option.

from their site:

"Internet Download Manager (IDM) is a tool to increase download speeds by up to 5 times, resume and schedule downloads. Comprehensive error recovery and resume capability will restart broken or interrupted downloads due to lost connections, network problems, computer shutdowns, or unexpected power outages. Simple graphic user interface makes IDM user friendly and easy to use."

Wednesday, June 14, 2006

black art of Halo mods errata

these are the errors that have been reported for The Black Art of Halo Mods. if you find something that is not listed in this post, please notify me.

1. viewing your skin - page 112

After following the steps in this tutorial, you will have edited a Halo PC map, so you should run Halo PC to see the changes, not HaloCE as it says in the text.

2. weapon notes - page 202
there are formatting errors in this section. these are actually three separate sections:

ROUNDS BETWEEN TRACERS: How many projectiles it will fire without contrails before it fires one with a contrail projectile.

PROJECTILE IS CLIENT-SIDE ONLY: makes the projectiles created for each player. This allows clients to get a way better idea of what is happening.
Without this checked rockets will not explode for clients - only for the host.

RANDOM FIRING EFFECTS:The firing effects are played sequentially, so firing effect zero is played first then firing effect one. It goes through the entire list before looping. This is used on the plasma rifle so that the flash comes from the upper section every odd shot and the bottom section every even shot (bet you didn't notice that). You can check random firing effects to make them random instead of sequential.

there is one value and two flags within this section. the last one is on it's own, but it doesn't have it's own bold title.

these sections should also have there own title:

If you want to make a gun with two types of fire (e.g. the Banshee or Scorpion) you must check secondary trigger overrides grenade this makes the secondary trigger fired with left trigger and you can either check mutually exclusive triggers to allow both triggers to be fired simultaneously or select a secondary trigger mode

Make sure to check or uncheck cannot fire at maximum age. With this option checked, the weapon is incapable of firing at maximum age. This is checked for all the plasma weapons so that they cannot fire when they have overheated.

Sunday, June 11, 2006

.Net project location is not trusted

this just goes to show how quickly things change in software development - or maybe... how long I've been working on halo books.

I was working on a C# WinForm project and I started to get a strange error when I opened the solution. the error is: "The project location is not trusted. Running the application may result in security exceptions when it attempts to perform actions which require full trust."

it is possible to ignore the error and go about your business, but I was curious so I did some googling. it turns out that this issue is commonly associated with web apps or projects that are run from network drives. my project is a WinForm app on the C: drive, so this didn't help me.

only after searching numerous pages did I find that there is a 'new' feature that applies security permissions downloaded zip files. this triggered some alarm bells because my app does use a sample project that I downloaded.

anyway, the solution is easy. you must unblock the sample code before unzipping. to do this, right-click the Zip files, choose Properties, click UnBlock, click Apply and then unzip.

this is probably common knowledge to those who work with sample code so it's sort of ironic. after all, I used to do that for a living.

Thursday, June 08, 2006

VC++ express opengl gotcha

there's a gotcha with the new "Express Editions" of visual studio. unlike VS.Net, they don't come with OpenGL nicely installed. for example, when tring to use glut.h with VC++ 2005 Express Edition, the result is this build error:

"Cannot open include file: 'GL/gl.h': No such file or directory"

I suppose you could just copy the files (the 'gl' dir) into your project dir, but I haven't tested exactly which files would have to be copied since I have a version of VS.Net already installed - I'll just use that.

here's some background...

Header (.h) files
OpenGL is part of Windows XP and the Visual Studio. Its header files are usually in C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl, so they can be included with the statements:

#include
#include

The GLU (GL Utilities) in glu.h refers to a set of utility functions that make some OpenGL operations easier to program. It is standard on all OpenGL implementations and is generally thought of as part of standard OpenGL.

Tip: Both gl.h and glu.h are included in GLUT, so if glut.h is included in your source file, gl.h and glu.h don't need to be explicitly included.

(from http://www.cs.tufts.edu/r/graphics/resources/OpenGL/OpenGL.htm)

Tuesday, June 06, 2006

C# Interop: unsigned char* C .lib

I ran into a situation where there was some C code in a .lib file that I wanted to access from C#. don't try this unless you have no other choice. ideally, you'll use a DLL instead of .LIB file.

I've created a separate post about the process of creating a wrapper: Calling a C++ lib from C#.

most of the .Net Interop examples don't include pointers being passed as out parameters, so it took me some time to work out the exact syntax for accessing the functions that I needed. hopefully, the next person who needs to do this will find this post.

the solution was to use a C++ wrapper DLL (create a C++ Win32 DLL Project from VS.Net - remember to export symbols - http://www.codersource.net/win32_dlls.html) and call the wrapped functions from C#.

you'll save yourself some hassle if you follow the steps in this tutorial for calling a sample function from a wrapper: http://www.codersource.net/win32_dlls.html.

note: I changed one project setting to get it to compile. I changed the general project configuration setting "Use of MFC" to "Use MFC in a shared DLL."

here is some sample code:

C .lib
-------------------
//create() will fill an unsigned char array with 100*scale*scale bytes
//this function will malloc room if image is NULL
//returns -1 if problem, 0 otherwise

int create(int id, int scale, unsigned char *image);

C++ Wrapper .cpp
-------------------
WRAPPER_API int create_wrapped(int id, int scale, void** image)
{
int retCode = -1;
unsigned char* ptrImage = NULL;
if ( NULL != *image )
{
ptrImage = (unsigned char*)GlobalLock(*image);
retCode = create(id, scale, ptrImage);
GlobalUnlock(*image);
}
else
{
retCode = create(id, scale, ptrImage);
*image = (void*)ptrImage;
}
return retCode;
}

C++ Wrapper .def
-------------------
LIBRARY Wrapper
; Wrapper.def : Declares the module parameters for the DLL.
DESCRIPTION 'Wrapper Windows Dynamic Link Library'
EXPORTS
; Explicit exports can go here
; Exporting the .lib functions
init_wrapped @1
close_wrapped @2
create_wrapped @3

C++ Wrapper.h
-------------------
// Add reference to library file
#pragma comment(lib, "library.lib")

C# Accessing the wrapper function
-------------------
// create
[DllImport("Wrapper.dll", EntryPoint="create_wrapped")]public static extern int create_wrapped(int id, int scale, [In][Out] ref IntPtr image);

C# Using the data
-------------------
// Allocate unmanaged memory - must be freed with Marshal.FreeHGlobal(ptrImage)
IntPtr ptrImage = Marshal.AllocHGlobal(scale * scale * 100);
// Copy the unmanaged bytes to a managed array
try
{
// Get a pointer to an unmanaged byte array which contains the image
// returns 0 for success
label1.Text = create_wrapped(0, 5, ref Image).ToString();
byte[] ManagedArray = new byte[scale * scale * 100];
// Copy pointer into managed array
Marshal.Copy(Image, ManagedArray, 0, ManagedArray.Length);
// custom function to Write the image out to a file
writeImageToFile(ManagedArray);
}
catch (ArgumentNullException ex)
{
MessageBox.Show(ex.Message, "Marshal Copy Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
finally
{
// Free the unmanaged memory
Marshal.FreeHGlobal(Image);
}

Thursday, June 01, 2006

ITBS distance running

I haven't found much information about training to run long distances if you have ITBS (Iliotibial Band Friction Syndrome), so I've decided to post this little experiment that I'm conducting. my goal is to see how well I can condition my ITB in eight weeks. in other words, how far will I be able to run without my ITB flaring up so badly that I decide to stop. last summer I made it to 18KM.

this isn't a doctor recommended schedule by any means, so do not try and use my numbers without consulting a doctor first. ideally, this sort of conditioning would be stretched out (pardon the pun) over a much longer period of time. for example, here's a good kilometer build-up schedule. you'll see on my schedule below that I break many of the rules (e.g. don't add more that 10% per week).

what is ITB?
"ITBFS is an overuse injury specifically referring to an irritation and subsequent inflammatory reaction of the lower iliotibial band. This occurs due to repetitive frictioning of the band as it rubs over the bony prominence of the lateral epicondyle of the femur during flexion (bending) and extension (straightening) of the knee." - from Serpentine Running Club

so basically your hurts more and more until it finally just ceases to work. it's a frustrating problem because you can feel great in every other way, but your knee flares up like a guy fawkes celebration.

stretches for ITB:
NISMAT - http://www.nismat.org/ptcor/itb_stretch

here are my rules for conditioning my ITB:

Rule 1: increase your distance by actually running longer distances - the only way to be sure that you can cover a certain distance is to do it.
Rule 2: stretch, stretch, stretch - many times per day
Rule 3: don't train on a treadmill - running on a treadmill is fine for cardio, but it isn't going to do much for your ITB. treadmills are obviously flat and it's the little undulations in running surfaces that cause the most irrtation for the ITB.
Rule 4: rest and ice when your ITB is inflamed - I read one person's opinion that running with a sore ITB is counterproductive. rather than increase your distance, you'll just hamper your ability to run the next day. this is intuitive, but hard to remember when you just want to run those last few KMs. after every run, I soak in a hot bath for 15 min (for my muscles) and then ice my knee (for any ITB irratation).

I'm basing my schedule on how my knee feels. if it starts to get irratated, I'll ease off. if it feels good, I'll add distance.

training schedule (in addition to other activities, such as 3-5 martial arts classes per week):

Day 1: 5K run 3K walk (ITB sore as hell)
Day 2: 2K run (ITB too sore to run)
Day 3: 8.5 K run (ITB fine)
Day 4: 11K run, rest, 4K walk (ITB fine)
Day 5: 11K run (ITB fine, but my legs need a rest day)
Day 6: Rest and stretching (professional massage therapy appointment)
Day 7: Rest and stretching (due to heavy rain)
Day 8: Rest and stretching (due to heavy rain again... arggh)
Day 9: 21K run (ITB fine) - I planned 15K, but I felt great (legs need a break though)
Day 10: 5K walk, rest and stretching
Day 11: 4K run (ITB fine)
Day 12: Rest and stretching (due to other sports)
Day 13: 22K run (ITB fine)

now that my experiment has been successful, I'm switching to a more traditional marathon training schedule. if training goes well for the next few weeks, I'll enter the Nova Scotia Marathon.

black art of Halo mods is out!

I recieved a heaping helping of the black art of halo mods from fedex today.

as with halo 2 hacks, this book has nothing to do with cheating on Xbox Live. don't buy it if that's what you're looking for! this book is about modding HaloCE and the new Prometheus modding app.

thanks to everyone who helped with the book. I had a great deal of support from the halo community.

note: the cover has been updated since I first posted an image...




Credits: Black Art of Halo Mods Credits
Errata: Black Art of Halo Mods Errata
Amazon link: The Black Art of Halo Mods