First Week at Microsoft
May 31st, 2011 § 1 Comment
My first week at Microsoft was great!
This should have been my second week; but due to some immigration issues caused by my stupidity I had to go to San Diego, cross the border to Mexico and back again in order to have a J-1 status… Long story short: all is fine but I’m starting a week late.
Most of my time was spent in meetings and setting up my environment; which is a pretty complicated process here at the Death Star.
I found my first bug and got to write my first line of code on Friday, which is pretty good.
Most of what I am doing I can’t talk about until PDC, which will be in September. But there is still a lot that I can blog about.
I get to code graphics (and other) stuff in C++.
First of all, I haven’t done any real Windows programming before in my life. The closest I had gotten was to compile under Cygwin or actualy using msvc but emulating Unix as much as I can. I had to learn about how Windows applications are made.
Second of all, I am working with some new APIs. On the plus side, there will be thousands of programmers using these APIs in the future and I am one of the first guys to actually use them (and hopefully find as many bugs as I can in the process). On the down side, there is virtually no documentation. There are specifications and code comments, but other than asking the guys who are actually working on this stuff, there are no other references.
I am very excited about the fact that the impact of what I’m doing will be very tangible.
Most days I have been working 10-13 hours. In part because I wasted a week and in part because I love being here and I am very excited about my project. I am drinking way too much soda though, it’s free.
I am very lucky. Besides getting a job here, I got the perfect role for me. Most of my work will be in graphics and if I do everything right, millions of people will use what I am writing. My brain is still trying to get that to sink in.
I haven’t appreciated the city as much as I would like; but once my first paycheck arrives, that will change. That doesn’t mean I haven’t gone out. I got to see a play: “The Agony and the Ecstasy of Steve Jobs”. It was 2:30 long but it felt shorter. It was mostly hilarious. I would definitely recommend it if you get a chance.
I have been to Pike Place Market and I have walked around the Space Needle. I got drunk with my roomies and I also went to a couple of bars. That’s more than enough for two weeks considering I have no car and a small budget. The highlight of it all thus far has been compiling Windows (or, more accurately, the part of Windows that I need) and working in a beautiful office on the kind of stuff that I would be doing at home for free; only in Seattle, with a guarantee of huge impact, and getting paid.
First day in Redmond
May 11th, 2011 § Leave a Comment
My internship starts next Monday and I arrived yesterday, which was a Tuesday. I have plenty of time to do anything I want as long as it doesn’t involve spending a lot of money, driving, or walking too much. Today a friend invited me to have lunch in one of the Office buildings. It’s incredible. Free drinks, pool tables, air hockey tables, arcade games, lots of whiteboards and ethnicities.
My department is beautiful. My roommates are not here yet so I have the desk all to myself. We have a fireplace, a TV, washer and dryer (you know you’re a spoiled brat when you have to google “how to use a dryer”…) and everything else you need except for dish soap. I need to buy dish soap.
The only problem is that I can hear everything my neighbors are doing. The neighbor above me either has a gigantic bipedal dog or a very obese hyperactive child. I don’t know, but someone is running all the time.
This also means that my neighbors can hear everything I am doing. They will hate me once my guitar gets here.
Now I am off to downtown Redmond to buy a toothbrush, underwear and food.
Week Summary [11-12]
March 27th, 2011 § Leave a Comment
My goal is to write here every Sunday. It’s been hard. But today I will do it.
Org-mode has saved my life.
I am a very disorganized, absent-minded and forgetful person. This has been a problem all my life regarding homeworks. Org-mode completely fixes this as long as I remember to make a TODO and a deadline for every school task.
Still, one of my classes is completely dull and uninteresting. It is a semester-long SQL tutorial and I don’t really care for grades, so I am planning to achieve the very mediocre 6.0 (least possible passing grade) for that class. 6.1 is too much.
Other than that, I’m taking Compilers and Operating Systems; the latter is extremely important to me because it so happens that this summer I will need every bit of information I can get on OSs. A side effect of this is that I get the feeling that everyone in class hates me now because I keep asking questions with long answers where already I see a lot of eye rolling and bored faces. My usual question at the end of the class normally makes it last 10 extra minutes. Compilers is also extremely interesting, now I don’t longer find automata theory and formal languages boring; if I knew about its applicability, I would have passed the class last semester =(.
This two classes fill my week with work. It’s been pretty fun but I have very little time to spare for other projects; particularly the work I’m supposed to be doing on Voxels.
I’ve been fulfilling my dream of hacking kernel code using an educational OS called Pintos (the course is a very watered down version of the Stanford OS course). Also, writing the compiler has made me want to write my own little toy language. A staticly typed python-lisp breed systems language would be extremely cool. Nothing grandiose, maybe just do it for fun and then write a game on top of that.
My IA course is also cool. I’m going to write a Tetris that plays itself. Not much progress done yet, but this week will be pretty dedicated to it.
Discarding sitcoms at night has made me sleep better and discarding them completely has made me read more. This two weeks I managed to read Harry Potter 5,6 and now I’m at the middle of HP7. I was a fan when I was little and I don’t want to watch the new movies till I read the books. I’ve got a ton of other books in my read-list, so I’ve now decided to make sitcoms a weekend privilege. This has been a good decision. I have watched sitcoms compulsively since middle school.
Still, I need to have some relaxation time. From yesterday to the day I leave to Washington, Saturday is game day. Yesterday a friend and some other guys got started on a Ctulhu roleplaying campaign. I also bought a Magic The Gathering deck and played until 5 am with a couple of friends; hadn’t played since the 7th edition, some years ago.
I can’t wait to leave to Microsoft; I feel a little abandoned since I haven’t gotten any emails from them in some time. I thought by know I would have been contacted by my team and given instructions to prepare myself. There is a facebook group where we’re making activity groups and I amused myself by starting a flamewar by litteraly posting “Let’s have a flamewar!”. More than 60 comments; my all-time facebook record.
I really want to blog about the Voxel stuff but I still haven’t got a working demo. If all goes well, next Sunday will be Voxel Sunday and I’ll write about something other than school. Still, having to write a compiler, edit an OS, making a self playing Tetris and the occasional beaurocratic SQL homework get in the way. We’ll see. Today I will try to make as much progress as I can. But I am also quite curious about Harry
Thanks for reading!
A New Hope. Computational Geometry, testing and Voxel magic. 3 month summary
February 21st, 2011 § Leave a Comment
Yes, I recently watched Star Wars Episode IV (And V).
Hadn’t watched it since I was little, and it was a very interesting comparison to make between my pre-teen memory of star wars vs my early-20′s perspective. Basically, it was “WOOO LIGHTSABERS” vs “Damn, I really care about these peopWOOO LIGHTSABERS”
Anyway, this post is about what I have been doing since december.
I went on vacation to San Fancisco, which was cool. I got to spend New Year’s Eve at a Dresden Dolls concert. Nothing will ever top that. New Year’s is basically ruined for me.
After that, I spent 20 days in Pasadena living with my younger brother. He had school so that meant that my time each day was divided in 6 hours of coding (on a 13″ display BTW) and then watching movies/going somewhere when he got home. Sometimes, I even got to code after he was asleep.
I decided to start working on an implementation of the Delaunay triangulation. This is the first algorithm that I need in order to develop my somewhat long term plan for a mobile app. This led me through many paths. I made many stupid mistakes
First off, my C++-foo was weak. I bumped into double-free errors, operator overloading hell (I will never overload operators in C++ ever again.) and not-so-smart planning.
I spent some time implementing the Graham Scan for the convex hull. I don’t know why I did that but the algorithm is very simple; basically a quicksort over the relative angle to some point. To micro-optimize, “Some point” should be the lowest point so that you can use the cosine and not calculate the angle.
Everything was fun and games until I started to implement the simple incremental Delaunay algorithm, which in it’s more naive form is around O(n^2).
The first problem was that my planning was bad, I was coding as I went and never stopped to test as long as the code sort of worked. After some time I started having truly random segmentation faults and access errors that were too hard to track down because my data structure was stupid, and they were hard to reproduce. My data structure was basically a list of vertices and edges; which is fine for things like the convex hull but for something like Delaunay you need more topological information.
I was too stubborn to refactor and implement a smarter data structure so I started writing tests using google-test. That fixed a couple of things but the problem was more fundamental.
Since I’ve been in Mexico my direction has changed somewhat. I am back at school and I am taking only programming courses. They all have a particular site with homeworks/assignments so I can finish school from Seattle since I’m leaving almost a month early.
I also started working on a really interesting project involving Voxels for the institute of astronomy.
I spent about a week investigating Voxel libraries / formats to see what I can use.
For polygonal meshes, you can just roll an OBJ loader (if they’re static) and use OpenGL. For volumetric data, there seems to be a bunch of formats and libraries, basically one for every research lab/game. I eventually decided to do everything from scratch keeping an eye on modularity for when (and if) I need something more sophisticated.
This week has been bureaucratic hell. I have been busy with the J-1 Visa application and it hasn’t been pleasant. My coding has also been very bureaucratic. First off; I started to learn Visual Studio for C++. Which isn’t very great until you discover Visual Assist (which is expensive, but I’m using the trial version). After that, and also after installing a package for Emacs emulation, it becomes something pretty close to the perfect IDE for C++. One thing that I was very enthusiastic about was that VS has macros. They are unusably slow, especially when visual assist activated, and they don’t work with C-u as in Emacs. Also, copy pasting from other programs, though rare to use, doesn’t work with Emacs emulation. Basically I have been using 90% VS with 10% emacs for macros, copy/paste and editing makefiles. The reason for this is that I am guessing that at Microsoft you pretty much need to use Visual Studio. I’ m not sure but it’s a good thing to start learning now.
That leads me to CMake. Since I want my projects to be cross-platform, I had to learn CMake. I’m almost happy with it but it took me some time to learn it well enough. I still have much to learn about CMake and I have been tempted to switch to SCons, but Cmake seems to be a better choice.
Being in Mexico made me realize that I am very unproductive. I use rescuetime.com to see how I spend my time, and although in Pasadena I was extremely productive, I have too many distractions here at home.
My family is loud, the phone is ringing all the time and facebook, twitter and reddit are just a click away.
A pretty good solution turned out to be StayFocusd; a chrome extension which limits the time you can spend on distracting websites.
One last thing I have learned is that testing is good.
I wanted to implement a decent data structure for my Delaunay program, so I downloaded the famous paper by Guibas&Stolfi on the Quad-edge data structure (Convincing your parents to spend money on some whitepaper is always a hassle). It’s a behemoth paper. You need basic point-set topology and some intermediate abstract algebra to get it, and the data structure is quite simple. Most of the paper deals with proving that the quad edge can represent all (orientable? can’ t remember) manifolds. And proving various identities.
To me, reading that paper proved to be too much of a herculean task, especially when my free time is shrinking and I just want to code a simple algorithm, not spend hours remembering what little I know about topology (I could never pass the friggin class…) and figuring out what they mean when they define an “Edge-algebra”. Still, I posted a question on cstheory@stackexchange and they were very, very helpful.
After reading a couple of papers dealing with differences in Delaunay algorithm implementations, I noticed that a lot of people (note: triangle) end up ditching the quad-edge for speed reasons. I decided that I was going to implement the more popular half-edge data structure (used in CGAL).
These couple of days I worked on refactoring the code to use the new data structure, and turns out that the tests that I wrote in Pasadena were extremely helpful. Once the tests passed, I was confident that the algorithms worked. Now I am pretty convinced that tests are a Good Thing.
That is the basic summary of the things that I’ve been doing, and I’m going to release a pretty-packaged version of Delaunay so that students can use it. I will write on how I plan to make the incremental algorithm O(nlogn) later, and if I can do it, I’ll do some benchmarks against Triangle; which by the way, is one of the most beautifully written C programs I have seen. I don’ t expect it to be very fast, but the code should be very simple, unlike Triangle.
I will also write about what I’m doing with voxels, which is also pretty interesting.
May the force be with you!
Interviewing for a Microsoft Internship. Part deux.
December 26th, 2010 § 2 Comments
I got the job!
All in all it was an amazing experience. Even if they hadn’t hired me I still would have been pretty happy (I was saying that before I had the offer). I got the chance to have dinner and talk about programming with extremely bright people. I met really nice and smart people from my own country and now we are going to be working at the same company; most likely not on the same team/group, but still…
I went to Vallarta for three days. My dad, who is a businessman, made a “business meeting” in Vallarta so that he could be with me.
The hotel didn’t give me room right away so I stayed at my dad’s room studying. I was pretty paranoid so I was making sure that I knew all the stuff I put on my CV as deeply as possible. When I was taking a smoke-break next to the window, I saw other interviewees chilling out. Having some drinks and spending time at the pool. In retrospect, that is how I should have spent the day. Nothing I studied during those hours directly helped during the interview. It may have helped my confidence but I should have just relaxed.
We were invited to have dinner with the interviewers the night before the interview. We were told it wasn’t an assessment. I still had the suspicion that there were ninja interviewers taking notes on our behaviour. There were three tables set up and I chose the one John Guin was sitting at. Both because the prettiest girl was sitting there and because John was hilarious. Turns out my choice of table was pretty good since Mike Fortin came to our table and sat next to me.For the next couple of hours I had a great time talking to Mike and John. Topics included what’s it like to work at MS and their backgrounds, we even spent time talking about the version control system they use at Microsoft. Mike made quite an impression on me when he said “I’m the one to blame for Windows Vista”. He is in charge of the team that is responsible for Windows being fast. Hardcore stuff.
I took the risk and told them that MS Paint sucks. Fortunately they agreed. Not only was the dinner delicious and the conversations interesting, but I made a good impression on Mike which helped me when, praise Zeus, he ended up interviewing me the next day.
I returned to my hotel so excited that instead of sleeping I spent a couple of hours at the bar with my dad, his friend, and a bunch of drunken Canadians.
My interview was supposed to be at noon, but they moved it to 7:30 am a couple of days prior. I only slept about 4 hours but the adrenaline of the next day was enough to compensate. The Microsoft guys were nice enough to get us breakfast at their hotel since ours didn’t serve until later. The interview began at 7:30 sharp.
We were taken to a room within the conference center. There were cookies and soda. Within a minute or two a small army of interviewers came into the room calling people by name. Slowly, pale students and recent graduates were standing up.
I had four interviews. All of them consisted of around ten minutes of talking about my interests and around 40 minutes solving a coding problem. There were no whiteboards in the conference center rooms so the small point markers I bought were pointless (no pun intended). We wrote code on paper. I always kept in mind all the tips I read from the Internet.
Donna, my first interviewer told me that Manav, the guy who interviewed me in Mexico City had put in a very good word for me during dinner. That was a tremendous boost of confidence. She made me write an algorithm about returning a sorted linked list from two sorted lists. It was pretty easy but I chose C so I could show her that I knew how pointers work. She gave me some tips and we wrapped it up.
My second interviewer was named Bambo, and he started off telling me that with my math background maybe I could find an formula to the solution of an algorithmic problem involving consecutive letters in a string. I spent a couple of minutes thinking and I found a solution only to realize that I hadn’t understood the problem correctly. He posed to me another problem and I went on to try to find a formula for the solution. I realized too late that this time what he wanted was code.
Realizing I made two mistakes in a row, I told him “damn… I’m not doing well”; he just laughed and told me that the point of the interview was to find out how I think. He changed directions and asked me how I would test a dialog box. Then he asked me how I would test Notepad. One thing that made me feel good was that he complemented me on not giving up on a problem. Still, my confidence dropped after the interview. I didn’t feel like I had done well. The disappointment didn’t last long. I found out that Mike was my next interviewer and I got excited.
Mike started of telling me that I asked some good questions the night before; again, confidence boost. He asked me if I wanted to go right ahead to the coding but I was a bit tired so I told him to ask me some questions first. He asked me what was my favorite program that I have written. I told him about an Internet proxy I wrote to substitute all images in websites for a picture of myself on my mom’s computer (For instance, instead of the google logo, there was a picture of me doing a stupid face). He laughed, but clearly he wanted me to tell him my most challenging program. I told him about the shadowing in pycave. It was the first time I had to buckle down and read research papers, learn a bunch of stuff and then implement it. Programming smart tricks with OpenGL’s fixed function pipeline is not exactly an easy skill.
The problem I had to code was to determine if a matrix had a copy of a smaller matrix within it. After I finished, he told me if I had any questions and I asked just the right question to get him to ramble for 10 minutes about some awesome stuff his team is working on; very interesting.
When I returned to the main room, there were only two guys left. Most of us just had 3 interviews. Of the ones who had 3 interviews, they only hired one.
My fourth interview was with a guy named Nar. I was worried that having a 4th interview was a bad sign, but he told me that it was actually the opposite. That meant I was doing well, so I got a confidence boost again. He works on device driver architecture for Windows. He asked me about Haskell and then he asked me to find an algorithm to find the largest palindrome within a string. After staring at a piece of paper for a couple of minutes he told me that I could find a solution in O(n^3), O(n^2), but he didn’t expect me to find the linear solution. I found a quadratic solution but it took too long to write and we didn’t have time to test it or for me to ask him questions. He did ask me some questions that made me think I was getting hired.
When I was waiting in the room for the last time, I was drinking coke and smoking my nth cigarette. Suddenly I heard my name and nervously walked to the aisle. I saw my recruiter and my four interviewers waiting to congratulate me. They gave me a t-shirt and they gave me an offer. My heart was pounding . It was one of those moments that really engrave themselves in your brain.
Tips for the interview.
I asked them during dinner what is it that they’re looking for in candidates. Mike told me: Intellectual horsepower and passion.
This is subjective but I believe this is what helped me:
Be methodical. Understand the problem. Plan the solution and *then* code. I did this in all interviews but the second, the only one I felt didn’t go well enough. I got complemented on it. It is important. Example: My first problem was about linked lists. The problems are going to be ambiguous so they can tell how you think. Is the list composed of integers? Can I destroy the original lists to save memory? Are the lists terminated by NULL? Can they be circular? (you don’t want an infinite loop!) What happens if the function receives wrong data? Say, a Null pointer instead of an allocated node? There are a lot of things left undefined behind a simple definition and they are absolutely vital to give an adequate answer.
Show passion: I made a good impression by having projects of my own and by getting excited when talking about programming. I don’t think you can fake this.
Don’t worry about statistics. There is a lot of luck involved. I got interviewed by the right people. It is likely that a different subset of the interviewers wouldn’t have hired me.
That’s pretty much it.
As for the actual internship, I will blog as much as I legally can about my experience the next summer =).
P.S.
I edited this post because I realized I didn’t write it as well as I could. I’m still not the best writer, but I had written this in a hurry. The original content is intact, I just made the presentation better and added a little bit of extra content.
Interviewing for a Microsoft Internship (Part one)
November 30th, 2010 § 3 Comments
I haven’t posted anything in quite a while now; I figured this is a good time to start writing again. It was not an uneventful year, but I didn’t feel like writing.
A couple of months ago I got an email sent to the CS students at UNAM about Microsoft recruiters coming to interview people who wanted to do an internship. The day before I spat out a résumé and decided to go. They did a presentation and asked some coding questions to the audience. Some guy got a Zune for answering something. I got a frisbee for participating…
A mexican Microsoft employee talked with me for about 30 seconds and then asked me to write code on a piece of paper to recognize a very simple regular expression. When I finished, he told me that I shouldn’t have used pseudocode. That if I made it to the next interview, it could kill me.
I didn’t feel very confident; wasn’t sure if I’d make it to the next step.
I got an email a couple of weeks later asking me to go to the Microsoft Mexico offices to be interviewed by someone called Manav. The interview, during which I had to write an algorithm to check if two rectangles collide, lasted around 25 minutes. Since I like making games, I have written that thing a thousand times; still, I got nervous and screwed up one of the cases. He told me and I had to correct it.
The interviewer was really nice. I told him that I recognized him; that I had googled him (In retrospect, maybe it would have been better to say I binged him =P). He asked me if I had any questions and all I could think to ask was “How did I do?”
It took them a while (more than a month) to send me an email. An hour ago I got one inviting me to Puerto Vallarta to be interviewed once again next week. I wasn’t sure about it, since I told him that I was a graphics geek and then had trouble writing in the whiteboard one of the most common things to write in graphics. Still, I landed the interview and I am feeling confident that I can do well.
It is the last week of my school term, so this means that starting today my time will be mostly spent practicing Topcoder problems, and not so much studying and doing homework. I may have to speak to a teacher to take the exam/turn in the homework after the interview.
I really hope to get hired. It would be an amazing experience.
Original Futurama cast is comming back!!
August 25th, 2009 § Leave a Comment
About a month ago, I sent this email to the casting company that was calling for new voice actors for futurama:
Please, do tell those suit-wearing cheap monkeys at Fox to use the original cast.
Sincerely, the Internet.
About 20 minutes ago, I got this response:
Dear Futurama Fan,
Thank you for voicing your strong support for Futurama and the original voice cast. We appreciate the time you took to fire off a thoughtful and/or concerned and/or homicidal e-mail message to our casting director, Scott Muller. (Rest assured, not a single one of these e-mails reached the actual decision-makers at 20th Century Fox Television. For future reference, please note that Scott Muller is in fact one of Futurama’s biggest fans, and was instrumental in bringing about the return of the cast. Please hoist a bottle of Olde Fortran for Scott!)
Speaking of the cast returning… good news, everyone! The cast is returning! All of our series regulars are back in action for Season 6. Billy West, Katey Sagal, John DiMaggio, Maurice LaMarche, Tress MacNeille, Lauren Tom, Phil LaMarr, and David Herman are all on board and have already begun delivering their customary virtuoso performances. The all-new Futurama episodes are slated to air on Comedy Central beginning in June, 2010.
We are extremely grateful for the outpouring of support for the series. Your loyalty over the years has kept the show going through its original four seasons on FOX, its subsequent reincarnations on Adult Swim and DVD, and now its Bendiferous return to life on Comedy Central. See you in the (near) future!
Sincerely,
David X. Cohen & Matt Groening
Good news indeed!
Clojure optimization of constants
April 18th, 2009 § Leave a Comment
(I actually read about this trick on the clojure user group, but I can’t remember where.)
This is a neat trick that eliminates boxing/unboxing overhead when you are using Integer and all you need is int.
(This of course works for the other java primitives)
Let’s do something stupid like summing up two Integers ten million times.
(def times 10000000) (def w 640)(def h 480) (time (dotimes [i times] (+ w h)))
This little test took around 950ms on my machine.
The w,h values are unboxed from and boxed into Integer classes in order to be used.
Now consider this:
(defmacro w [] `(int 640))(defmacro h [] `(int 480)) (time (dotimes [i times] (+ (w) (h))))
This is a very smart macro trick that I read on the Clojure user group. What it does is it substitutes (w) with a java primitive at compile time.
On my machine, the benchmark took around 430ms.
The problem is that it is ugly, but that can be fixed easily.
(defmacro const-int [name val] `(defmacro ~name [] (list 'int ~val))) (const-int w 640)(const-int h 480) (time (dotimes [i times] (+ (w) (h))))
Still around 430ms. There is no performace cost because of the way macros are evaluated.
const-int is a macro that creates a macro so our definition looks prettier. The only caveat is you still have to use (w) instead of w.
pyCave: Porting to mac.
April 6th, 2009 § Leave a Comment
So for the past couple of days I have been porting pyCave to my mac. Yesterday was the day I thought the work was pretty much finished (It’s not).
I did it by starting with a GL demo written from scratch, and I went up from there adding features until I had a working copy of pyCave. Obviously, there was a lot of copy-pasting, but the overall writing involved a lot of redesign that ended up touching the whole program. The diff file was huge.
This wasn’t the original plan. The ‘project’ was called ‘glui’. It was only a module to build GL user interfaces. It eventually morphed into a new version of pycave =). There was only a single commit. Bad idea. But the code is the product of an intense non-stop coding session.
One of the first changes was adding an opengl extension checking mechanism. I found a nifty thing that pyOpenGL had. Every extension module has a member called EXTENSION_NAME. I used that to check for extensions in a very concise manner.
Little did I know that the nifty feature is actually only featured in the latest releases of pyOpenGL 3 (ubuntu beta releases don ‘t have it).
So i’m thinking that I’ll include a subset of the latest pyOpenGL (3.0.0) so that I won’t get emails from ubuntu users with Nvidia cards saying that the game doesn’t run.
The game runs almost perfectly on my Macbook with Python2.6. I was going to write about the hell I went through compiling pygame for Python2.6 on a mac (it’s practically impossible), but it’s a long story. I had to do it because I had screwed up the default Leopard python instalation thanks to a very stupid bash command.
Today I fixed my pretty apple-provided Python and tried to run pyCave (practically all my users will do the same).
It actually crashes.
The 2.5 and 2.6 versions have the same PyOpengl (release candidate 1). It is a very strange bug and I think my frankenstein python2.5 instalation is to blame. I am not sure.
A friend of mine just got a brand new Macbook (lower-end) and I would love for him to let me borrow it for a half hour to do some testing.
I am very optimistic that my 6 year old laptop will be able to run the game. It already does, but there is an odd bug in which all the edges are highlighted. It looks awesome with the proceduraly generated tunnel =) It also has the extension-checking bug, which should be fixed by adding the OpenGL module inside the pyCave distribution.
pyGame beta
April 1st, 2009 § Leave a Comment
I have had this little game brewing for too long. It’s a small program. Around 2,000 lines of python.
I tried to keep it as “from scratch” as possible. I didn’t have a dependency on pygame until I had to add music. I wouldn’t hesitate to remove the pygame dependency if I found a lighter cross-platfrom sound library that was as simple to use as pycave.mixer.
I am not using shaders. Shadows were implemented after reading lots of papers with a depth map using OpenGL’s fixed functionality. I want to write a more sophisticated shadowing algorithm but it would be too painful without using shaders. I may add the functionality to pyCave but it may be out of the scope of the project, and it would introduce too much pain (see below on porting).
A few weeks ago I released a first beta to generally good reviews. Some people find it too difficult, while others (myself included) find it easy until they reach hardcore mode.
I have learned a few things about pyCave. First, dealing with video card drivers is a pain. Most laptops with intel integrated cards won’t work. They just render a black screen instead of showing the menu. I think it’s because they don’t support multi-texturing without using an opengl extension. I will prove it soon enough with the new interface code that I’m writing.
There was a very strange bug caused by trying to clear the stencil buffer. On my macbook it caused a bus error (mac-speak for segmentation fault). A friend running linux on a lap also had a segfault. I guess it was the same bug. I just removed the line since I am not using the stencil buffer =) It was just a left-over from when I was implementing shadow volumes.
Right now I’m working on making it more cross-platform. I wrote a little python module to check for available extensions. I am changing some abstractions in order to make the menu code less horrible. I will be happy when pyCave runs on my Macbook and another dying 5 year-old laptop.
For now, If you are on a desktop computer with an Nvidia graphics card, you can get pycave from
http://pycave.sourceforge.net/index.php
(svn version is better ;)