Platforms and Programming: OOPs

adventures in gaming

Object-oriented programming really does change a lot of things for Processing. It’s not that the concept of something that is object-oriented was hard for me to understand, but that all of a sudden, there are so many options for where to put a bit of code, and on top of that, the methods in my code need to be called somewhere, and where I call them can make them work, or not. It’s pretty different from just having “setup()” and “draw().” Going forward, on top of learning how one actually does different things with different functions and techniques, my work will be learning about where to place my code. And there’s no right or wrong way of doing that – just ways that break everything and ways that don’t.

The other interesting thing about defining classes and objects and calling methods and all that, is that the error messages in Processing are no longer as accurate as they were for the more basic stuff – Processing no longer necessarily knows where the problem is. So, when calling a new method, sometimes all of a sudden Processing says that my class/object isn’t defined.

So, essentially, when I tried to make my first “game” after redefining my cat drawing as an object (thanks to Gersande for talking some stuff through with me in regards to the constructor), everything broke! And it stayed broken until I spoke with Pippin — together, we rewrote an example program that did everything that I wanted, and then I took that and fixed my broken code.

I’m kind of in love with it. Here’s a .gif of me playing with the cat:
CatRoulette

Before moving onto arrays and the rest of the book, I’ll be making another object-oriented interactive thing. I’m trying to stick to things that I have learned in Daniel Schiffman’s Learning Processing so far, rather than jumping ahead so that means that I only have limited resources at my disposal (why, why, why is text so far away? — I may have to break this rule). That has me thinking about what kinds of stories and mechanics I can create (within a reasonable scope) using just what I know so far. One of the things that immediately came to mind was visual metaphor and simple “procedural rhetoric” — which, in turn, reminded me of The Marriage by Rod Humble. By Humble’s own admission, it is a game that “requires explanation” and honestly, it’s a game that I just don’t like. It comes onto my radar every now and again, and the last time that I encountered it was without explanation at IndieCade East as part of the love and rejection arcade at the Museum of the Moving Image, and it reminded me of how annoyed I felt by it. I also don’t really relate to the “meaning” of the game. Which is fine – it’s a personal game.

Anyhow, because of its use of primitive objects as containers for meaning, I thought about it for this next project that I’m planning. I think I want to use bright colours and balls that are repelled away from the mouse…Or something like that. Something about shoving/jostling through a crowd, perhaps? Or about taking space and making space?

Meanwhile, our discussion (this week between Rilla and I) has shifted to game-making softwares. Our first discussion focused heavily on Twine, and we discussed what it might look like to make a platformer in Twine, and what the essential qualities of a genre are, and whether they are important. Eventually, this lead into a discussion of the relative perceived value of some of the different elements that might go into making a game. For example, on forums, people post example code for each other all the time. But then, nobody wants to take your example poem and put it in their game (probably) – but most writers might not offer either. Writing somehow feels personal while code doesn’t quite as much. And writing somehow feels like something that “everyone can do for themselves.” For audio, there’s no shortage of free soundbanks and CC0-licensed items. For art – people are willing to sell 3D models on asset stores, but it also feels personal. But people would definitely be willing to put your free art in their games. Not your poems, though…not your poems…

That’s a big abbreviation of a much-more nuanced and far-reaching discussion.

PS: Here’s a 3-year-old poem you can use for free in your game, based on how I think the animated adaptation of Swan Lake should have ended:
“The bird was sumptuous; finger-lickin’
Para chuparse los dedos
Meat sucked off bones like fingers, wings,
And what’s this but a shred of silk
Like the colour of Odette’s dress
which was the colour of her eyes
And we knew she’d been missing
for a while
but forgot until the silk was caught in our teeth
Forgot that no good deed goes
unpunished by that magician that
yes, it’s true, you banished
just about fifteen or twenty years ago.
He had a thing, didn’t he,
for swans and also wanting your kingdom
but oh, sorry, we ate it,
and it was sumptuous, and probably
maybe
Well, where would a bird pick up a scrap
of a dress except that maybe
maybe
Odette patched it up!
when she was lost (didn’t you, Odette?)
She’s a kind soul.

The swan should know.”

Platforms and Programming: My Flower Garden

adventures in gaming, Uncategorized

This week, I ran into my first difficulties with Processing – exercise 7-6. Except, exercise 7-6 of whatever edition of Learning Processing is available through the Concordia Library. When I tried to look up the exercise, it didn’t exist!

My exercise about flower gardens and making flowers with differing numbers of petals based on a function seems to have been replaced in newer editions with an exercise about cars.

Probably because it’s a difficult exercise for someone at that point in their learning.

But I am occasionally stubborn, and I worked at that exercise, dang it! Then, after plenty of googling around, I asked for help.

I am lucky to be surrounded by talented folk at the TAG lab, and luckily enough, on that day, Tony Higuchi had the time to give me a hand. After about an hour or so, and after Tony explained many a concept to me, here is what we ended up with:

thousandsofflowers

And, with a small change of parameters, this:

darkflowers

Yeah, it turned out that this was an exercise that didn’t belong in Lesson 2 of the book.

I am about to learn about objects and object-oriented programming… I hear that there will likely be some sticking points there too.

On the platform studies side of things, we have spent some time looking at the games that are discussed in I AM ERROR, and that felt fruitful. Finding ways to engage and argue with what feels “factual” (maybe because I’m just getting started with platform studies) is challenging. For next week, we have decided to try taking a look at how game-making softwares affect what it is possible to make in them.

I’m reminded of a workshop that I took with Kim Hoang about making visual novel romance games in Construct 2. It was possible to do, and relatively simple, but it was also in a fairly roundabout way, with much of it involving the (adequate but) fairly-limited text options. It was a lot about making things visible or invisible at the right time, and using a global variable to track what ought to be on-screen. It didn’t use any of the features that I end up almost immediately setting up – and when it did, it didn’t use them in the ways that I’m used to. Visual Novel tutorials are not popping up everywhere when you google Construct 2. Probably the thing I remember seeing the most of is stuff involving bullet behaviours (even when I wasn’t looking for that kind of stuff, the code examples that I needed were often linked to enemies and bullets).

Well, I’m back to object-oriented programming – for some reason, people make it sound complicated…

Platforms and Programming: Learning Processing

adventures in gaming

Surprisingly empowering. These are words I’d use to describe the beginning of my odyssey into learning Processing this semester as a part of a directed reading course about platforms and processing with Rilla Khaled and Pippin Barr.

I started “seriously” making video games in January 2013, and in that time, I’ve been using programs like Stencyl, Construct 2, Twine, Unity and others that are meant to facilitate game-making for those who don’t program. I am finally taking the leap into learning to program more “seriously” – what an awful word.

Robotprogram

To be clear, I don’t mean to undermine the artists and creators who make games using these sorts of programs, which are amazing and empowering in their own rights. These programs are excellent! They’re powerful! They’re accessible! I want all sorts of people to make games, not just the ones who are interested in learning a programming language.

Nevertheless, as an artist, maker, photographer, creative-type, writer, sculptor, painter, academic, etc… I felt a bit of a chip in my shoulder (and that’s my problem, nobody else’s) about not being able to write code “from scratch” (but I mean, these programming environments are really excellent at predicting things, have plenty built-in already, the libraries are excellent… Is it really from scratch – and who cares?). Thinking about this from a software studies-inspired perspective, I also felt like I learned to do certain things in these programs and it was really easy to do them, but then that there were kinds of actions and things that I wanted to do that they didn’t permit. For example, I want to play around with chatbots, or with having people draw with their mouses. I’m sure it’s possible to do that in Construct 2, but I couldn’t have done it. That drawing stuff is one of the first things that I learned to do in Processing.

mspaintprogram

I guess, learning to program is also just something that I want to learn to do for myself. I love learning languages – the human ones. I’d say that I’m practically a native speaker for French, an intermediate speaker of Spanish, and a beginner in both German and Italian, with a smattering of the Japanese that I learned from watching subbed anime as a teenager. It’s not that I have something to prove to myself or anyone else, but that I still felt like this was something that I need to do to further my skills and abilities as a game creator – partially just for my own understanding.

The book that I’m learning Processing with, “Learning Processing” by Daniel Shiffman, is excellent. It’s friendly, accessible, and gets you going (nearly) right away. I am surprised at what I’m already able to do after just a few chapters. The truth is, though, that those two years working with WYSIWYG-ish/”not-actual-programming” tools taught me a whole lot about how computers think and about the logic of programming. And really, that feels like about half of what this book is teaching me. So, that feels pretty empowering too. I feel encouraged and eager to go on.

There is, too, a connection between platform studies and learning to program – one that I’m still forming and thinking about. In a way, the basics that I am learning, the somewhat labourious way that I am currently drawing things shape by shape and line by line in Processing, feels connected to the labour of early games, shaped by the affordances of hardware. I said limitations at first but erased that. There are limitations, for sure, but it isn’t as if there ever won’t be a bigger, faster, better SOMETHING coming out on the market that will make older tech feel limited. But, then again, “I AM ERROR,” the book we’re currently reading, talks about how Nintendo deliberately damaged the chip they decided to use to make sure that anything proprietary to Coleco (who owned the patent) wouldn’t be an issue. So that and value-for-money on these chips are two limitations that Nintendo placed on themselves.

Well, these are just a few thoughts for now. More to come as I continue learning processing!