Took an easy ride today because of tight legs. I always manage to forget how beautiful New Jersey can be during the work week. It is easy to see why everyone who passes through NJ thinks its a dump if all they see is turnpike and Newark rather than what I see.
I have started my work on removing the next spacer. It feels great and looks fantastic. I am a fan of gigantic saddle-to-bar drop.
And of course you can’t go anywhere in NJ without climbing some ridges. This steep ascent is just 0.2 miles long from bridge (foreground) to fence (out of view) but peaks at 18% gradient and “levels off” to 11% for just a brief moment. Hill repeats, anyone?
Overall it was a good ride with some productive saddle time, working on climbing without standing. Tomorrow will repeat the route but with a group. Also trying to get used to the camera. Managed to record a whopping seven seconds of video. Whoops!
Wish this were the law everywhere. Give a cyclist three feet of room or more to make a safe pass. Seems so simple and yet many drivers just can’t seem to grasp it.
Jealous of Epon’s fantastic photography on-the-go, I took the plunge and bought a new toy for when I am out enjoying the road sweep under my two wheels. The camera boasts a lot of pixels but more importantly does HD (1280×720) video at 30fps while being tough. Supposedly it can take a 2 meter drop and is somewhat waterproof, though I plan to never test either claim. And yes, this means to expect many pictures of my cycling adventures!

Taken with my XTi and 24-105L
Also of note is the Russian President, Dmitry Medvedev, speaking about photography:
Just a quick post here regarding Settlers 7 and windowed mode. Although the in game UI doesn’t say the game supports running the game in a window, you can be changing your settings file. You can find the file in the Settlers7 folder under the “My Documents” folder. Open the “Options.ini” file and change the following.
1 2 3 4 | [Quality] FullScreen = 0 ScreenHeight = 960 ScreenWidth = 1280 |
Now, if only someone could tell me why the game still thinks DoF is on when the options file reads it as being set to zero! Happy settling.
New to the input engine within the Focused Games Framework is the gesture recognition capabilities, housed in the GestureTracker class. The gesture recognition class currently supports a small subset of the gestures I plan on supporting, but all are useful none-the-less. The included gestures are press, two fingered press, swipe, two fingered swipe, zoom and pinch. To use the gesture recognition, instantiate a GestureTracker object, add it to the IGame.Modules list and then listen to its GestureTracked even. You will also need an instance of the InputManager class added to the list of modules.
The following is a small sample taken from one of my games that handles some simple menu swiping (a full sample is on the way).
If you do happen to use FGF, I would love to hear what you think! Drop me a line via the Contact form or leave a comment here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | private void OnGestureTracked(object sender, GestureArgs args) { // If it wasn't a swipe, we don't care! if (args.Gesture != Gesture.Swipe) return; // Get the direction of the swipe to determine what way // the menus should move if (args.Direction.X < 0) { // If we are capped at the right side of the menus, return if (current == menus.Length - 1) return; // Transition the menus menus[current].Transition(Menu.MoveDir.OffToLeft); current++; menus[current].Transition(Menu.MoveDir.OnFromRight); } else { if (current == 0) return; menus[current].Transition(Menu.MoveDir.OffToRight); current--; menus[current].Transition(Menu.MoveDir.OnFromLeft); } } |
During the last semester I was taking a class on ASP.NET where we formed teams to write a website from scratch. The website was a “project manager” that would help users maintain projects, employees and customers. Given my experience with ASP.NET prior to the class, my team hit the ground in a full on sprint. We hit a wall when it came time to bind the site’s controls to the data behind it, in this case a Microsoft SQL database. The problems weren’t associated with a lack of knowledge but rather the gross disconnect between interfaces and the data with which they associate. It is easy to think that a textbox on a page can represent a name, but how that name is actually filled in can be the most complicated process.
This is just one instance of running into issues with data. How many times have you used a converter of some sort to scrub data or used a validator to make sure it can be stored? How many times have you written the same try-catch block for the SqlConnection class? How many times have you written a statement with “XmlDocument” or an instance somewhere in the middle? I have come to realize that there within the .NET Framework, there are many classes to get all the work done, but they aren’t really put together in a unified way. When you look at all the data-oriented classes (e.g. System.Xml.*, System.Data.*) you will find that there is no grand picture. For some reason the framework architects didn’t take a step back and see a possibility to unify the approach to reaching, converting, validating and consuming data.
So what is DMS? In short, the Data Management System prototype is a look into how possible it is to unify the approach to using data and whether or not it can make a developer’s life easier. The first step is to consider open architectures that are highly extensible and configurable. The current version of the DMS Prototype is focusing on just that by experimenting with converting runtime objects to and from XML. The important part isn’t the conversion; XML serialization has been done to death before. The important part to take away is that the serialization is being done in an abstracted manner. It is trying to gain as much information as possible from as little information as possible. The fewer attributes a developer has to use and the more generic they are, the easier life will be.
If you hate reading the XNA Forums because of the low contrast and overly wide style, there is good news. I have managed to rewrite a bit of the CSS to drastically increase the readability of threads. As an added bonus, your overall experience on the forum will be better. The modifications were done using the Personalized Web plugin for Chrome, but it works just as well in similar plugins for Firefox (I was testing in the Web Developer plugin).
After installing the plugin, open the Options page (through the Extensions menu item in Chrome) and add a rule for the forums that matches the url, http://forums.xna.com/forums/. Add the following CSS into the appropriate textbox and click the Save button.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | body, * { color: #3d3d3d; } .CommonPagingArea { color: #2d2d2d; } .ForumPostHeader { display: none; } .CommonDescription { margin-left: 0px; background: none; } .XnaCgp_small_CreatorRollUp_Container { float: none; } .XnaCgp_small_CreatorRollUp_Forums a { display: inline; } ul.ForumPostUserPropertyList { width: 160px; } ul.ForumPostUserPropertyList li { margin-left: 0px; } a, a:link, a:visited, a:active { color: #0A67A3; } a:hover { color: #000; } .XnaCgp_CSCommonTitle { background: #efefef; color: #000; } div.XnaCgp_shell_wide_body { width: 960px; margin: 0px auto; } div.ForumPostArea, div.ForumPostArea table tr, div.ForumPostArea table tr td { background: #efefef; } .ForumPostUserArea { width: 150px; } .ForumPostUserContent { width: 150px; } td.ForumPostContentArea { background: #fefefe; } td.ForumPostContentArea>table>tr>td { background: #fefefe; } div.ForumPostBodyArea { background: #fefefe; } div.ForumPostContentText { color: #3d3d3d; text-align: justify; background: #fefefe; font-size: 1.2em; } div.ForumPostTitleArea { background: #fefefe; border: 0px; border-bottom: dashed 1px #8d8d8d; } div.ForumPostTitleArea>h4 { font-size: 1.2em; color: #2d2d2d; } |
Now just browse to a post and check out the changes. There are many more changes you can make, and some optimizations in the CSS so have at it.
Are you new to Twitter? Are you looking for some interesting people to follow? What follows is an introduction to who you should be following on Twitter. It is by no means a complete compilation of who I think is important but rather the beginning.
This is a compiled list of the XNA MVPs known to be twittering. If you are interested in XNA, you should be following these guys!
Speaking of Klucher, he is the Lead Program Manager of the XNA Development Platform at Microsoft. Follow him for an interesting view of the daily life of a Microsoftie.
Best known for his website, Paul offers a fantastic viewpoint on the industry and is constantly on top of the latest products coming out of Redmond.
Gates is finally twittering! Follow him to stay up to date on his work and travels related to the Bill & Melinda Gates Foundation.
Shawn, famous for his cat based tutorials has one of the best XNA blogs out there. If you are an XNA developer and don’t know him, you’re living under a rock.
Keeping up to date on all things XNA can be a daunting task some times. Thankfully Sgt. Conker has got you covered! Follow these guys for the latest news, articles, videos and releases.
Dishwasher. Charlie Murder. GAME WITH ZOMBIES. What else needs to be said? The leader in XNA game development. Follow for news not just about their latest creation but gatos as well.
As you no doubt saw in the writing of the Application class, FGF implements its own version of the XNA Framework’s component classes. The first major reason for doing so is that the builtin component classes require you to pass in a (Framework) Game object through the constructor. While this dependency can be circumvented by implementing the interfaces directly and supplying a manual workaround, the attempt is exactly that: a workaround. The second major reason for my implementation is that by controlling the interfaces and base classes, I can easily support more advanced situations such as the separation between initialization and content loading/unloading. You will see more of this later on when I modify the classes to support asynchronous content loading.
For now, the focus is being put on building a robust base for developers to start working with my framework. Because the goal is to fix the XNA Framework’s implementation, we begin with a simplification of the IGameComponent, IUpdateable and IDrawable interfaces. We combine these three into a single, multi-purpose interface, IModule.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | public interface IModule { event EventHandler DrawOrderChanged; event EventHandler UpdateOrderChanged; void Initialize(IGame game); void Draw(GameTime gameTime); void Update(GameTime gameTime); int DrawOrder { get; } int UpdateOrder { get; } bool IsVisible { get; set; } bool IsEnabled { get; set; } bool IsInitialized { get; set; } IModule Parent { get; set; } ModuleCollection Modules { get; } } |
For most purposes, the builtin collection classes supplied by the .NET Framework are terrific. They are simple and straight forward implementations that do exactly as you expect. But for our purposes, a collection class that fires events when the collection is changed is simply better and in some cases, necessary. For this class, we make the jump over to the FocusedGames.Collections namespace, maintained in the FocusedGames library.
Before writing the collection class itself, we need a delegate that can define how our events will work. Enter the CollectionChangedHandler delegate.
1 | public delegate void CollectionChangedHandler(object sender, CollectionChangedEventArgs args); |
As you can see, we need to define the CollectionChangedEventArgs class itself. This is a simple class that has two properties. The two properties help listeners of the events to understand how the collection was changed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | public class CollectionChangedEventArgs : EventArgs { public CollectionChangedEventArgs() { } public CollectionChangedEventArgs(object item) { Item = item; } public CollectionChangedEventArgs(object item, int index) : this(item) { Index = index; } public object Item { get; set; } public int Index { get; set; } } |