Monkey Island 2!

By this time everyone knows that Monkey Island 2 is coming back this summer with a new special edition after the great success of MI:SE from a year ago.

The 3 original creators: Dave Grossman, Tim Schafer and Ron Gilbert reunited in the party that LucasArts gave for this event. It would be great to see them working in the ultimate sequel that was never done but it’s better to keep the feet on this earth :)

It’s also worth mentioning that The Secret of Monkey Island: Special Edition will come out in tha Playstation Network. After the great fun that was playing both MI:SE and Tales of Monkey Island, here we have another change to revive our memories (or if it is the case, play this wonderful game for the first time). It’s a pity that it doesn’t come with another Tales, or maybe we’ll get them in the end of the year? :)

Here are some links that I gathered in the last couple days:
MI2:SE Homepage
LucasArts official announcement
Screenshots
GDC 2010 Interview
Grumpy Gamer – Ron Gilbert talking about it
Official Twit
More info

Trinity

I’m a fan of puzzles since I remember. This September is my 12th year here in Lisbon and is also the number of years since I built a puzzle, i.e., until three weeks ago when I decided to buy a new one. I bought this one called Trinity that you can see in the following image:

I started it on the Friday of 26/06/2009 and I finished it a week later 03/07/2009 with a total time of approximately 8 hours of work. It went very fast but as you can see in the images, it was very easy. The problem is that now I want more! :)

Here is the day by day progress:

Day 1

Day 2

Day 3

Day 4

Day 5

 

Folder Creator

A few days ago a friend asked me if I had or knew a program that would create folders given a two numbers. Example: if we put 01 – 04 it would create folders from 01 to 04 and so on. Well, I didn’t have nor knew any program that did what was asked so I just thought: this is pretty simple, why not do it myself? And after a hour or so I had the first version. The program asks where you want to create your folders, the base folder name and the number range.
Folder Creator

Instructions:

  • Insert/Choose the base folder. You may enter a folder manually or you can double click the field to open a folder browser dialog an choose a folder. The base folder indicates where the folders will be created. Example: c:\test\
  • Insert a base name (not required). The base name will serve as the name which will be appended by the number of each folder. Example: inserting folder in the base directory textbox will create folders in the path: c:\test\folderXXX where XXX is a number.
  • Insert a start number. Start number is the starting number of the range (start-end) that will be appended to the base name (if there is one). Continuing with our example: 003 will create folder in the path: c:\test\folder003 and so one until we reach the end number.
  • Insert an end number. End number is the number that ends the range (start-end) which will be end appended to the base name (if there is one). Again, in our example: 010 will create folders in the path: c:\test\folder003 (which was our start number), c:\test\folder004 … an so on … ending with c:\test\folder010.
  • Escape key closes the application.

Note: The start number must be less than or equal to the end number.

The program hasn’t been fully tested so it’s most likely that you’ll find bugs in the program. If you find some please report them to me. With time I may add more things if needed, so feel free to suggest new features.

You’re free to use this code as long as you don’t blame me for any changes/bugs, as well as, don’t demand anything from me. Download folder creator here and/or download source code here.

Let me know if you have any bugs/questions/comments/suggestions.

Before I go, I want to thank Victor Romão for the idea for this program.

Diagramming for dummies

Hi, in the past months I’ve been working with the .Net framework either in C# and in C++/CLI. I’ve been more focused in the GUI part of the framework playing with controls and developing some simple ones. Now I needed to make a more challenging control that would draw diagrams, so I went looking for references and I found this great article http://www.codeproject.com/cs/miscctrl/NetronLight.asp by NetronProject. I liked the design of the code and decided to use it and make some modifications to my needs. Below you can find the modifications I did to the code.

Changelog (2006-04-02):

  • Added scroll bars (maybe a bit more of tuning is needed.)
  • Added type for connectors (none, input, output. An input connector can’t connect to another input connector and the same goes for the output connector.)
  • Added a new type of shape (the actionbox that has some inputs, in green, and outputs, in blue.)
  • You can indicate if a shape allows internal connections, i.e., a connection from two connectors within the same shape.
  • Delete key deletes the selected component.
  • When deleting a component, it will delete all connections associated with it.
  • The controls gains focus automatically as the mouse passes over it. This was added so we can use the mouse whell (for scrolling the scrollbars) and keyboard keys, like Delete, more easily.
  • Mouse cursor changes to a resizer when hovering a shape and to a hand when hovering a connector.
  • Fixed some problems with the drawing/refreshing of shapes, connections and connectors.

These modifications haven’t been fully tested yet so it’s most likely that you’ll find bugs in the control. If you find some please report them to me. With time I may add more things as I need, so if you interested in this control, just check this page from time to time.
You’re free to use this code as long as you don’t blame me for any changes/bugs that were introduced and don’t demand anything from me. Just download it here if you accept these conditions.

If you have any bugs/questions/comments/suggestions just send me an e-mail.
Before I go, I want to thank NetronProject team for this great control and tutorial.

References:

http://www.codeproject.com/cs/miscctrl/NetronLight.asp – Diagramming for dummies – The Code Project – C# Controls

Ogre Exporter for Maya 2009 32-bit

A colleague at work needed to export some stuff to Ogre engine from Maya 2009 but there were no exporters available. I compiled the tools and all went well. Here’s the plugin for anyone that needs it.

I realized that I had just compiled the x86 version (32 bits) and not the 64 bits that he needed. Next, I tried to compile the 64 bits version but it proved to be a bit difficult and I couldn’t finish the compilation due to time issues. Ogre seems to compile fine for 64 bits but the problems are the dependencies. I got stuck in the FreeImage library that itself doesn’t appear to have problems with 64 bits. But since FreeImage uses other libraries, one of these libraries was not compiling for 64 bits (OpenJPG I think). So if anyone succeeds on this task let me know.

Instructions

  1. Download Microsoft Visual C++ 2008 SP1 Redistributable Package for x86 from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2&displaylang=en
  2. Install it.
  3. Download Ogre Exporter for Maya 2009 here.
  4. Unzip the file you just downloaded.
  5. Put ogreExporter.mll in the (Maya2009InstallDirectory)\bin\plug-ins. This is usually under: C:\Program Files\Autodesk\Maya2009\bin\plug-ins.
  6. Put OgreMain.dll in the (Maya2009InstallDirectory)\bin. This is usually under: C:\Program Files\Autodesk\Maya2009\bin.
  7. Put ogreExporter.mel in the (Maya2009UserConfigDirectory)\2009\scripts. This is usually under: C:\Documents and Settings\YourUsername\My Documents\maya\2009\scripts.
  8. Start Maya 2009.
  9. Type ogreExporter in the MEL script prompt and a new window should appear with the exporter.

If you have any problems installing it, contact me.

Regular Expressions (part 2)

The first regexp was thought after someone in the IRC asked for some help. They asked if anyone could remove the comments from a c++ source code file. I tried to help:

(/\*([^*]|[\n]|(\*+([^*/]|[\n])))*\*+/)|(//.*)

Note: this is not the exact expression that I came up at the time but this one is richer and better than the other one I answered at the time.

Let’s analyze it:

  1. /\* – to match with the beginning of any comment /*.
  2. [^*]|[\n] – to match any characters except the * or match with the new line character.
  3. \*+ – matches any number of * in the middle of comments.
  4. [^*/]|[\n] – to match with any character except these two * and / or match a new line.
  5. \*+/ – matches any number of * and the / character.
  6. //.* – matches // followed by any characters.

After matching with the first /* the expression becomes a bit harder to understand. What happens next is that we match anything (including new lines) except the * or we match one or more * followed by anything except the end of comment */. After we match with one ore more * followed by a /.
The second part matches only 1 line comments in C++.

Have you ever received an email full of HTML garbage? It happened to me more than once and it’s extremely annoying having to filter the text in the middle of the HTML. I remembered to create a regular expression that would help me remove this kind of garbage. If you didn’t understand what I meant by garbage, here is an example of these emails:

<html><div style='background-color:'><DIV>
<DIV>
<P class=MsoNormal><FONT color=navy face=Impact size=5><SPAN style="BACKGROUND: #f7f7f7; COLOR: navy;
FONT-FAMILY: Impact; FONT-SIZE: 18pt">This is extremely&nbsp</SPAN></FONT><FONT color=#9966ff
face=Impact size=5 FAMILY="SANSSERIF"> <SPAN style="BACKGROUND: #f7f7f7; COLOR: #9966ff; FONT-FAMILY: Impact;
FONT-SIZE: 18pt">annoying&nbsp;</SPAN></FONT> <FONT color=navy face=Tahoma FAMILY="SANSSERIF">
<SPAN style="BACKGROUND: #f7f7f7; COLOR: navy; FONT-FAMILY: Tahoma">&nbsp;</SPAN></FONT>

In this case I used this regexp:

(\<[^\<]*\>)|&nbsp;

It’s quite pretty to grasp this one, we just grab everything that is between two < > but we have to put a safe guard to exclude a possible < since regular expressions are pretty greedy and like to match whatever they can.
The &nbsp; match the HTML code for space characters serve. We could filter other similar characters but this one seems to do the trick in most situations.

Monkey Island is back!

Ohhhhhhhhhhhhhhhhh yeahhhhhhhhhhhhhhhhhh!!!!!!!!!!

That’s right, you are not dreaming. Ask someone beside you to pinch (or punch) you if you don’t believe me. The greatest game of all time is coming back to us by the hands of LucasArts and TellTale. Not only we’ll get a remake with neat features and graphics of the first adventure in the Monkey Island series, we’ll also have new 5 episodes.

Check the official page of the The Secret of Monkey Island Special Edition: http://www.lucasarts.com/games/monkeyisland/ the new screenshots and a video of the people involved in the project.

While at LucasArts headquarters, you can also check this related merchandise: http://store.lucasarts.com/catalog/category.xml?category_id=1301488

New series!
TellTale will be continuing to deliver us great adventure games and after reviving the classic Sam and Max, they’ll revive the mythic Monkey Island. We’ll get 5 new episodes (http://www.telltalegames.com/monkeyisland) starting in 7 July and it seems the “creator” itself (aka Ron) was also involved in these episodes. You can pre-order it now and if you want a discount coupon for the TellTale store, here’s one: 3PD-XNB-8Z7-M2K

Ron Gilbert has also commented this in his blog where he talked about some interesting things about the design/production of the first game. Check it here: http://grumpygamer.com/8280380

I thank you LucasArts and TellTale for bringing this great game to life again. (As if it was dead…)

Papercraft

You may all know that I am a big fan of graphic adventures and I already showed this interest in other posts with t-shirts. I’m also a fan of old platform games demonstrated here in this post by one well known figure among this genre. Since I don’t have any more shirts, this time I come to show you some paper characters of some great games of the 90s. The characters were printed from this site: http://www.cubeecraft.com, cut and folded by me with some help of two work colleagues in two of them. It was fun to build and I’m already missing to fold another one. Without wasting more time, here are the images:

Papercraft

Sam from Sam & Max

Sam from Sam & Max

Max from Sam & Max

Max from Sam & Max

Jim from Earthworm Jim

Jim from Earthworm Jim

Purple Tentacle from Day of the Tentacle

PS: I don’t really know what happened with the tentacle but it came rather pinkish and not so purple.

A nice day for a walk

A few weeks ago I went to a visit in the Cascais Natura park. I went with Guilherme and when we were approaching the meeting point we saw something rather interesting or peculiar as you can see in the photos below. The funny thing is that the horse knew exactly what he was doing and where he was because as soon as we got closer he slowed down and came to a full stop waiting for us to pass.

When the visit was over and after a meeting, we were returning to our work place but can you guess what we found this time? No, no, not our horsey friend, this time it was a dog in the middle of the road, completely lost and not knowing what he was doing. Luckily people were slowing down so that they wouldn’t overrun the dog. Unfortunately I didn’t get a photo of this moment.

Here is a challenge to the people who like math: calculate the probability of these two events occur in the same day. ;)

Visual Studio 2005/2008 Free Utilities

Here are some free add-ins/tools/utilities that you can use in Visual Studio 2005 (or 2008):

AnkhSVN

http://ankhsvn.open.collab.net/
Do you use subversion version control system? TortoiseSVN? This add-in is great and integrates very well with all VS versions since 2002.

CLIArgs Made Easy

http://www.ricardosabino.com/?pag=vs_addin1
CLI Args Made Easy (Command Line Arguments Made Easy) is an add-in that allow you to change the command line arguments of the startup project very easily by adding a combobox in the toolbar. It also saves all the arguments you insert for future use.

Microsoft Visual Studio 2005 IDE Enhancements

http://www.microsoft.com/downloads/details.aspx?FamilyID=CD7C6E48-E41B-48E3-881E-A0E6E97F9534&displaylang=en
Set of Visual Studio extensions that improve productivity: Source code outliner, Visual C++ code snippets, indexed find, super diff utility, event toaster utility.

MPCL

http://www.todobits.es/mpcl.html
This plug-in allow us to compile the source code files of a Visual Studio 2005 project in parallel. This is extremely useful for processors with more than one core to reduce the compile time.

Power Toys for Visual Studio 2005

http://msdn2.microsoft.com/en-us/vstudio/aa718340.aspx
Pack with various tools for VS 2005.

Project Line Counter

http://www.wndtabs.com/download/Download/LineCounter/
Reports statistics about the files in projects. It’s automatic, has a filter and you can check its source code.

Refactor! For Visual Studio 2005/2008

http://msdn2.microsoft.com/en-us/visualc/bb737896.aspx
Free add-in that refactors (simplifies and re-structures) source code to make it easier to read and less costly to maintain.It has more than 15 different features.

RockScroll

http://www.hanselman.com/blog/IntroducingRockScroll.aspx
This add-in extends the Visual Studio’s scroll bar showing the code with syntax highlight. It is extremely useful to go to where you want within long source code files.

SlickEdit Gadgets

http://www.slickedit.com/content/view/441
Free useful gadgets for VS 2005: Editor gadgets – line ruler, indentation guide, auto-copy selection, editor graphic; command spy, file explorer, data object analyzer and SLOC report.

VSFileFinder 2005/2008

http://www.zero-one-zero.com/vs/
VSFileFinder helps you find files quickly in your projects by typing a few letters from any part of the file name which is much faster than using the solution explorer in large projects.

There is also a version with some improvements (wildcards, regular expressions, personalized tooltips, project filter) and compatible with Visual Studio 2008 available here: VSFileFinder2008.

Visual Studio Add-Ins Every Developer Should Download Now

http://msdn.microsoft.com/msdnmag/issues/05/12/VisualStudioAddins/
MSDN page with a collection of free add-ins mostly for .net languages but not only.