Windows Weirdness
March 16, 2008 at 2:14 am | In Personal Rantings | No CommentsLately I’ve spent a lot of time developing batch files for Edu2, writing for weirdness for batch renames and having fun with the command-line in general, since it is my tool of choice that goes beyond simple Explorer and SVN Tortoise jobs. And because of that I’ve found a few quirks and bugs that are either funny or at least worth noting since they are a PITA to track down.
How to crash cmd.exe
Plain and simple:
for /R %f in () do echo
crashes cmd.exe in Vista
Environment Variable Mess-Up
Maybe you know the environment settings dialog in XP/Vista. It allows you to specify environment variables both for the global environment and for the current user. (The former only if you’re an admin though.)
A neat feature is that you can, of course, set the same environment variable twice and Vista/XP will merge them to one, which naturally allows for some neat system configuration.
However, it has its issues, too, of course.. Notably it handles case-sensitivity of environment variable names inconsistently, which results in some pretty weird behavior.
For example let’s assume we have a global and a user PATH environment variable, then Windows would merge the two, so that for applications PATH will be %PATH_global% %PATH_user% (where _global and _user refer to specific variables).
You can easily try that by opening cmd.exe and typing in set path and notice how they are merged.
Now what happens if you have e.g. a global Path and a local PATH. You’d expect that they either show up as two different environment variables (if Windows treats them as case-sensitive) or they will be merged into one variable again (if they are treated case-insensitively).
Sadly none of the above happens:
> set path will return Path = %Path_global% %Path_global%, which is both useless and can cause severe headaches, when only one half of your environment variable is available suddenly (for example after installing a program that changes or adds environment variables).
What happens? My guess and the only possible explanation are that Vista’s (maybe XP’s, too) handling is inconsistent. Detection of variables that need to be merged is case-insensitive, while the actual merging is not. It fails to find the user environment variable and instead uses the global one again (maybe it uses the same buffer to cache their value before concatenating them).
It took me some time to figure it out because, obviously, the set command and everything else treats them as case-insensitive.
File Associations
I’ve been using Notepad++ for over half a year now and I really really like it. But a few days ago I made the mistake of switching over to using it exclusively over notepad and for that I decided to change its file associations. Thank god it provides a simple dialog for that in its preferences window and it was a nice and easy task. Except that I also changed the file associations for .bat and .cmd files and instead of changing the “Edit” verb it changed the “Open/Execute” verb, which caused .bat files to only be opened in Notepad++ instead of being executed.
Windows 95/98/ME/2000/XP had a really nice file association tab in their folder options which gave you total control over pretty much all aspects (except for some obscure cases where you had no choice but use regedit to change things). Now Vista’s designer apparently have decided that it gives users too much control and that that is a bad idea - so they have totally crippled it. I repeat: totally and fully crippled it. Instead of being able to edit and manage various verbs, specify DDE actions, setting a default verb, etc. etc., you only have a “Change Action” button that only allows you to specify the command-line.
They have also moved it to System Settings, which is probably a better location than Folder Options where it was next to the visual appearance tab, but it’s totally useless now - as are more freeware tools that you find on the internet
.
After some cursing, goggling and worrying I eventually found some .reg files that restore Vista’s default associations but that’s really not what I would call a perfect solution.
Stay tuned for a last blog post about Edu2: a post-mortem (coming soon hopefully) and more,
Andreas
Edu2 is finally done o/
March 4, 2008 at 11:57 pm | In Nexuiz, Personal Rantings | No CommentsEdu2 is finally over (at least for me). I’ve uploaded a 99% final build - the only thing that is missing are correct credits, but I hope to receive them ASAP and then I’m really really really done with it. Which means lots of free space on my harddisk - the beast is over 2 GB bigs here…
On the other hand lots of new awesome projects are out there waiting for me to contribute and I’ve already joined two new projects (WoWar and SemuruC) and also finally have time to concentrate on another one (with the mysterious name “DasProjekt”). More news, links and information about them later.
First I have to come up with a Post Mortem for Edu2.
Cheers,
Black
PS: On different other news I hope that I have been able to convince the head of PR of EA Germany to use Nexuiz as FPS example game at one of their public discussion rounds. More on that later, too -hopefully!
Final Java Homework at uni.
February 20, 2008 at 12:44 am | In Check This Out!, Coding, Game Projects | 1 CommentThis is the final Java homework in our Java introductory course at university. Enjoy ![]()
Click here to play the game
Greetings,
Black
Edu2p Stuff
February 18, 2008 at 1:37 am | In Game Projects, Nexuiz | 2 CommentsFinally, I’ve found some time to write a tiny post linking to a couple of pics of Edu2 (the prototype) - the project that has kept me busy for the last 3-4 months and burned me out pretty badly from what I can tell..
First a small animation that shows the terminal:

This was an awesome step in my opinion and it’s really great to see it live (especially in a real level).

Res2k aka Frank Richter hacked that into Nexuiz’s new menu (written by div0 - kudos to him for fixing/rewriting the broken piece of shit that my old menu was after all). It’s pretty nice but of course Nexuiz doesn’t support Gecko atm (and won’t either in the near future due to potential security vulnerabilities), and that feature only existed in our branch for some time. I guess I’ll add it back soon, too, because it was really useful.
Next comes Edu2’s chat window which is really a big step forward because it uses client-side code and the menu to replace engine features (ie. the normal messagemode input line when you want to chat). This should be an example for more serious projects, too, because it was really easy and clean and it’s really a lot more professional than the usual DarkPlaces Quake1 look.

Of course, it wasn’t finished and still isn’t fully, so I added a button to view a chat log of different sizes (apparently I don’t have a screenshot of that and I’m too lazy to grab one so here it is without the varying chat log size feature):

Next we spent some time adding model rendering support to the menu. Poor res2k spent a few days writing lots of code and doing many changes in a separate branch that got mostly thrown away by me later and/or rewritten due to bad management (that would be) but that prototype code was used as a base and was probably cleaner than the current result hiding in DP’s codebase.
Anyway a nice first pic after the “hack”:

And even with alpha-blending support - that required some “clever” thinking on my side - and maybe div0 will add that to Nexuiz at least because it was on his wish-list:

We also wanted to feature at least one mini-game (actually we wanted to design something proper but in the end it was our job again to do it and in the very end I volunteered due to having a similar task in my introductory computer science course at university). Guess the game:



Guessed? Yeah pure, good, simple ol’ MineSweeper!
It looks like that in its final version though:


Even div0 didn’t think that such things (resizeable and moveable(!) windows and dynamic items) would be possible in his menu but I hacked that in pretty quickly and it’s not even that big a hack to be honest
).
In the mean-time res2k and I have worked on the player model in the game itself - res2k did the groundwork and it’s a very good one to say this and when he was away for a weekend I simply added animation support from Zymotic and adapted it to our needs somewhat- res2k was a bit angry with me when he came back and found animations somewhat working already but I let him - I didn’t really have any spare time either - finish the rest of course and he also added some code to allow taunts to be sent from clients to server which broadcasts it to all clients which does pretty awesome things using temporary entities in QuakeC - which I’m pretty proud of coming up with to be sincere.
Another big TODO which res2k worked on and which shall not go unmentioned here is all the gecko stuff - except for the dynamic texture code in DP and the first set of gecko builtins and wrappers, he created all of our Gecko backend - which is a free sourceforge project called OffscreenGecko - and even added support for JavaScript interaction with Darkplaces (the various VMs). A major task and because he’s currently in the Amsterdam working on CrystalSpace and the like, it’s up to me to kick some asses and use that in Edu2p for some new ueber-awesome features.
Anyway, what I’ve been working on lately is skin support in edu2p - thus another contribution to the playermodel code
- and intergrating it with the menu plus allowing the users to select different models for the player’s legs, torso and head. I think it looks pretty great with Quake3’s models but sadly we can’t use them and many of the free ones that can be found on ioquake3’s homepage are incompatible and badly tagged (or rather Darkplaces has problems with them that Quake3 has not).



Now imagine that with more WoW-like models and you can see where Edu2(p) is heading. Sadly we have no player modeler right now, who could create such models and the modeler/animator we had that was capable of this was - I sadly have to conclude in retrospect - a complete jerk and arrogant retard - and yes that is mean and probably uncalled for in this public blog but I’m not naming him and I’m pretty pissed off that he still hasn’t replied to 10 emails from me, hasn’t done the work he was more than once politely asked to and agreed to, didn’t give any feedback though we were more than willing to help and adjust requirements if needed and used way too many repeated exclamation and question marks for my taste in his emails and simply dropped of my radar. I’ll still try to see if I can fix the models that we can use but there’s a grim perspective to it with little more than two weeks till the final presentation.
Anyway this is it from me and stay tuned for a really final update on edu2p and more stories and rants and disclosures - no NDA! \o/
Black
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.