Friday, December 12, 2008
[code] Compiling on a share with VC2005
To fix it, simply redirect temporary files to a local directory, such as:
$(temp)\$(ProjectName)\$(ConfigurationName)
(setting in Configuration Properties -> General, Intermediate Directory)
More info on
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101276
Friday, November 28, 2008
[tips] Sharing a folder from the command line
One idea is to share folders so that you can access the files through the network. But that does not seem too easy without a screen... Well, usually you can get to log into windows without visual feedback. It is also fairly easy to launch a command line (CTRL-R (run) on XP; on Vista use the 'windows' key, type "cmd [enter]" and your are in). But, how can you share a folder from the command line, so that it will show up on the network?
I found the answer here: http://support.microsoft.com/kb/295622. There is a command line tool, WMIC, which lets you do many things, such as sharing a folder, from the command line. In principle you can even create the shared folder remotely. In my case it did not work out (password was refused for some reason) but I could do it 'blindly' from the command line.
Hope it helps!
[grrrr] Sorry, your IP is outside the US
However, region locking on Internet - especially for video on demand - defies any sort of logic. It has become a sort of marketing reflex, hurting the very interests it is supposed to be protecting. Exactly like these stupid moves we sometimes do, such as looking at your watch when you're holding a glass of water.
Let me explain. I like many of the latest US shows. I want to reward the people making the show and I am perfectly fine with the idea of paying to watch them online. So, here I am, on a popular VOD website, my credit card number half entered, when suddenly, a doubt strikes me. The sort of thought that you sometimes get, along the line of: 'no way ... that would really be too stupid'. But no, there it is, in the service agreement I too quickly agreed with: "We do not broadcast outside of the US".
Darn.
Where this really gets mindbloggling is that 1) there is no equivalent service in my country 2) most of these shows will never be on TV here anyway 3) I could watch all of them, 'for free', with very little effort. So what the hell is going on? ... go figure ...
(note that even if bullet 3 stops being an option somehow (!!) it becomes even worse: people will never get to discover the show, they'll be even less inclined to buy it on DVD ...).
Friday, July 25, 2008
[electronics] PICs
Anyway, I never dropped the idea of coming back to electronics one day. I mean, computers are great, but actually building a physical device really is something I find amazing.
Luckily, a new collegue of mine - David Grelaud - turns out to be an electronics guru :) He pointed me out a familly of microcontrollers - PIC's from Microchip - which are in fact fairly easy to use. These little things are programmed in assembler. Code is compiled on the PC and sent to the device through a programmer. You can order a relatively inexpensive programmer, which comes with a demo board, and get started! All tools to program are provided, as well as lessons to learn progressively the assembly language. The programmer is extremely simple to use: Just plug it to your computer USB!!
Ok, but how about the circuit board? Well, this is what is so cool about the PICs. They are extremely easy to use from a hardware point of view. I made a simple demo card with only a few wires, one resistor and a tricolor LED! I can program it from the PC, unplug the programmer and it becomes independent! Here is my - really ugly - card, plugged to the programmer:
Monday, June 9, 2008
[research] Lazy Solid Texture Synthesis
The key idea is to synthesize solid textures for surfaces, but only for the voxels around the object. Hence we never have to store or compute the entire volume. Our GPU implementation is very fast, so we can in fact synthesize a texture for the interior surfaces whenever an object is cut or broken. We obtain much more variety than a direct tiling of a 3D tile, which would create visible repetitions along some directions (and require storing a full volume tile). There is no pre-process of the object interior (ie. no thetrahedrons, no prior-knowledge of where the object will fracture) so our approach could be used for interactive breaking of large structures.
This is a collaboration with Yue Dong and Xin Tong (from MSRA). The project was very fun to work on, and I hope you'll find it interesting and - most importantly - useful.
I will add some more material on the paper webpage soon.
Saturday, May 17, 2008
[game] ragsmash
This is now fixed!
Tuesday, May 13, 2008
[game] Ragsmash on YouTube
At least I know someone played the game ;-) It's really cool for a 'wannabe' game developer such as myself to discover this kind of things. Highly enjoyable.
A few explanations on the weird things happening that the player points out:
- guys stuck mid-air happen because the game only simulates 3 bodies. So it assumes others already landed. I could correct it ... but well, it's sort of fun.
- the 'elastic band' effect is more difficult. I have to look into it but it is likely due to instability in the stepping of the physics. Due to this, a very large force is produced. ODE is not able to propagate forces fast enough and one bone flies away while the rest of the body remains where it is.
Anyway, I am always happy to hear about ideas for a new version of Ragdoll smasher, so feel free to make suggestions. I had another stupid idea involving a chainsaw ... I played too much Doom I think ;-)
[C#] grabing pictures from a webcam
The code is simple, the only difficulty is to install the WIA sdk before (download from here, WIAAutSDK.zip). Don't forget to execute 'regsvr32 wiaaut.dll' in a command line, after copying the DLL in WINDOWS\system32.
WIA cannot be used for videos it seems. For this you'll need a DirectShow wrapper. (Note that the FTP is nicer in the sample code above).
And, if you just need to grab images and send them to an FTP, use Dorgem.
That was my 2 cents on webcams :-)
(I found Scott Hanselman's blog to be a great source of info on this)
Wednesday, April 9, 2008
[code] pure virtual function call
Nevertheless, I actually came accross an interesting variant of this issue, involving a thread. My parent class, A, is creating a thread in its constructor. The thread execution later involves calling a virtual method of A, which is of course meant to be implemented by inheritance.
The funny thing is that depending on 'how long it takes' before the thread calls the virtual method, we may - or may not - still be in the constructor of A. So, sometimes, this will produce the 'pure virtual call' error, sometimes not. Needless to say I was a bit puzzled the first time :-)
The solution was simply to implement a lock mechanism to make sure the thread calls the virtual method after the constructor executed.
Tuesday, April 8, 2008
[win32] Ascii, Unicode, Scan code, Virtual key
I found two very useful functions in the Win32 API: ToUnicodeEx and ToAsciiEx. It converts from a virtual key code and a scan code to a unicode or ascii character. It can be used directly from a WM_KEYDOWN (or KEYUP) message.
Here is a quick code snippet:
uint scancode = (lParam >> 16) & 0xFF;
BYTE keyboardState[256];
GetKeyboardState(keyboardState);
char charvalue[2];
if (ToAsciiEx(wParam, scancode, keyboardState, (LPWORD)&charvalue[0], 0, GetKeyboardLayout(0)) == 1) {
onKeyPressed(charvalue[0]);
}
Also check out this blog for more info.
Saturday, March 29, 2008
[research] SIGcrash
Submitting a paper to SIGGRAPH is a very emotional thing in fact. You put a lot of you in each paper. A lot of ideas. A lot of time. A lot of work. But here it is. It is rejected. Well, well, well. Sometimes it gets in, often not.
Anyway, you won't learn about the cool stuff we did ... but it should not bother you too much since our work was not above the threshold ...
Ouch. It is hard to keep a cold mind :-) Of course you'll learn about our stuff, we'll improve the paper and find a more friendly place for it!
Tonight I just want to have a special thought for all those who put so much in their work and will see it rejected from SIGGRAPH. As a reviewer, I am part of the whole reject / accept process. Giving fair scores is not an easy thing. I know deciding who gets in and who is rejected is not an easy thing for the committee either. But well, it still hurts.
Friday, March 7, 2008
[gpu] G80: The gritty details
Wednesday, March 5, 2008
[game] Zombie gameplay
http://armorgames.com/play/269/the-last-stand
I like the gameplay. Everytime I thought about doing a zombie game it was something along these lines: Build barricades at day, fight for your life at night. The game asks to choose how to allocate day time (repair, or search for weapons / survivors), rather than having you wander around and search for items. It is a neat idea.
Tuesday, March 4, 2008
Friday, February 29, 2008
[gamedev] Don't do it!
The main reason is that I strongly agree with the bottom line: It is a lot more fun to actually engage in smaller projects that you can hope to finish. My very first game project was very ambitious - of course I did not realize that at the time. Even now I just could not do it unless I stop doing anything else for 4 years :-) (and find some good artists to help! ;-) ). Now, note that I learned *a lot* from it, so I do not regret a single second the time I spent on it. But it would have been even more fun to have a game in the end. I am definitely not saying hobbyists should not engage in crazy projects - it is amazing what someone determined can achieve with a lot of work. So if you feel this is what you should be doing, just do it.
However, if you are beginning in game programming you should definitely start with a first small project. Just to experience how great it feels when your game is finished, when you prepare this final zip that will be available for download on your web site, when you receive first comments from players (typically bug reports ;-) ). Sure, plenty of people will tell you 'your game looks ugly', 'it's been done before', etc ... But it will be your game, your creation, your contribution to the ocean of 'fun time wasters'.
I recall when I did my first game. It was a Breakout game. I worked very hard. I was very proud. Nobody was impressed. The number of time I heard 'Why are you doing that? It's been done before!'. Hell ... not by me! But then, as you make more projects, as you gain experience with your game development skills, you'll start to make more impressive stuff. And then you'll realize it's not about being impressive. It's about making something fun. And this is where it starts to be both easier and more interesting :-)
Anyway, I agree with this web page. I know its right. I know I shouldn't. I am still working on this MMO game project ;-)
Sunday, February 10, 2008
[dev] Tile based world
Here is a screenshot of my 'tile' world editor. Its written in C#. The tiles are Danc's free tile set (many thanks to him!).
I am sort of planning to use this for my next project - which is supposed to be a networked game ...
Anyway, making such an editor is a very good exercise, highly recommended! (I am new to C#)
Thursday, February 7, 2008
[opengl] gluX
gluX is here!
Tuesday, February 5, 2008
[dev] CEGUI
I finally took some time to look into CEGUI. This is a great library! Exactly what I was looking for: It provides a very well designed API to build GUIs, using any renderer (and of course OpenGL and DirectX are among them). I did, years ago, spend some time designing a GUI, but I am really happy to take this load of my shoulders now :-)
It really wasn't hard to compile and use it. Let me give a few hints for those who would like to start using CEGUI with Visual C++ under Windows (and with DirectX).
All downloads are on:
http://www.cegui.org.uk/wiki/index.php/CEGUI_Downloads_0.5.0
I had to recompile CEGUI since the precompiled binaries did use a version of DirectX older than the latest available. And anyway, it is good to have the source code on hand, as it acts as a good documentation :-)
- Download the zipped source code and the precompiled external dependencies (available for all three versions of VC++ - nice!)
- Uncompress everything in a same directory.
- Follow instructions on http://www.cegui.org.uk/wiki/index.php/Build_from_Source_for_Win32
Yes, you need premake, it will generate the "*.sln" projects in makefiles/premake. You have to enable DirectX support by editing "config.lua" and setting "DIRECTX9_RENDERER = true". Then launch "build_vs2005.bat", open the VC++ project and compile. Also generate the samples project with "build_samples_vs2005.bat". - To run the samples, copy the DLLS from lib\ into bin\. I also had to copy datafiles\ into the root of my CEGUI install to be able to directly launch the samples from bin\.
Now a couple links I found handy when doing my first steps with CEGUI:
- The Widget Galor: http://www.cegui.org.uk/wiki/index.php/WidgetGalore. A big sample with all widgets.
- Xadec page on CEGUI http://artis.imag.fr/~Xavier.Decoret/resources/CEGUI/.
But of course, the CEGUI Wiki contains a ton of useful information!