Let´s talk about combat - Part 1


Backstory

If you really think about it, Barkley 2 is a very weird game.

What I mean by that is; its so much different from Barkley 1 and, due to being a commercial product, that it had to stop using so many characters that it barely fits in the same "franchise". Many people compares it to "The Lara-Su Chronicles" because of that.

To me, many changes were very interesting. The art style is great, the music is awesome, the writing is so-so and the combat is terrible.

"The combat is terrible"... This is the my current issue. Since the beginning, I was dreading the time where I needed to work on the combat mostly because working on something that I didn't like seems like such a drag.

Check this high quality, 10 years old, early gameplay:

While its "early" in its development, the combat itself is very similar to the Janky demo´s gameplay. From what I can see, it has many issues:

  • The characters are too big for a 384x240 resolution
  • The concept of guns with multiple effects is very fun until you get 2 useless guns and 1 good gun with low ammo.
  • Dodging and dodge rolling with such a big character doesn't feel nice.
  • The UI eats up about 10% of the screen, making things even more cramped.

I also feel that today, we have so many great twinstick/topdown shooters (ex.: CrossCode) that this kind of gameplay pales in comparison.

Porting a subpar gameplay element that I don't particularly find fun doesn't give me the incentive that I need to actually work on this. 


So... what now?

So far, I was able to half-ass a solution during the tutorial gameplay, but now I have to deal with item and weapon data and player stat. This is really forcing my to actually address this issue. What I decided was this:


Yep, lets make a turn based combat system from scratch, trying to recycle as much as possible from the old system.

Because I had no Idea how to make a system like that, I made simple proof-of-concept for that system: https://sanlor.itch.io/rpg-combat-prototype

The prototype was very useful for me to brainstorm ideas. It ended up being an active turn-based combat (Similar to FF6 or Chrono Trigger), with guns/weapons being the "party members".
After finishing the prototype I realized that Barkley 1 already used a similar system.

Just for fun, I even tried to de-compile the original game to see how it worked ( check it out ) but the code was very messy and hard to understand.

"Great, now I just need to backport some code from the prototype to B2, add some flair, some stuff related to guns and we are done" I said... Oh boy...

Issue #1 - Gun Types and Materials

If you ever played the game, you know that all weapons behave differently, there are A LOT unique gun sprites. each gun can have 2 affixes and 1 suffix, granting further modifiers and different behaviors. There are 81 gun materials and 26 gun types.
This is what I was talking about. Can you try to imagine the amount of work that was poured on this system and spritesheet? How can I just scrap it... I need to reuse it.


Normally, you would have some JSON file with all modifiers and traits and one script that decodes it and applies it to the gun, bullet and bullet casings. That is not how the GMS Barkley 2 does it...

This script sets up a new weapon. Its an array / list / dictionary with a bunch of keys. That's not a lot of keys, right?
This script resets all (or some? dunno) keys on that array. That a lot of keys and I don't know how they are used.
This one selects the weapon type and this one selects the weapon material. Please note that its just a fuckton of case statements, conditions, exceptions and weird edge cases (like adding a delay before firing a musket).
This script details each firing behaviour. Its a huge script with a lot of conditions.

What I mean with this? How the FUCK should I do with this? Its a bunch of code that I cant use, but I don't want to waste it.
I also don't want code the weapons from scratch, I really want to use everything I can from the old code.

The solution for this is...

Dunno. Is there a good solution for this? The solution I came up for it was a simple one.

We have a class called "B2_WeaponMaterial" and "B2_WeaponType". Most data from the scr_combat_weapons_applyType.gml was ported to resources using the "B2_WeaponType" class and scr_combat_weapons_applyMaterial.gml was ported to resources using the "B2_WeaponMaterial".

With these classes, we can create the actual weapon using the class "B2_Weapon" along with a ton of others proprieties.

After a few weeks doing that, I finally realized that it was not going to work on the long run... I have a class with hundreds of proprieties that I don't know how to use it. Its a mess and I don't like it, but it works for now.

Issue #2 - Gun placement

Hoopz can face 16 different directions, as well as the weapons. Hoopz is also right-handed, so assault rifles and heavy weapons are held on the right. Try to imagine how can we place the weapon exactly on Hoopz hands when looking at 16 different positions.

The original game had a bunch of different scripts with a bunch of offsets. This was solved by basically copying these offsets and trying to "translate" Gamemaker's functions to Godot.

After 2 weeks of brute-force coding, I was able to make it work.


Each weapon type has a set of offset for distance from the center, h_offsets and v_offsets. Each propriety needs to be rotated based where the weapon is aimed.
The muzzle position (The pink part) is still a bit off and needs to be tweaked. Some weapons like miniguns still look a bit off, and they have a special draw order. No Idea how to deal with this.

On the next part, I will talk about the combat itself.

Get Barkley 2 - Godot Port

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

And yes, I totally agree. The combat in the demo wasn't really good at all...
For some time I've been thinking that it might be best to do Earthbound style combat:

Any enemy you touch, shoot or get damaged by in the overworld, means you're instantly transported to a temporary battle area, where you and nearby enemies get to battle. 

It would have way more space, and could just be made to look similar to wherever you're currently at, be it City, Swamp, etc.

Hey there, thank for the support!
Actually, I did think of doing something like that ( Not like Earthbound, but more like a regular RPG combat ), but I really would like to use most (if not all) existing assets. After seeing how many weapons, weapon animations and all different enemy sprites (moving toward 8 directions, all attack animations and such), hiding the player and/or having a static image for a enemy representation feels bad.

About Half year ago I think I made a simple prototype with a final fantasy 6 (minus the action bar) and I found it to be too boring.

With Hoopz being the only "party member", I had to come up with something to make it "fun".

Here is a somewhat old demo for what I came up.

(1 edit)

Wow :), this exceeds what I had in mind by a lot. The demo looks amazing, and it looks really fun to play, which is the difficult part!

You are very talented, and I agree entirely with your idea of using as much Barkley 2 assets as possible. They look and sound good.


Questions, have you thought about any of the following? 

- If Hoopz chooses to move, does it cost him Action points or anything similar? Does moving limit how much he can fire?

- Also, does Hoopz get the chance to evade enemy fire / strikes in any way? 

- Have you thought about "friendly" or "neutral" NPCs participating in battle? 

Nothing stops you from having a "party" of people that join you throughout the adventure. Maybe they give passive benefits/skills for use? Or maybe you can deploy them to fight alongside you once a battle starts?

If a fight starts, do you battle exactly where it started (for example: a cramped corner, or an alleyway), or are you transported to a bigger fictional area to do the battle? The demo you showed seems like a good size for fighting.

(Chrono Trigger just refocused the camera on the party once a fight began, since the party didn't have to move from their spot.)


Thank you for showing me your Demo concept! It's really nice to see cool game development like this.

(1 edit)

- If Hoopz chooses to move, does it cost him Action points or anything similar? Does moving limit how much he can fire?

Both 'yes' and 'don´t know yet' actually. Initially, that was the plan.
The combat prototype worked like this: Both weapons and the players have 0 to 100 "action points". Certain actions consume some amount of points (ex.: moving costs 30 points, normal attack costs 60 points, a weapon skill costs 100 points, etc).

On the prototype that worked pretty nice, but when porting that code to B2, I changed my mind because of the ammo costs. Managing both the amount of ammo and action points felt weird... Would a "triple shot" skill cost 90 action points and 12 bullets? It seemed too complex using the current system / gameplay loop.

Having said that, Hoopz still have its own action points that he can use to move, use items (???) and defend. Hoopz action point would affect the speed that the weapons action point would increase (ex.: Hoopz AP is at 50, so the weapon AP would increase at 0.5x speed).

- Also, does Hoopz get the chance to evade enemy fire / strikes in any way?

Yup. From the start, I was think that would be pretty cool for the player to wait an enemy attack, dodge the attack and shoot the enemy at a close range, all using menus to do it. The action points and "Active" battle system was made to do just that.

- Have you thought about "friendly" or "neutral" NPCs participating in battle?

I haven't thought of that, but I think that the current battle system can support that.

- Nothing stops you from having a "party" of people that join you throughout the adventure. Maybe they give passive benefits/skills for use? Or maybe you can deploy them to fight alongside you once a battle starts?

The main issue of having a party is the writing and sprite work necessary to make good characters. Those aren't my strong suits lol.
Between having no party members and having some that say nothing interesting and has bad graphic/sprites, I prefer having no party members. Manly, that why I´m trying so much to use only original assets.

- If a fight starts, do you battle exactly where it started (for example: a cramped corner, or an alleyway), or are you transported to a bigger fictional area to do the battle? The demo you showed seems like a good size for fighting.

You always stays in the same map, but Hoopz and the enemies can move to a specific place before the fight. In the Demo, for example, the enemies would move to the '0' and '1' spot, while Hoopz  moves to the '2' spot.


With this, we have some control on how battles would look at the start.

(1 edit)

Very cool, and thanks for replying in detail to my questions.

And yes, I agree with your point about the party members.

I also wanted to mention:

- There's this Kickstarter post, which has a summary of the game's areas, progression, and quests that were planned. You probably know about it already, but I include the link just in case it can help you when designing:

https://www.kickstarter.com/projects/talesofgames/barkley-2-an-rpg-sequel-to-bar...


- Also, someone in TCRF.net has been making a wiki of assets that are not included in the final Barkley 2 version.
Songs and Music in particular!

https://tcrf.net/User:Missile/Prerelease:Barkley_2


- And, the B Ball Tactics Demo is here - I think most people haven't seen it: https://talesofgames.itch.io/basket-ball-tactics

It includes Design Documents! such as work notes and design ideas for Spells/Zaubers, which are not implemented. Maybe they can be of use as reference/inspiration?


Best Regards,

Wow, thanks a lot!

Actually, I really didn't do any sort of research while working on this project. Its actually the first time that I´ve opened the game´s Kickstarter page.
That thing about Al Akibahara is pretty interesting. A while ago I found some scrap of data related to that map and I was able to convert it to Godot. Its not much nor impressive, but its fun to find these things.
I remember looking around TCRF for some info, but I guess I didn't see that. "powerbadboy" is one of my favorite tracks so far, finding an early chiptune version of it is pretty nice.

That BB Tactics game is something I really overlooked, I will take a look at it.

(1 edit)

This is amazing! And your solutions are very ingenious.
Whichever route you choose for developing the game (Turn based RPG or Shooter or in between) I very much look forward to reading your posts and updates.
And remember, the game was not previously finished, so what matters now is how you feel the game works best. It's your vision and you're practical, which this game needs.