Games‎ > ‎

Romeo and Juliet

3 people, sharing the love


Intro

Romeo and Juliet close-up
In Verona, you play Romeo Montague whose family is bitter enemies with the hated family Capulet.
Last night you met your One True Love!  Juliet ... Capulet!
    Doh!  :-(

In order to marry your Love and live happily ever after, you must get the blessing of her Father.

As our scene opens, a portentious day dawns.  The men of the two houses head to the streets intent on verbally lashing their opponents.  If this goes too far, the only guarantee is that you will never be happy.  Resolve the conflict between the Montagues and the Capulets while keeping your Love safe -- you worry what she might do if she becomes too despondent...

Play

Web (PC/Mac) -- right click for full-screen option.

WebPlayer

The gadget spec URL could not be found


Background


This was created during the global game competition, Ludum Dare where one has either 48 or 72 hours to create a game on the published theme.  For LD 30, an old friend who'd recently started learning Unity came over and we collaborated in-person!  As is my mien, we used the jam as a learning opportunity for several things we haven't tried before.  He wished to experiment with human avatars and I, Behaviour Trees (AI).   See here for his write-up of the endeavour including notes on the challenges of human avatar creation.  When the theme was announced as "Connected worlds", a brain-storming session discarded all the obvious/clichéd mirror/phased world tropes in favour of a different take -- a more literary one!

The basic goal was to have a non-violent playable simulation of Romeo and Juliet who endeavour to 'connect' the worlds of their houses -- the Montagues and Capulets.  The basic premise is that each line of delivered dialogue has an effect on all opposite house members who hear it.  An insult offends, a compliment or calming phrase heals.  The non-Player characters are driven using an emotion-based Behaviour Tree.  They choose their own conversation based upon their emotions and will flee when too upset.

For the Behaviour Tree, I had a couple of options and decided to use Behavior Designer.   The basic design has the AIs almost always looking for opposite house members and moving towards (1.) and engaging them in conversation.  If no opponent is visible, (2.) they choose one of several hangout locations (way-points) to travel to, go there, wait a little, then repeat.  Once in conversation, (4.) they wait until no-one's talking, select a phrase (detailed below), speak and wait.  If they get too upset, (3.) they stop looking for opponents and simply go hide at one of their hangouts.
Given this was a time-constrained first use of Behaviour Trees, it wasn't a bad experience and I definitely learnt useful things for future uses.  I liked the shared variables idea (as opposed to the 'blackboard' approach I read about while learning about BTs).  (Caveat: it deletes shared variables on prefab instances sometimes when prefab updated!?)  barI would have liked to have seen a more CPU-friendly implementation for delays -- waiting seems to require a per-frame call (as opposed to a Coroutine or similar).

Behaviour Tree used in-game

The dialogue system is relatively simple.  Phrases come from either a negative or positive list, scaled from weakest to strongest which have more or less effect.  For the player, it simply offers a random negative and positive comment.  For the AIs, what they hear from the other side effects their emotional level and they choose their phrase from a range around their present level.  As such, being positive around the enemy AIs can influence them to be positive to the player's side.  All AIs initially start out slightly negative (they *are* enemy houses after all!) and the love-struck Juliet being supremely positive.  The levels were set such that Juliet on her own cannot save the situation -- thus the player has agency.  Everyone also has a short-term memory to reduce repetition, a stock of phrases when they don't manage to come up with something new to say within a time-limit and a sense of manners -- they try not to talk over each other.

A fuller dialogue implementation would vastly increase the phrase collection and endeavour to imbue semantics (or sufficient simulation like valid response lists) such that conversations grow beyond mere trading of insults to semi-meaningful responses.  One goal of this being to challenge the player to 'make sense'.  If they say something nonsensical, they could be laughed or scoffed at and lose something (perhaps efficacy in influencing the AIs due to their lack of  respect).  This might even be used to encourage understanding of the Shakespearean English (or perhaps school children are smarter and would simply memorize all valid trees!  I certainly did for the Sierra Online and Lucas Arts games ;-) ).

A fully realized game would also (see above) see better feedback (e.g. emotes, scores), more & better phrases (including translations from Shakespearean 'New' English to Modern English/other) and a 3 act progression with dramatic semi-open conclusions emphasizing the changing outlook of the protagonist and the consequences of his/her actions.  Act 1 before the lovers meet showing Romeo's family-typical stance; Act 2 covering the meeting, perhaps in a choreographed dance entailing some movement-based game-play; Act 3 covering the current game-play.  Potential conclusions could include:
  • WORST: solo suicide and/or all-out war for no resolution (or hurting your Love resulting in loss and/or a suicide). 
  • MEDIUM: mutual suicide if you manage no familial resolution (perhaps leading to the story-standard resolution over their children's deaths). 
  • BEST: Various levels of peace brought about through your successful actions. 
In the current implementation, once family feelings (calculated as a sum of all members' emotions) drop below a certain level, war is declared and you lose.  You win if you manage to influence all family members sufficiently positively.  Sadly, this is actually too easy in the current version -- merely requiring being at the centre of a group of Capulets and being continually complimentary.  (hence the 'make sense' addition potential mentioned above.)

After the jam, we did a few bugfix builds (including trimming 35MB of uncompressed sound out!) then added a post-jam build with a few enhancements.  The GUI was improved, the camera was updated (to zoom in on the relevant actors when the player engages in conversation and fade out buildings that interposed between the camera and player) and, most importantly, the AI's, when upset, now show a ":-(" rather than just running away silently!

We decided against continuing efforts on this after the jam -- it served its purpose as a vehicle for learning.  Let us know if you think there's a market(?) -- we may change our minds!  

Here's a list and notes on other tools and Unity assets we used:
  • The sole sound was last minute from http://www.freesound.org/people/dobroide/sounds/115872/ -- labelled quiet city, foolishly it's 46mb so blew-up the download and contains more ambient sounds than at would have liked (e.g. random walking!).  We got this properly compressed in a bugfix build.
  • GUI is NGUI (our first time with this, after years of 2DTK!) but we used Unity OnGUI for jam-time speech bubbles after we ran out of time for 9-sliced ones.  We switched them to NGUI after the jam.
  • World geometry is from the marvellous Michael O's "Cartoon Town and Farm v1.0".
  • Models are UMA (Unity Multipurpose Avatar) and 1 Autodesk Character Generator (we also tried MakeHuman -- good but wasted some time in Blender trying to make clothes for them!).  On that note, be *really* grateful the game characters are wearing clothes! Why doesn't anyone warn you these modelling programs and auto-generators seem to think boxer-shorts are sufficient attire!? :-P )
Comments