Game
Rhythm, Paper, Scissors
7 years ago

Timing is everything


When the code that you’ve been working hard on, the one you’ve been failing to complete several times and almost bringing you to the verge of surrender. Is there a better feeling when this code finally works and you’ll get to start working with it? Is there a better feeling than feeling that wind in your back? I
think not.

Since last time I’ve only really spent two days on the project since I took an early holiday over Christmas, new years and then returned last Wednesday evening to Skövde to continue. But man has it felt good those two days!

The first thing I needed to do was to send the information I got from Wwise and send it to the scripts that needed it. I created a new script called “BeatTiming” and created floats for Metre and Beat Duration to name two. These were then connected as you can see below:

PrintCallbacks script (the script I’ve used the most in my previous posts):

5d0a84e970fb1.png

PrintCallbacks basically receives the information from Wwise regarding Beat Duration and the callbacks for Entry, Bar and Beat while sending them over to BeatTiming as well as a few other scripts.

BeatTiming (the new script):

5d0a84ebeaa9a.png

The BeatTiming code basically checks if the song is being played in 3/4 or 4/4 and then checks on which beat it is currently playing. Then we have a SafeTriggerZone so that the player has some room on each side of the beat to make the button press without failing. If the player presses the button within the safe trigger zone she will perform an attack. If the player is too far off beat the player character will be stunned for a while.

I also made it so that the player has a chance of making a strong attack on the first and fourth beat of a 4/4-track and weaker attacks on the second and third beat. This might change after some game tests but the idea is, as seen in my first blog post, that the player should be able to commit to stronger attacks or play it a bit safer with some quick, weak attacks.

The results can be seen below in the Debug.Log:

5d0a84ee6809b.png
5d0a84f0bf8a2.png

As you can see I had a good run with a streak of successful attacks but was then slightly too slow on the second beat of the 30th bar. This resulted in my character being stunned and unable to attack for a while. So the player will have to be careful, attacking off beat will give the enemy a chance to attack you when you’re defenceless!

A similar thing will soon be implemented for the enemies in the game. The enemies will on each beat decide wheather to attack or not on the next full beat. If the enemy decides to attack it will show a hint above their head at half the Beat Duration to let the player know what they should attack against. On the full beat the attack is performed and depending on what attacks the player and the enemy has chosen one of the two might be damaged.

Since I haven’t spent any time on the actual battle mechanics this will be more fleshed out in a later blog post. We’ll see who in our team eventually gets to work on it as well as it’s not yet 100% decided.

But I’m gonna leave you all here for now. But we have plenty of fun stuff ahead! We’ll try getting the Rhythm, Paper, Scissors-world into a full out dance mode, compose some music for the game and get the combat working as intended!

See ya next week!

/Sebastian



0 comments

Loading...

Next up

Just as Pecaminosa's musicians #improvise this rendition of #LittleSunflower 🌻, so do we improvise with this post you're reading. 😂

What's coming out of your own improvs? 🤔

#Pecaminosa | #IndieDev | #OST | #Jazz

Did you know that today is #InternationalJazzDay? 🎷😎

No? 😯 Well, we couldn't pass up this date!

And what better to celebrate this day than #Pecaminosa #OST? 🎷

Let us know what you think about it and have a great weekend!

Heya there! I really wanted to show you all a little gameplay preview of the first boss fight i'm currently working on i hope you like it ^^

Today I was setting up the location of the first boss. His name is "Father" and he is the first of the Patagonians. His task is to guard the road to the House.🛡🗡 Bookmark pre-launch page🔖🔖🔖

https://www.kickstarter.com/projects/rdvindiegame/the-patagonian…

I have added rewards for quests so that villagers can give you something in return for your hard work helping them. 🥳

I want to know - what's your favourite quest reward?

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

Family band complete!

So here's the first of the zodiac signs i will make for the next weeks.

The Darkside Detective: A Fumble in the Dark is out TODAY! 🖱️Advanced pointing, clicking action 🖨️Very funny words! Loads of them! 👻6 sarcastic, spectral cases to solve

Update 2.627

New challenges & new effects!