Archive for the 'Graphics' Category

Caster fan art contest

Saturday, November 8th, 2008

My friend Mike over at Elecorn has been working hard for a long time on an action game called Caster. Fairly early on I started maintaining the Caster Mac OS X port and have had the unique opportunity of experiencing the game evolve over its development cycle. Caster has really matured into quite a fun and graphically impressive indie game. Mike has made use of a lot of neat techniques that produce slick looking graphical effects without shaders or vendor specific extensions. This emphasis on back to the basics GPU effects means that Caster runs pretty well even on older systems and doesn’t break compatibility across GPU vendors or even operating systems.

For the month of November, Mike has instituted a Caster fan art content. Caster itself has a neat feel to it and I am looking forward to seeing what people come up with. The winner gets to have their art featured in the final build of the game as well as a free copy! So if any of you out there have an artistic streak in you, see what you can come up with and it might get published in the game!

Language Aid 1.1.2 is out!

Saturday, March 1st, 2008

One of the things I hear most often while providing support for Langauge Aid is something along the lines of “I hovered my cursor over text in some program, hit the lookup trigger and it didn’t do anything/grabbed the wrong text.” This is sometimes because the application they want to grab text from does not support the Accessibility API or sometimes because what they were hovering over wasn’t really text. Thus I have added a feature in version 1.1.2 that should help alleviate confusion.

highlight

Now in Language Aid 1.1.2 if you hold down the lookup trigger for more than one second, a highlight bubble will appear containing the text that will be grabbed if you let up your lookup trigger. You can also move the cursor around while holding the lookup trigger to see the exact text that would be grabbed from any point that your mouse cursor can hover over. So now if you are unsure about what text will be sent to the plugin, simply hold down the lookup trigger and move the mouse cursor around until you find the text you want. The highlight bubble is also slightly translucent so you can see the text under it.

I have also slightly overhauled the main Language Aid website to focus more on the the three different ways that you can use Language Aid to grab text. I have added short videos that explain and demonstrate each way. Also, a quick side note on Quicktime video encoding…the “Prepare for Internet Streaming” setting is BAD. When run in my web browser I found that my videos would often play for a bit, then the video would freeze but the progress slider would keep moving. This would continue until the end of the video. If you scrubbed through the video it would seem to display fine. However, if you scrubbed to a section in the video and then pressed play, it would play for a bit and then freeze again. Strangely enough, when played through Quicktime Player this did not happen quite as much but still occasionally would occur. I found that when I turned off the internet streaming setting this behavior stopped. Also, setting my H.264 keyframes setting to “Automatic” from 24 seemed to cut my file sizes in half. I suppose the moral of the story is that it pays to deviate from the default video encoding settings.

My video editor of choice? Quicktime Player (Pro).

Friday, February 29th, 2008

I must say that over the years more than any other video editing program I have used Quicktime Player (editing functionality requires Quicktime Pro) to do quick, clean and simple edits of video when I have needed to. Despite having only limited editing functionality and its purpose isn’t primarily to edit video, I have found that it gets the jobs I want done without a lot of hassle and helps maintain my video file fidelity.

I havn’t had the time to learn Final Cut Pro and for most jobs that I want to accomplish it feels a little overqualified. iMovie tends to mush my video around in ways that I don’t like such as transcoding it into something else, messing with the video dimensions and framerate. There may be better alternatives closer to what I want but I am not aware of them and I havn’t hunted extensively.

What I like about Quicktime Player is that I can slice and dice, re-order things, make translucent overlays and muck with the soundtrack by simply adding in references (by copy/paste) to my source media and then play with them. This means that nothing has to re-render and everything stays quality (the big box editors of course do this too). Now there are some problems sometimes when you try to play things back. Often my edits would playback one frame off as it is trying to load the resource or something. Even when I save the movie as a self contained archive it seems to have this problem. However, I have found that when I am all done with my edits simply choosing to “Export->Movie to Quicktime Movie” seems to take care of that.

An example of using Quicktime Pro to add a translucent comment overlay onto a video:

qteditor

  •  First I make a translucent png the same size as my video.
  •  The I open it with Quicktime Player
  •  Edit->Select All
  •  Edit->Copy
  •  Then I open my video and select the time that I want that overlay to be visible
  •  Edit->Add to Selection & Scale
  •  Window->Show Movie Properties
  •  I then change the new video track’s “Transparency” to “Straight Alpha”.
  •  Lastly I make sure to export so that the little transition jitters are removed.

It seems to have filled my little niche fairly well. Perhaps one day my needs will grow but until then Quicktime Player will be my quick and clean tool of choice.

Physics Models

Thursday, December 20th, 2007

So I have been thinking about what level of physics model I want to implement in Razor. Specifically I have been doing a lot of thinking about collision detection. There are a lot of different ways of doing things with their own strengths and drawbacks. I have initially made the decision of going for more precision and complexity versus speed and ease of computation. I have been spending a lot of time at Wolfram Mathworld trying to remember all the stuff I learned in college.

In preparation for the impending physics tests I have added optional bounding box drawing to all the Actor objects:

Razor Bounding Boxes

I looked around and didn’t immediately see any optimized math libraries that calculate determinants on the mac. If anybody knows of one please let me know. I did find this thread which had some helpful ways of doing it manually.

Why is it called Razor? I don’t know, I just needed a name.

Tuesday, December 18th, 2007

I actually had a very hard time thinking of a name for this project. Nothing really seemed to fit too well or sound that good. But I needed some sort of name for my new project. You have to call it something… I finally settled on “Razor”. What does it mean? Nothing. What does it have to do with the project? Nothing other than now that is what the project will be known by. After not being able to think of a name for a while and itching to just start coding on the darn thing I just picked the name and it has just kind of settled.

Ok, so what is it? On the Google Code page that it is hosted at I wrote:

Razor is a strategy game engine which is oriented around programming the AI of the units rather than direct control by humans. The idea is that human players compete by engineering the intelligence of the units under their control in order to fulfill an objective. The game world is in 3D and will employ some basic physics. Units, AI, physics models and many other aspects are extensible through a plugin system.

Razor is for Mac OS X Leopard only due to leverage of certain Leopard exclusive features such as dynamic loading/unloading of Objective-C, Garbage Collection and more as time goes on.

This is an idea I have had banging around in my head for a long time. Ever since I worked on an AI lab in college where the final semester objective was to program the AI of 5 tanks to play capture the flag against 5 other tanks controlled by one of the AIs of my many classmates. At the end of the semester the class had a tournament in which the prize was an instant ‘A’ in the class and didn’t have to take the final! My lab partner and I won the tournament and even though we both had As in the class at that point, not having to take the final exam was a big time relief at the end of a very busy semester. Perhaps I will make a blog post on our winning strategy later.

Along with that, I have always loved the great strategy involved in RTS games like Starcraft (which in my opinion is the best RTS ever made). I loved thinking of crazy new strategies that would find kinks in established defenses or play with the psychology of the other players. The only thing that prevented me from pulling off my grand designs was the limitations of my own reflexes. Some people just have the twitch and can bounce from scene to scene, keep everything in their heads at once and make lightning fast and precise mouse movements. But if the Korean Starcraft scene is any indicator, these cyber-athletes like gymnasts have a limited lifespan. Once you hit the ripe old age of 22 your reflexes aren’t what they used to be and some pretty young 16 year old is going to take your spot. What I want in some respects is AI programmable Starcraft.

Now the project is only in its infancy and is nowhere near doing anything of significant interest at this point but I decided that I wanted to get the code into an initial functional state that would at least be worthy of initial check-in. Because the project is open source I will be commenting here about the work that I am doing on it, future feature additions and other issues with great openness and frequency unlike my closed projects.

Below is a screenshot of the Simulation Viewer app that you can build and run right now from the source that is posted on the project page. It is not much but it is a start.

Razor, first commit

Digital Quoteboard

Saturday, August 18th, 2007

So one idea that I have had knocking around in my head for a while has been a digital quoteboard. I remember how in college I would go over to somebody’s apartment and there would be this quoteboard full of funny one-liners which if taken of context or more often, taken in the context of who said them, were hilarious. Of course they are usually only funny if you knew the people that said them. I thought about how there are a lot of online communities of tight knit people who could have a little bit of fun with a digital equivalent and so I whipped up this little example. I will probably refine it here and there over time and will probably release the source soon (it is not that much code). Other things I have thought of were live javascript based editing and Wordpress permissions hook ins. It currently works by having a php page render a csv quote database into a jpg so you can have static links to the results, ensuring that it will work in every browser (the above image is the actual linked image and thus may change as the database changes). So far what I have found is that there is a great disparity in exact results or even basic functionality in using the same Truetype font on different operating systems and different versions of the graphics libraries that PHP hooks into. Also, it appears that some fonts do not fully define things like punctuation and formating such as tabs. Feel free to leave a quote by going here. Although I may decide to remove general access to it in the future ;)

The Biggest Graphics Problem You Have Never Heard Of

Saturday, July 15th, 2006
OpenGL

I am now pleased to announce the second of many tech oriented articles that will be placed here on the Blue Lotus Blog. This time it is about a problem in computer graphics that I have been working on for years called Order Independent Translucency. It is something so simple and basic that you might wonder why nobody has solved it. So have I. That is why I have decided to write about it and have included some example source code to go with it. In this article I outline the problem, discuss and implement the currently most promising solution and suggest a better hardware-based solution. Come on in and let us make you aware of a problem that you were happy to be oblivious to.