March 2007 - Posts
A small troubleshooting and how to fix it.
Problem: Internet Explorer 7 under Windows Vista doesn't plays flash elements (such as Youtube or Soapbox videos). You install the Adobe Flash Player 9 component, restart and still don't works.
Answer: Download a stand-alone installer, such as the one from www.filehippo.com, and install it. Restart IE7 and you should now have flash player activated/available for all webpages.
Update: Thanks to the fallen one, in this thread there's another workaround to fix this without reinstalling Flash.
Loading resources from a resource file helps a lot. But loading them from an external assembly is a lot more helpful, because you can update the content without having to recompile the entire solution, just the resources assembly.
This is an easy way of manipulating an external assembly that has a resource file embedded:
ResourceManager
resManager = null;
ResourceSet resSet = null;
Assembly resAssembly = null;
// Load an assembly located on same dir as executable and named ImageAssembly.dll
resAssembly = Assembly.Load("ImageAssembly");
// Get all embedded resource files the assembly has inside
string[] resourceFiles = resAssembly.GetManifestResourceNames();
// We assume it has one resource file (error handling should go before this)
// Beware of the bold fragment: Manifest gives the full namespace + resource name, but constructor
// accepts just the name without full namespace
resManager = new ResourceManager(resourceFiles[0].Remove(resourceFiles[0].LastIndexOf('.')), resAssembly);
// Get all resources inside the resource file
resSet = resManager.GetResourceSet(System.Threading.Thread.CurrentThread.CurrentUICulture, true, true);
// And lastly, do whatever we want with them
IDictionaryEnumerator
enumerator = resSet.GetEnumerator();
while (enumerator.MoveNext())
{
// In this example, we want only images in supported formats
if (enumerator.Value is Bitmap)
{
// ...
}
}

I've finished reading an interesting article about Windows Vista, interesting because is oriented for technical people (IT, developers and advanced users).
It's the first article of three that will be published, but gives a good overview of some of the changes this operating system brings.
I like ars Technica because they don't usually get into "politics" favoring Windows, Linux or Mac, and here it's reflected too. For example, talks about the DRM system (Media Foundation), explaining what it does, and who benefits (companies), but not going into stupid and false affirmations that it cannot play "any copyrighted material".
Anyway, the article speaks about Desktop Window Manager, the new Driver model, DirectX, Media Foundation, and the .NET Framework 3.0 basics (mostly talking about WPF and it's vector-based graphics).
Very recommended reading.
Oh, and by accident I found this article of Vista's UAC for Game Developers, very important too if you plan to make games with XNA compatible with the XBox 360 (because as UAC states, games should only access to a few special folders, for example to save the game data).
and this is what I find when I do:

In my new client assignment I have to get up quite early and it's a bit far from my home, so I'm sleeping like a normal person (you know, 7-8 hours per day) and going to bed at decent times (no more "dude, it's 3 AM and you're still awake!").
The work is tiring but interesting, and to get to the client office I have to cross a beautiful park that makes you joyful:

And tonight, at last I'm going to watch 300 :D
I'm proud to announce the Kartones.Net MVF Awards!
You can check the details here, but this is a contest that will be held each June and December, and will award the 3 geekiest, freakiest blogs of this community the MVF award.
I will post an announcement and for a week you'll leave as a comment your 3 votes. The three winners will have displayed on their blog the MVF Award in recognition of their geeky status!
To advertise the contest, and until June comes, I've decided to choose now three blogs... and based on my oppinion and my friends' this are the winners:
-This blog, because everyone calls me "the freak" at work :P
-FreakWorld, because it's commitment is being the freakest one, and actually has quality posts to assure it.
-Jad Engine Blog, because not everyone develops and coordinates a 3D Game Engine in C#.
So, every blogger of the community (and the ones who I expect to join it very soon) has almost 3 months to take their chance to be the real Most Valuable Freaks! :)
Note: This is a geeky, innocent parody of the Microsoft MVP awards, and by no means an offense. Please take it with humour as it is by no means an offense to the MVPs.
Today, 3-14 is not a normal day. At 1:59, the combination will make the first six digits of that magic number, Pi.
So, have a nice and geeky day! And if you thought this is the geekiest holiday, check the Square Root Day, that's the best one :DDD
To celebrate this day, you can for example try finding your birthday inside pi (mine in spanish date format is at position 1,257,535 :)
Thanks to Blanca for the tips and for finding the Square Root Day :)
Today a friend asked me for a tool to convert from WAV to MP3 (actually, MP3 to WAV too) and I remembered that some years ago I made with my friend Lobo666 a small app with VB6 (yup, I worked more than 2 years with VB6 and ASP.NET before switching to .NET/C#), and I wanted to look at it now and see how I made it.
My friend did the research of LAME command line options, and suggested me the layout of the GUI, and we decided to make it multi-language (english and spanish).
This is how it looks:
The main window, spanish language

The main window, english language
The about window, english language
So, let's get into what I did back at 2001? 2002? (I can't remember exactly, last executable is dated 2002)
What went right
Instant language switching is cool. We planned it from the start and went smoothly and without problems.
We provided all the useful basic and intermediate LAME encoding options in an easy, visual way. It was quite fast configuring the options and encoding an MP3. The presets were also a good add-on.
Part of the code was separated from the forms, in a module. Is well documented, perfectly readable, no bad coding style mistakes (no "i" variables and similar), and I used hungarian notation (which I don't like too much now but it's better than nothing).
Building the command-line text was centralized in a single function, that avoided complex string manipulation issues as it rebuilded the query from scratch every time an option changed.
It worked! Seems funny, but some of my experiments back then ended being either non-functional or non-optimal (for example, being quite slow because of complex calcs made badly and with VB). The application can still be used now.
Intensive testing. Although I didn't know about unit testing at that time, we did a lot of manual testing (we tried every combination of options, for example).
ID3 Tag support. It was not initially planned, but we thought it would be useful to avoid having to open Winamp and setting the text after encoding.
My friend learned a bit of programming in the process. And the scrolling text in the about window looked cool back then :)
What went wrong
I didn't used resource files! While having 4-5 graphics/icons was easy, all the "multi-language" is hardcoded as two functions (which fill the labels, combos and message strings) called when you select a language.
Not al code was detached from the presentation layer (the damm VB6 style of coding logic in the .frm). Too good that I got another job and I started doing 3-tier layered applications :)
Code comments were in english, but variable names were in spanish. Strange mixture :P
No error checking on choosing source/destination files. Also just basic error-checking on the Shell interaction (when launching LAME).
The command-line string building function was called dozens of times... Instead of a having a multiple event handler, I had all optionxxx_Click() repeated.
Conclusion
It proved easy to develop the tool, and while I might not be very proud of the coding, it wasn't bad either. I just didn't had the same knowledge as I have now.
Also, I worked with a "final customer" and experienced what was building a GUI being "directed", playing with the Shell and actually using the tool frecuently.
I would probably now do it in much fewer lines of code and better organized, but it works quite well :)
Maybe another day I'll take older source codes, like my (terrible now) C mini-games and make more postmortems of them... but I don't know if I want to look at them :)

Yesterday I officially came back to Jad Engine as an active developer. Vicente and I had a meeting with the other developers and they discussed about what the future 1.2 release will have.
Although it is early to talk about that, the 1.1 is actually in internal RC state and will be released quite soon. This are the new features it will bring:
- Lots of bugs fixed & speed improvements
- Multiple viewports support
- Virtual File System for resource loading (supports compressed files)
- Improvements to the Math library
- New Input system
- Scripting support: C#, VB.NET, Boo
- Collada support (still in beta)
- Morphing animation (still in beta)
Also, I've created the game profile at the Great Games Experiment social network, to advertise it a bit.
Lastly, Vicente has finished migrating his Jade blog here, so he will post info and articles about the engine too (he coordinates the project, and has developed the VFS system and the 1.0 AI components).

I've just seen this game, Paper Pilot. You build a small paper plane and throw it (similar way as in Yeti Sports).
Warning: Do not try this game at work, it's highly addictive :)
I've just uploaded two pdfs I've found quite interesting:
- A Test heuristics cheat sheet, with lots of tests related to file system, dates, numbers, strings, web and others. Quite handy to check if we're doing all basic testing or we're missing for example checking number limits or input max. lengths.
- A tweaking guide for Windows Vista, that not only teaches the basics of the new operating system but provides tips and tricks to optimize the system's performance.

Today's been the "XNA day" at the GDC 2007, and as expected there are a lot of fantastic news:
- Next revision of XNA will feature things like Windows Vista Support (at last!), XACT 3D (3D audio!), bitmap fonts, volume textures, icons for the games and many other bugfixes and improvements. Schedule is April.
- They are investigating ways to allow making XBox Live Arcade Games
- Networking (including Live, but with restrictions as any other XBLA game)
- Video
- Sharing games with non-XNAGSE users
- Making money with XNA games
You can read all this news and more in detail at The Z Buffer.
Oh, and the slides from the speeches have been released too here. Seems that I won't be sleeping too much in some weeks ;)
The Mozilla development group has released an alpha version of Firekeeper, a browser IDS/IPS that secures user browsing by detecting, warning and blocking browser based attack attempts.
It scans HTTP/HTTPS response headers, body and URLs, and has a direct implementation of Snort's pattern matching system.
When detects an attack attempt, shows an alert like the following one, allowing to block it once or permanently (or allowing it).

There's some general help about using this extension and details of how to create new rules. There is a test page too where you can try different fake browser attacks and see how it detects and warns about them.
While having dinner today, I explained how at ilitia we're starting to add to our interviews small puzzles and riddles, not to test if the candidates are very clever but to test how they think and approach a problem, and I thought "If Phobeo posts about development puzzles/riddles, why not posting one or two general ones?".
So here's the first one, the first I knew when I was learning C (development languages are like girlfriends, you never forget the first one ;)
You have 9 dots:

You have to connect all the nine dots, with 4 consecutive lines (if you're drawing in a paper, you can't lift the pen/pencil between drawing the lines).
Example:

This is correct (3 more lines remaining)

This is incorrect (no "curved lines" allowed ;)
I'll post a comment with the solution in a few days, and if you like it, I'll continue posting more from time to time :)
Update: Here's the solution to this first puzzle.
Sometimes, me and my friends got deep into doing something, whenever it's playing a videogame, studying something or something like that, and we usually say (in spanish) "like a monkey!!!".
Well, as I'm doing a few things and today I said it at least twice, here's an application of the phrase for developers :)
(I'm too tired to post anything serious today)
nite nite

The online community site for XNA Creators Club is finally online! Apart from the content that will be available for the premium club members, the website contains this for everyone who registers:
- Tutorials and video tutorials
- Some samples, like skinning a model, fonts, sprite effects, and simple animations
- Marblet, a new starter kit
- Minjie, a mini-game made with XNA
- and, of course, forums to ask and answer questions
Also, the XNA Team has posted some fresh news about what else the premium members will have:
- A GarageGames Torque X Engine license
- An upcoming version of SOFTIMAGE XSI 3D software targeted for supporting the XNA platform.
- Allegorithmic ProFX, another upcoming software for managing 2D texture libraries.
Seems that getting the premium account starts to get worth the annual fee...
PS: I've registered too here (I'm like God, everywhere :)
More Posts
Next page »