06 January 2018

Picross - How Many Possibilities?

One of my favorite games back in the old days was Mario Picross. It introduced me to the Japanese Nonograms. A puzzle that requires you with the help of a few numbers as hints to fill out squares. In the end, the result will resemble a picture of something.

Here's an example of what it would look like:

                     1   1           
 1  1  1
 5  1  1  1  0
 4
 1
 3
 1
 4

And solved it looks like this:

                     1   1           
 1  1  1
 5  1  1  1  0
 4
 1
 3
 1
 4

As you can see this one is five times five in their size. In Mario Picross, there were three different sizes in Mario Picross: five times five, ten times ten and 15x15. Though you could technically make them any size.

The game features 256 puzzles in total but that's not all you can make. You can probably make a lot more puzzles. So...

Let's-A-Go!

Let's start with the smallest size. We have five times five, which results in 5 * 5 = 25 squares. Each square can be either filled or empty. So our first one would be to leave all empty. Our second bunch would be filling one square. We have 25 squares that could technically be filled so 25 possibilities here. Next up is filling the 25 squares with two. There are 2 out of 25 possibilities or C(25, 2) = 300 to fill it up. Our next case is filling the 25 squares with 3. This time it's 3 out of 25 possibilities or C(25, 3) = 2300. Now without going through each calculation you already notice something? The only difference is that we increase the X out of 25 or C(25, X). So we can just do this:

C(25, 0) + C(25, 1) + C(25, 2) + C(25, 3) + C(25, 4) + C(25, 5) + C(25, 6) + C(25, 7) + C(25, 8) + C(25, 9) + C(25, 10) + C(25, 11) + C(25, 12) + C(25, 13) + C(25, 14) + C(25, 15) + C(25, 16) + C(25, 17) + C(25, 18) + C(25, 19) + C(25, 20) + C(25, 21) + C(25, 22) + C(25, 23) + C(25, 24) + C(25, 25) = 33554432

or alternatively we can write it like this: 

25
Σ C(25, i) = 33554432
i = 0

However, having none of the squares filled is not a valid option. So we have to subtract one, which means 33554432 - 1 = 333554431 levels could be possible. That's.. extremely many. Unfortunately, many of these don't make much sense. Anyways that's how much we have for the size of five times five.

What About 10 Times 10?

We're definitely not going to iterate through 100. So let's see if we can find a different way to calculate it. Let's look at how they behave if the first number changes.

5
Σ C(5, i) = C(5, 0) + C(5, 1) + C(5, 2) + C(5, 3) + C(5, 4) + C(5, 5) = 32
i = 0

6
Σ C(6, i) = C(6, 0) + C(6, 1) + C(6, 2) + C(6, 3) + C(6, 4) + C(6, 5) + C(6, 6) = 64
i = 0

That's interesting it doubled. It could be a coincidence though. Let's go through the list. 7 would be 128, 8 would be 256, 9 would be 512, 10 would be 1024. Let's try it with ten:

10
Σ C(10, i) = 1024
i = 0

Okay. 1024 that's 2^10 and 2^5 is 32. So the previous number we've calculated for a five times five field should be 2^25. Let's see: 2^25 = 33554432 and that's exactly the number we had before.

Makes sense. We have a chance for a field to be either filled or not filled. That means we have two states for each field. You can show these fields like a binary number. Using the example of a Picross or Nonogram I gave it would be 11110 10000 11100 10000 11110.

That's funny, this is basically how QR-codes work.

Calculating the Rest

Well since we know this now we can easily calculate the rest.

So for a ten times ten field we have: 2^(10 * 10) = 2^100 = 1.2676506 * 10^30 that's about one Nonillion (US) or one Quintillion. Though don't forget to subtract one, since an empty field would be an instant win.

And for 15 times 15 we get even more: 2^(15 * 15) = 2^225 = 5,391989333 * 10^67 that's over 53919 Vigintillion (US) or 53 Undecillion. Again don't forget to subtract one.

Those numbers...

The Best Part Last

There are Nonograms and Picross games or puzzles that even use colors. So each color adds a new set of possibilities, but it's easy to calculate that with what we know. We calculate two to the power of n, where n equals the number of squares we have. The two resembles the number of states a square can have. So far we only had filled or not filled. With different colors, we could say it could be either red, green, blue or black. So that's four states plus none of those. Five states total. So we would calculate five to the power of n, where n equals the number of squares we have. Our example with a 5x5 field would be:

5^(5 * 5) = 5^25 = 2.980232239*10^17 

That's 298 Quadrillion (US) or 298 Billiard instead of the previous 333554432 possibilities.

05 January 2018

Guild Wars 2 - A Different Quest System

If I would happen to be decent at drawing I would've made a comic unfortunately you have to bear this the script.

Classic Quests

HansiBah the Great: Hey, this NPC has an exclamation mark above him. I guess he has a quest for me. Have you gotten this quest yet?
Meta6969: No, I'm currently killing these trolls that try to destroy the garden.
HansiBah the Great: Alright, wanna do the quest after you're done?
Meta6969: Sure!

* a few minutes later*

Meta6969: Alright, let's see what it is.
Farmer: We have a great problem. Can you help me keep these trolls away from my garden so they won't destroy it?
Farmer: Do you accept my request?
Meta6969: I already did that quest.
Farmer: Do you accept my request?
Meta6969: I helped you already, didn't you see me defend your garden?
Farmer: Do you accept my request?

So back in the old days, you had to talk to NPCs to get your quests. So you walked to the person asked them what their problem was and traveled to solve this problem. Once you're done you return to this NPC to get your reward. Surely you can't finish a quest without knowing about it, right?

Controversy

Well if someone has a problem in real life, for example, they lost something and you found it. Thanks to the address you knew where to bring it and as a result they're grateful you helped them and give you a reward. You didn't know they were searching for it though you might have assumed they were.
This could be done by a quest item, but let's say they mixed up their stuff and can't find anything you don't talk to them and yet you help them sort their stuff and they're grateful afterward.

Okay, taking the example in my script. You helped the farmer protect the garden. Why shouldn't you get the reward? Just because you didn't talk to him? Is talking to a person to know what's up really required to solve the problem or help them?

I don't think so.

Innovation

Having to walk to an NPC to accept a quest to fulfill it and get the reward from the NPC in person is called a classic quest system. There has been some innovation here and there like adding the ability to accept quests or rewards via phone but the greatest innovation has come from Guild Wars 2.

The quest system uses heart-quests. These heart-quests are shown by yellow hearts on the map and yellow hearts above the NPC's head. While in this area doing anything, related to helping the NPC progresses the heart. When the heart is full the quest is done. Once the quest is done you get your rewards sent by mail and additionally you can buy items at this NPC as thanks for helping.

So what has been changed:
  • No need to accept a quest
  • Technically Quest works retroactively
  • Rewards are sent by mail
  • Heroes choice of how to help
Unfortunately, this system has some downsides as well.

Problems of This System

These heart-quests work in a certain area. That means if there are possibilities to help the NPC by carrying something from point A to point B you'll most likely leave the quest area and this kind of help to the NPC might not be recognized. This limits the number of possibilities for quests.

NPCs only have and can have only one quest. How would you implement multiple quests? Show multiple hearts? Show a heart after the first is finished? This would probably confuse people more than it would help.

There shouldn't be two hearts next to each other. It would probably be possible to know about both quests and keep track of them though it might overwhelm the player.

Conclusion

Compared to the classic quest system it's much easier but more limited. It allows more freedom for the player but restricts the developer. Also, it depends on the person. Some might like the classical quest system more others like this dynamic system. Though this is definitely a good alternative to the classical quest system so I wouldn't give it up. Another idea could be to have both systems in a game where it matches. Some quests make more sense to work retroactively while others don't.

04 January 2018

Subgenre - Bullet Hell

There are so many games out there. Each has its own genre, some have different genres and times a completely new genre or sub-genre is created. It took one Japanese person to create this sub-genre.

Nice to Know

In the Japanese culture precision and perfection is something seen highly off. There's also something called meditation through movement. Anyways all these cultural influences play a role in the games that get created. Games like OSU! or other types of rhythm games ask you to perfectly hit the notes at the right time for a perfect score, but rhythm games aren't the only ones.

The goal was to strive for perfection to improve one's skill to unknown new heights.

STG - Shoot-'Em-Up

Everyone knows classic shoot-'em-ups. "Battle Garegga", "Starfighter" and "Gradius" to name three.
For us to go more into detail of this new sub-genre we need to be familiar with its father genre so to speak. So let's define an STG game:
Shoot-'Em-Up is a sub-genre of the shooter genre. It features a camera moving with the player and allows them to shoot the enemy.
That definition should pretty much combine any STG, I hope. If not I have to update it though I think I already wrote it as broadly as possible.

Alright, so what happened?

Striving for Difficulty

Believe it or not there actually were players that wanted harder STGs. Harder than "Gradius", the company who developed "Batsugun" (1993). 1995 a Japanese person, known as Zun, created a fan-game called "Touhou 2: Story of Eastern Wonderland", which also was one of the harder STGs.

Bullet Hell Was Born

And so 1993 the bullet hell genre was born and grew. Especially the Touhou games made their name in this genre with the years drawing in more and more players. According to a survey done by the Japanese fan wiki of Touhou the 6th installment Touhou 6: Embodiment of Scarlet Devil is the most famous. With each installment up to the 6th, the number of bullets also grew.

By now some of the enemy attacks often called pattern, reach from a bunch of shots up to a screen coverage of at least 80%. It doesn't help that these patterns look beautiful and mesmerizing, resulting in their looks to distract you from your attempt to dodge them.

Bullet Hell Definition

So let's define bullet hell games.
Bullet Hell is a sub-genre of the shoot-'em-up games. They differ through their intense amount of enemy attacks often filling up huge parts of the screen.
I think that does it.

Unique Features of Bullet Hell Games 

Some of the unique features you may see in bullet hell games are:

Bombs
These allow the player to clear a part of the screen or the complete screen saving you from all attacks and giving you a brief moment to breathe.

Grace
Often a stat that is awarded for avoiding attacks closely. If you're close to an attack you basically get extra points.

Focus
Some bullet hell games implement the ability to decrease your character's movement speed but making it more precise at the same time allowing you to maneuver easier in tiny spaces.

Mixing This Genre

Bullet Hell has also been implemented in other games. I've seen platformers as well as adventure + STG + Bullet Hell. Binding of Isaac, for example, implemented Bullet Hell in their fights especially seen against Hush.

Conclusion

Bullet Hell games can be very challenging, obviously since they're intended to. Though I can suggest everyone check them out give them a test and see whether or not you like them. Don't worry too much about the difficulty, depending on which one you pick up you get the ability to choose between difficulties. Touhou 6: Embodiment of Scarlet Devil, for example, allows you to choose between...
  • Easy     - For people who don't like STG much.
  • Normal - For most people.
  • Hard     - For arcade shooting game players.
  • Lunatic - For weird people.
  • Extra    - Give up already, are you crazy?
On a side note: This really makes me think which other genres one could come up with and which existing genres could be paired with bullet hell.

About Me

My photo
I'm a M.Sc. Games Engineer and I created this blog to share my ideas, theorycrafting, thoughts and whatever I'm working on or doing.