Author Topic: Tangent Coding  (Read 1272 times)

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Tangent Coding
« on: July 12, 2010, 08:36:00 PM »
So, today I was coming up with some very basic design stuff for the game that I'm currently planning. All of a sudden, I find myself off on a coding tangent. Ever find yourself doing that?

Anyways, from this point on, it's a glut of information about the game that I'm developing and what I did today that led to my tangent. Feel free to provide input / commentary.

Seriously, I don't have much at all about the game itself. The business model that I want for the game is completely designed and I have a vague "in my head" idea of how I want the game to work. But I didn't really have any flavor picked out for the game.

I decided today that I want the game to be very heavily flavored by classic elements. I've decided on 6 elements at this time (air / earth, fire / water, void / spirit). Notice that when dealing with elements, you're also dealing with the opposite of that element!

Right now, I'm thinking that a unit's stats are actually just their affinity with each of the elements. So, a typical stat block might look like:

Air5Fire5Void5
Earth5Water5Spirit5

I thought it would also be interesting if gaining proficiency with a single element would widen the gap of power with the other element. Thus, each pair of elements is given an upper boundary. I've started with 10 for my testing purposes and you can see it reflected above.

If I were to shift the statistics above so that Air affinity was 6 instead of 5, then the affinity with Earth would drop to 4.

Of course, I started with the mid-line table above. But, I kinda thought that felt bland. So, I decided that each unit also needs to designate one of the elements as being primary. A primary element must always be at least one higher than the median of the upper boundary. Thus the example given above now becomes invalid. Here is an example with a primary air unit:

Air6Fire5Void5
Earth4Water5Spirit5

This got me wondering how many combinations were possible. I wasn't thinking very well at the moment (it's seriously hot right now) and couldn't figure out the easy way to do this (5 * 11 * 11 = 605) so I started writing it by hand. That quickly grew tiresome and I thought, "I know! I'll write some code to figure this out!" But I ended up taking a while to make all the opposites work the way that I wanted them to. And, from there, I went off into my own little world making the whole ElementSet class so that changing values affected other values appropriately.

A couple of hours later, I have a complete class with a couple of helper functions for defining the basic elements as well as specifying their opposites and then being able to determine these elements programmatically. So, I now have a way already coded up that I can add to (or rename or subtract) the element list that I have as well as change the upper boundary from the default value (10). Each of these changes can be done with a single line of code.

At the end, I decided there wasn't enough options to suit me and I ended up with the thought that you could increase the upper boundary for a given set of elements. This would, essentially, be unit levels. I came up with a slow progression that still allows me to keep ratios relative.

The formula for the upper boundary progression is:
level * 2 + 8.

So, as an example:
LevelBoundary
110
212
518
1028
2048

With these increases in mind, the new statistics at level 5 would be:

Air14Fire9Void9
Earth4Water9Spirit9

Because Air was larger than Earth, each increase applied to Air affinity. Since all other element pairs were equal, they advanced equally. In this way, the unit still feels like a heavily-air flavored unit with weak earth affinity.

It's important to note that my game is not being built with the thought of allowing player customization of units. Units are pre-generated and the way this behaves just serves as a reasonable default. I could take this same unit and specify (probably via an admin interface) that Air = 13 which would automatically change Earth = 5.

I haven't quite decided how each element will influence game behavior right now. I think that each element will grant a certain benefit if it is the primary element. I'm thinking along these lines:

Air = movement
Earth = physical damage reduction
Fire = magical damage reduction
Water = avoidance
Void = damage
Spirit = regeneration

Maybe you've noticed that I keep listing these elements in a particular order? That's also because I've kind of grouped them this way:

chaos = air, fire, void
order = earth, water, spirit

This game will be a tactical, turn-based game. Current plans are that is will be a PvP only game. Maybe in the future I'll create a PvE side to the gameplay, but I want to focus on solid PvP first.

*Edit - had wrong values in my level progression table. They were the right values, just the wrong columns.
« Last Edit: July 12, 2010, 08:40:00 PM by JGadrow »
Idiocy - Never underestimate the power of stupid people in large groups.


Offline jannesiera

  • Level 35
  • **
  • Posts: 1,026
  • Reputation: +6/-1
    • View Profile
    • BBGameDesign
Re: Tangent Coding
« Reply #1 on: July 13, 2010, 03:31:49 AM »
I like your elements, especially the order and chaos thing. I think you can do a lot with this mechanic, the question is what! How will it affect everything? What are the other actors on the stage and how do they take advantage of this?

Offline Nox

  • Level 35
  • **
  • Posts: 768
  • Reputation: +12/-2
    • View Profile
Re: Tangent Coding
« Reply #2 on: July 14, 2010, 12:08:33 PM »
These and similar aspects are often organized into circular diagram with opposite items opposite to each other and similar beside each other,
but of course this may be sufficient, just sayin'

Otherwise seems fine as a base, though JanneSiera's question is very good

On top of that I fear that elements are kinda...em... overused, but maybe with a good presentation/graphics it might do (magic for example have each color/element coupled with landscape and many other different charasteristics (on top of wonderful graphics) making it more interesting)
Meet us at an IRC irc.freenode.net #bbg as well
https://vimeo.com/36579366 (a must-watch) | Join BOINC - no longer a hype, but you can help never the less

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Tangent Coding
« Reply #3 on: July 14, 2010, 06:23:20 PM »
Yeah, the different part is that these are the unit attributes.

There is no Strength, Intellect, HP, etc.

I think I've decided on some of the primary specialties now. The ability that a Unit has is determined by its primary element. A Unit may use this special power once per game.
Air - Move at twice its speed.
Earth - Cut a Unit's speed in half (within line of sight, lasts 1 turn).
Fire - Negate the damage portion of a melee attack.
Water - Negate the damage portion of a ranged attack.
Void - Deal 1 damage to a Unit (within line of sight).
Spirit - Heal 1 damage to a Unit (within line of sight).

By the way, the damage system isn't numeric it's:
0 Damage = Flawless
1 Damage = Scratched
2 Damage = Bloodied
3 Damage = Broken
4 Damage = Eliminated

Not really married to the condition names, but, essentially, it's fairly easy to quickly eliminate Units.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline jannesiera

  • Level 35
  • **
  • Posts: 1,026
  • Reputation: +6/-1
    • View Profile
    • BBGameDesign
Re: Tangent Coding
« Reply #4 on: July 15, 2010, 04:31:21 AM »
Ah, quick elimination is sweet! I like it because it can give a more realistic feel of tactical combat where evasion is important, where every hit means something. Also, it might be an interesting addition to weaken a unit's abilities based on how much damage he has (like in some shooters it becomes more difficult to aim and run when you're hit, etc).

Another tip: I think that it's good you start with some concrete abilities and more or less concrete game mechanics so keep on doing that. Though, for the sake of your game you're probably going to need to drastically change or throw away some of these for all game elements to work together. You should keep that in mind. You know it already but in this case play testing is extremely important and the ability to look at each new set of rules as if it were a completely new game.

Keep us up to date!

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: Tangent Coding
« Reply #5 on: July 15, 2010, 07:11:37 AM »
This game will be a tactical, turn-based game. Current plans are that is will be a PvP only game. Maybe in the future I'll create a PvE side to the gameplay, but I want to focus on solid PvP first.
I love how you added this at the very bottom of the post, as if these elements were equally (or even more) important than the basic gameplay :D

Take a note that it is almost impossible to properly invent elements system if you do not know the basic combat system. Elements are going to merely modify the basic combat system. If no basic combat exists yet, it is too abstract to decide how should these modify something that you don't know how it will look like.

Quote
Ah, quick elimination is sweet! I like it because it can give a more realistic feel of tactical combat where evasion is important,
A quick elimination could turn a game into "first strike" game. The unit which hit first kills enemy. Meneuverability becomes everything and it could lead to tactical stalls (like everyone stays out of range, the first unit to move will come into the range of the enemy unit next turn and effectively dies without doing any damage to enemy, so everyone stays and do not move).

Take a note that Chess is the game with perfect quick elimination rules, imagine you would be playing with only paws (no ranged units), the first to move would die.

Offline jannesiera

  • Level 35
  • **
  • Posts: 1,026
  • Reputation: +6/-1
    • View Profile
    • BBGameDesign
Re: Tangent Coding
« Reply #6 on: July 15, 2010, 08:21:14 AM »
Quote
Quote
Ah, quick elimination is sweet! I like it because it can give a more realistic feel of tactical combat where evasion is important,
A quick elimination could turn a game into "first strike" game. The unit which hit first kills enemy. Meneuverability becomes everything and it could lead to tactical stalls (like everyone stays out of range, the first unit to move will come into the range of the enemy unit next turn and effectively dies without doing any damage to enemy, so everyone stays and do not move).

Off course you are right but every system has it's weak points. This isn't worse than any other system concept.

Quote
Take a note that Chess is the game with perfect quick elimination rules, imagine you would be playing with only paws (no ranged units), the first to move would die.

Ah, yes! I also thought about chess, forgot to mention it though. What I like about JGadrow's idea is the fact that each unit has more than one hit point. Though, not too much. It depends on where he wants to go with it but I think a system where each unit has 4 HP and can only do 1 or 2 damage. (single strike = 1 dam, double strike = 1 x 2 dam, super strike = 2dam).

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Tangent Coding
« Reply #7 on: July 15, 2010, 02:17:05 PM »
@Chris, yeah, the post was kinda meandering. I didn't really even mean to get into a discussion on game mechanics when I started writing it, but that's where I ended up. lol It was an odd day for me where thoughts kept going on a chain-reaction into other ones.

And your thought on Chess with all pawns as first to move loses isn't exactly correct. Depends upon which pieces you and your opponent move in order. Still, it would be pretty stale gameplay. ;)

And, yes, I want mobility to matter.

@Janne
The system that I have for combat now works based on levels. An attack always uses the Unit's primary element (at least right now, playtesting might force me to change it). To counter the attack, you compare the value against the defender's value of the opposite element.

So, if you attack with a primary air of 6 (lowest possible attack value) and the defender has a score of earth 12 then the attack fails. However, if they have a score of earth 6, the attack succeeds (attack wins ties).

There will be 5 levels to units, but not in the traditional "level up" sense. The units do not advance / change levels. When you construct your team, you can have more low-level units, or fewer high-level units. The trick is that you should always be able to counter the unit with equivalent level units.

Anyways, the formula for dealing damage is max (attacker's level - opponent's level, 1). Thus, higher-level Units can eliminate lower level Units in less attacks. However, even the highest level Units can be brought low by 4 level 1 Units if they have the proper attack power.

And, yes, this does mean that sometimes it is impossible for a Unit to strike an opponent with a standard attack. But, the game won't only be about standard attacks. Units will also have abilities that might give them an edge, deny an opponent, etc. Gotta get this to a full prototype still, but I think that this system will actually be balanced and promote the fact that you need to build a well-balanced team. Not just throw a bunch of high fire power earth units together and you're unstoppable.

For instance, you could have a level 5 Earth Unit. With the following abilities:

Air0Fire9Void9
Earth18Water9Spirit9

This Unit would be nigh invulnerable to all but the most powerful air Units. However, an earth Unit with the most lowly attack power (6) could easily score hits against this powerful adversary. Exceptionally powered level 1 Fire, Water, Void, or Spirit Units (10 / 0 abilities) could also damage this unit.

Again, playtesting will tell the tale, but I think this is a simple core mechanic that still adds an overwhelming amount of diversity and tactical value. :)
Idiocy - Never underestimate the power of stupid people in large groups.


Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: Tangent Coding
« Reply #8 on: July 15, 2010, 03:51:16 PM »
Quote
There will be 5 levels to units, but not in the traditional "level up" sense. The units do not advance / change levels. When you construct your team, you can have more low-level units, or fewer high-level units. The trick is that you should always be able to counter the unit with equivalent level units.
There was a famous game (but not famous enough to me remember its name :)) that used this system.
You could deploy level 1, 2 or 3 units on the battlefield. The total number of levels your army had was limited by the balttle level (on battle level 5 sides can have 5xlvl1 or 3xlvl1+1xlvl2, etc). The nice twist was that that there was another quota of levels for abilities and equipment. In addition, a unit could not have more levels of equipment than its level. So you had 5 levels to distibute for units and 5 levels to distribute for abilities and equipment.

Offline jannesiera

  • Level 35
  • **
  • Posts: 1,026
  • Reputation: +6/-1
    • View Profile
    • BBGameDesign
Re: Tangent Coding
« Reply #9 on: July 15, 2010, 04:35:47 PM »
It strongly reminds me of how yu-gi-oh! capsule monster chess like I read in the manga. The rules / content weren't explained very detailed but there are 2 video games and 1 board game based on it (never played it though, so wouldn't know how it works exactly). http://yugioh.wikia.com/wiki/Capsule_Monster_Chess

In the manga Yugi has to play a match against some one but he only has lower level monsters. In the end he wins by using his monsters' special abilities. His opponent didn't notice because he was to self-confident with his highest-level-monsters.

PS: I admit I watched yu-gi-oh! on tv when I was younger. I only read (and own) the first 5 mangas but they're waaay cooler than the tv series. People get eaten and burned alive and stuff like that. Very cool. I stopped reading when the manga seemed to get focused on the card game though. Before that he played very different games with high stakes. Definitely game-designer-reading-stuff.

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Tangent Coding
« Reply #10 on: July 15, 2010, 04:45:27 PM »
Yeah, I've got the whole business model for the game planned out. There are actually 3 different revenue generation techniques that I'll be using. But, I'm not going to speak about those at this time. ;)

I think I'm going to leave this post for now and come back when I've got a playable paper prototype... Then it would be awesome if you guys wanted to try it out and offer feedback. :)

I'll probably leave abilities and stuff out of it and do that in another iteration. Just focus on the core mechanic first.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline dsheroh

  • Level 21
  • *
  • Posts: 235
  • Reputation: +6/-0
  • Perl Vicar
    • View Profile
    • Psi Rangers
Re: Tangent Coding
« Reply #11 on: July 16, 2010, 06:28:40 AM »
The system that I have for combat now works based on levels. An attack always uses the Unit's primary element (at least right now, playtesting might force me to change it). To counter the attack, you compare the value against the defender's value of the opposite element.
For instance, you could have a level 5 Earth Unit. With the following abilities:

Air0Fire9Void9
Earth18Water9Spirit9

This Unit would be nigh invulnerable to all but the most powerful air Units. However, an earth Unit with the most lowly attack power (6) could easily score hits against this powerful adversary. Exceptionally powered level 1 Fire, Water, Void, or Spirit Units (10 / 0 abilities) could also damage this unit.

This feels wrong to me.  Shouldn't your greatest vulnerability be to an opponent whose strength is your weakness rather than to one whose strength is the same as your own?  My intuition says that your example Earth 18/Air 0 unit should be nigh-untouchable by Earth, but fall easily to Air, not the other way around.

Which isn't to say that the way you've described it won't work, but I'd expect a lot of player confusion until they've had it beaten into them that your greatest strength is also your greatest weakness.

Come to think of it, though, I think it may also be a bit too symmetric for my taste.  Regardless of whether Earth attacks against Earth or against Air, any unit that has the same Earth + Air total as you do will have exactly as much of an advantage against you as you have against them, which greatly amplifies the "first mover advantage" that Chris brought up.  Personally, I think I'd make the attack pairs circular rather than symmetric (Earth attacks Fire, Fire attacks Spirit, Spirit attacks Air, etc.), which would add more of a tactical element of trying to maneuver your units to attack units they're advantaged against while avoiding units they're disadvantged against, which isn't really possible when the combat system dictates that, for enemy units at the same level, the ones you're strong against will also be just as strong against you.

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Tangent Coding
« Reply #12 on: July 16, 2010, 08:55:07 AM »
Yeah, I understand what you're saying because, at first, I had the same issue with it. Until I realized that it made sense. It makes perfect sense that you attack with your primary element. But to defend against an element, you would counter with that element's opposite.

Again, these are my thoughts pre-prototype and they could very well end up changing when I start playing it. I have a playable prototype now with the core mechanic that I've set out. I'm going to give it a few games when I have time and I'll report my findings. :)

Some thoughts that I have are actually reversing the attack method and having it compare your primary element value against your opponent's value of the same element. Also, I may allow you to attack with any element but I think that might be a horrible option.
Idiocy - Never underestimate the power of stupid people in large groups.


 


SimplePortal 2.3.3 © 2008-2010, SimplePortal