Friday, May 27, 2011

Android Rect Confusion

Jesus christ! That's all I have to say on this subject. Apart from the following:-

In their wisdom, Google decided to give the Android function Rect.intersect() a side effect. Without reading the docs, you would naturally assume that something like:-

boolean b = rect1.intersect(rect2);

would be reasonably straightforward, returning true or false depending on whether the two rectangles intersected. However, if it returns true, it also sets rect1 to be the shape of the intersection. WTF?? Wouldn't calling the function something like getIntersect() be a good idea?

There is a function called Rect.intersects(), which does do what you'd expect (and avoids doing what you wouldn't expect); so just remember to add that little 's' at the end of the function name because it makes all the difference.

Tuesday, May 10, 2011

I got the call!

Last month I got an email from someone at Intel asking if he could call me about porting Stellar Forces to work on AppUp. We did, and had a quick chat about it and AppUp in general, which seems like Intel's take on the AppStore/Marketplace. I checked out the documentation that was emailed to me, and looked at the website. It wasn't going to be a small job, they obviously weren't going to pay me to do it, and it's a free game so I make no money from it anyway.

However, eventually I came to a page that listed the Java SDKs, and noticed the lack of a Linux version. I sent an email back to confirm if this was the case, which would be a showstopper for me. That was about 4 weeks ago and I've still not had a reply.

It's a bit crap that they expect me to spend the time converting a game to their system (without any financial benefit) but they can't even be bothered to send an email as soon as there's nothing in it for them.