Paul Michelotti

The URI and then some

Updates From Comic-Post

A Strong Accusation

May 10th, 2013 at 12:04 am

Alternate Endings

Apr 28th, 2013 at 11:54 am

What I Did Over Spring Break

Apr 17th, 2013 at 10:55 pm

Bocce Banter

Apr 11th, 2013 at 11:16 pm

These Arent Your Parents Pampers

Apr 6th, 2013 at 9:13 pm

Latest Project Update

from Iterative-Living

Weekend Updates - Indexing and Graphics
Sep 18th, 2011 at 7:17 am
A hodge-podge of generally undirected game updates took place over the weekend which I wanted to write about.  Now that the in-game menu functionality is working I'm getting close to having nothing but a handful of random details to cleanup before the engine and game are actually playable entities.

Indexing

One thing I found that I overlooked in my originally programming of the engine was the fact that, since the player is movable, the player may at some points be in front of an object while at other points might be behind an object.  The problem came in when I realized I was not re-ordering the array of on screen objects, so when a player walked behind an object, the entire player sprite was still drawn on top of the sprite for the object which they were supposed to be behind.

On the surface this isn't a major problem and I was able to write up a sorting function to pass to Array.sort which ... sorted things out.  Writing up the function however brought a larger issue to light.  In order to get objects which were literally on top of other objects (ie, a coffee cup on top of a table), I had to introduce a gameHeight property to each game object.  This property I used to indicate how far off the ground something was assumed to be and my sorting function could take this into account when calculating an objects relative position.

This may end up being sufficient for this game, but I feel like the engine in the end needs to more robustly handle the fact that I'm essentially working in a 3d environment but drawing in a 2d context.  For instance, I may end up reworking the object positioning mechanisms so that their position is defined in 3d space and the engine does the work of calculating where to map those objects to in 2d space for presentation purposes.

Graphic Work

I've been putting off drawing more sprites, largely, because I got so sick of it after making all the sprites for the room itself.  This weekend however I decided to hunker down and start work on the panda walk cycles again.  It was as much of a pain as I expected it to be, but I got the forward walk cycle done and am now moving onto the left walk cycle (which will be repeated as the right walk cycle).

All of this graphic work has led me to the conclusion that, for my next game, I need to just pay someone to do this for me.

I still have some cleaning to do, but here's the general idea of what the final walk cycle will look like

So, what is left to be done?  I'll try to get a list together for a future post, if for no other reason than to provide myself with a checklist of sorts.

DnL8Tar

Seeking Foundations

Stability and Fragility of Namespaces
Apr 21st, 2012 at 9:24 am
While working on a blog post which will soon be published (and linked to) on CITYTECH, Inc's site, I mentally ran across the subject of updating a namespace definition within a domain of data.  More concretely, I was considering why Apache Jackrabbit does not allow updates (or unregistrations for that matter) to namespaces once they are established within a given Repository.  It seemed to me initially that allowing changes to namespaces would be valuable, for example, as new versions of an ontology were published.  Considering the matter further however I began to realize how dangerous such a practice would be.

Consider the following scenario.  Let us say that I told you that I bought a new shirt, the color of which was blue.  However, instead of saying that, I said "I bought a new shirt, tar klonor blue."  You would look quizically at me and perhaps question your hearing of my statement, because what I didn't tell you was that I had contrived a new statement, "tar klonor" which meant "having the color".

This example is somewhat absurd in and of itself but it is essentially what would happen to a machine's ability to understand linked-data statements if a namespace were changed in the domain of the data being represented.

Consider now a more concrete example.  Let us say that I have created a food ontology identified by the URI http://example.com/food/v1.0/.  Now let us say that I have two documents containing food information.  I present these documents in listing 1 and listing 2 respectively.

@prefix food: <http://example.com/food/v1.0/> .
@prefix ex: <http://somesite.com/things/> .


ex:americanCheese a food:Cheese .
ex:lambChop a food:Meat .
ex:apple a food:Fruit .
ex:provalone a food:Cheese .

Listing 1

@prefix food: <http://example.com/food/v1.0/> .
@prefix me: <http://self.com/items/> .


me:camembert a food:Cheese . 
me:brusselSprouts a food:Vegetable .

Listing 2

If I were to search over this dataset for all resources which are http://example.com/food/v1.0/Cheese, I would find three things.  Now, let us say that I create a new version of the ontology and identify it with the URI http://example.com/food/v2.0/ however I only update document 1 with the new namespace.  Now, if I perform the same search, I only find one thing.  I know in my heart of hearts that I meant for http://example.com/food/v1.0/Cheese to be semantically equivalant to http://example.com/food/v2.0/Cheese, however a system looking at this data has no reason to make this connection (nor should it).  It is equivalant to me creating the new phrase "tar klonor" and then assuming that you will understand the meaning of my sentances including said phrase.  One solution to the problem would be to update the second document along with the first, however this assumes that all documents and systems utilizing the URI of this ontology are under your control.  If your ontology is more widely used, this is not viable.

OWL does expose some mechanisms for handling this (see http://www.w3.org/TR/2004/REC-owl-guide-20040210/#OntologyVersioning), however these seem cumbersome and rely on a system to implement the understanding of the versioning constraints.  Further, some of the more robust constraints are only available in OWL-Full, the implementation and usage of which is far from trivial.  And this only covers ontology versioning.  What about specifications which are not ontologies?

Some time ago, a version 1.0 of Dublin Core existed and there was talk of creating a version 2.0 after version 1.1 (some old notes on this and on translations of DC).  Imagine if you already had your data published in DC 1.0 when 1.1 was pushed out.  The change to version 1.1 updated the URI of the specification and as such, made your data obsolete for all intents and purposes.  Given this, it's clear why the RDF URI still has "1999" in it.  Also, on some specification sites (such as FOAF) you will find statements concerning the stability of the specification URI, specifically, it's not changing.

Coming to the end of this rather long winded discussion, I suppose the bottom line is, Jackrabbit does not need to support changes to namespaces, because namespaces shouldn't change.  Updating a namespace in your domain of data is equivalent to updating all nodes of data using that namespace, which should not be taken lightly.


DnL8Tar
-PCM
expand post reduce post

Paul and Laura

Gardening 2012 - Phase 1 - Cinder Blocks
Apr 22nd, 2012 at 3:50 pm
I experience a strange mix of excitement and dread every time I look out my kitchen window into my back yard.  It is a substantial canvas with amazing potential, however, before I can bring out said potential, I have to whitewash what is a fairly fouled canvas currently.

In case you did not follow the metaphor, allow me to be more blunt.  The yard is an overgrown mess.  Not only that, it is filled with artifacts of prior gardening attempts which are old, rotten, and half buried.  So as to not completely overwhelm myself I have set a goal of simply cleaning the slate this year.  That includes getting rid of all the junk which I no longer want back there, pulling up nearly every flower bed, turning over the earth everywhere I want to plant next year, and reseeding large portions of the lawn.  This also includes ripping up a few fairly substantial bushes and trees, but someone will be hired with cash monies for that job.

This weekend I set to digging up the bricks and cinder blocks which lined the rear garden.  The bricks I should be able to get reuse out of.  The cinder blocks however are in terrible conditions and, frankly, were not aesthetically appealing to begin with.  The job was only complicated by the fact that buckthorn, a plant who's roots are relentless, seems to run rampant through the yard currently, and had actually grown INTO the cinder blocks.





The next task I have set for myself is uprooting everything which is in the rear garden, followed shortly by turning over the earth in the garden to prep it for next year.   I'm considering also lining it with stones this year if I get around to choosing what form of masonry I want to decorate the yard with, but that's fairly low on the priority list.
expand post reduce post

Chefsplorations

Steak Fajita Baked Potatoes
May 28th, 2012 at 6:44 pm
When faced with leftovers I often seek to present them in a context other than that of the producing meal.  Tonight steak fajita leavin'z sat in my refrigerator (as they will for the next two days given the amount of steak I cooked yesterday) consisting of grilled skirt steak and grilled vegetables.  Having a few potatoes which I wanted to do something with as well, I decided to make a facsimile of twice baked potatoes, stuffed with the remains of the prior nights dinner.  Having no intention of putting creative energy into the name of the meal, I dubbed it "Steak Fajita Baked Potatoes" combining both the identity of the leftovers and the cooking technique for the potatoes.

The Potato


Over the years I've learned to be more patient with baked potatoes.  Early on I would give a potato 30 minutes in the oven before assuming I had already left it in far too long.  Years later I've found that 50-60 minutes at 400 degrees is adequate for baking a potato ... a potato which is ideally covered in olive oil and kosher salt.  Tonight I think the potatoes actually went over 60 minutes, because I finished Zelda while cooking and was unwilling to disrupt the ending with details such as baking time.

The Fajita


Some credit for the meal must be given to the prior night's efforts.  The steak fajitas were in and of themselves a most acceptable meal, and while I'm not writing about them specifically, I will speak of the steak and the vegetables.  Skirt steak is the type of steak I prefer for fajitas .... or tacos .... or anything of that ilk.  It cooks quickly and it takes a marinade nicely.  I let the steak sit in a gallon zip lock bag for 5 hours with olive oil, apple cider vinegar, chili powder, garlic powder, cayenne pepper, paprika, cumin, salt, and pepper.  This I grilled up along with a compliment of vegetables consisting of red, yellow, and anaheim peppers, onions, and mushrooms, also covered in oil and apple cider vinegar.

The Combination


Last night the above were put together as they would normally be for fajitas.  Tonight, the cold leftovers were chopped into small pieces and mixed with the potato innards.  Innards which were extracted after cooking and cutting the potatoes in half.  Innards which were also mixed with sour cream, cheddar cheese, olive oil, and some more salt and pepper (if I had some green onions I probably would have put that in there too, but I didn't have any).  Innards which were then spooned back into the potato shells to be baked another 10 minutes.

Completed Steak Fajita Baked Potato
The result you can see above - and while not overly decorative (since I did not use any sort of piping equipment to put the filling back into the potato) the final product was greeted with rave reviews (from Laura) and also took a hot sauce admirably.

DnL8Tar
~PCM~

expand post reduce post