JELLE VAN DOORNE - GAME & NARRATIVE DESIGN
  • Home
  • Portfolio
    • Angela's Wedding Disaster
    • Angela's High School Reunion
    • Angela's Fashion Fever
    • Viola
    • Press Q To Stop Time
    • SECRET
  • Blog
  • About
  • Contact
  • Presskit

Party with your Party!

12/5/2018

0 Comments

 
This week, I spent my time creating a system that keeps track of the player's party. Since Viola is the RPG where anyone can join your party, it's more than a bit important. Another key feature of the game is playing music, so obviously, these two things have to mix with each other. If you have someone in your party, they'll come out as you play songs on your violin. Every possible party member will have a different instrument, so you can almost create your own band!

Click 'Read more' to find out a bit more about the code driving this system.

Party in the Programming Section

I use a PartyHandler object that handles everything related to the party. It's really quite simple: five "slots" that can contain game objects, and a bunch of game objects that link to prefabs for each possible party member.

The script also has the ability to add party members to any of the slots, and takes care of the little pop-up telling the player someone joined your party.

By the way, the little jingle is just the theme we've been hearing, but sped up a lot, and using a Secret of Mana-esque soundfont.

The Party Instrument script is separate, and it handles spawning party members in place, making them move and flip, changing their animation... As well as adding audio source layers, with a little help from Viola's SongHandler script.
Picture
Picture
Picture
The purple one shows what happens in-game when playing an instrument with multiple characters. An extra Audio Source gets added to a separate object containing the layers. This object looks back at the PartyHandler to figure out which party members are supposed to be playing their instrument.
This is what Viola's object looks like right now. It's a lot, so I created small icons to add to the scripts. This way, it's much easier to find what I'm looking for if I need a specific script.

You might notice there's two at the bottom that I haven't talked about yet: stats and equipment. What's an RPG without them, after all?
Picture
Picture
Party member stats are really just a lot of integers, and a bit of math for calculations.

"Stat at Level 1" is what that stat should have for that character at level 1. "Stat at Max Level" is the same, except at whatever is designated as the maximum level. In this case, 50.

With a bit of math and clever rounding, the script calculates how much should be added to each stat for every level up. This allows me to easily reiterate the characters' stats and progression through the game!

The "Level up" and "Add EXP" buttons in the video were made to test out this system, and it works like a charm. 
The equipment script is not quite so finished. As of this point, it can only keep track of what objects are equipped to the character it's attached to, and what kind of weapons and armor the character could carry... Although, these booleans don't actually do anything just yet.

Working on an equipment system made me realize I'd need an inventory system, as well as menus. Menus are something I need to learn about for the RPG battle mechanics as well, so next week I'll be spending time creating a main menu, and a pause menu.
Picture
0 Comments



Leave a Reply.

    Tweets by GameViola

    About

    This is a development blog for my own game project, "Viola".

    Picture

    Archives

    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018

    Categories

    All
    Art
    Design
    Music
    Programming
    Story
    Viola

    View my profile on LinkedIn

    RSS Feed

Site

Portfolio
About
​Contact
  • Home
  • Portfolio
    • Angela's Wedding Disaster
    • Angela's High School Reunion
    • Angela's Fashion Fever
    • Viola
    • Press Q To Stop Time
    • SECRET
  • Blog
  • About
  • Contact
  • Presskit