First Reflection

WRD111-44

Kolf, Emily

2014-01-18

Caskey, Damon V

 

Topic: Reflect on yourself as a writer. What is your process? Does it work for you? What aspects of your writing are strong and which areas do you think you need to improve on?

 

If you were to view this recent article (if you wish to, please create an account and let me know so I can give it access), you would find I the following is really a reiteration:

I do have a large body of written work, but am not by any fair standard a “writer”. It simply isn’t within my purview. That said I am a trained and experienced verbal communicator, particularly with improvisational public speaking. When writing, I attempt to leverage this skillset by imagining I am speaking to a group and simply attempt to transcribe the resulting stream of consciousness.

It’s a crude method and of little use for formal research, but does allow quick fabrication of content and by nature is vocally presentable. The detriments are incoherence, source citing and poor reading flow. These are all areas I wish to improve upon.

A semi-professional profile with (silly) picture may be found here. Thank you for reading. I look forward to working with you and the class body!

DC

Multi-Layer Stage Example

Multiple stage layer example with OpenBOR. See gallery below for stage broken into its individual resources.

Layer example

This stage is comprised of eight layers. See text for description of each.

From front to back:

  1. Posts are the default OpenBOR front panel.
  2. Palm fronds are a panel type entity to allow wafting animation.
    1. Layer: 100
    2. Speed: -0.25
  3. Play field is the default OpenBOR panel.
  4. Boat is an animated singular obstacle type entity. It is fully animated and has collision enabled. It can thus be hit and ultimately sunk, but only by throwing enemy characters out of the play field (more on that later).
    1. Layer: -8
    2. Scroll: 0.17
  5. Bay and nearest area of the city are made from a series of panel type entities. This is to allow animation of the various city elements and gleaming water.
    1. Layer: -10
    2. Speed: 0.2
  6. A second series of panel type entities creates another layer of water and city area for smoother scrolling.
    1. Layer: -11
    2. Speed: 0.3
  7. A third and final layer of panel type entities comprises the furthest visible water.
    1. Layer: -12
    2. Speed: 0.4
  8. Background is OpenBOR’s default background, set to autoscroll mode so the clouds are always rolling by.
    1. Bgspeed: 1 0

With eight independently scrolling layers, the visual effect is that of near 3D scrolling when characters traverse the stage. A final touch is an invisible entity resetting the stage palette to the next of ten increasingly darker and redder hues every thirty seconds of real time. This creates a sunset effect during game play.

DC’s Object Core Library – Vol I: Damage

PHP

DC’s Object Core Library is an effort to bring some of the benefits of object oriented programing to the OpenBOR script engine. Although it is technically impossible to define a true object through OpenBOR script, careful structuring of functions into methods properties allows us to closely simulate OOP behavior.

  • Encapsulation
  • Re-usability
  • Forward compatibility
  • Simplicity
  • Expandability

The DC Damage Library coves a fundamental building block; damaging entities. After all, there is little use in something like a bind/grappling system without the means to apply damage. It is very important to not only damage entities using the engine’s built in damage system, but to do so in a controlled way. You will find this system allows you near infinite combinations of settings to cover almost any damage needs.

License

This library is released under license seen here.

Installation

  1. Download and unzip the library.
  2. Place dc_damage folder into your scripts folder.
    • You can always put it elsewhere, but if you do, you’ll need to modify all the #include and #imports accordingly.
  3. Add the line #include “data/scripts/dc_damage/main.c” to any scripts you’d like to use damage objects in, and you’re ready to go.

 

Use

In its most basic form, there are exactly three steps once you’ve installed the DC Damage Object.

  1. Initialize an object. To do that, call dc_damage_create_object({index}). The {index} is a required integer value of your choosing. You can have as many damage objects as you like, {index} identifies which is which. Once initialized an object can used by any script that you installed the library to.
  2. Now you need to define a target to damage. That’s easy too; call dc_damage_set_target({index}, {entity}) and make whatever entity you want to damage.
  3. Now all you need to do is call damage_execute({index}) and your target gets nailed!
frame chars/dude/sprite1.png
    @cmd dc_damage_create_object 0 #Let's create an object with index of 0.
    @cmd dc_damage_create_object 0 findtarget(getlocalvar("self)) #Set the target to be the nearest enemy.
frame chars/dude/sprite2.png
frame chars/dude/sprite3.png
frame chars/dude/sprite20.png
     @cmd dc_damage_execute 0 #Apply damage the target of damage object 0.
frame chars/dude/sprite22.png

Now here’s where it gets interesting. If you do nothing else but the three steps above, you get a simple knockdown with 0 damage. Not all that exciting. But that’s because you applied damage without setting any properties other than the target. So now you’ll want to work with the other properties to crate different effects. The amount of force, knockdown, how far, which direction, and so on are all adjustable on the fly. Just call the relevant mutator function (see below for list) with the index and you desired value. Only worry about the properties you need to – the rest have defaults (you can change these defaults if you like, see Advanced Use). There’s even a set of constants provided to help you along.

Damage a target, change some settings, damage it again. Multiple objects can be used all it once, it really doesn’t matter.

 

Action Methods

These methods are used to execute basic actions.

  • void damage_create_object(int index): Create a damage object identified by and populate with default values. Object is then ready to use, but you will need to set a target before applying damage.
  • void damage_destroy_object(int index): Destroy the object and free up resources.
  • void damage_execute(int index): Apply damage effects to target. You must first set a target. If there is no target set, an alert will be sent to the log and no further action will be taken.
  • void damage_ dump_object(int index): Send all object properties to the log.
  • void damage_import_object(int index, void object): Import all properties from a another damage object to . Will create new object or overwrite existing as needed.

 

Access Methods

Get object properties and status values. Unless noted otherwise, see the corresponding mutate method descriptions for property details.

  • void entity = damage_get_attacker(int index): Get the damaging entity.
  • int atk = damage_get_attacking(int index): Get attacking property.
  • int dir = damage_get_direction_adjustment(int index): Get direction adjustment property.
  • int dol = damage_get_dol_force(int index): Get damage on landing force property.
  • int drop = damage_get_drop(int index): Get drop power property.
  • int force = damage_get_force(int index): Get force property.
  • int force = damage_get_force_mitigated(int index): Get the damage target would receive after its defense and attacker’s offense are applied.
  • int force = damage_get_force_final(int index): Get force that target will receive after all damage mitigation and object settings are applied.
  • int min = damage_get_hp_cap_min(int index): Get target HP cap minimum property.
  • void obj = damage_get_object(int index): Get object array. Useful to copy object or save into global for game persistence.
  • int proj = damage_get_projectile(int index): Get projectile property.
  • int type = damage_get_type(int index): Get attack type property.
  • int flip = damage_get_velocity_flip_x(int index): Get X velocity flipping property.
  • float X = damage_get_velocity_x(int index): Get X drop velocity.
  • float Y = damage_get_velocity_y(int index): Get Y drop velocity.
  • float Z = damage_get_velocity_z(int index): Get Z drop velocity.

 

Mutate Methods

Establish and change object properties. Where applicable default values for the property are listed.

  • void damage_set_attacker(int index, void value = NULL()): Set entity that will cause damage and receive credit for doing so. If no attacker is set when damage is applied, the target itself will be considered the attacker.
  • void damage_set_attacking(int index, int value = DC_DAMAGE_FALSE): Toggle the target’s attacking flag when damage is applied. Combine with projectile to create a blast effect. Uses general Boolean constants:
    • DC_DAMAGE_TRUE: Target’s attacking flag will be turned on.
    • DC_DAMAGE_FALSE: Target’s attacking flag will be turned off.
  • void damage_set_direction_adjustment(int index, int value = DC_DAMAGE_DIR_ADJ_OPP): Determines how target’s direction will be adjusted when damage is applied. Use with following constants:
    • DC_DAMAGE_DIR_ADJ_LEFT: Target will always face left.
    • DC_DAMAGE_DIR_ADJ_OPP: Target will always face opposite direction of attacker.
    • DC_DAMAGE_DIR_ADJ_NONE: Target’s facing will not be adjusted.
    • DC_DAMAGE_DIR_ADJ_SAME: Target will always face same direction as attacker.
    • DC_DAMAGE_DIR_ADJ_SAME: Target will always face right.
  • void damage_set_dol_force(int index, int value = 0): Damage target will receive upon landing from fall. May be mitigated by target’s defenses or ability to land.
  • void damage_set_drop(int index, int value = 1): Drop (knockdown) power that will be applied to target with damage.
  • void damage_set_type(int index, int value = openborconstant(“ATK_NORMAL”)): Type of damage that will be applied to target.
  • void damage_set_force(int index, float value = 0): Quantity of damage that will be applied to target. Float types are only accepted for future expansion. The engine will truncate any decimal value when damage is applied.
  • void damage_set_hp_cap_min(int index, int value = 0): Target’s minimum allowed hitpoints after damage is applied. If after mitigated force will drop target’s HP to at or below , applied force will be adjusted as necessary to allow target’s HP to stay at minimum.
  • void damage_set_projectile(int index, int value = DC_DAMAGE_FALSE): Toogle target’s projectile flag when damage is applied.
    • DC_DAMAGE_TRUE: Target’s projectile flag is turned on.
    • DC_DAMAGE_FALSE: Target’s projectile flag is turned off
  • void damage_set_target(int index, void value = NULL()): Set target entity to damage. You must set a target before applying damage.
  • void damage_set_velocity_flip_x(int index, float value = DC_DAMAGE_VEL_FLIP_X_AWAY): Toggle mirroring of X drop velocity when damage is applied.
    • DC_DAMAGE_VEL_FLIP_X_AWAY: Always send target away from attacker.
    • DC_DAMAGE_VEL_FLIP_X_OPP_ATK: Always send target opposite direction of attacker’s facing.
    • DC_DAMAGE_VEL_FLIP_X_OPP_TARGET: Always send target opposite its own facing.
    • DC_DAMAGE_VEL_FLIP_X_NONE: Apply X drop velocity as is.
    • DC_DAMAGE_VEL_FLIP_X_SAME_ATK: Always send target same direction of attacker’s facing.
    • DC_DAMAGE_VEL_FLIP_X_SAME_TARGET: Always send target same direction as its own facing.
    • DC_DAMAGE_VEL_FLIP_X_TOWARD: Always send target toward attacker.
  • void damage_set_velocity_x(int index, float value = 1.2): X axis velocity applied to target on knockdown.
  • void damage_set_velocity_y(int index, float value = 3): Y axis velocity applied to target on knockdown.
  • void damage_set_velocity_z(int index, float value = 0): Z axis velocity applied to target on knockdown.

 

Advanced Use

  • Efficiency notes:
    • The installation #include is merely to start a file chain of #imports. The only items truly being #included are constants.
    • Objects are actually arrays stored as an index var. Therefore each defined object requires only one indexed var.
  • Because the library is written to behave like an object, it can be easily extended like an object class. Add your own goodies, just make sure to follow the interface rules for forward compatibility and try not to get carried away. Remember this is an “object” and should remained specialized. Things like flash spawns, sound effects and such are the purview of other object libraries (which will be coming soon).
  • Settings.h allows readjusting of object behavior as needed.
    • Array keys
    • Indexed var keys
    • Default properties

 

To Do

  • Clean up some of the calculation formulas. A few of them are pretty crude.
  • % based damage option.
  • Maximum option for HP cap.
  • Min/max damage caps.
  • No reflect option (currently not available in OpenBOR script).

Writing Portfolio

Course Assignments

The following are drafts submitted for all major writing assignments (ordered from earliest to latest):

 

Food Ethnography

Materials from final assignment (Food Ethnography).

 

Other Writings

 

Class Related

While these mostly amount to simple thoughts or one offs, I hope they can offer a bit of the requested writers insight.

 

Non Class Related

This blog itself contains dozens of random musings, adventure memories and other writings which you may peruse at will. Given that it was to become my choose subject for the class, I choose to specifically link the following missive about Druther’s, written ~one year before attending this class.

 

Essay

I would like to believe that if one were to examine all of my writing output, they would find that there is little to be read between the lines. Now I will tell you straight away this is not really true. As it happens I take great pleasure in little games, inside jokes, riddles and hidden messages within my writing. But all that said, the overall message itself is as honest and clear as I can make it. If nothing else because I lack the acumen it takes to weave complex imagery and commentary into what amounts to be a collection of thoughts.

So it is with telling you why and how I choose the works I did. Was there some special meaning behind each? With some noted exceptions, absolutely not. Truth be told I simply brought up my blog list, followed in order from earliest to latest and picked the items with more substantial content. Perhaps that’s not really the greatest message to send – especially considering this is part of my academic career, but I DID say I was an honest writer, and I’ll stand behind my choices good or ill.

The contents found are effectively a lead up to more elaborate and (hopefully) superior writings upon the primary subject I choose when presented with the class theme (food). I had already recently made a point to explore and document a restaurant that inexplicably holds sway in my memories – Druther’s, the last of a once thriving regional establishment. It was an easy choice to make. Why reinvent the wheel when I had already finished half the work? It only remained to formalize and find acceptable sources. There is a downside to this approach, and that is the lack of any true linear progression. You may find the thoughts and content to be all over the place, rather than a gradual increase in validity and quality. I can only hope it’s not too jarring.

Now comes the part where I must analyze myself as a writer. This is easy. I’m not a writer. Oh sure, in the technical sense we all are, but in the colloquial application of the term, not so much. That doesn’t stop me from trying. I’ve written dozens of fictional stories, characters, exploration notes, class papers, tutorials, the list goes on. in short, it’s fair to say I’ve actually produced a very large amount of content, though the vast majority will never see daylight. Unfortunately, I have no clue how to write. My strength is in speaking off the cuff and presentation. Stand me before a crowd, give me any subject and I can produce a several minute speech from nothing – making it all up on the spot. Hand me a blank paper and ask the same, and I am lost. Therefore, to write, I simply imagine myself speaking and attempt to transcribe the words. This works about as well (not at all) as you might expect.

Even now I am a bit confused at times which format to choose, flow of dialog and so forth. But I can credit the class with a bit of growth, and hopefully will be able to build upon what I’ve learned. For that, I will thank Ms. Casero’s efforts and promise I will endeavor not to waste them. Here’s to more and better!

 

 

Food Ethnography – Proposal

Caskey, Damon V
Ms. Casero, Courtney
WRD 110-038
2014-10-21

Food Ethnography Proposal

For the food ethnography assignment, I would like to expand upon the previous Food Memoir. To wit, I believe there is still more to learn and expound upon the Druthers’ Franchise. The question I would ask is fairly straight forward:
Can a regional level business survive in today’s market?
The answer I think is a bit more mercurial. It’s obvious that big chains are here to stay, and there will almost certainly be a niche for the “mom and pop” establishments. The mystery is what happens when the mom and pop grows enough to attract notice. My family owns a long standing small business, and we are all too familiar with the growing pains that encompasses. Too large to manage on a small scale yet lacking the resources to obtain grander markets, let alone take on the big boys. It’s a delicate balancing act to be sure.
I believe that Druthers’ Systems is a fine example of this challenging market niche in action. Despite enjoying a lasting popularity, the chain ultimately failed within the span of a decade and now exists in name only. What caused this? Mismanagement? Overreaching? Cashing out? Stamped out by larger players? Or perhaps the ostensible popularity is merely an illusion created by a few passionate devotees.
  • Review basic franchise design and locations.
  • Obtain interview with owner of last standing example. Research business records.
  • Compare regional influx of competitors.
  • General economic influences.
After obtaining this information and analyzing accordingly, I believe a definitive answer may be found. If the concept is found appropriate, further steps will be taken immediately.

Food Ethnography

  • Apple Festival (Casey County)
    • When did it begin?
    • Why apples? This is not an apple centric area.
    • Is it for expansion?
  • Small family restaurants.
  • Kansas City
  • New York
  • Denver
  • Olive Hill
  • Pops BBQ
  • Red River Gorge
    • Who from the west discovered it?
    • Any specific food culture or items?
    • Local eateries?
  • Cloudsplitter
  • Office
  • Druthers
  • Caramunda’s
    • Local history.
    • Family?
  • Eagle’s Nest

Crowther, Bourdain, Pollan, Conklin, Foer

  1. Interpretation / Claim:
    I believe Mr. Foer, perhaps unintentionally makes a claim that vegetarianism is a higher form of living to aspire toward.
  2. Question: “Why?” In context, Foer closes with the recollection of his desperate and starving grandmother refusing to eat pork offered from a local farmer at her darkest hour. Why? It wasn’t kosher. “If nothing matters there’s nothing left to save”.

Quick Tip – PHP Enumeration

PHP

Looking for native enumeration with PHP? Sadly you are out of luck. PHP simply does not support enumeration out of the box. Fortunately though you do have some options. Each one has its attributes and shortcomings based upon your needs.

  • splEnum: This is an experimental PHP extension that will provide enumeration that’s as close to native support as you’re going to get. Because it requires installing additional files to work, it is not a good solution unless you have full server control. Personally I avoid this approach at all costs. I prefer clean installs of PHP. Also, depending on extensions makes your code non portable.
  • Custom class: There are a lot of great enumeration classes out there, or you could always write one from scratch. Marijan Šuflaj has written an excellent version available for use here. The primary disadvantage is complexity. Even using a pre-made class the instantiation and function calls are sometimes just not worth it when all you need is a straight forward list of enumerated values.
  • The third option: Leverage abstract classes to create an encapsulated list. This is the simplest route and what I shall be demonstrating here.

 

Creating a value list really is a simple affair with PHP. All you need is to craft an abstract class and define a group of constants within it. Abstract classes cannot be instantiated as objects, but their members are immediately available for referencing.

Here is an example for calendar months.

// Set up a list of months.
abstract class MONTH
{
	const
		JANUARY		= 1,
		FEBRUARY	= 2,
		MARCH		= 3,
		APRIL		= 4,
		MAY		    = 5,
		JUNE		= 6,
		JULY		= 7,
		AUGUST		= 8,
		SEPTEMBER	= 9,
		OCTOBER		= 10,
		NOVEMBER	= 11,
		DECEMBER	= 12;
}

// Now echo a value.
echo MONTH::APRIL;

That’s really all there is to it! Sure, this isn’t true enumeration. You must still key in values. Plus there’s no error checking or type hinting for switch operations and similar ilk as you’d find in a compiled language. What you do get is a simple list with encapsulation and list type hinting from the IDE. All with minimal code. Keeping the global namespace clean alone is a fantastic benefit.

A few keystrokes and your IDE springs to action.

A few keystrokes and your IDE springs to action.

For most rudimentary enumeration needs this should prove more than sufficient, at least until the fine folks at PHP step up and provide us with the real thing.

Until next time!
DC

Quick Tip – Copy Table With Transact SQL

SQL

Here’s an easy one, but sometimes still troublesome for individuals testing the waters of SQL: How to quickly copy a table. There are lots of cases where you need to duplicate a table in all but name. Maybe you want the data as well, maybe not. Unfortunately this seemingly simple task is lacking as a functionality in most development tools – including the big boys like MS SQL Server Management Studio.

The good news is there’s a perfectly logical reason such a feature isn’t apparent: It’s part of SQL already, and super simple to boot. Here’s what to do:

SELECT * INTO schema.new_table FROM schema.existing_table

Execute this as a query and voila! You now have a duplicate of the old table, complete with data. Want to make a copy sans data? Just query for a non existent key value.

SELECT * INTO schema.new_table FROM schema.existing_table WHERE some_field = non_existing_value

It’s really that simple. No plug ins or complex write ups required.

Extra Credit

  • You needn’t copy every field. Swap out * with a list of desired fields, just like any other query.
  • Play with the WHERE cause a bit and you can copy portions of data rather than all or nothing. Again, to your SQL engine it’s just another query, so use your imagination.