The Crying Game #1: A Unity3D Dev Diary

This dreary September,Robert Yang and myself are taking part in the 2nd Super Friendship Club’s pageant. These pageants, open to all, give you a month to make a game surrounding a theme. This time around the theme is Mystism. Stretching that slightly, we are making ‘Cult Tycoon’ (working title), where players must recruit cult members and make as much money before Judgement Day, while keeping the FBI off their backs.

As the ‘programmer’ on this game, this dev diary will go over code techniques and structures I’m using, and some of the lessons and tips I’m learning, in the hope it will help, or at least be of interest, to somebody. It will mostly cover basic practice, but may delve into more advanced stuff if I end up going that way. Also, since this is a somewhat different breed of game than what I usually make, I’m coding it almost entirely from scratch, so I’ll be experimenting as a go along. For more up-to-the minute progress reports, see our thread on the Club’s forums.

DAY 1) Implemented camera movement. Scroll via sides of screen or keyboard. No plans for rotation or zoom right now, and cam height is locked. Gameplay will mostly be about buying/placing buildings, so I’m also laying out the base class of buildings. Have logic for selecting building from GUI and placing in place.

DAY 2) Robert has finished first bunch of models of the town that you must recruit people from. Putting in the essential state-logic, like cash reserves, followers, and FBI interest. I’m laying out the base class for all the people, and putting in the basic logic for the ‘Recruiter’  class. With delicious beer in hand.

To minimise redundant code, I’m using interfaces and inheritance more heavily than I usually would in a Unity project. Usually the component/gameobject structure makes it less necessary to use such constructs. For an FPS say, you would have a Gun component, of which you would change properties to change the gun type. In  this project, for example, I have an abstract building class that handles placement, while each  building type has it’s own code to do whatever it is that the building does. In a similar vain I have a plain ‘Follower’ class, from which inherits the various classes of character. Interfaces are useful for, say, selectable objects.

Putting in first hint of gameplay, the loop of sending recruiters out to convert people to your noble cause. Setting up building placement and basic AI (wandering, conversion, allocating amongst buildings…)

DAY 3) I work (my day job) and get wet in this horrible NYC weather.

More crying will come. Feedback/questions are more than appreciated, and if any one wants to join in, you have until the end of the month, so give it a shot! Ask around on the forums if you want t o help another group/person, or be brave and try something yourself.

Go to Part 2

NOTE: This is also posted on AltDevBlogADay, a wonderful site for blogs from gamedevs of all sorts.

Tagged , , , , ,

5 thoughts on “The Crying Game #1: A Unity3D Dev Diary

  1. I love the tilt-shift miniature effect. Can you give some details on how you did that in Unity? Simply focus+saturation?

    • Eddie Cameron says:

      Unity 3.4 actually comes with a tilt-shift image effect built in. But without Pro I suppose you could fake it somewhat with a custom blur shader on a plane in front of the camera?

  2. Cool. I’ll be following along. And I’m in New York, gearing up to use Unity in a planetarium/digital dome we’re building. If you’re interested let me know.

  3. [...] we decided to make ‘Cult Tycoon’ (still no real name). For the first part, take a look here. [...]

  4. [...] Yang (now as Altercation.), for the Super Friendship Club’s second pageant. Have a read of Part 1 and Part 2 for more [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

/* Parallax */