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.

Advertisement

4 Responses so far »

  1. 1

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

    • 2

      Eddie Cameron said,

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

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

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


Comment RSS · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.