Thursday, April 17, 2008

Game construction 04-17

The professor just totally said, "Oh, I just had lunch with the founder of Bungie, he might come in and talk sometime." I mean, he did graduate from here. But still.

And now he's pimping Audacity (again) and Sketch-Up.

Naaaaame drop central.

What did I have for lunch? Gyros.

(For the record, I took paper notes on Tuesday -out of battery- and missed class last Thursday. Whoops.)

For maps: consider using heightmaps.

I'm kind of worried that most of my group seems to be missing today.

The track format are the "bones, not the skin": we can render the view how we like.

Convention: xz plane is ground: x is to the right, z is backwards, y is up

Higher level AI makes decisions; lower level AI interprets those decisions as movements.

Tuesday, April 8, 2008

I wonder who is reading this over my shoulder

It proves impossible to type notes for Computational Models of Speech, there are too many squiggly lines, too many omegas, too much supertext. So much for that.

Basic physics engine (second milestone) doesn't have to be fancy, "bells and whistles" can be added later. Updating state iteratively with accelerations, rotations, positions, et cetera. First-level behaviors, basically.

First milestone ( design document ) pushed back one class. Is the second (physics) also pushed back? His answer is unclear.

physics takes a state and a control, returns a state.

Steering Behaviors:

seek (target)
v = target.pos - self.pos
return (maxAccel * normalized(v), 0)

path following
t = pathParamClosest (self.pos)
targetPos = path(t +Dt)
seek targetPos

predictive path following
find where your headed
find the point on the path closest to that
aim for that instead
that is
targetPos = self.pos + Dt * velocity
param = pathParamClosest (target.pos)
seek (param)

He just said "Catmull-Rom Splines" again.

Approaches to steering:

Arbitration
eg. "arriving" steering

Weighted Blending
weights associated with steering behaviors
w.i , s.i
s = sum.i(w.i * s.i(target))
interesting...
but situations exist where weights can balance out

Flocking
combine:
separation (not too close to neighbors)
cohesion (not too far away from neighbors)
alignment (with the velocity and direction of the flock)

Priority Based Combination
blended groups ordered by priority
find the highest priority behavior that provides "meaningful steering"
ex:
(high, collision avoidance)
(med, enemy avoidance)
(low, path following)

game construction 04-03

mailing list: cmsc23800@

First milestone: design document - get in a group - be thinking about gameplay
read chapter 3.1

Aside: Man, I wish I'd been here for the first class.

Movement:
AI has to figure out where to go
then, pathfinding
these are high-level issues
"physics" of movement - position, orientation
"graphics" of movement - how is movement displayed

Aside: How could one of two roads be both longer AND straighter?

Low-level AI:
responsible for issuing commands to physics engine
avoid obstacles

State of a character:
position - vector (3) (y is up)
direction - float (angle, but a 2-vector could also be used, or even 3)

Kinematics: movements without forces
velocity - vec3 (y=0)
rotation - float

NB: It's important to make things relative to time rather than, say, frames.

Update (Dt):
pos += Dt * velocity
dir += Dt * rotation

Update` (Dt, linearAccel, angularAccel):
pos += Dt * velocity + .5 * linearAccel * Dt^2
dir += Dt * rotation + .5 * angularAccel * Dt^2
velocity += linearAccel * Dt
rotation += angularAccel * Dt

in practice, if updating happens often enough, we can leave off the second half of the first two

Aside: Dude is totally reading Dinosaur Comics in class.

NB: Want to keep graphics separate from mechanics as much as possible - graphics doesn't need to know the state of the whole world, or even necessarily the whole of the visible world.

Aside: Hm, is the Wii multiprocessor? Answer: Doesn't look like it.

Kinematic Movement: Given a state, change velocity and direction to achieve some goal.
match (state, goal)
seek : attempts to match position
set velocity = maxSpeed * normalize(target.pos - self.pos)
flee : attempt to get as far away as possible from target

Steering Behaviors:
produce accelerations
arrive: like seek, but without overshooting
define two radii
target radius
slowdawn radius
d = distance to target
if d < r(t) then done
elif d < r(s) then slowdown()
else seek()

Aside: "Catmull-Rom Spline" just sounds so ridiculous. Also, I'm starting to get huuungry.

Tuesday, April 1, 2008

A lesson:

"Leave as late as possible" may not be the most effective heuristic. Consider changing to "leave as soon as possible", or one of the other alternatives for second day of class.

Friday, March 28, 2008

Half a page written

I have decided that it's probably a bad idea to put the actual draft of my paper on an Internet. I don't want a professor to be all like "I found this same paper on a blog" and I'll have to be all like "*cough* Yeah that's totally my blog, right," and be, though not a plagiarist, totally sketchy. Plus, I don't know, it's conceivable, though extremely unlikely, that someone else might eventually want to plagiarize such a paper, and I wouldn't want that. The notes though, go nuts. I hope they were helpful.

Things I am tempted to write in the draft, but will not because it might get overlooked when revising: "Well I tried to make it Sunday, but I got SO DAMNED DEPRESSED."

Tuesday, March 25, 2008

more Basho

h34. "If I'd the knack / I'd sing like / cherry flakes falling." Appreciation of beauty - how does this relate to happiness?

h35. "Striding ten, twelve / miles in search of / cherry wreathes - how glorious." Happiness via search for beauty? Or happiness merely via exertion?

h45. "Draining the sake / cask - behold, / a gallon flower-vase." This also makes me happy. Out of the good, good? Endings are new beginnings?

h74. "Poor boy - leaves / moon-viewing / for rice-grinding." Abandoning the beautiful for the practical. But does the boy do this because he is poor, or does Basho just pity him because he is forced to go do chores?

h79. "Bright moon: / I stroll around the pond - / hey, dawn has come." One enjoyable moment is extended until it is superceded by another.

h91. "To lie drunk / on cobbles, / bedded in pinks." Drunken contentment with the state of being drunk.

Observation: Basho's haiku are generally moments observed or experienced: What is happening, how he is feeling, nothing more. He chronicles episodes of happiness (and sadness, and peacefulness, and excitement), rather than analyzing them. I myself tend to include descriptions of events and feelings only to give context to my analysis of them. Is it questionable to apply analysis to Basho's haiku, when that is what they purposely avoid?

h99. "Old legs, still eager / for Yoshino's / flowering slopes." Why does this make me think of happy moments?

h113. "Noon doze, / wall cool against / my feet." Tactile pleasure. Simple joys?

So, yeah, I dropped that class.

But I still have the odd incomplete class to finish up by way of writing papers. So I decided to take my notes straight onto an Internet, in the hopes that a) I could then access them anywhere; b) I could copy and paste a bunch of it into the paper proper; and c) It would, you know, make me (and make me feel) more productive.

So then, on Basho:

p 10. Basho suggests that the spirit properly is like the natural world, with a natural ebb and flow, high points and low points, constantly changing. I wonder: Times of unhappiness are then not necessary for happiness, but rather just strictly necessary. Also: happiness is not a goal, merely part of the environment?

h1: "In my new robe / this morning - / someone else." Makes me think of happiness, but why?

h9: "Wearing straw cloaks, / with spring / saints greet each other." vs.
h30: "Behind the virgins' / quarters, / one blossoming plum." Divers routes to happiness? The spiritual vs. the natural, or the ascetic vs. the sensual? Both are valid, but are either valid without the other?

h17: "Sparrows in eaves, / mice in ceiling - / celestial music." Happiness in the familiarity of home, even in situations considered unideal (mice in ceiling).

h28. "Another haiku? / Yet more cherry blossoms - / not my face." Unclear whether sarcastic or laudatory.