Sunday, February 26, 2012

Ring equipment system

This system should be adaptable to any fantasy-themed game.

A human has ten fingers, so why should one be limited to one or two powerful magic rings? Shouldn't one be able to wear a ring on each finger? And why should one wear only one ring per finger? One can easily wear more than one on each.

The reason is game balance. Allowing so many rings would mean that they would have to be pretty weak compared to other equipment, otherwise they would outclass everything else.

So I came up with a system which allows one to wear as many rings as one likes, but many rings disturb each other, so that they don't give their full effect. So the more rings you are wearing, the less effect does each single ring have. My formula is:

Efficiency per ring = 100% * (0.9 ^ (number of rings - 1))

Coincidentally, the effect of this formula is that adding more rings after 10 results in a reduction of the overall stat bonus instead of an increase, so there is no reason to do so. Exhausting this maximum is only advisable when all rings are of equal power. Otherwise the weak rings will drag the strong ones down.

Number of rings Efficiency of each ring Sum of effect of all rings
1 100% 1
2 90% 1.8
3 81% 2.43
4 73% 2.92
5 66% 3.28
6 59% 3.54
7 53% 3.72
8 48% 3.83
9 43% 3.87
10 39% 3.87

In my mage-war system - should I decide to use it - rings should only increase basic attributes and elemental protection. For tactical reasons any offensive elemental specialization should be visible on the character.

Saturday, February 25, 2012

A non-sucking combat system

There is no melee combat, only magic.

Each spell has a casting time of several seconds (so lag doesn't matter so much). You see exactly who is casting what spell and how long it takes (by a progress bar over the casters head) but not what's targeted. When an enemy casts a spell on you (or you assume that you are the target) you have three options:
  1.  move out of range before casting is finished
  2. cast an appropriate shield spell on yourself (you can only have one active at the same time)
  3. hit the attacker with a weak but fast spell hoping to break its concentration (useful when he isn't protected against your element)
Protection spells only protect against one element, so you must be prepared to change them when an enemy attacks with a different one.

Mana regenerates but health doesn't. Not a problem because everyone also has healing magic. But preventing damage with protection spells is always more economic (both in mana and in time) than healing yourself.

SpellDescription
Quick ShieldQuickly cast reaction shield, with a small buffer against one element
Strong ShieldTakes too long to cast to do it spontaneously, but offers a much larger HP buffer when you know what element you will be dealing with
Team ShieldA quick shield on someone else instead of you. Note that you can only have one shield spell active at the same time, so while your teammate is protected you are vulnerable. On the other hand these shields are cumulative, so a large party can make one of them almost invulnerable. You can also use it to help out a party member who is attacked while casting a powerful spell
BoltStandard attack spell.
BlastMuch quicker to cast than the bolt, but less powerful. A useful counter-spell.
StrikeTakes very long to cast, but is deadly when the enemy doesn't manage to do something against it.
HexHuge range, but low damage. Mostly an annoyance and distraction.
BallAn area-of-effect attack,
StormA large area-of-effect attack. It does damage over time, so it can be used for area-denial.
Cast-CancelVoluntarily interrupts the spell you are currently casting. You lose the mana, but you may keep your life.
HealRecovers hit points. Can only be cast when the target is not protected.

Attributes:

Willpower: Your max HP and your ability to avoid interruption while casting.
Intelligence: Damage of your spells
Wisdom: Max MP and variety of spells you can cast
Creativity: MP regeneration

The Spellbook:
Every mage has a spellbook which contains the spells he or she can use in combat. The spellbook can only be edited while in town.  It has a maximum number of pages which depends on the users Wisdom stat. More advanced spells take up more pages.

Spells can gain experience and can be leveled up. For each level, the spell can be enhanced with an upgrade point on damage, range, mana cost or casting time when added to the spellbook. But each enhancement increases the number of pages the spell takes up. So a player might decide to trade power for flexibility.

Equipment:
The most important equipment of a mage are hat, robe and staff (other equipment are gloves, shoes, belt, amulet and rings, but their stat boosts tend to be a lot lower). They tend to enhance only a single element, and also tend to be color-coded accordingly. So when you face an opponent dressed in red, you should prepare your fire shield. Said opponent could, however, be bluffing and has his spellbook filled with spells of entirely different elements. He might not get any equipment bonus for them, but the element of surprise makes more than up for it.

Why MMORPGs suck

Yesterday I felt like playing an MMORPG again (Runes of Magic, to be precise). And soon I remembered why I don't like them: They are boring! Sure, they throw in a lot of gimmicks, ways to advance your character and improve its equipment. But all the icing and decoration on the cake can't mask that the combat gameplay itself - and that's still the core of every MMORPG - is just crap.

You go to a mob spot, click a mob, push your skill hotkeys in the optimal order you've figured out after 10 minutes, and then pick up the drops. Again and again and again and again. Sorry, but that's not an interesting past time for me. Not when you have do do it hundreds (literally) of hours to advance. That's like working an assembly line.

But how could one create a combat system which is more challenging, more surprising, and requires strategic ability or fast reaction? In an MMO you have to deal with two limiting factors: Realtime and network latency. The realtime nature means that you can't pause your game and plan your strategy, like in Bioware single player RPGs. You can't have a combat system which requires fast reactions either (like in the Elder Scrolls single player RPG series), because of the network latency. Everything that happens on the server reaches the player between 100ms and 1000ms later, once in a while even much longer due to a lagspike (and that could mean a very frustrating death in the middle of combat).

But is it really impossible to design a fun combat system around these limiting factors?

Friday, February 24, 2012

Another scenario concept: Technology vs. Magic vs. Religion

A world in which magic, powerful gods ad science fiction technology coexist.

Technology
The followers of technology try to understand the world around them through research. Their enemies are the religious, because the technologists perceive their dogma to understand the world through the holy scriptures instead of verifiable facts as dangerous for the mind.

Government: Democratic
Values: Objectivism

Religion

The religious worship the gods - incorporeal beings of incredible magical power - and get favors from them in return. They believe that the magic users are stealing the magic which rightfully belongs to the gods. In their opinion it is a grave sin for mortals to use the power of the gods directly. For this sacrilege the magic users must be purged.

Government: Authoritarian
Values: Fundamentalism

Magic

The magicians are striving to control and shape the magic powers radiated from all living beings. They realize that ecological damage caused by the technologists is slowly destroying the ecosystem of the world and thus reducing the worlds magic. Their goal is to stop the technologists from harming the ecosystem and thus harming both the magicians and the gods.

Government: Anarchy
Values: Environmentalism


NoviceTankDamage DealerSupporter
TechnologyStudentMutant
A walking biomedical experiment. Mutants always seek to improve themselves through genetic modification, cybernetics and dangerous pharmaceuticals.

Weapon: Maces
Engineer
Gadgeteers always experimenting with new inventions. An engineer takes pride in designing and building their own equipment.

Weapon: Guns
Scientist
The theorists among the followers of technology, always wanting to understand the principles of the world around them.

Weapon: Emitters
MagicApprenticeRune Knight
These magical warriors - while physically merely average - use the arcane powers to enhance their combat abilities. They can conjure magical weapons and use auras in battle to distract and hurt their enemies in melee combat. 

Weapon: Amulets (used to conjure weapons)
Wizard
Masters of directing magic in form of destructive spells.

Weapon: Wands
Sorcerer
These magic users use their power to heal and empower others.

Weapon: Orbs
ReligionAcolyteTemplar
Fanatic warrior monks who defend their church with heavy armor and swords. In combat they pray to their gods for strength and protection.

Weapon: Swords
Exorcist
The exorcists duty is to find the enemies of the church and direct the wraith of the gods onto them.

Weapon: Knives
Priest
Demagogues who preach the word of the gods. They instill fanaticism in their followers and bless them with their gods powers.

Weapon: Staffs

Saturday, February 18, 2012

Implementing WebSocket Part 3

I successfully implemented a WebSocket echo server which receives data from a client and sends it back to it. As you can see here, the data is interpreted correctly by the client. Now I need to implement close frames and other error handling, clean up the code, and then it is ready for integration into the main server.


Theoretically I would also need to implement the Ping and Pong opcodes and fragmentation as well to be fully RFC 6455-compilant, but I couldn't get Firefox to send these packets. I could test it against an own implementation, but then I would have no way to verify that my implementation on the client is correct. When my client would work incorrectly, my server would reproduce the bug, and it wouldn't work with any other implementation. I need to test my implementation against a professional 3rd party client.

Thursday, February 16, 2012

Implementing WebSocket Part 2

I can now read packets from the client.

Fragmentation as well as the close, ping and pong opcodes aren't implemented yet, though (everything is interpreted as binary data).

I successfully received and decoded messages with up to a MB in length. I implemented a message size limit of 2 GB though (the standard theoretically allows up to 16 Exabyte). To be honest I did this because supporting a larger limit would have required more complicated code. But putting a reasonable limit on the max packet size would be a smart thing to do anyway. The server has to allocate all that memory for a packet in advance, so it would be easy to exhaust the servers memory by sending a forget packet which pretends to be larger than it. When I think about it, a much MUCH lower limit than 2GB would be in order to avoid a memory-exhaustion DOS attacks. I couldn't imagine a use-case relevant for me which would require messages larger than a few KB.

Tuesday, February 14, 2012

Implementing WebSocket

I am currently creating a Java implementation of the WebSocket protocol. This will allow me to have a Javascript client with a fast, bidirectional communication with the server. Currently only Firefox and Chrome support WebSockets. But Opera already released a development build with the old hybi-00 WebSockets protocol enabled, but decided not to integrate this feature into the main branch because of security concerns. The current version of the standard has solved these security problems, so I am sincere that they will add WebSocket support to the official version soon. MSIE supports it in version 10 (Win8 only). The Windows 7 versions of MSIE is still a problem, though. There are, however, workarounds for that, like using a little flash animation for network communication.

First I wanted to use the jWebSockets Server, but it turned out to be a everything-but-a-kitchen-sink solution much too oversized for my purpose. So I decided to take a look at the RFC and implement it on my own.

The handshaking with a little Javascript exectuted in Firefox already works. Now I have to implement the hard part of the protocol - the data framing. I implemented RFC protocols before, but never one which required me to interpret and write data on the binary level. It will be interesting.

Monday, February 13, 2012

Monetizing via Crowd Funding

Lately I thought about how I could monetize my efforts.

I personally despise the "Play for free, pay for goodies" business model practices by most MMORPGs. I believe that success in a game should only depend on your effort inside the game, and not on how much real life money you pump into it.

An alternative would be the subscription model, but I can understand that having to pay is a very high entry barrier. It also means that I am obliged to keep the game running as long as people have subscriptions, and any downtime will mean that people are (at least morally) entitled for a refund. It makes management really complicated. Not to mention the bookkeeping and payment handling nightmare.

But an alternative which has (to my knowledge) never been tried before would be to monetize an online game via crowd funding. This would mean that I would create an update, publish some screenshots, and then name my price for activating it. Then I would create a funding campaign on Kickstarter or Crowdtilt, ask the community to donate to it, and as soon as the tipping point is reached I activate the update. Incentives for donating could be:
  • early access to the new content
  • ingame items (which give no actual benefits)
  • Being listed as a donor ingame (as an inscription for a monument, for example)
  • naming rights for non-key ingame locations

I would have the advantage that I can control pretty accurately how much money I make with an update and that I needn't handle any payment details. The players would have the advantage that they can play for free when they want to, and enjoy the game in the same way as those who donate to it. Also, my financial gains are very transparent to the community, creating a relation of mutual trust.

Wednesday, February 8, 2012

Redoing the client in a different programming language

I came to the conclusion that developing the client as a WinJS-only application was a bad idea. The canvas implementation of Metro apps is too slow for what I want to do and I am essentially closing out all people except for the Windows 8 early adopters.

So which programming language to use?


Keeping the client in WinJS:
  • + profit from the Windows 8 early adopters
  • + collect Windows 8 experience
  • - performance is horrible
  • - badly documented API
  • - Testing and development in a VM

 Platforms to dismiss completely: Everything but Windows 8


Client in Javascript:
  • + very accessible, because it requires no plugins and no download
  • + keep much of the existing code
  • + GUI in HTML
  • + users behind proxy servers can play (websocket / AJAX go through HTML)
  • - users behind proxy servers can't be IP-banned efficiently
  • - it's a horrible language for larger applications
  • - annoying differences between browsers
  • - WebSocket is currently disabled or unimplemented in most browsers. Workarounds exist (AJAX long polling), but the performance is unsatisfying.
 Platforms to dismiss completely: only Windows XP with IE8, it would even runs on most smartphones.

Client as Java Applet:
  • + Almost as accessible as JS
  • + Runs on a lot of platforms
  • + share code between client and server
  • + powerful library 
  •  + data exchange via serialized objects is possible (but turned out to be 4x as bandwidth-intense as JSON for some of my test cases)
  • + applet allows integration into browsers
  • - But no communication with the website, because Java DOM isn't supported well enough
  • - Java plugin required
  • - Conspicuous Do-you-trust-this-applet click required unless I do without some crucial features
 Platforms to dismiss completely: Android and iOS

Client in C++:
  • + Very good performance
  • + platform-independent development is possible, but a lot harder than in JS and Java
  •  - development will take longer due to low level stuff I have to deal with
  • - Binary download and installation required

Platforms to dismiss completely: Mac, most Linux distributions (sorry, but I can't create packages for all of them), Android, iOS

Saturday, February 4, 2012

Added exp gain

Today I added simple exp gain from killing mobs. This wasn't on my milestone plan yet, but I felt like getting some small but crucial feature going.