Categories
Game Development Geek / Technical

Fun with Game Physics Bugs

I was working on a game involving leaf raking, and I tried adding physics code to it. I researched a lot until I came across Randy Gual’s Custom 2d Physics Engine tutorials.

My own implementation leaves a lot to be desired so far, as can be seen in this YouTube video I uploaded of leaves ricocheting when I turned off damping to see what was happening:

Somehow they seem to pick up more speed after some hits but not always. I’m sure it has something to do with how I calculate the velocity along the normal of the collision.

Categories
Game Development Personal Development

Learning from Game Development

Over a decade ago, while I was still in college, I went to my first indie game developer meetup. It was in a suburb of Chicago at a Starbucks, and it involved mainly people who participated in Dexterity Software’s game development forums, which are now the Indie Gamer forums. My first meeting’s minutes are still online: Indie Game Dev Meeting Summary December 2004

It was kind of a mastermind group. We showed off what we were making. Or rather, they did. I never had anything to demonstrate. I played their games and gave feedback, and we talked shop and set goals for the next month’s meeting.

Some people traveled from downstate to make it out to these meetings, which alternated between that Schaumburg Starbucks and the Dave & Buster’s in downtown Chicago.

I remember while packing up to leave one meeting I asked everyone, “How do I get better at programming?” At the time, I felt like I wasn’t making a lot of forward progress and it was mostly due to my lack of experience and knowledge.

I remember getting a few looks, there was a pause, and then someone said to nods of agreement, “Just…do it.”

It didn’t feel like very helpful advice, but I chalked it up to the idea that no one actually knows how they get good at something. When you are good at it, you don’t remember how you got there because your goalposts are always moving, and if you aren’t good at it, you don’t know how to change that fact.

Unless you ask, of course, and “just do it” actually is fantastic advice.

I learned C++ in college, but it was Visual C++ 6.0, and it wasn’t consistent with the C++ Standard, and I think I was taught wrong. I remember reading code online and not understanding why people were needlessly using “advanced data structures” such as vectors and sets. I taught myself BASIC on the Apple II c+, but programming in C++ was not fun or enjoyable.

But then I found some advice in the GameDev.net forums to read Accelerated C++: Practical Programming by Example. I bought the book, forced myself to read it from the beginning and do the exercises, and wouldn’t you know it, it turned out that C++ wasn’t so bad. What were considered advanced topics in college were introduced in the first few chapters.

I was still struggling to be productive with programming. I was challenged to find tools and libraries to make my job easier, and it is how I learned about a sprite engine, which I blogged about extensively.

I learned how to use libSDL. I succeeded at my first game jam when I attempted to work on Game in a Day, which was hosted by people at Garage Games. Kinda. I made something playable. It just wasn’t what I wanted to make originally.

And I learned a ton participating, including the first time I had an overwhelming sense of fear that I had no idea what I was doing and should stop, even though I had no rational reason for listening to this fear. I pressed on somehow, but I was shocked at how that experience challenged me. I didn’t expect it.

I had that almost tangible anxiety a second time, probably during my first Ludum Dare compo, but it was less powerful and I recognized it and pushed through it, and I haven’t felt it since.

I started finishing games. I built confidence in my abilities. When I read my old blog entries, I read about someone who struggled with focus and time management, someone who felt like he wasn’t putting in enough effort to learn and work on games.

But over the years, chipping away at ignorance made a difference. Today I’m seen as not only an expert in C++ but also in software development in general. I still find myself surprised by C++ today, though. For instance, sometime in the last couple of months I learned that I could forward declare more often than I thought I could.

A decade ago I couldn’t code my way out of a wet paper bag. Today, I could rearchitect a complete game halfway through its development without so much as a flinch.

Most of my experience and knowledge of software development came about due to my persistence with working on my own game projects. I did research on best practices. I sought answers to the problems I ran into. I wrote code outside of class and outside of my day jobs.

I just did it.

And while I might not have felt I was making a lot of progress on any given day, over a decade of such days resulted in a ton of growth.

It could be argued that a more focused effort with a lot more time dedicated to it would have been better, that I could have gotten to the same point years earlier.

But the advice would still be the same. You want to learn how to be a better programmer, artist, game developer, mathematician, engineer, or designer?

Just do what they do, and push through the “I suck” phase until you get the hang of it, push through the fear where you feel like you might choke and give up. Just do it, and even if you don’t figure it out today, tomorrow you’ll know how.

Categories
Personal Development

Do People Limit Themselves to Classes Like They Are in an RPG?

In an RPG, characters often have a class, which determines a large part of who the character is.

Often these classes not only tell you what role your character plays but also what the character’s limitations are. Fighters can wear most armor and wield most weapons. Clerics and mages can’t, but they usually make up for it with powerful magic and other abilities. Thieves and rogues aren’t usually very strong or know much magic, but they can be quick and resourceful, usually finding ways around the direct approach.

In real life, we often say things like, “I’m no good at math” or “I couldn’t draw to save my life”. Sometimes it is a matter of how our individual brains are wired. Pattern-thinkers get abstract concepts more easily than visual-thinkers, for instance. And for some, it is a genuine lack of interest.

But often it’s a matter of people limiting themselves, then declaring what they can’t do.

In Wizardry: Proving Grounds of the Mad Overlord, I used to have fun experimenting with the Change Class feature at the Training Grounds. I would create a character with not only a high strength but also a high IQ. I would create a mage, level up a bit to learn some higher level spells, then change my character into a fighter.

My fighter has to start over at Experience Level 1, but he/she retains all knowledge of spells from earlier time spent as a mage. Now I have a powerful character with some overlapping skills. My character won’t learn higher level spells, but he/she will eventually learn all of the spells up to the level of the highest level spell learned.

If you’re an artist, you’ve probably had people say to you something along the lines of, “You’re amazing, but oh, I’m not good at art.” You’ve been drawing all your life, perhaps, perfecting your craft, and these people are talking to you as if it’s some innate talent that allows you to effortlessly draw what you see in front of you.

I like to ask such people to draw a perfectly round circle. Often it ends up looking like an oval, and they say, “See? I can’t draw.”

Then I say, “If you did nothing but draw circles for hours, days, weeks, months, do you think you would eventually figure out how to make it rounder?”

Most people admit that, yes, they could see drawing a round, evenly-shaped circle as something they could probably figure out if they put in the effort and time.

And it’s how I demonstrate that we don’t have to limit ourselves to our professions or self-imposed classes. We can multi-class if we want. It might take more effort. If you spend eight hours a day working as a software engineer, you need to use the spare time outside of commuting, eating, and sleeping to get better as an artist, which would take longer than if you could dedicate all day to it.

But most of us don’t bother. I just wish most people would recognize it as a choice instead of performatively uttering their limitations.

Categories
Geek / Technical Personal Development

Learning about Art

Yesterday I went to the Des Moines Art Festival with my wife. Vendors from all over the country put their works on display and attempt to sell them, and the variety always amazes me.

There are oil, acrylic, or watercolor paintings. There are photographs. There are ceramic sculptures. There are wood carvings. There are metalworks, glassworks, and mixed media pieces. There are displays, frames, furniture, clothing, jewelry, baskets, kinetic sculptures, and plateware.

Some pieces are functional, and some are abstract. Some were gorgeous, and some were fascinating to look at. Some I could see having a place in my home, and some I could see never making it in through the front door. B-)

Almost all of them were priced outside of what I could afford, but it was still enjoyable to browse. It’s kind of like going through a museum and seeing what’s possible, and I found myself delighted by finding out about things unlike anything I’ve never heard of or seen before.

For instance, I learned about “scissor drawings”, and the artist explains how she creates her work in this video:

I learned what a skilled hand can do with wood, creating 2D art that looks three dimensional with no paint or dyes.

I learned about glass sculptures that look like architectural scale models.

I learned that some people are inspired by nature, found objects, inherited family heirlooms, and by abandoned places. Some people had artistic statements that were straightforward, some were general and vague, and others seemed to struggle with the idea of mixing commerce with art.

I had one conversation with an artist about the festival, and while I can’t remember exactly how she said it, she said, “One of the purposes of art festivals is to get people to be aware of what’s out there. It’s not all economics.”

So despite walking away with nothing, I feel I gained quite a bit simply knowing more about the artistry that’s out there in the world.

Categories
Personal Development

Please Grow Up

Last night, my wife and I saw the movie Inside Out, the latest Pixar film featuring the voices inside an 11-year-old girl’s head.

I enjoyed it, even though I wondered how much children might receive it since it seemed to deal with much larger themes than I can remember comprehending as a child. Then again, I don’t want to sell younger children short. I’m sure they can relate to dealing with feelings about their parents or friends, and I am willing to bet they understand more than I might expect.

During the credits, I saw this message:

This film is dedicated to our kids. Please don’t grow up. Ever.

The wording and punctuation is creeping me out. Put it in scary horror movie font, and you’ve got yourself a tagline for a slasher film about a murderous monster who targets kids.

Now, I get what they meant here. The appeal was for their children to keep their childlike wonder of the world, to avoid the idea that maturity means you can no longer play or be a goofball. And I’m all for that sentiment.

I want to see children express their creativity, explore their world, and feed their insatiable curiosities.

But they can grow up as they do so.

When I think back to my younger self, there are things I miss. Some things I don’t have time for because other priorities have taken over, and some I have made a conscious effort to bring back into my life. I don’t read encyclopedias in my spare time. Instead, I read with a focus, often looking up the thing I specifically want to know and diving deep into it only as far as I need to.

I used to doodle a lot, and I took two art classes in high school, but I let it go for a few years before picking it back up again almost 10 years ago. I now make a point of bringing my pencils and drawing pad to the weekly Team Trivia and draw the people around me.

But there are things I’d be embarrassed about. I don’t miss my awkwardness when meeting new people. I’m glad I’m more aware of the existence of an entire world around me because my youthful cockiness and self-centeredness would make it hard for me to get along with people today.

As you get older, you take on more and more responsibilities for yourself. It requires you to be ready for it, and some people struggle with the transition. For these people, getting older means never making time for enjoyment or learning because there is always work to do.

Being a grown-up doesn’t have to mean stunting your growth or stifling your dreams.

Categories
Game Design Games

What Games Teach Us About Relationships

The stereotype about video games is that they are played by loners, isolated in a basement somewhere.

It’s one person playing on a computer or a console, interacting with a machine instead of people.

And when you think about games such as Donkey Kong, Super Mario Bros, and the like, even if they allow multi-player, it’s usually just serial single-player, with one player waiting for the other player to lose or finish.

If a game is interactively multi-player, there tends to be an adversarial conflict. Pong pits one player’s skill against another, as do most sports games. The goal of many games is to defeat your opponent, whether you are talking Space War or Goldeneye. Your relationship to someone else is enemy vs enemy.

So games tend to lean heavily on the “you vs the world” narrative.

But games can also be cooperative. MMOs tend to have people band together. Star Trek Online has player-vs-player, but missions tend to be something you can take on with friends. Your relationship here is defined as allies, as teammates, or as guildmates.

But outside of MMOs, if there is a cooperative multiplayer, it seems to be notable. New Super Mario Bros Wii can be ridiculously fun and frustrating, but you’re all in it together. Most platformers weren’t simultaneously multiplayer in this way.

Board games and card games are often based on competition, but because they seem to be experiencing a surge in popularity and variety, it’s easy to find examples of cooperative games.

Arkham Horror by Fantasy Flight Games has players competing against the game system. While you might have one winner, everyone stands to lose if you try to go it alone.

Forbidden Island by Gamewright also has the players trying to collect all of the treasure and escape before the island sinks, and moves tend to be discussed before they are taken. “If you do XYZ, that would put us in a good position.”

Some games reinforce the idea that if you put your mind to it, you can accomplish anything. They are about private victories, as Stephen R. Covey would call it in The 7 Habits of Highly Effective People. You can be proactive. You can prioritize. You can keep your eye on the goal. It’s all about your independent thoughts and actions.

And some games reinforce the idea of interdependence, that we’re stronger together than we are apart. They are about public victories. You win together or you lose together.

I love competitive games, and I love a good solo game. Power fantasies can be fun, and there is nothing wrong with them. Saving the world on your own can be great.

That said, I do worry that if there are interpersonal lessons taught in some games, it is that other people are adversaries. If you treat life as a war, you versus the world, it can be very isolating and you’ll have a hard time working your way through reality which invariably involves other people.

In real life, you’d have allies, people who have their own agency and aren’t mere pawns in your game. You can accomplish more and do more in a team, and you’ll need to be able to interact with them as equals.

Some games remind you that you that there are other options than going it alone.

Categories
Game Design Games Geek / Technical

Learning New Old Games

Card Games

Last night, my wife taught me a card game she played with her grandmother earlier that day.

Hand and Foot is a Rummy game similar to Canasta, but it apparently has no standard rules. It was hard for us to look up what is allowed in certain situations. For instance, I was at the end of my Foot, and I had drawn two cards and now had an Ace and two Jokers. If I play them, I have no card left to discard. Am I allowed to do so, or do I have to discard at the end of a turn, meaning I can’t play my hand and must either give up a valuable Joker or an Ace.

It occurred to me that I’ve never played many card games. These days, I play Four Point Pitch and Up and Down the River with my in-laws, games I didn’t know a few years ago until they taught me. When I was younger, I played Solitaire, Kings in the Corner, and Thief with the Italian playing cards my parents always had on hand.

But as a game developer, shouldn’t I be more well played than I am? There are centuries of games out there, but if I limit myself to the popular video games of today, aren’t I also limiting my source for inspiration?

Granted, many are thinking that today is the Golden Age of Board Games. Between Kickstarter and popular cons, people are creating and playing games that aren’t the usual Scrabble and Monopoly. I’m participating in a few board game nights these days, whether it is at the day job or with friends, and I’m learning quite a few games.

But I’m sure I can stand to learn a wide variety of card games. We even own a copy of the book Bicycle: 100 Years of Timeless Card Games, and I’ve never read it.

I’ve seen similar books on card games that are larger and probably more comprehensive, but 300+ pages of card games with their variations is a good starting point.

When playing Hand and Foot, I noticed a few self-regulating aspects of the game that were pretty clever. For instance, if you want to pick up the discard pile, you had to pick the entire pile up. If it was full, it meant you suddenly had a lot more cards in your hand, which means you can create melds more easily, but the discard pile might include multiple dangerous red 3s, and you can only get rid of each one once per turn. Have a red 3 in your hand reduces your score by hundreds of points. It’s a risk you might be willing to take if you have been struggling to complete melds, though.

Similarly, you might play all the cards in your hand until you have almost nothing left. That’s great, because you are close to getting rid of the cards in your hand, which allows you to pick up your foot (Oh! I get it now!), but it also means you have a harder chance of creating a meld and actually getting rid of those cards.

So just exposing myself to this one new old game got me thinking about game design. What if I spent time learning more such games in earnest? I wrote about consciously consuming information daily, and reading and listening to a variety of information is beneficial. I’ve been thinking about how important it is to also play a variety of games.

The great thing is, I already own a deck of cards. I’ve paid the expensive part. It can be quite the investment to get a new board game or video game, but a trip to the library might be all I need to do to find books on card games I could play with my existing deck.

Heck, I also have a bunch of dice, and I’m sure there are plenty of dice games out there, too.

It’s time to make a conscious effort to learn some new games. Got any recommendations?

Categories
Personal Development Politics/Government

Revisiting Your Existing Knowledge

I went to a Catholic grade school which included kindergarten all the way through to 8th grade. There was no clear break between grade school and middle school. To me, I went to grade school, then high school.

Often when I tell people about my grade school experience, I realize that people get confused about how young I was, so sometimes I have to say that it was my grade school/middle school.

Now that that’s explained, when I was in grade school, I recall distinctly the lessons about the Civil War. I remember the teacher specifically saying that the war was not about slavery, that it was about states’ rights.

I remember thinking, “Oh! I didn’t know that! The little I knew about the war was North and South, the country splitting between free states and slave states.” Learning about the slave states that stuck with the Union was kind of like learning about a piece of trivia and reinforced the idea that no, it wasn’t about slavery specifically. It was about whether or not the government can tell states what to do.

And in the end, the federal government won. The United States of America is a single entity, not a bunch of individual states.

And I carried this knowledge throughout my life. Whenever the Civil War came up, this fact about the reasons for the war being about states’ rights as opposed to slavery came with.

When I visited a Confederate museum in Virginia, I hadn’t seen the war from the Confedrate perspective, and while the museum was tiny, it was full of uniforms, battle standards, carvings such as an engagement ring made from a peach pit, and all matter of fascinating pieces of history. I found no mention of slavery, and I was not surprised.

So after the tragedy in Charleston, South Carolina in which 10 people were shot in a church by someone motivated primarily by race, I found it odd when a few friends posted on Facebook about calls to remove the Confederate flag from the capitol.

They kept talking about racism and slavery, and I was confused because, after all, the Confederacy wasn’t about slavery, right? Calling for the removal of the Confederate flag seemed irrelevant after a shooting driven by hate.

Then this article in the Atlantic called What This Cruel War Was Over published some of the rhetoric and public documents prior to the war.

Oh. It very much was about slavery.

It was about slavery, and it was about White supremacy. The election of Abraham Lincoln with his party’s radical agenda of stopping the spread of slavery was in direct opposition to the desire of leaders in the Southern states to spread slavery into the larger empire of America, which touches on our tensions with Mexico in a way I never saw before. The end of slavery would mean that Blacks would be bizarrely considered equal to Whites, and if that happened it would be the end of civilization as we know it. Even when the Confederates realized the rest of the world wasn’t so keen on helping their cause and so diplomats tried to spin it as states’ rights, it was abundantly clear by the writing and opposition that there was no reason for people to feel embarrassed about slavery, that it was actually a force of good and they should be proud of what it has accomplished.

It was about slavery. That people think so is not perversion by extremists. It isn’t miseducation. It’s part of the historical record, and it isn’t interpreted as it is part of the primary documents we have about the war. To the extent it was about states’ rights, it was the right of states to continue keeping a good number of their population as slaves in order to ensure equality among Whites. It’s an odd thing to today say is part of your proud heritage, and I now understand why people conflate slavery, White supremacy, and the Confederate States of America a lot more closely than I thought they deserved.

And I look back on my grade school days and recognize some of the things I’ve learned since. I remember a high school teacher informing our class that most text books are published by Texas and have a certain point of view built into them. Lies my teacher taught me, indeed.

Now, I’m from the Northern part of the country. In my mind, I always thought WE won the civil war. I identify with the Northern states despite the fact that I was born to immigrants over a century later and have no direct tie to the war. I can only imagine how painful this kind of knowledge can be for people who identify with the South, or who have ancestors who held such views and proudly fought for them.

There are things you learn from a young age, and you never think to question it because it just was. You have a base to build your knowledge on.

And then you find your base is a lie or wrong. It can be difficult because you feel like you are starting over. If that base was wrong, what about everything built on top of it?

But when is the truth ever not the goal? You know, when cynicism and duplicity aren’t involved?

Sometimes your continued education in life isn’t isolated to gaining new knowledge. Sometimes it is about relearning what you thought you already knew.

Categories
Personal Development

Consciously Consuming Information Every Day

When I was a child, my parents bought encyclopedias.

Plural.

We had Funk & Wagnall’s, which is still fun to say. We had Charlie Brown’s ‘Cyclopedia, which is where I learned about fun facts such as Laika being the first animal in space and what the Great Pumpkin is. We had a science-oriented one with cool projects to do at home and great illustrations.

We never had Encyclopædia Britannica, even though it was a household name:

The weird thing was that one day I decided to read them.

The illustrated ones were easy to read. Charlie Brown’s ‘Cyclopedia even had comics in them.

Funk & Wagnall’s was a bit more dense, and I don’t think I got past A, but the books were always around to look up various facts. When I played Illusion of Gaia and learned my character had contracted scurvy from being on a raft for a very long time, I looked it up and found out it was a Vitamin C deficiency. There was even a picture of a hamster with scurvy, which I still see in my head whenever the topic of scurvy comes up.

The point is that I was very privileged to have access to a local library anytime I wanted it, and I don’t know what the catalyst was, but one day I decided to actually consume it. I learned a lot about my world from a young age.

I know some people prefer not to read because they find it to be a pain and a struggle. But there’s always audiobooks. There are documentaries. Between TED talks and conference presentations, videos on YouTube, MOOCs, and podcasts, there’s plenty of information out there for you to learn from.

Of course, now you have a firehose of it, which means you need to be selective. You can’t consume it all. You’d have no time left for you to process it or make use of it or otherwise do anything in the rest of your life.

I listen to audiobooks on my 20 minute commute to the day job. I read at night before bed. In the morning, I might listen to an interview or read a magazine.

The topics are varied: personal development, business, software development, fantasy and science fiction, autobiographies, history, science, and more.

And since I can’t afford to own so many audiobooks, I’ve been taking advantage of my library card.

Let’s see. This is the…

$ date +%U
25

…25th week of the year. To date, I’ve consumed 29 books in some form or another, which means I’m well on track for a book a week, which is my goal.

And it doesn’t feel like it has taken up a huge amount of my time.

But I did make a conscious effort to consume good information. I didn’t necessarily pick a topic I wanted to learn more about, although I can see doing so to get deeply immersed in it. I picked audiobooks that seemed interesting off the shelf, and even the ones with narrators who cause my teeth to grate have been fascinating.

I know more about how the brain works, how modern urban living was made possible, and how chess evolved and spread. I learned who Shakespeare was and how little we know about him. I learned about the potential reasons why people think that young boys are in trouble today, ideas on how to raise children to be more aspirational, and on the science of thinking. Throw in some heavy physics and a light-hearted set of observations from the vantage point of a number of different people, and it’s not a bad amount of education in a year.

And I’ve still got six months to go, and I’m not even including all of the information I learned from magazines and podcasts.

Consuming all of this information doesn’t just mean I’m better at trivia night at the bar. It means I’m more informed. I can make connections between pieces of knowledge, which means I am more creative. I can understand the world better, which means I can navigate it more easily.

I was really privileged as a child to have access to so much information in my home. It helped me feed my hunger for knowledge, and today I make an effort to read or listen to something each day because that hunger is still there. I’m still curious about my world, and wouldn’t you know it, people have been nice enough to document it for me in an easily-consumable form.

Why not take advantage of it?

Categories
Personal Development

Learning to Paddle Your Own Boat

This past Sunday at church, a friend of mine was the celebrant, and he told a few stories about times he fell into water as part of a theme of revelry.

After the service, he and I were talking, and part of our conversation turned to lessons we try to impart to younger people.

He spoke about the time he and his children were using a kayak and a canoe. Because his son was older, my friend insisted his son use the kayak on his own at one point.

His reasoning? “I wanted him to learn how to paddle on his own. You can always sandbag in a canoe and let the other person do most or all of the work. In a kayak, you won’t go anywhere unless you put in the effort yourself and figure out how.”

Some days I wonder about my ability to paddle on my own. How much am I hiding behind the efforts of others?

Teamwork is great, and multiple hands can make light work, but if you took away my family or my coworkers, would I be embarrassed or proud of my contributions?