LoadingScene.Load(sceneManager, true, (GamePlayScene)levelType(((MenuEntry)sender).Text).GetConstructor(new Type[] {typeof(SceneManager), typeof(Player)}).Invoke(new object[] {sceneManager, controllingPlayer}))
Feb 29th, 2012 by bug

Much time has gone into profiling and optimization, leading to the unfortunate removal of shadows. In utilitarian terms, though, our decision to severely restrict movement along the Z axis and standardize platform widths makes this a net zero, since shadows are no longer necessary to indicate relative position in 3D space.

Game data is now being saved, including collectible items (story pages are the new Star Coins) and level finish times. New levels are unlocked by completing previous levels.

Bounce pads now visibly wiggle on contact. Matrix manipulation shown to be vastly more fluid and efficient than model animations for simple non-deforming transformations. 3D artists still not convinced. Speaking in the third person linked with sounding officious. More at 11.

if (Vector3.Dot(t.normal, bdir) > 0)
Feb 9th, 2012 by bug

In spite of XNA’s attempt to build a vector library that even orangutans could use (in turn in spite of the irredeemable clumsiness of .NET’s type system), I find myself doing high school trigonometry by hand more often than seems necessary. On the other hand, if I didn’t stop to think that cos(±π/2) = 0, this condition check would have been much more inefficient:

if (Math.Acos(Vector3.Dot(t.normal, bdir)) < Math.PI / 2)

This is also what a built-in Vector3.AngleBetween() function would have done, if there was one. The fewer trig calls the better…

Anyway, this is all part of a new collision routine specifically for platforms, designed to support one-way, bouncy, and moving platforms (in any combination).

The rest of my time during the past week was spent practicing video game cosmetology: removing the most unsightly bugs and temporary assets, touching up colors, and even adding a nifty new, fluid “chase” camera, which drew much attention during our industry demo. Sometimes the little things really count!

b = Vector3.Cross(a, Vector3.Cross(a, p));
Feb 1st, 2012 by bug

Let’s go sailing a × c and ocean…
6 across, 12 letters: disgruntled commodity
Don’t you just love my hot cross puns?

(Honestly, though. I hate writing math code in C#.)

Many apologies for the stagnancy. Shall I summarize my efforts for the past month?

  1. refactored controller code to use a hot-swappable stack of delegates, allowing game objects to restrict or disable standard controls in a safe and reversible manner.
  2. experimented with more realistic physics, i.e. actual Newtonian acceleration and friction. We ultimately decided to stick with our magical Mario-style physics, but the exercise was informative.
  3. wrote a Photoshop script to act as a texture atlas generator. (’twas not a small feat…)
  4. created a class of moving platforms that trace elliptical paths; dealt with a severe bug that was pushed upstream and subsequently instituted a more strict merge policy.

That last one hints at the fact that a sizable percentage of my time has been spent attending to my teammates’ difficulties with Git. GitEx has smoothed the learning curve greatly for many, but it has taken time for the paradigm of distributed version control to sink in. After a month of gentle nudges and hand-holding, though, at least half of the team are into the flow now, and the rest are beginning to learn from them. We even have de-facto mini-teams forming again, working within a single fork to complete complex tasks and merging regularly with the main branch (although not at the same time, yet). All this means I might finally have more time of my own to work on gameplay!

currentEntity.velocity += acceleration * (float)gameTime.ElapsedGameTime.TotalSeconds
Dec 6th, 2011 by bug

The simplest ideas are often the best.

Gravity is one line of code.
Wind resistance is two.
Updrafts…probably 30.

In any case, it seems that my most valuable contributions are those that happen without premeditation. More than half of my “stories” for this project were never formally planned, and more than half of those that were have been rescheduled, reassigned, or reinterpreted. It has become obvious to me that agile development needs to be agile in every sense: it’s neither possible nor practical to limit each mind to a “shopping list” of tasks. An efficient agile developer is like a figure skater: able to spin on a dime and turn from one maneuver to the next without breaking stride. Time spent changing direction is time saved running against the plastic barriers of a design made from limited information.

Anyway, aside from some interesting additions to physics, I’ve also built a few world objects, such as chests that deliver gifts of headwear. Actual gameplay is coagulating swiftly!

triggerLinks[trig] = Regex.Split(root.Element("Links").Value, @"\s*,\s*")
Nov 27th, 2011 by bug

Yes, we’re using CSV inside XML. OgreMax exports scenes as XML based on input from a range of configured widgets, which doesn’t include one for supplying arbitrary lists. CSV the closest we can get to “user-friendly” for our less geeky level designers to link their triggers to multiple targets.

You may wonder what any of this has to do with spline-tracked cameras. We’ve in fact decided to set aside that project, whether only for this year or for good, leaving me to pick up the slack wherever I find. Shadows are still on the plate, but are now largely under the care of our expert in animations, and at a lower precedence than implementing said animations or game logic.

callbacks(this, other, time)
Nov 22nd, 2011 by bug

We’ve finally come to realize that there’s only so much we can do in two months, especially now that we’re down to two weeks before alpha. Our minimum scope has been pared down to the size of a single level with no curvature. However, due to popular demand, we have not simply shelved it until next year when we’ll be sure to have the time to finish dealing with the complexities of multiplayer camera tracking along a Catmull spline. No sir: instead, I have been volunteered (or more accurately, dragged away from my volunteer position in the [much more important] domain of shadow rendering) to help the camera “specialist” hack together the entire caboodle of attractive, curvy features in the space of one week, after which we will decide whether to integrate our work into the alpha release.

I do recognize the appeal and novelty of this feature, and will give my all to see it completed, but I’m afraid that this is yet another case of misprioritization based on the loudest voice in the room. We have no functional applications for a camera spline track as of yet, nor do we even have a working prototype of the rotational transformations necessary to support multiple viewing angles. I can only hope our efforts will prove worthwhile.

BoundingBox.CreateFromPoints(originalBB.GetCorners().Select(c => Vector3.Transform(c, transform)))
Nov 15th, 2011 by bug

That must be the ugliest and most naive way to generate AABBs ever. LINQ is wonderful, but my method-chaining habits from Ruby don’t exactly translate elegantly to C#.

Since Thursday I’ve been on double duty, first patching a bounding box rotation bug with the above eyesore, then being asked to integrate object interfaces, class hierarchies and even entire branches together, all while cleaning up math errors and making optimizations. Even now my plate remains unclean with the stains of a thousand lines of unmerged code.

As a bonus, due to issues in deployment logistics with the lab machines, we’ve decided to abandon Git for this semester, practically invalidating my work of the past two weeks. Not to be discouraged, however, I’ve already prepared a tutorial for my teammates to use Git alongside our existing SVN repository, so that they’ll each have a chance to wet their feet before taking the dive next year. I do think most of my teammates are convinced of the necessity of change, what with frequent (and avoidable!) merge conflicts and our ever-growing bramble of pointless branches, but the final hurdle will be weaning them off of a flawed system for which they were not aware alternatives even existed.

git svn fetch animation -r 146
Nov 8th, 2011 by bug

A CADE operator finally bothered to take the time to read my massive email (after I coaxed him in person). Amazing! Now that we have an actual GID, I can spend my time migrating our project instead of writing half-assed Git tutorials. After consultation with our fearless leader and various experts, I believe I should be able to move everything without halting the dev cycle, even with our ridiculous pile of branch spaghetti.

If that goes well, all that would remain is for the opers to install our needed tools, and for my teammates to trip on the doorstep of their scary neighbor Git.

git init --bare --shared=0660 heroes.git
Nov 3rd, 2011 by bug

That’s got it.

After a few hours of R&D I’ve found a setup that should suffice. Most of the lab’s git tools are still intact, and I’m hoping the ones that aren’t are only for end users. All we need is a place to push.

I’ll still need to collect the team’s handles and coerce the admins into adding another group…and while they’re at it, maybe install gitextensions on their Windows boxes. Of course, being currently the only git user in the class, I get the feeling I’ll need to write a book on it just to get them up to speed.

git init
Nov 1st, 2011 by bug

First, an apology. My conflicting interests in other classes has led me to be lax in my documentary habits. However, with the most pressing obligations out of the way I’ll should stay current with this development log from now on.

Second, a lament. The past two weeks also have been full of obstacles aside from schoolwork, and I’ve spent most of my time attempting to clear them. For example, the condition of the SVN repository, now with almost a dozen poorly maintained branches, is so deplorable that, last week, I took it upon myself to rally a complete migration to Git. Unfortunately, I recently discovered that key components of the CADE lab’s Git installation are non-functional. In addition, the Windows machines lack Git tools completely, making it difficult to ensure a ubiquitous working environment for our team.

Meanwhile, the SVN-related problems continue to accumulate. Having used both SVN and Git, I can easily recognize when and where each tool has its purpose, of which ours is most assuredly aligned with Git’s. I am now too invested in my current plan to retreat, despite the setbacks.

More updates will come within the week.

»  Substance:WordPress   »  Style:Ahren Ahimsa