LMG Letter of Support for the Digital Media Hub

Sent to FORM on 14th February 2012:

To Whom It May Concern,

We are writing in support of The Foundry Digital Media Hub, a FORM project proposal to establish a facility to provide infrastructure, resources, and services at the Midland Atelier to support digital media in Western Australia. Our particular interest in the Digital Media Hub is the potential for greater support of game development in Western Australia.

Games Industry and Cultural Value
The commercial video games industry generates approximately $60 billion annually worldwide, and is growing at a rate of 10% annually. The Australian domestic market is worth approximately $1.5 billion with 9 out of 10 Australian households owning a device for playing games. Locally, the West Australian games industry boasts over 40 game development related businesses, and over half a dozen full-time tertiary education courses throughout the state.

Aside from the commercial games market, games technology is increasingly ubiquitous in a wide range of industries including: mining and resources, education, advertising, and online media. Games are also pervasive in popular culture and a preferred platform for expression by a wave of young artists, designers, and writers who use unique aspects of the medium to engage audiences.

During a recent (16 October 2011) presentation at the Digital Culture Public Sphere event, Hon Simon Crean (Federal Minister for the Arts), described games as “the next iteration of the film industry”. Surprisingly, despite the clear growing value of the games industry, there is very little infrastructure to support game development in Western Australia and the local industry has yet to receive any state government support.

Let’s Make Games Inc.
Let’s Make Games Inc. is the only non-profit organisation actively supporting the game developer community of Western Australia. We engage hundreds of game creators and interact with related organisations locally, interstate, and internationally. Our regular events routinely attract 40-100 participants, our website garners over 5000 visits per month, and our mailing list and social media presence have a weekly reach of over 400 people.

We appreciate FORM’s recognition of game development as a vital factor in the future of digital media, as evidenced by the inclusion of games in the objectives for the Digital Media Hub. We also feel that collaboration between game developers and other industries is crucial to prepare for increasing consumer expectation of richer interactive experiences.

We look forward to working closely with FORM to identify how the Digital Media Hub can maximally benefit the local game developer community. We believe that the coordination of the Digital Media Hub with our practical experience and knowledge of the local game developer community will also result in substantial benefit for related creative industries and Western Australia.

From Let’s Make Games Inc.

Git branching, naming conventions, global variables, and Mr. Carboon…

First, I’m very aware that the topic of this blog has kind of shifted a bit over the last few posts. It went from posts about games, the messages within games, and game-related issues to posts about JavaScript and the more technical aspects of learning how to make games. I’m not sure if this is going to alienate some of you guys, but as this is a personal blog…well…I’ll write what I want to write. However, I have now separated game related posts into different categories (as I’ve noticed from the traffic stats that quite a few people filter by the ‘gaming’ category specifically when reading this blog):

  1. games – All game related posts of all kinds will sit in this category
  2. gaming – Posts about existing games/game reviews/critiques of games/etc. Also more general game design-y musings and theories
  3. game dev – Posts like this one, that go more into the technical aspect of learning how to make games and specific projects

On to what I actually wanted to talk about:

Git branching

I’ve been thinking about Git branching strategies. As Gwen is a small one-person project I probably don’t really need to worry about things like this too much, but I’m treating it as a small-scale test that I can learn from for future scenarios as well, so in that sense considering things like this can be important. I found this article very interesting, but so far I just have two branches – master and development.

Naming conventions

I’ve also been looking into JavaScript naming conventions and decided to use Douglas Crockford’s guidelines. Tonight I’ll be going through what I have so far and renaming where required.

Avoiding global variables

One thing that I’ve been hearing and reading a lot is how bad global variables are due to potential clashes in the code, since they can be accessed by anything at any time. This is a problem for me because so far I don’t yet know of another way (much less a way that’s as simple as just declaring a global variable) to refer to my arrays.

Data flow diagrams

I remember learning about entity relationship diagrams and data flow diagrams in my high school Information Systems class (thanks, Mr. Carboon!) in years 11 an 12. At the time I didn’t really consider that I may actually have to ever use this knowledge, but the more I try to get the structure of this thing straight in my head the more I realize that I need to find a clear way of documenting what various entities actually do and how they respond when the player interacts with them.

This made me really appreciate my Info Sys teacher for forcing us to learn this stuff and drilling it into our heads. It was a long time ago and I have to do some major brushing up, but at least I still vaguely remember some of this stuff. I wonder if Mr. Carboon will ever get to see something I made and think “Yup, I contributed to that.”

Scope

Even though the complexity of building this thing has been ramping up as I get a handle on what I have to do, the idea for this game has stayed the same in terms of gameplay. I’m very wary of not letting this turn into some big complicated overambitious “thing” and don’t think that this will be a problem. I have an idea, I’m in the process of documenting it, and I know where it has to end up. As a player, the gameplay will be fairly simple – really centering around just one kind of interaction with different objects. As the person making this, the actual development process is what’s getting tough. I do feel like I’m heading in the right direction, though, and progress is being made on a daily basis (and most importantly I’m learning new things on a daily basis).

Life drawn

Been awhile since an update. My recent life has been consumed by work and a sister’s wedding festivities. Mostly work.

Here are a few life drawings. 30mins each, at a pretty leisurely pace.

BBQ this weekend!

It’s BBQ time this Sunday (26th February 2012) from 4pm!

Details:

Things to bring:
  • Insect repellent
  • Footy/frisbee/Vortex, etc. (optional)
  • Favourite outdoor chair (optional)
  • Portable devices with any games you’ve made (optional)

If you still haven’t RSVP’d yet head over to the Facebook event page and let us know you’re coming.

We look forward to seeing everyone this Sunday!

[photo: Laura Mary]

Breakfast sandwich cake

I made this for a breakfast picnic on the weekend:

Here are the ingredients (I also used some milk and butter for scrambled eggs, a cherry tomato, and some apple and chilli relish):

I sliced the bread into four pieces and discarded the top crust, then arrange the ingredients into the following layers (from bottom to top):

  1. Bread
  2. Scrambled eggs
  3. Bread
  4. Vege-bacon, spinach, and relish
  5. Bread
  6. Philadelphia cheese topped with chopped vege-bacon and half a cherry tomato

It was delicious. Unfortunately, I didn’t get any photos of what a slice looks like. You’ll just have to make it yourself.

Obviously inspired by this ordinary Swedish meal:

An update on Gwen – we have path follow.

Today was filled with boxes, furniture, moving, and being squished in a car. It was awesome. Tiring, but awesome. Ellen and Baz were helping me move into the new place, which was amazing of them. After the first load was dropped off at the new house and we were back for the second we took a short break to relax. Naturally, the conversation drifted to games. It always does. Specifically, I expressed my frustration at being stuck on Gwen.

The problem

Just follow the fricking path.

The problem, you see, is that I’m building an array of points for particular entities to move to. The player clicks any number of nodes which get added to an array, then clicks a button to spawn the entities and start them moving. An if statement decides whether the entity should be moving or staying still depending on its position in relation to each node.

Now the issue was that if I set the pos.x and pos.y of the moving entity to that of each node, then used shift() to remove the first item in the array until it got to the end, everything was just dandy. The entity was instantly cycling its position through each node. However when I tried to make the entities move to each node gradually using vel.x and vel.y, they kept jumping back and forth after reaching the node, hovering around it. As a result they never met the condition to shift the first item in the array and move on to the next node.

The solution

Giving it a bit of leeway

I thought that the issue was my noobishness and not understanding something basic. It kind of was, but Baz let me know that this is actually a common problem – he’s seen it before – and that the issue was likely the moving entity overshooting the first node slightly, then jumping back and forth attempting to reach it but never quite falling onto the exact coordinates. One thing I could try was create a range around the node’s pos.x and pos.y, to give the moving entity allowance to hit within that range as opposed to trying to force it to hit the node’s exact coordinates.

So after a bit of fiddling around, Ellen and Baz musing over potential setbacks, I ended up with a working path follow! My overall code structure is still really messy and I’ll need to now restructure lots of things as I realized something I didn’t consider for the future, but right now it works and it looks like this:

// If there is at least one node in the path, do this
if (ig.game.patharray.length > 0 ) {
     console.log(ig.game.patharray.length);
     // Find the angle to the first element in the array
     var angle = this.angleTo( ig.game.patharray[0] );
   			
     //If the entity is at the first element in the array, stop moving and remove said element
     if (this.pos.x < = ig.game.patharray[0].pos.x + 10 && this.pos.x >= ig.game.patharray[0].pos.x - 10 && 
          this.pos.y < = ig.game.patharray[0].pos.y + 10 && this.pos.y >= ig.game.patharray[0].pos.y - 10){
          ig.game.patharray.shift();
          this.vel.x = 0;
          this.vel.y = 0;
     }

     //If the entity is not at the first element in the array, move toward the first element
     else {
          this.vel.x = Math.cos(angle) * this.speed;
          this.vel.y = Math.sin(angle) * this.speed;
     }
}

As a result, visually the user can barely tell that the path may not be hitting the coordinates of the node exactly (and the actual node entity is larger than 1px, so to the naked eye it is hitting that node), and my entity moves from node to node until it gets to the end of the array. Yay!

Of course upon further discussion about what I’m actually trying to do I’ve realized that I need to do away with the single global array and create individual arrays for various entities instead, but I won’t get into that now. It’ll just require some re-routing.

Reading

I want fiction, but this is what I get

The Art of Readable CodeI haven’t read any fiction in a while because I’ve been too focused on other things. Like the last thing I was making, and now Gwen. I need to learn to manage my time better and make time for both reading and playing games. Both of these things are important. It just seems like now that I’m in learning mode I have to keep going – it’s all I seem to think about in my spare time. I did recently go to Boffins and pick up The Art of Readable Code by Dustin Boswell and Trevor Foucher. As you can likely see above, while I try to keep my code neat there is probably a lot of room for improvement. Hopefully this will help me to keep my code legible and to not end up with a jumble of crap that even I can’t understand a few weeks down the line.

 

So now

It’s tea time

After the moving the three of us squished into the car again to get some dinner. And on the way back the conversation, as always, drifted to games. We talked about Deus Ex and Modern Warfare and Skyrim and BF and Batman and, again, linear games (which the three of us seemed to be in agreement on – something that I haven’t noticed a lot of when it comes to this particular topic). I am now logging off for the night…I think…to make a cup of tea and then, finally, go to bed.

Liza out.

Now you don’t have to email me to ask me stuff. So don’t.

Over the past couple of weeks I’ve started getting a random influx of people emailing me with questions, some of which are really cool but a little repetitive (and no, not the “I am beautiful 20 year old Russian woman, you looking for wife?” or “You need to keep it up for longer?” kind). Not sure if this is just some sort of phase as it started pretty suddenly and I can’t see anything special in my list of referring sites, but because I’ve actually gotten to the stage of copying and pasting some answers to some questions I decided to just install a FAQ plugin and list these kinds of things on the site. I love talking to people, but I also like to minimize the amount of stuff in my inbox (that and I’ll probably just end up responding faster here).

So now…if you want to ask me about parrots or games or whatever strikes your fancy, you can head over here. Note that I will ignore any most some troll-y questions. And Baz and Ellen are the only ones allowed to mention short shorts. Of course you can still email me at me at liza.id.au if you want to ask a private question, but I don’t really get many of those. Most of them have been about fluffy stuff like favorite games and general geekery.

Hello, Gwen.

I kind of started this thing last night.

First, I should probably think of some way to refer to this thing when I write about it in a way that doesn’t give away the entire concept. I have a feeling calling it “thing” or “project” or “it” is going to get very old very quickly. At the same time though, giving it a name is kind of like making a commitment. Seeing as I don’t actually know what I’m doing and have no clue how or when or if I’ll even finish, it seems risky. Oh well, I still don’t want to keep calling it “it” all the time.

Let’s just call it Gwen for now – the NPC that I most associate with Guild Wars: Prophecies. First introduced in pre-Searing Ascalon, Gwen was always the most memorable for me; like the NPC representative of the entire series. I really need to finish EotN and Beyond to see where she ended up.

Anyway, here’s what I actually did last night.

Installed Git and set up GitHub

Houston – we have version control.

The Git installation was mostly painless except for my having to run the .dmg twice before it actually installed properly. Thanks to the awesome people of Twitter for helping me troubleshoot. It did work in the end! I now have a working private repository and while I’m still getting the hang of pushing and such through the terminal, several commits have successfully been made.

Yesterday’s list

In yesterday’s post I had a list of things I had to learn as a first step to coding this thing:

  • Detect mouse clicks onto an entity
  • Store entity coordinates into array when clicked
  • Remove coordinates from array when the entity is clicked a second time

And happily all of the above have been accomplished! I didn’t really expect to get them done in one day (although I know all of the above would be very simple for an actual programmer, for me it’s more like stabbing in the dark until something works. It takes forever to pin the tail on that donkey).

First I should say that I haven’t been doing this alone. I Googled the heck out of this (yesterday morning I had no idea what push() and pop() were) and my friend CODENAMEX helped get the idea of what I have to learn to do straight in my head as I bounced my dodgy brainstorming off of him. I modified the final concept slightly when actually coding it when I saw how to best handle these things in Impact, but much advice was definitely had in terms of general structure. Stew, whom I originally met in the Impact IRC channel, also gave some awesome pointers.

It’s interesting to be able to actually talk to people fairly openly about individual mechanics in Gwen as opposed to the last thing. I certainly don’t want anyone to do anything for me, but am already finding general advice invaluable. It never ceases to amaze me just how much you can learn in a short amount of time from people who actually know what they’re doing.

So:

Detect mouse clicks onto an entity

I did this by creating a pointer entity that is 1px x 1px and follows the cursor at all times. When the left mouse button is clicked, the pointer entity checks against whatever other entity it is touching and triggers a function in the clicked entity accordingly.

Store entity coordinates into array when clicked

I modified this slightly. Instead of storing coordinates, I’m storing the entire entity that’s being clicked itself (presumably I’ll then just be able to pull its attributes out as needed). I created an array in the pointer entity that is empty by default and scattered a couple of node entities that are meant to be selectable on the map. When the pointer checks against a node, it stores that node in its array via push() and changes the visual appearance of the node to signal that it’s active/selected.

Remove coordinates from array when the entity is clicked a second time

When the entity is clicked a second time things got a little more tricky for me. Setting it up to remove the last set of coordinates with pop() was easy. However, I don’t want the player to be able to just deselect any currently selected node. I need them to only be able to deselect the last selected node that they clicked (so deselect the nodes in the order in which they selected them).

Click counter

I did this by creating a click counter in the node entity. The click counter is set to 0 by default.

  • A click on the node is detected.
  • If the click counter is 0 the node is added to the array. The click counter then goes up to 1.
  • If the click counter is 1 when the node is clicked again and the node is the last one stored in the array, it gets deselected and removed from the array with the pop() method.
  • The click counter is then set back to 0
  • If the node that is clicked a second time is not the last node in the array, nothing happens and the node remains active. The player can then click on the nodes to deactivate them in order.

Go button

This wasn’t on the above list, but I also added a Go button…it doesn’t do anything yet, just prints a message to the console.

The thing is that visually right now all of the above just looks like a couple of boxes on the screen. Nevertheless, I made these boxes. They are mine and they do things, so I am happy:

Gwen screenshot 1

Boxy.

Next

Right now I’m pretty apprehensive about my abilities to code this thing. Just thinking about this array stuff bent my brain yesterday and I’ve already learned a lot, but it’s not even a tiny fraction of what still has to be done. I should note that the idea itself does not involve overly convoluted or complex gameplay. In fact, the overall concept is pretty simple. It’s the making of it that is going to be difficult.

At this stage I can’t really be too specific about exact things I need to do here as they would start revealing a little too much of the gameplay, but I’ll keep posting updates on isolated mechanics as I learn them.

I slept! And next.

First of all: Yay for R18+ games in Australia!

Second of all: I slept for 12 about 10 hours last night. Ten hours. That’s like…ten hours more than I usually do. Just kidding…I do sleep, I’ve just been doing less of it lately. I’ve noticed myself getting a little worn out over the past couple of weeks, like the lack of rest has been catching up with me. It’s kind of to be expected with the amount of work that needs to get done around here on top of personal projects. I finished a “thing” just in time to prepare for going away at the beginning of March – now there are lots of loose ends to tie off, work to finish, assistant instructions and client plan to sort out, etc. And a move! Did I mention I’m moving? All the moving out arrangements, cleaning, etc have been driving me nuts. There’s just so much happening at once.

Focus

So far I’ve forced myself not to think about any other ideas and it’s been surprisingly easy. Usually I have tons of stuff going through my head and sometimes I try to start multiple things, but this time that hasn’t been a problem at all. I think I’m getting a lot better at focusing on one thing at a time and I think this partly has to do with actually being able to build what I’m imagining – or being able to learn to build what I’m imagining. This means that I don’t feel the urge to jump around from one thing to another each time I get stuck on something because I know I can figure out how to get unstuck and keep going. I also need to make sure that there’s a high enough level of emotional investment in every project to keep this up.

Next

Yesterday I started speccing out the next project. Briefly. Nothing major, more like the very basics of the gameplay. I’ve also started thinking about what engine to use.

I’m not sure if I want to use Impact for the engine or try my hand at Unity. Impact has been amazing (I’ll write a post about it later). What drew me to it in the first place was the excellent documentation and active forum community (any beginner questions I had were already answered either in the docs or on the forum). It has single handedly been the most helpful tool in my learning JavaScript so far and I will forever be grateful to Dominic, the guy who develops Impact all on his own, for creating it.

However, Impact is better for platformers and this game is not going to be a 2D platform game. Even basic things like detecting mouse input as opposed to keyboard input become slightly more convoluted in Impact (though definitely not impossible). I’ll try Impact first and see how it goes. Before this idea starts coming together into a proper game I’ll need to do a lot of experimenting and learning of how to set up the core mechanics. I know what I want it to do and in theory I know how to do it, but it’s putting this into practice and coding it that’ll be the challenge.

The very first step in terms of coding for now will be for me to learn how to do the following:

  • Detect mouse clicks onto an entity
  • Store entity coordinates into array when clicked
  • Remove coordinates from array when the entity is clicked a second time

I have a feeling just the above will take me a while to figure out. I’ve dealt with arrays in the last project, but that was just for level setting and sprite animation; nothing that needs to be populated on the go based on user input. It should be very interesting.

Oh and I also have to catch up on all of those Code Year lessons.

And did I mention yay for R18+ games in Australia?!

Midland Digital Media Hub

FORM are pursuing federal funding to help set up Western Australia’s first digital media hub at Midland’s old Railway Workshop. They are seeking letters of support from the West Australian game development community and you can help by making a statement on their website. Statements of support closes February 12, 2012.

We hope that FORM is successful with their application and if it goes ahead we’d be interested in starting a dialogue regarding how the Digital Hub can support local games development.