Monday, April 17, 2017

4/17 The Archer and the Swordsman, take 2

I vividly remember the day I met the archer for the first time. He was wearing an expensive forest green cloak with a pattern I couldn't draw or describe. He could easily blend into a crowd of other archers if he wanted to, but I would soon learn that wasn't his goal at all. Instead of a bow, he was awkwardly holding a sword too large and too heavy for him, and I clearly remember him walking over to me, nearly dropping the sword against the table where I was seated, and then managed to sit down across from me with the same grace and elegance as if he was in the company of the queen.
"I want to be a swordfighter," he said. "Any way possible."
I was thrown back in surprise. Such a man looked like he had never fired an arrow let alone held a sword in combat. 
"I'll be moving across the seas to take training from the best swordsmen in the whole world in only a few short months. Until then, will you train me?"

Any reasonable swordsman wouldn't dare bother with something so arduous, but there was something about this archer that caught my interest. He walked with grace, always seeming aware of exactly what was around him.  This was no ordinary archer. 

So with no reluctance, I stood up and looked him square in his dark eyes, and agreed to be his trainer. With only a few short months until his journey to the other continent, he needed all the training he could get.



It was his knowledge of swords that first drew my attention, even if he could barely hold one. 


At last, the training was to begin. 

But, that was the point. I couldn't will the archer to be a swordsman anymore than someone could will a fish to swim on the land. 

Sunday, April 16, 2017

4/16 The Swordsman and the Archer, take 1

I was always a swordsman. I was born a swordsman, I will die a swordsman. My father brandished a sword just like his father, and that's how battles are fought here. Rather, that's how battles are won. I remember my first fight, as well as my first sword. And I could live the rest of my life as a happy swordsman if I chose to, and that's what would happen.

I've read stories about archers since I was a kid, but not until I met one in real life did I believe the stories might actually be true. Maybe before then, I assumed everybody in the whole world was a swordsman just like me, but when my eyes opened to other types of warriors, something changed deep inside me.

You see, right before I became old enough to fight battles alone, I realized I could just pick up the biggest sword and swing it as hard as I could, and I would win almost every time. The bigger the sword, the more powerful I felt. I didn't need grace, I didn't need precision. Now compare that to stories of people who don't even swing swords at all.

The archers are different than the swordsmen. They seemed much simpler, and much more sophisticated. I even went as far as taking an archery class near my home to learn what I could. I was obsessed - how could people so different fight battles without a sword? It was amazing.

I took years of training before I even picked up a bow, and more years before I shot my first arrow. I knew I was never going to be an archer, yet, each arrow I held made me question who I was as a swordsman. I had been fighting with only strength, no precision. I wanted to change as a warrior, to become a fighter who could do more than swing a sword.  So I decided to move to the land of the archers and take up training with them in their own land.

I guess I was most surprised by the country itself. The archers didn't just battle with precision, they lived their whole life that way. Everything was built around the same sophistication I had learned about back home.

Of course, I learned I could still fight battles with my sword there, but for the most part I awkwardly entered the battlefield with a huge bow and quiver strapped to my back, too. I met other swordsmen here learning how to be archers - some very talented, some not so much - but enough of them to witness them win battles.

But my biggest surprise was not from the swordsmen, it was from the archers. You'd be amazed at how many archers wanted to be swordsmen. Pictures of swordsmen on big signs in the town markets, training arenas on every street. I could get a job showing people how to just hold a sword if I wanted to. But, of course, I was dedicated to learn everything I could about archery, and even though I still practiced with my sword every day, I made sure to practice shooting arrows every day, too.

This continued for a long time. Of course, I look like a swordsman, most archers wouldn't even guess I knew how to hold a bow. But I was proud of where my archery training had gotten me. I could hit a target at 50 meters! It made me a better swordsman, too, as I was using my understanding of precision and timing to make better swings.  Maybe a few more years, and I can battle with arrows as good as with a sword.

Of course, that's not how life on the battlefield works.

One dark evening, I was going about my business, and a timid archer came up to me smiling and holding out a small dagger. He said he had just picked it up, but by the way he swung it around, I doubted it was his first knife. He looked at the giant blade strapped to my hip, looked me in the eyes, and asked me to help him become a swordsman.

Of course, it wasn't unusual for archers to want to be swordsmen, but this was the first person who had approached me who wasn't even holding a proper sword. I looked at him up and down at first; he may have lacked the skills, but he had the passion. His bow was long and slender, and his quiver was filled with hand-carved arrows of many different lengths.

After a few months, I had met the archer on a few occasions to help him hold bigger swords and help him with his swing. He always kept his bow neatly strapped to his back unless he absolutely had to shoot an arrow; I think I shot more arrows in battle than he did when we were together. One time I shot 30 arrows and only hit 3 targets; the same day he hit 5 targets clean through the center with one arrow.





Thursday, September 9, 2010

Maybe it's a cultural thing

I've been getting to work very early hoping that I can do my own work before the real work starts. Today was a little different, I got some weird sleep after some odd dream of being chased by a gun-wielding maniac. I just didn't have the full motivation to get going.

Instead, I read the news. Today was depressing.

There is some supposed Quran burning in central Florida on Saturday, some real winners there. It has sparked a firestorm of complete idiocy in this country. I read another story about how most people in Ohio think God will take care of global warming and people need not worry. Last but not least, I read some long conversation about video game addiction, and I weep inside both for the victim of the addiction and the fact that I'm not playing games anymore. Ugh..

America has become a depressing place for an intellectual. Instead of the "American Dream" of growing up, earning based on your hard work, and doing what you want in life, you are stuck working for other people because that is the only opportunity that exists. You want to make something grand out of your life, but you are limited by lack of education. I am a very smart person - and yet I still have to play by the rules that people that are too scared to lose theirs have set up. When I eventually naturalize to some European or Asian country in a few years, it will be one of the greatest days of my life. I can't wait to leave this shithole. Last night on the news, I hear the German Chancellor talk about European freedoms. They have freedoms of speech and religion, they are safe from the worst crimes and you really can't go toting around a gun everywhere you go. People are important - not some multinational global corporation calling all of the shots and making sure that the low classes stay low. I will definitely be some polyglot at that time. What's an even richer factoid is that most Americans are learning Spanish as their second language to deal with the increased flood of Mexicans who live in this country now. If they were to naturalize to Europe, they would end up living in the poorest shittiest country in Europe! (ok, eastern europe is a true shithole, but Spain is just a fucking joke).

As humans, we are living in a truly strange time for "animals". I don't see dirt and grime, I don't have to hunt for my food, I don't really have any animal left in me to do these things anyway. I sleep on a space-age bed with processed blankets in a room that has scientifically proofed air filtration and cooling systems.

But I'm not happy.

My wife experiences complete anxiety - she's not worried about eating her next meal or getting enough water to live another day. She is worried about global catastrophe, about getting enough sleep for a night so she can do her homework. Homework for somebody else so she can prove to an employer that won't pay her her fair salary to make sure crazy people are ok. What a country.

I, on the other hand, just want to play with information and science. I want to create a program that would simulate life. I want to create a program that would interface cleanly with a person's mind and let them go through different stages and tunnels and understand a completely different part of themselves reflected back at them through the world they create. Of course, that sort of software takes time - and resources - and I have to do work for other people because the kind of software I want to create doesn't look like it's going to generate any money in the short term (the kind of money people are really worried about now!)

I am really excited for December 21st, 2012. I think that is the turning point for the world. There is going to be a lot of shit going on in the 6 months up to that point, and then the 6 months afterward.

more later.

Tuesday, September 7, 2010

construct

Ever watch The Matrix? Remember that part where Neo is on the Nebuchadnezzar and Morpheus loads him into the first white area? Morpheus calls it "The Construct Program".

I've been a real computer programmer for about 8 years. My background is different than your usual software engineer, though. I graduated from DigiPen Institute of Technology in Redmond, WA in 2007 - a Bachelor in Real-Time Interactive Simulation.
Real-Time - lighting fast
Interactive - you can change it as its happening
Simulation - computer worlds.

I'm a video game programmer.

Your usual software engineer is good at creating data processing applications. I'm good at creating computer simulations. It's a distinction I deal with every day at the office, every office I've ever worked at. Most other engineers don't understand this distinction and think that I have less education than them. Turns out, my mind works "per-frame" and theirs looks at a different big picture that allows for less interaction and less simulation ability.

This distinction isn't important for the rest of the post, but it is important to point out for someone that doesn't know too much about programming video games. Games are a very special piece of software - they must operate a subset of commands very quickly 30 times a second as well as produce 1-2 million colored boxes in that same time so the user can see the progress of it.

When I first was tasked to create one of these simulations, I was completely naive. I had a barebones program that could display computer-generated fireworks in real-time. It did not allow any user input to change the fireworks. Today, I'm running 4 cores trying to synchronize how the physics and artificial intelligence systems work with drawing them in a breathtaking real-time world. Oh, how times have surely changed.

Ignorance is truly bliss. Back then, things were so simple. If i wanted to "press A to continue", i sat on something called a block that "listened" for the user to press the A button. If i wanted to navigate a menu, each box of the menu was some specific call to draw a rectangle at a location, and as the mouse's cursor's math was between some decidedly tweaked numbers (if the cursor's location is greater than 128 and less than 228 and the Y is between 50 and 100 and the left mouse button is down this frame but wasn't last frame, then tell the program that some button was pressed!!!)... today, things are a lot more "smart" where a menu button has it's own structure and coordination with the input system (oh yea, it's a system now) to check to see if a callback needs to be called because the button was hovered over and actually clicked.

I had lost my job this February. I was really excited to be home again - i could work on a brand new engine! I had programmed a physics simulation a few months before and had thought long and hard about programming a Deferred Lighting engine. That is a special way to visualize a computer world with a large number of lights - i only light things that you see from your perspective. Before this, I could only have a few lights in the world because every single object, no matter if you could see it or not, would deal with all of the lights in the world. I had a very fundamental naive knowledge of how to program this. Before this engine, I had really just got something called a Render Target working the way I wanted it to, and the entire engine could look at all of the render targets at any time.

But today, which is why I'm tying today, I want to lay everything about the construct down somewhere so my brain can thouroughly process this information properly. Talking to my wife is great, but until she responds back with actual answers, it will be easier to just tell the vast interwebs what I'm feeling and everything will be ok in the end.

I had drawn a few ideas on paper for a new threaded construct program. I'm only calling it "construct" because that was the concept from The Matrix that my wife actually understood. I wanted the user to be able to drag and drop any asset from his desktop into the program at any time, and have it show up as a usable asset. This was a huge difference from previous engines, these were ones that had big bulky asset management schemes that required everything to be plotted in some XML document and linked up to objects individually. lame. A better system exists.

After working at two different companies do I realize that a threaded program is the only way to go. Now that everything has more than one processor (xbox = 2, ps3 = 6, my home pc = 4) I should be writing simulations that can take advantage of all of these processors. I was so naive about that, too. I just sat down and banged out a system where different threads would run different processes, one for rendering, one for input, one for simulation, one for...... and magically it would all work! And it didn't. I had issues where I just simply couldn't deal with the entity format without memory problems. When you thread, two processes can't read the same memory at the same time. So much for that.

Last week, I sat down and designed a system that would work. 4 threads; Simulation, Render, Loading, and Synchronization. It is a beauty. Render would be one frame behind Simulation. Synchronization would be in lock with those two threads. Came up with an object format that would work. Came up with enough data to transmit between the two easily and with a small data format. Everything may work this time around.

So why am I still so anxious? I just suck at this or something. Honestly, I don't know where to start. I wanted to write this post to talk about it. Now I've talked about 200 other things to set it all up for you. Such is my life.

To start, I had to create a system to lock the sync thread between the render and sim threads. That was not as hard as it sounds, but it took 5 minutes to come up with a decent algorithm. I am essentially creating 4 gates. Sim and Render wait for their own gate to be opened, walk through it, and lock it behind them. When it's done, it unlocks one of two gates that the Sync thread is sitting behind. When Sync goes through its 2 gates, it locks those gates behind it, syncs everything, and then unlocks the sim gate and the render gate. Sweetness.

To load things, messages are generated in the sim thread and sent during a Post Message step to the loading thread. When the object is done loading, it sends a message back to the Sim thread that the asset is ready.

Today, I was starting to write the render thread. I was really stressing out about this. Render needs to order and cull things to render before it starts to draw. It needs to order them in a special way. What is all an asset? What is the least amount of information needed to draw things? God this is a crazy world.

If I have time to work on it tonight, I'll post how it went. I feel good about this. I just want to make the first level of Zelda64 from tools in the construct. God i have so fucking far to go.


Tuesdays are sometimes like Mondays

I had a good Labor Day weekend. Lots of rest, even though I wanted to spend time programming on the construct. There will be time to work on it in the future, but I definitely want to work on it right now. It sucks!

At work, nothing is going right. I am supposed to write up some documents for programming the next stage of the game. Unfortunately, nobody really knows what that is. It is not my job to create these documents without design input. Some people have already created a few game types, some things they want to see for next game, and level pitches. I don't know. My job is an AI programmer. There is some ideas for AI, but almost all of the pitches include head to head play with real players and not with whatever the fuck random characters we want doing tricks in the world instead. I feel like the other people on my team in my department have no idea how to do some of the things they should know how to do (especially for their pay scale!) and yet they are allowed to make the big decisions. I don't hate my job, I just wish it were a little bit better.

Japanese takes another interesting turn. I feel like I'm getting better at listening myself. Our exchange student said that exact thing 2 days ago when I asked her what had improved the most. I think that she doesn't understand construction on a few things, but overall she is doing quite well for someone just dropped into a society completely different than her own. I feel she will be a lot more comfortable speaking both English and Japanese around us in a few months, I hope that is soon enough for us, too.

Today I just really wanted to work on my own project. At work, nonetheless. But, I can't do that. I spent a lot of time creating something that would work, but it's not working. I fail, yet again. I don't know what to do! I have a beautiful and complex system in my head that I want to put in the computer. For some reason, I just can't make it work because I either don't have the time or don't have the concentration.

new blog time, gonna write something else

Thursday, September 2, 2010

Frustration Thursday 90210

Shit all around. Frustration from every angle. Discomfort. Unhappiness. Sounds great for a Thursday.

On one hand, I have simple frustration from everyday things. Things that, regardless of my mood and the people around me, are frustrating. A great example is American politics. No matter how I feel, some asshole with a louder megaphone is going to say something that makes people around me agree with him; and these are usually things that I do not agree with at all.

On the other, I have frustration from things I'm encountering today. Coworkers are unusually loud today, a project I'm trying to work on in my spare time is not going at all like I want it to.

So I'm frustrated.

I don't have a lot of solutions for this feeling. It's just a stressy mess and I live with it.

I thought this blog post would help, but my fingers are not even cooperating with me.

Fuckkkk

Monday, August 30, 2010

Nostalgic

It's been awhile since I last wrote something. I used to write everyday in a leather journal; after meeting my wife and getting married, I'm fortunate to have enough time to write blogs online.

Over the weekend, our exchange student arrived from Japan. She is a very shy girl and her English leaves something to be desired. My Japanese is ok, my wife's is not terrific, and overall we can communicate fairly well with her, even though sometimes she answers a yes/no question "yes" when she really wants to say "no".

I was reading a thread this morning about nostalgia. There is a picture of the first few screens of Pokemon red/blue, and a caption saying that of all the wonder, since you don't know what is to come, you have amazing hopes and desires and excitement for this game you are about to play. And after you play it the first time, that feeling is gone because the wonder is gone. Other people in the thread commented about other games and experiences they had that felt the same way. I am not a man to cry at my desk job, but I felt compelled to write a bit about that experience and maybe understand other times in my life I had that feeling.

"Wonder" is a great way to express the feeling. It is a combination of the unknown, things you just haven't yet experienced but know you will, and amazement of knowing there will be excitement during that experience. I wanted to write this blog today to cover some of the finer points of "wonder" and "nostalgia".

For sake of definition, "nostalgia" is remembering the wonder from your past. I can't quite describe it any other way. You get this feeling when thinking about new toys, watching old movies, going to old locations that you had great times when you were young.

Can we duplicate that feeling? Other people like to attribute it to specifics. I remember the first day I'd ever played World of Warcraft. It took about two hours to get to level 6 and make the long journey for my Horde Troll to get to Ogrimar. I remember seeing characters at level 50 and thinking that was so much higher leveled that I would ever get to (that troll only made it to level 34!)

Old games really do it for me. Thinking back to sleep-over parties playing Final Fantasy VII; even the first run through Link to the Past. There was an expectation of greatness to come. And greatness did come - both through the actual power I received through in-game mechanics (bigger weapons, chaining Materia) and the emotional connections I had with the characters (Death of Aeris)

My wife just played through Chrono Trigger for the first time, and I don't think she experienced the same level of emotions that I do on every re-run I play. Maybe that sense of wonder can't be shared between people on those same levels. Maybe she feels that same way when reading a new book. As I have gotten older, I also understand that a game has a finite limit of characters, levels, weapons, and spells. Programmers and artists are human, after all. I understand that my journey will end after 10 hours. When I was a kid, a game could have taken a month to complete, and knowing that the end was so far out was something that is hard to relive now that I am an adult.

Another recent bit of wonder I have experienced is Japanese. When I first started learning the language, even the most basic kana symbols gave that same sense of wonder. あかさたなはまやらわ. There were over 2000 kanji I needed to know. They could have meant anything!! Japanese also reminded me of a game - each individual kanji could represent a specific statistic on a menu screen in old japanese RPGs. Your player could have 強 薬 魔 勇 知. Each kanji had this complexity and beauty and they all represent something so powerful and rich and wonderful.

After learning the language for 4 years, I still felt that way. I had over 1300 kanji to learn, and that was just to know "everyday kanji". One day, I decided to simply write down the meanings of all the kanji I didn't know still from the first 2000. It was a little overwhelming at first, but the more I did it the easier it became. And slowly, one by one, my wonder melted away. I realized that the rest of the kanji were either concepts that I'd already covered, simple verbs, or worse - names. By the time I finished the last one, there was no wonder left. There was really no excitement, either. All of the kanji were things and simple concepts that someone from ancient China would need to know. No magic words, no secrets, no wonder, mystery, excitement. Bummer. I did run across 衡 which is a kanji I adore greatly. It means equilibrium.

As a game developer, it would be wise to figure out how to create a game full of wonder and mystery and excitement. Gamers have an expectation to have magic and power in a game. They want to see space flight; levitation; ability to bend rules of physics, spacetime, mathematics, and art. They want to leave a mark on the world they are exploring. They want to meet characters. They want to live in this world that is not at all like the real world. Even more, they want to do it while interacting with other people online at the same time. How is this going to be possible? Do we design that feeling and that wonder into the game? Can a game even be made with that much emotion and feeling and power? No wonder games like this are rare :)

I will think this over. I look forward to the day I have the confidence to break away from the emotions and feelings and create something breathtaking and amazing.