Platforms and Programming: OOPs

adventures in gaming, Process Writing

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.”