- player learns how to equip an attack spell
- player kills some non-aggressive, they drop a piece of equipment
- player learns about equipment
- player fights some aggressive enemies
- player gets a healing spell and is instructed to heal to full hp
- player learns about trading by selling the loot of the monster they just fought and buying a barrier spell
- player is instructed to use the barrier spell to survive a gauntlet-like scenario
Wednesday, November 28, 2012
Script for the tutorial
Some new spell icons
Here are the icons for the fire spells.
Saturday, November 24, 2012
Friday, November 23, 2012
Procedural spells part 2 (gallery)
Here are some procedurally generated spells:
This is a common firebolt of rarity level 0. Its MP cost is slightly lower and its damage and range are a tiny bit above normal. But it's still pretty average. It serves as a baseline for the more interesting, rarer, spells below.
Here is a rarity 2 Fire Blast spell. Blasts are deluxe-bolts. They are more powerful, but harder to cast. This one has a whooping 60% more damage without even costing more mana, but pays for it with a longer casting time. A great combat opener.
This Fire Trick spell has reduced range, but a very short casting time. This makes it possible to spam it in close combat. A good damage dealer.
The higher the rarity, the more interesting do the spells become. This rare-grade (rarity 4) fire strike got the "ethereal" modifier. That means that it reduces the targets MP instead of HP. It won't kill the enemy, but it will prevent it from casting spells. It also comes with a great range and good damage. And it's also pretty low-cost. This makes it even better suited for MP warfare. Too bad that it has such a long casting time.
I used to be a wizard like you, but then I got a fire arrow to the knee. Pretty great range and spam-able. Unfortunately it's very mana-hungry.
Rare means "interesting", but not necessarily "good". This rarity 5 spell has great damage and is really cheap to cast. But it has a very long casting time and a low range. Any smart enemy will be out of its range when it's finished. Still, a very economical way to get rid of dumb enemies.
Now this one is cool: A splash damage spell. It damages enemies in a radius of 2 tiles. And it has a great range to boot.
And that was just the very first version of my spell generator. A lot more special abilities will be added for even more interesting strategies.
This is a common firebolt of rarity level 0. Its MP cost is slightly lower and its damage and range are a tiny bit above normal. But it's still pretty average. It serves as a baseline for the more interesting, rarer, spells below.
Here is a rarity 2 Fire Blast spell. Blasts are deluxe-bolts. They are more powerful, but harder to cast. This one has a whooping 60% more damage without even costing more mana, but pays for it with a longer casting time. A great combat opener.
This Fire Trick spell has reduced range, but a very short casting time. This makes it possible to spam it in close combat. A good damage dealer.
The higher the rarity, the more interesting do the spells become. This rare-grade (rarity 4) fire strike got the "ethereal" modifier. That means that it reduces the targets MP instead of HP. It won't kill the enemy, but it will prevent it from casting spells. It also comes with a great range and good damage. And it's also pretty low-cost. This makes it even better suited for MP warfare. Too bad that it has such a long casting time.
I used to be a wizard like you, but then I got a fire arrow to the knee. Pretty great range and spam-able. Unfortunately it's very mana-hungry.
Rare means "interesting", but not necessarily "good". This rarity 5 spell has great damage and is really cheap to cast. But it has a very long casting time and a low range. Any smart enemy will be out of its range when it's finished. Still, a very economical way to get rid of dumb enemies.
Now this one is cool: A splash damage spell. It damages enemies in a radius of 2 tiles. And it has a great range to boot.
Spells can have more than one special ability, like this rarity 6 spell. The combination of ethereal and vampiric is special: It doesn't destroy MP, it steals MP. You've spotted a target, but you are too low on MP to engage it? No problem, with the reduced casting time and godly range of this spell, you can steal all MP from an enemy before it even notices you. And then you can kill your helpless victim with its own MP.
And that was just the very first version of my spell generator. A lot more special abilities will be added for even more interesting strategies.
Wednesday, November 21, 2012
Procedural spells part 1
I made the first step of procedurally generated spells.
There is no longer a list of learned spells. Instead of that, the player drags spell scrolls directly into the quick bar. Each spell scroll is now an individual item. The attributes of the action it performs are now stored in the database.
Now I just need the code to generate spell scrolls with randomized action attributes. This is going to be interesting...
The client still needs work. Dragging scrolls into the quickbar and using them is technically functional, but the spells in the quick bar don't have icons yet.
There is no longer a list of learned spells. Instead of that, the player drags spell scrolls directly into the quick bar. Each spell scroll is now an individual item. The attributes of the action it performs are now stored in the database.
Now I just need the code to generate spell scrolls with randomized action attributes. This is going to be interesting...
The client still needs work. Dragging scrolls into the quickbar and using them is technically functional, but the spells in the quick bar don't have icons yet.
Thursday, November 15, 2012
Get rid of accounts?
After I moved into my new apartment I again have some spare time for my game. I wonder if I should maybe get rid of accounts and instead have passwords for the characters themselves. Really, what do I need accounts for? I don't plan to bill by account, and when a player wants more than one character, they can just register a second one. Having accounts just adds a whole lot more complexity without actually adding much value.
Any per-account limitations I could enforce would just cause people to register multiple accounts to circumvent them. Any per-account perks for players, like easier item exchange or easy switching between characters, could be substituted by adding a "link character" feature. You log into characer A, click on "link account" and enter the name and password of character B. Now the two characters - as well as any characters already linked to them, are then considered to be owned by the same player. The player can then switch between them without needing a password and can easily exchange items between them.
This would allow to have "lazy registration" like, for example, in forumwarz. The player can play the tutorial without registration and is prompted to register after completing it. This results in a really low entry barrier.
Any per-account limitations I could enforce would just cause people to register multiple accounts to circumvent them. Any per-account perks for players, like easier item exchange or easy switching between characters, could be substituted by adding a "link character" feature. You log into characer A, click on "link account" and enter the name and password of character B. Now the two characters - as well as any characters already linked to them, are then considered to be owned by the same player. The player can then switch between them without needing a password and can easily exchange items between them.
This would allow to have "lazy registration" like, for example, in forumwarz. The player can play the tutorial without registration and is prompted to register after completing it. This results in a really low entry barrier.
Friday, October 19, 2012
Roadmap update
I hadn't had a roadmap update in a while, so time for a new one.
Milestone 8 (wealth):
Milestone 9 (adventuring):
Refinement 1: HTML and CSS
The newest beta of my favorite browser Opera finally supports real WebSockets. Unfortunately there are a lot of layout problems (unrelated to canvas support). I need to get the UI to render properly on it, too. There are also some other layout problems, like the inventory grid not being exactly square in all situations.
Refinement 2: Movement
Since I declared my space partitioning and my route finding algorithm for working, I encountered some glitches which need to be addressed.
Refinement 3: Performance
The client framerate fell a lot lately. I need to find out why and optimize it so I get at least 20 Fps on my Intel Atom notebook.
Refinement 4: Game System
Refinement 5: Mob AI
I skipped a few AI strategies I had planned. These still need to be implemented:
Refinement 6: Attract Mode
Observer random locations in the background during the login sequence.
Milestone 8 (wealth):
Items and Inventory-
Dropping items - Splitting and combining item stacks
Player tradingTrading cashShopsSelling itemsItem stack sizes in trade windowItem information system
NPC interactionScripting
Permission management- Database logging of
LoginsAdministrative actions- Usage statistics
Prevent multi-logins- Brute force protection
- Animated sprites
- Animated tiles
- Particle effects
Refinement 2: Movement
Since I declared my space partitioning and my route finding algorithm for working, I encountered some glitches which need to be addressed.
- Suboptimal routes in some situations
- wrong blockmap calculation in some cases
- one time I got stuck in a tree - reproduce this (or at least create automatic unstuck)
Refinement 3: Performance
The client framerate fell a lot lately. I need to find out why and optimize it so I get at least 20 Fps on my Intel Atom notebook.
Refinement 4: Game System
- Resistances
- Damage randomization
- Misses? Critical hits?
Proceduarally generated spellsRest System
Refinement 5: Mob AI
I skipped a few AI strategies I had planned. These still need to be implemented:
- Attack strategies:
- Pursuit
- Stalk
- Flee
- Roam strategies:
- Guard
- Target strategies:
- Best attacker against team
- Closest to team
- Last attacker
- Last attacker of team
Refinement 6: Attract Mode
Observer random locations in the background during the login sequence.
Thursday, October 18, 2012
Item code improvements
I made a lot of under-the-hood improvements to the inventory handling code on the server. I made it more robust by throwing exceptions when an operation isn't possible instead of just returning null or false. I also added a crude transaction system in order to be able to easily roll-back inventories should an error occur during trade completion. It's crude in the sense that it creates a complete backup copy of the inventory content, and in case of a rollback it empties the content and restores it from the copy. I could do this more elegantly when I would invest some time, but the code isn't performance-critical and I want something simple which doesn't leave much room for bugs.
Any glitches in the inventory code could cause serious, permanent harm in the game by duplicating or destroying valuable items (and I already found and fixed bugs which caused both), so the quality of the inventory handling code is very important.
Any glitches in the inventory code could cause serious, permanent harm in the game by duplicating or destroying valuable items (and I already found and fixed bugs which caused both), so the quality of the inventory handling code is very important.
Rest system
Lately I was again thinking about how I can make my game attractive to those players who already have jobs and thus can't treat an online game like one.
To get some mental input on this I asked this question on gamedev.stackexchange.com. I was actually pretty surprised to get an answer from someone like Josh Petrie, a Guild Wars 2 developer. But the other people who answered and commented also had some interesting points.
I decided that the first thing I will do to level the playing fields will be a rest system. After a lot of number crunching in LibreOffice Calc, I came up with a rest system which works like this:
For every minute - online or offline - your character gets a "Luck" point (60 per hour, 1440 per day, 10080 per week). Your character has a luck bonus which is equal to log10(luck)-1.
All gains of skill EXP and SP are multiplied with your current luck bonus. The chance to get rare drops is also increased: Whenever you kill a monster, you roll ceil(luck_bonus) times for each drop. One successful roll is enough to make it drop. When multiple people kill a monster, the best luck bonus of all participants is used.
Every minute where at least one event occurs which uses the luck bonus, the luck points are reduced by 1% (that means your luck will never fall below 100, so your luck bonus will never be below 1).
So when you go to sleep at 10pm and continue the next evening at 8pm (after 22 hours) you will have 1300 luck points, which means that you will get a x2.1 multiplier for a while. After your 120 minute session, you will have about 400 luck points left, so your bonus will have dimished a bit to x1.6. These 400 points will roll over to the next day, where you will have a multiplier of 2.3.
Let's compare that to an unemployed power gamer, who will play 8 hour session, interrupted by 16 hours of rest. He will have 960 luck points the next morning, which is still a bonus of 1.98, not notably worse than yours. But after four hours, his luck bonus will be depleted and his exp rate won't get far above x1. It won't be above 2 the next day either.
Variables for balancing:
To get some mental input on this I asked this question on gamedev.stackexchange.com. I was actually pretty surprised to get an answer from someone like Josh Petrie, a Guild Wars 2 developer. But the other people who answered and commented also had some interesting points.
I decided that the first thing I will do to level the playing fields will be a rest system. After a lot of number crunching in LibreOffice Calc, I came up with a rest system which works like this:
For every minute - online or offline - your character gets a "Luck" point (60 per hour, 1440 per day, 10080 per week). Your character has a luck bonus which is equal to log10(luck)-1.
All gains of skill EXP and SP are multiplied with your current luck bonus. The chance to get rare drops is also increased: Whenever you kill a monster, you roll ceil(luck_bonus) times for each drop. One successful roll is enough to make it drop. When multiple people kill a monster, the best luck bonus of all participants is used.
Every minute where at least one event occurs which uses the luck bonus, the luck points are reduced by 1% (that means your luck will never fall below 100, so your luck bonus will never be below 1).
So when you go to sleep at 10pm and continue the next evening at 8pm (after 22 hours) you will have 1300 luck points, which means that you will get a x2.1 multiplier for a while. After your 120 minute session, you will have about 400 luck points left, so your bonus will have dimished a bit to x1.6. These 400 points will roll over to the next day, where you will have a multiplier of 2.3.
Let's compare that to an unemployed power gamer, who will play 8 hour session, interrupted by 16 hours of rest. He will have 960 luck points the next morning, which is still a bonus of 1.98, not notably worse than yours. But after four hours, his luck bonus will be depleted and his exp rate won't get far above x1. It won't be above 2 the next day either.
Variables for balancing:
- Increase the percentual luck reduction to make the multiplier go down faster
- Increase the luck gain per minute to increase the exp multiplier after shorter rests
- Reduce the base of the logarithm to increase the exp multiplier after longer rests
Friday, October 12, 2012
Network session logging
A small change, but one I could be very grateful for in the future: I added logging of sessions on the database. Every connection to the server is now logged with:
- Time of connect
- IP address
- When it's a websocket connection:
- HTTP headers sent by client (including User-Agent)
- Whether or not this header was accepted
- Accounts the user logged into successfully (maybe I should log failed attempts, too?)
- Time of disconnect
Subscribe to:
Posts (Atom)










