Improving the battle-system in Pokemon

The problem with PP

I mentioned in my previous post that I don’t consider the PP-system in Pokemon a very good system.
It’s a means to limit the use of stronger moves, but it’s not very effective at that and it mostly just causes annoyance.
Or to quote myself from my previous post: For battles that matter, you generally make sure to have full PP before battle, effectively making PP irrelevant, as you’ll rarely run out of PP for any move within a single battle (except rarely for some specific powerful moves that have only 5 maxPP). Outside of these battles, it just feels annoying when you have to heal at a pokecenter when you’re pokemon are in full health, just because a move ran out of PP.

Not only that, but it’s (what I think is) the reason Pokemon doesn’t use a move-learning/remembering system like Ni no Kuni.
You might argue that not having the current PP-system wouldn’t necessary mean that Pokemon would switch to the Ni no Kuni system, but I really think they would, as it seems like they (=Nintendo/GameFreak) are already trying to make it more like that.
For one, they added Move Relearners, which are NPCs that can make your pokemon relearn all the moves they could learn at a lower level.
And they made TMs be reusable, which is a terrible decision IMO, as it causes more pokemon to know the same moves, decreasing variety.
These are both attempts to make it more like the Ni no Kuni system, but they’re not as good as just being able to choose the moves at any given time outside of battle. (and they should revert the TM change)

Cooldowns

So I propose the following system to replace the PP system:
Instead of having PP per move, every move has a cooldown, of either 0, 1, 2 or 3 turns.
Moves with a 0 turn-cooldown, can effectively be used every turn, moves with a 1 turn-cooldown every other turn, etc.
Making the maximum 3 turns will ensure that there’s always atleast 1 move that can be done (if you have 4 moves).
In general, moves that currently have high maxPP, would get a low cooldown, and moves with low maxPP, would get a high cooldown.

For example:

Pokemon PP Moves

A pokemon with it’s moves and their respective PP

Pokemon Cooldown Moves

Would become this when using the cooldown system

My idea is to have these cooldowns be reset outside of battle, so all battles start with all moves usable, but switched out pokemon would leave their cooldowns as they are. (So a pokemon has to be in battle for their moves’ cooldowns to reset.) Though I suppose switched in pokemon should have their cooldowns be lowered by 1, seeing as the player already loses a turn switching that pokemon in.

I made a beautiful mockup showing how it would work in battle:

pokemon cooldown moves

The cooldown system in action (opponent’s actions aren’t depicted).
Note that dig is a 2-turn move

I think this system could be a better way to make player’s think about what moves to use, and can cause battles to be more strategically interesting. All without causing the annoyance and hindrance of PP.

Improving the moves-system in Pokemon

I don’t know why, but I recently got in the pokemon-mood again. That is, in the mood of thinking about ideas to improve the pokemon games.

One thing I have thought often, is that I think it would be better if they made pokemon learn more than just 4 moves.
I don’t mean they should have more than 4 moves at their disposal in battle, but the player should be able to pick the pokemon’s 4 battle-moves, out of a list of all the moves this pokemon has learned, outside of battle. Like Ni no Kuni did.

Now it isn’t like this in pokemon, and I’m sure the reason isn’t because the people at Game Freak / Nintendo have never thought about it. (And even if they hadn’t, Ni no Kuni happened)
For a long time I’ve wondered what that reason could be, as IMO, the Ni no Kuni moves-system is better in every way.
But I think I finally realized what the reason is, and it’s as small as it is stupid;
it’s because of the Power Points.

See Power Points, or PP, is pokemon’s version of mana or MP or whatever you want to call it, but instead of there being 1 mana pool per creature, it’s per move.
The use of mana-cost is generally to have some way of limiting the player’s use of strong abilities, preventing the player from using only his strongest move(s) without thinking.
In pokemon this is no different, by having stronger moves have less max PP, they intend to have the player use these sparingly, only when he needs to.

The reason Ni no Kuni can have their moves-system, and why pokemon can’t (at first glance at least), is because in Ni no Kuni moves don’t have PP, but simply use the character’s mana-pool. Switching moves outside of battle has no effect on the mana pool, so there’s no problem. But if the pokemon games would allow this, player’s could just switch moves that ran out of PP with other moves, drastically postponing running out of PP.

Now one might say that isn’t necessarily a bad thing.
For one, the current PP system isn’t a very good system to be honest, it’s mostly just annoying; For battles that matter, you generally make sure to have full PP before battle, effectively making PP irrelevant, as you’ll rarely run out of PP for any move within a single battle (except rarely for some specific powerfull moves that have only 5 maxPP). Outside of these battles, it just feels annoying when you have to heal at a pokecenter when you’re pokemon are in full health, just because a move ran out of PP.
Another thing is that it would still stimulate players to use lots of different moves, rather than using the same old all the time.

But if there’s one thing the different pokemon games have taught me about Game Freak / Nintendo, it’s that they don’t like to make “drastic” changes to their winning formula if they don’t have to.

So I propose a simple solution that allows the Ni no Kuni moves-system, without it ‘breaking’ the PP system.
And that is to simply take over the PP amount of the old move, when switching it for an other move, in relation to their maxPP.
For example: I have a charmeleon that has the move ’ember’ with 10 PP of its 25 maxPP set as 1 of his 4 battle moves, and I want to switch it for ‘flamethrower’ which has 15 maxPP. Doing so will result in having ‘flamethrower’ with 6/15 PP. As 10 out of 22 PP is equal to 40%, and 6 out of 15 PP is also 40%:
10 / 25 = 0.4
0.4 x 15 = 6

That way the PP system isn’t undermined when switching moves.

Now if you’re wondering “but what when the result isn’t an integer?”
Then we have to get technical:
The solution is to store a floating point number internally, rather than an integer, for the moves current PP. But to the player we display this number floored to an integer. We then consider a move out of PP whenever it’s lower than 1.

And there we have it, a clean solution to the PP issue.
(Oh god, PP issue, I just noticed how that sounds)

At least that’s what I thought, until I realized that this system could be easily abused to make a move replenish PP, by switching it out, and then switching it back in for an other move, completely undermining the PP system.

Sigh, so much for a non-“drastic” solution.
I add the “” because I personally don’t find any of these changes to be drastic, but I feel Nintendo probably would.

Anyway, my point was simply that I think the Ni no Kuni system would be favorable over the current system, it just may need a small workaround for the pp system.
They could just use a mana pool like most other jrpgs use, but I have another idea, albeit just as drastic (or even more so), but I’m saving that for an other post.

The problem with the random encounters in Pokemon

I loved Pokemon blue and gold back in the day, but haven’t really played any Pokemon games ever since. I’ve had briefly tried some of the newer ones, but they couldn’t spark my interest for the lack of innovation (And that’s the main problem with the Pokemon games really, they’re all essentially the same game).

Now recently I borrowed Pokemon Black from someone, and while it wasn’t as bad as I feared, I’m reminded of all the things it could have been but isn’t.

The issue

Now there are tons of things to comment on, but writing it all down would take forever, so I’m just gonna talk about what I think is the biggest issue (or at least one of).
Namely the random encounters.
The thing about it is that while it’s the main thing you do in the game, I’m pretty sure that on average a player spends more than 50% of the time in a random encounter, nobody likes doing it.
It just so extremely tedious and annoying.

I have often thought (as have others) the main reason for this is just the very nature of turn based combat, that they’re just outdated. But gym battles and other “boss”-battles have showed me that that isn’t necessarily the case.
These turn-based battles can be fun and exciting, mostly when challenging, but just not when encountering the same pokemon for the 10th time in a couple of steps.

So the main thing that needs to be changed, is how we experience these random encounters.

But before thinking of concrete ideas to improve random encounters, we first have to understand their purpose.

why does Pokemon have random encounters? or jrpgs in general?

Purpose

I would say the purpose of random encounters in jrpgs is to provide a way of having continues obstacles for the player while traversing the world. And (generally) the main way for the player’s character(s) to develop and become stronger.

Now let’s not mistake obstacles for challenges. random encounters generally aren’t there to provide a real challenge to the player, at least definitely not in Pokemon.
And there’s a good reason for that, a game needs to alternate the difficulty, having every battle be challenging could possibly be worse than having no battle be challenging. So having the random encounters in general not be challenging is probably the best idea. (That way important battles can be)

An important difference between random encounters and fixed battles, is that the former isn’t linked to the progression through the campaign/story, but only to the players own speed and interest in discovering the world, it provides a freer kind of obstacles basically.

But Pokemon specifically has another purpose for random encounters, namely to introduce the player to new pokemon and allow him to capture them and expand/alter his team.

Now i would argue that Pokemon already has something else to provide continues obstacles, and as the main way to gain experience (points), namely npc trainers, littered over the world as an obstacle in the player’s path.
There are so many of them that there really isn’t much point in having random encounters for this purpose, especially since they aren’t challenging to begin with, they’re just obstacles, so the only purpose remaining is for the user to encounter and capture new pokemon.
But this can be done differently, and more importantly, way less tedious.

Proposition

Removing the “obstacle”-purpose, allows for some changes to the random encounters:

First of, skip the long battle-intro. I can understand a battle intro for important fights, but not for random encounters, it is quite literally a complete waste of time.
Also, allow the player to run from battle immediately.

To make the battles less tedious, it could also be a good idea to differentiate them more from trainer battles, by changing the battle mechanic a little. For example, by having your turns have a time limit, making the wild pokemon attack if you wait to long. (Which would fit perfectly with the lore, as wild pokemon don’t have to follow the rules of trainer battles)

And that brings me to my main suggestion to improve random encounters:
Since the DS, the games have always been on 2 screens, but let’s be honest here, it doesn’t really need to have the battle menu take up an entire screen.
This got me thinking, for random encounters, we could have the game world on 1 screen, while the other screen shows the battle. This way the player can keep walking when encountering a wild pokemon, and run away from battles by actually walking away.
The wild pokemon could be shown on the world screen as well, and having it go out of screen would be equal to successfully running away.
The battle could have time-based turns, so if you don’t get away fast enough your pokemon can still get hit.

 

Anyway, you might not agree with my solution for the random encounters, but I really think everyone should agree that they need to change.

I know I’m kinda simplifying everything in this post here, but I feel my statement still holds true.

The power of blend maps (or whatever they’re called)

First off, I don’t actually know whether it’s called a blendmap, that’s just what I call it,
what I mean is a grayscale texture that is used to dynamically blend 2 images.

in it’s simplest form, a single numerical value defines the clipping value; for each pixel of the blendmap, if the luminosity is higher than the clipping value image1 is used, otherwise it’s image2.
Most often though, I don’t want a hard cut like that, so instead I use 1 value that roughly determines how much of image1 to use (_BlendAmount), and 1 value that defines the sharpness of the transition (_EdgeSharpness).
Which looks something like this:

float blend = blendColor + (_BlendAmount * 2 – 1);
blend = saturate(blend * _EdgeSharpness – (_EdgeSharpness – 1) * 0.5f);
result = lerp(color1, color2, blend);

Now this might not seem like much, in fact it’s pretty much just an alphamap.
But it’s strenght comes from the fact that it’s great for dynamic transitions from one image to another, in time and/or space, and that’s usefull for a lot of things.
And it’s quite simple and cheap, which is also a good thing.

For example, I used this to make a snow material, that would blend in snow with the diffuse texture, based on the surface normal, using the blendmap in the snow’s alpha channel.
And for fading HUD overlays (like the Frost Effect, and blood splatter when taking damage).

Usage in games

The first time I came into contact with this technique, was when I saw the snow in Uncharted 2 (on the internet, I never actually played the game).
They seem to be using blendmaps for the transition between snow and ground/rocks. (which gave me the idea to make a snow material)

And I believe a lot of games also use blendmaps in general for transition between terrain textures, which looks a lot better than the default fading.
(Which should actually be a little more complex, as it’s not just blending 2 textures, but any number)

But the weird thing is that I can’t seem to find anything about it, I mean, actual documentation (or just even how it’s called),
but maybe that’s just cause I’m terrible at finding things on the internet.

Shoot ‘Em Up! (experimental flash game)

gameIcon

I never play much casual or web based games,
but I do visit Kongregate every so often (though it has been a while),
because they tend to have more original games than the average flash games site.
(or atleast they used to)

I also made some small games available there, mostly fairly rough, not-quite-finished games, like Warmada for example.
But an other one is Shoot ‘Em Up, which this post is obviously about.

One thing I liked about making games for use on Kongregate, are the APIs.
(To be honest though, I’ve never uploaded my games anywhere else, so I don’t know what it’s like on other sites)

One of the APIs is the “Shared Content API”, which allowed users to save content they made in a game, and let others load it.
Mostly used for sharing save games and creating custom levels.

But I started thinking of ways to use the API for more direct gameplay mechanics, for creating a more cooperative gaming experience.

The Concept

I got the idea to make a 2 player co-op game, where instead of 2 players playing simultaniously, only 1 player playes at a time, and the other is a recorded run of someone else.
And after finishing a level, the player could then save his run, and share it with others so they could then play co-op with it.

The idea was to see if this concept could allow for a new interesting experience, given the advantages and disadvantages that come with it.
The main advantages beeing that it allowed players to play together without having to play at the same time, and that any single run could be used for any number of different players, both friends and strangers.
(and smaller advantages beeing the impossibility of there beeing server or connection problems)

ShootEmpUp_small

Since it was gonna be an experiment, I decided it should be a fairly simple game, not too big and easily accessible.
A 2D Shoot-em-up with pixel graphics seemed to be a good chose, as that’s one of the more easy games to make (seeing as how Warmada was made quite fast).

Well that turned out quite differently.

seu2 seu3 seu4 seu14

The Development

I liked making different ennemies, bosses and weapons too much, so it caused me to make the game at lot bigger and complexer than originally planned.
The graphics style was indeed fairly easy to make, but that only caused me to make more and more content.
Other than that, it also proved very difficult to explain the game mechanics in simple and clear ways to the player.

I wanted to emphasise the co-op element of the game, so I tried to make it really about cooperation.
I didn’t want it to be just 2 players shooting trough enemy waves, ignoring each other, I wanted them to help each other and work together.
Now how do you do that when 1 of them is a predetermined recorded run?

Well the biggest ellement I added for that purpose was the gates and gate switches;
some levels where devided in 2 parts, 1 for each player, with gates blocking their paths and gate switches that opened the gate when shot, but the key beeing that the switches for Player1’s gates where in Player2’s part and vica versa.

Gates Gates2

And another was a weapon, the helix cannon.
It shoots a beam of red and blue particles, that can move through walls, in a sin-like wave.
But when both players had this weapon equipped, their beams would be drawn towards and spiral around each other. Beacuse of this the players really had to keep track of each other and act in accordance.

helix1 helix2 helix3 helix6 helix7

The Problems

Having one player beeing completely predetermined causes some issues ofcourse, I anticipated this, but the gravity of it was still much bigger than expected.

Simply put, everything that makes a playthrough different from the playthrough of the recorded run, can cause the recorded player to behave illogically.

For one, this means nothing should happen, even partially, at random. Everything must happen exactly the same each time (except for the active player), otherwise the recorded run would make no sense.
And all the enemies that target a player, always have to target either player1 or player2, they can’t change this based on whoever is closest, cause this would further differentiate it from the recorded run, this unfortunately limits the enemy behaviour.
An issue that can’t be helped, is that when the active player kills an enemy (that wasn’t killed in the recorded version), the recorded player might still try to shoot it down,
and worse, when the active player fails to kill en enemy fast enough (that was killed in the recorded version), the recorded player might fly into it (causing massive damage to the player).

The designs of the levels, and the gates and gate switches, had to be severly simplified,
because originally there where gate switches that both closed gates and opened others, but the problem with this was that it could cause the recorded player to fly straight into a gate, killing him instantly.
And the gate HAS to kill him instantly, as it is a recorded run, and so the only alternative would be making him fly through the gate.

The Result

All in all, I like how the game ended up, though I do not consider it a succes.
The concept has it’s plus sides, but IMO they don’t really outweight the downsides.

The problem basically comes down this:
It’s supposed to be a cooperative game, and that really requires interaction between the 2 players,
but there can’t be interaction when one is prerecorded, there can only be reaction.

It was an experiment, and although it wasn’t a great succes, an experiment is only a failure when you fail to learn from it.

seu5 seu7 seu15 seu23 seu20 seu21 seu22 seu16

You can play the game here:

http://www.kongregate.com/games/Stef1987/shoot-em-up

But make sure to read the instructions before you start.

You can only save your run and share it when you have a Kongregate account (don’t worry, it’s free)

Procedural “Worn Edge”-effect

When texturing some sort of metallic object (a machine, weapon, robot,…),
it’s often a good idea to make the edges a bit worn off, otherwise it looks to clean, and it just makes the object more interesting.


worn-edges example (not made by me)

The way I was taught to do this, was by painting it manually on the texture.
But I always felt this to be kind of a hassle, as these worn edges are often on UV-seams, making it more difficult to paint correctly than anywhere else on the textures.
And it just always seemed to me that this could perfectly be generated procedurally,
as the location and look of a worn edge is more of a technical thing, rather than a design chose.
Like ambient occlusion, you can paint that aswell, but most often you’re better of baking procedural ambient occlusion.

A couple of weeks ago I finally started making something to do this.

I created an editor extension in Unity3D, that allows you to generate worn edges and bake it into a texture.

Here’s an example:

wornmetal_MineBot
Both the rust/dirt and the worn edges (middle and right) where created by my tool.

My first idea was to make this a tool in Blender, but I’m not familiar with Python, and so I wanted to test some things in Unity first. But before I knew it, I had already created the whole outline of how to make it in Unity in my head.
So I started making it in Unity instead, and to my suprise, the development of it went extremely smooth, everything worked as expected, even the things I had to invent on the spot.

wornmetal_editor
The editor extension and a test object in Unity.

Now the tool does have it’s restrictions (for example: it currently only works on hard/sharp edges), but if you keep these in mind it works great IMO.

I’m planning on putting it on the Unity Asset Store,
I still have to make some documentation and screenshots and stuff, those things tend to take way more time than intended. 😦
But other than that, it’s as good as finished. 🙂

EDIT:

Now available on the Asset Store:
https://www.assetstore.unity3d.com/#/content/10674

More info:

https://stevencraeynest.wordpress.com/2014/12/10/worn-edges/
http://forum.unity3d.com/threads/204359-RELEASED-WORN-EDGES-Generates-a-worn-look-for-your-props

Dynamic Frost Effect

So a while ago, while I was making a christmas themed version of a level at work, I was playing the latest SSX after hours.

MetroXmas
The christmas level

There’s a game mode in SSX where you have to stay out of the shadow or you freeze to death, they visualise this by putting more and more frost on the screen.

I quite liked this effect, and thought it would be nice to include this in the christmas level at work.

Now in essence it’s just an image overlay, but the special thing about it is that when it fades in or out, it doesn’t just get less or more transparent, but the frost shrinks or grows.
I figured they must be using a blend map or something alike to achieve this,
which is how I then made it.

Here’s what it looks like:

sharp35 sharp65 smooth75 smooth100
this is the frost effect I made, not the one in SSX

Distortion

After making this, I thought it would be even better if the ice also distorts the view.
Since the frost effect was already a post effect, this wasn’t that difficult to implement.

What I did was create a normalmap from the frost texture.
This is used to determine the direction of the distortion, and the amount of distortion is relative to the opacity of the frost, together these define the sampling offset.
(It’s a screen space image distortion, so the distortion works by just sampling the source image with the offset.)

So this is what I got:

melting2 melting1 melting3

I’ve made this post effect available for free on the Unity Asset Store:
https://www.assetstore.unity3d.com/#/content/5337
It requires a Unity Pro license in order to work though.