Monday, January 30, 2012

How Not to Create a World

Yesterday I was playing on my favorite surivival minecraft server, and a new player to the server got killed twice in a row by another player. His kill logs popped up first, and then the complaining started.

"Why didn't I see the PKer on dynmap?? He isn't on the map."
"Because he is a donator, he can hide himself from the map"
"That's not fair he is giving $$ to be more powerful"
"If you don't think its fair then you should donate too and he won't be able to find you to kill you"
"He is contibuting to the server, he deserves it"

About 3-4 people on the server put in their 2 cents, telling the new player to deal with it and that donations "are to help the server". I was the only person who told him that I agree, but put a disclaimer to him that this server isn't nearly as bad as many others. Which was true, I know because I spent weeks looking for a minecraft server that fits all my personal specifications, and I found myself right back where I started. A good half of the servers I visited during those weeks have donator incentives that make them god-like (sometimes literally), admin powers, and unlimited items/blocks.

The next day I visited the forum of my minecraft server to see that the same newbie complaining about donators being able to make themselves invisible on the minimap had posted 2 threads asking to be unbanned. One thread was created after the other one was locked; it was locked after he mentioned donator incentives being unfair. Apparently, he had been 'whining' too much. Sorta true, I thought to myself... When I was online the day before he was going on about it quite a bit more than I would... And he must have continued doing that because I was not there when he was banned.

So why does this bother me so much? Maybe it is because I am a little jaded, having spent 5-10 years casually programming websites and multiplayer video games myself from scratch yet making only $25 or so a month despite all this work, which I put back into advertising the game, whereas a minecraft server has more advertising outlets like server listings. I see my minecraft server raking in $50 every few days and it makes me cringe. Maybe I feel bad for the original creator of minecraft, who is seeing none of the money (like many, this server is a cracked server, meaning you can play it with or without a purchased copy of minecraft) while some random guy is 'raking it in'. Maybe it is because I have run servers before for first person shooters, and I run servers for my own multiplayer games now, and I know that a lot of the time these are being hosted off of our home computers and are costing us $0 but making us gods in our own little world. I see people playing on this minecraft server and tip-toeing around the owner and moderators, kissing up to them, etc and think to myself, they don't really deserve this. The work they have put in does not deserve the reward they have been given (not that this is unusual in the U.S.). I wonder if maybe I should open my own server (I know it takes a lot less time than some of the players say it does), but it would be difficult being so bogged down with grad school, so I don't open one yet. I am far beyond getting thrills out of being 'powerful' in a game community anyways, so I would just be doing it for the $$ and enjoyment of playing with some new software. And I keep playing on this server, and I donate myself because I need those perks to enjoy the game to its fullest, but I feel a tinge of guilt knowing that I am contributing to something twisted. That leads me here to rant about it because we all know that if I posted this on my servers community forum that it would be ridiculed and locked.

I am not arguing against a free-to-play structure, but against original games being exploited for money by players hosting multiplayer servers. This is only worsened by the pay-to-win attitude that comes a long with many of these servers, which I am also strongly against.


Monday, January 16, 2012


I want to draw attention to recent article by Raph Koster, known for his work in MMORPG's and MUD's as lead designer and his 'theory of fun'. His work as a game designer has helped mold the first 20 years of online RPG's, and hopefully we will see more of his influence in the future.

The article is about immersion, what it is, and how developers have lost video games immersion in exchange for a wider audience. You can read the first part of the article here and the second part here.

"Games didn’t start out immersive. Nobody was getting sucked into the world of Mancala or the intricate world building of Go. Oh, people could be mesmerized, certainly, or in a state of flow whilst playing. But they were not immersed in the sense of being transported to another world. For that we had books.

... "Things that we once considered essential to games drift in and out of fashion. And I think immersion is one of those.

"Immersion does not make a lot of sense in a mobile, interruptible world. It comes from spending hours at something. An the fact is that as games go mainstream, they are played in small bites far more often than they are played in long solo sessions. The market adapts — this reaches more people, so the budgets divert, the publishers’ attention diverts, the developers’ creative attention diverts."

I thought that the article was incredibly insightful and and chilling. It really does describe the current climate of MMOs and the way that things have changed from making immersible virtual worlds into making quick cash. It probably started in 2002 and 2003, when MEO was cancelled to be replaced by the linear LOTRO and World of Warcraft was released. And of course in 2004 when SWG was changed to be more mainstream.

The people in charge of these game companies used to be gamers, and once contributed to industry with interesting, immersive games. Now they squabble to follow mainstream market trends and copy previous successes to a T.

Heres something interesting that reveals some of Raph's feelings about the direction his industry has gone in:

I mourn. I mourn the gradual loss of deep immersion and the trappings of geekery that I love. I see the ways in which the worlds I once dove into headlong have become incredibly expensive endeavors, movies-with-button-presses far more invested in telling me their story, rather than letting me tell my own.

I truly feel sorry for Raph. Our industry deserves better, and he deserves better. He didn't write that because he wants pity, he wrote it because he is truely passionate about virtual worlds and it is difficult for someone like that to participate in today's gaming climate professionally. I have always been a game designer at heart and now I am very glad that I am going to optometry school instead of attempting to participate more heavily in the game industry. I often wonder why it has been so long since Raph has worked on a AAA mmorpg; he could probably get a decent job as a designer; he has a ton of experience. And I think I understand now that he is unwilling to sell out the way other MUD/game designers have.

I hope that WORG can someday be seen as a glimmer of hope in what has become a mechanical and calculating industry.


Saturday, January 14, 2012


I have been reading an interesting set of powerpoint slides by Richard Bartle, who you may have heard of because he is the person who came up with the 4 types of gamers... Achievers, socializers, explorers, and killers. In his presentation he talks about what he calls 'Gamification'. Anything can be gamified by adding rewards to it, even if it is not intrinsically enjoyable. We see this done to get kids to do their homework, etc, and to draw RPGs out so the game lasts longer. Check out the article here.

It starts to get good a little before halfway through. Here is quote that you might need to read some of the power point before you get completely:

"Gamification is basically bribery... You reward someone for doing something that you want them to do. It can be regular or irregular. Regularity: “pull this handle 20 times and we’ll give you £1”. Examples of this is your everyday employment: Vanilla gamification. Irregularity: “pull this handle and there’s a 5% chance of winNing £1”. This is like gambling, which is advanced gamification. This is starting to look like a variable ratio reinforcement schedule, a psychological topic of study. You might know it as Operant conditioning, which is very interesting if you have stuff to sell.

"Game designers studiously avoid operant conditioning (for extrinsic rewards). It’s not really fun- fun is intrinsic, not extrinsic. It’s an admission of failure. It means the gameplay is too weak on its own. Also it’s only usable on naive players, and once they’ve learned the pattern, they avoid it. Finally, it’s immoral!"

I think that this is interesting at the least.... And very real in todays MMO climate. In other parts of the industry as well: With all the games coming out for phones, etc, operant conditioning is at its peak. I am sure a lot of you have played these games that are on phones these days, and they are not like the games that came out on the early game systems in the 90's, despite the controls being simple and graphics being 2D. Many of these top selling games have been molded into mathmatical perfection. Simplistic, quick, and with all those bells and whistles to peak your excitement at all the right times.

And we see this in MMOs today, big time. If you read the slide I put here on the right, it basically is a prediction by Bartle that casual gamers will eventually catch on to the conditioning they are being put through by these games, and become bored with them. That would mean the $$ that is to be made from using over-gamification would no longer be useful on the masses (just children, I suppose).

Lets take World of Warcraft for example; just because a lot of people play warcraft does not mean it is a good game. Firstly,warcraft'smarketing was astronomical. But aside from that,the vast majority ofwarcraftplayers have never encountered a game with so much gamification- reward systems based on operant psychological conditioning, and therefore they fall prey to it easily. One reason why they might not migrate to another warcraft-like game is because they are starting to see through the mundane meaningless conditioning system that warcraftused on them and they are unwilling to fall prey to another game in that same way.

I think that he is being a little too optimistic. But I am focusing 99% on intrinsic value for my game anyways. I want to create game play that makes activities in the game valuable on their own and according to each player.


Friday, January 13, 2012

amfPHP Woes

the simple and helpful amfPHP UI. 

I have finally finished going over all 22 of my PHP scripts that act as intermediaries between the game client and server.  Now its time to work on the client!  It has been taking a lot more time than I previously thought but it is still worth it.

It is amazing how messy the code was before compared to after integrating amfPHP.  I am very excited to see the change and can honestly say that my code is starting to look professional.

Major pieces of code and general
game structures are documented.

On the right is an excerpt from the games documentation.  I have been documenting information about the creation of this game so that in the distant future I can continue work on the game at my leisure, and so that another programmer could take over or assist with the project someday. I will do a blog post about my views on documenting sometime.  You might also notice it says "grass1" as a variable being sent into amfPHP.  That is a discrepancy from mapping not being completed.  Right now, every area always has grass.  Eventually I would like there to be several backgrounds to choose from for different parts of a world.


Sunday, January 8, 2012

Client to Game Database Communication and amfPHP

Client side scripts as done in this
tutorial, which I do not recommend
as it is outdated.

Today I am going to post a bit about how the game client communicates with the game database.  It is going to be pretty technical.

WORG will feature a ton of information from the games database, and the client will be constantly communicating with the server to update each other on what is going on in the game world.  More than ever, I needed a good way for the client and server database to communicate, but until today I lazied it up using the same old newbie URL calling.

I am not very good at adopting 3rd party scripts, but in this case it was incredibly easy.  Easier than doing it the traditional method, in fact.  I should have done this years ago.  I am now using amfPHP, and this is not a real review of it as I am not a real programmer, technically speaking, but wow is it handy.

Before explaining how amazing amfPHP is, let me explain how I used to have my client software communicate with my servers database.  Using traditional URL calls, the client would send any variables needed to a PHP file on my website.  This URL call would be 10-15 lines long, depending on how many variables are being sent because each variable had to be given a name and a value in its own line on the client code.  Variables could be string only, so if I wanted to send an array I would need to first convert it to a string.  Most of the time they are arrays, often they are 3D arrays, and I have never been able to get the serialize() function in AS3 to work for me, so I combine the array manually using .join() and .split().  If you are a professional programmer, you are laughing right about now.

The PHP file takes the variables and looks at one in particular, $request.  $request tells my PHP files what my client wants to do...  There are just so many actions at this point in my games that clients need to do that I did not want each action to be associated with its own PHP file, so I try to group them and then within the PHP use $request to split up each action.  It worked pretty well.  But now we have this intermediary variable that was sent from the client, and it may or may not be named the same name as it is in the client, and it may or may not be named the same name as in the server database.  Usually not.  I would decode the array using split, play with the files, save them to the database, request things from the database, encode those arrays into strings with join, and using variables like &var=value&var2=value2 send them back to the client.  The client would have to once again split up the arrays etc...

Super messy.  And difficult to debug because if I want to test the PHP I have to manually type in variables and values into the URL, and remember all of the variables, and include the $request, and also a $debug=1 because I need to see details that shouldnt normally be shown to the client.  And its easy to forget the variables names when you are debugging!!  Especially because they are arbitrary... They are often not the names used in the client or on the database.

But no longer!  I have known I needed to update this system for a while now...  Ever since I made a script I call MonkeyShark which interfaces mediamonkey and grooveshark's playlist and media libraries.  Grooveshark had this beautiful API to work with, which is essentially a way for 3rd parties (clients) to communicate with the grooveshark database.  You could send requests to it and it would reply using multidimensional (5+) arrays that were very standardized and easy to use.  Why can't I have that??

The interface allows you to test your
PHP scripts with ease.

And now I do!  Not only have I totally cut out a variable from the PHP intermediary, but the client side script, which you can see in the picture to the left here, is about 2 lines long of very clean code that looks much like a simple function call.  Compare that to what I used to use, 10 or so messy lines of traditional URL retrieval.  And look at this great interface, it is so easy to test my PHP.

To sum up how it works, because this post is running a little long...  amfPHP basically allows my client to call to PHP functions as if they were just another function in my client.

I am now converting all my old PHP scripts for Mario, World Builder, and WORG to amfPHP.  I meant to do debugging today, but this is some serious code optimization and is also very important part of my current debugging phase.  Not using amfPHP would have driven WORG out of control with messy code.


Wednesday, January 4, 2012

Dynamic Warfront & Clans

WORG's very first map.  Black represents
one low level clan, and red represents
another.  Can you guess where the red
clans stronghold is?
What you see to your right doesn't look like much, but it is a visual representation of this world beginning to come to life.  Everything in this post is already in the game, although I must admit it is pretty buggy.

I have recently programmed in the preliminary code to control the movement of NPCs, Tree Species, and Clans across the game world.  Each world is broken into a 20x20 grid like the one you see here and each piece of the grid is up for grabs by clans.  Clans choose certain zones as strongholds and focus their forces at these strongholds, engaging other nearby clans in battle.

Clans are Unique
Clans are dynamic groups of NPC's with personalities and traits that dictate their movements in an inter-clan war for territory.  So far there are several traits in the server code that are controlling the clans activities...
  1. Civil Unrest controls how likely the clan is to split up into 2 clan groups, one with (Rebel) at its end.
  2. Arrogance controls how likely the clan is to choose a target stronghold to attack which is currently owned by a clan with higher level and momentum.
  3. Aggression controls how likely a clan is to attack wandering players or go to war with other clans.
  4. Wanderlust controls how nomadic the clan is, if the clan has a high wanderlust they will change their stronghold more often.
  5. Level controls how powerful the clans NPCs tend to be.
  6. Momentum controls how well the clan is fairing in war against other clans.
  7. Professional Preference controls what types of professions NPCs of that clan tend to be.
  8. Name Loyalty controls how likely a clan is to change their name.  Rebel clans have a very low loyalty to their name and will change it quickly.  In the future, I hope to make it possible for players to influence the choice of their favorite clans name, and even become the leader of that clan.
NPCs Travel and Battle
Even when players are not playing WORG, the NPCs are battling against each other for control of strongholds and zones.  NPCs tend to stay close to their stronghold, and if that stronghold moves then the NPC will attempt to move with it, travelling across zones.  If the NPC battles with another NPC or with a player and loses, they will die and that specific NPC will be gone from the world forever.

Here is a newer map with 4 clans.  The
person symbols are strongholds, the
shield is a town, the lightning is a
clan's target for their moving stronghold. 
Players Influence the Outcome of Clan Warfare
By killing clan members you harm that clan.  If you and your friends target a clan long enough, you might even drive it out of existence entirely.  This process could take months, however,  And other players who have invested time in building reputation with the clan you hope to destroy will no doubt work to stop you.

Right now this is all in the game, except for reputation building between players and clans.  This is a huge part of what I have been hard at working doing over the winter break, and I am not going to get another chance to work on the game until February.  In February I will be focusing on bug fixes before working on network play.

A note about these Maps
The maps I show pictures of in this blog post are of day 0.  As time passes, battlefronts will become more rigid because the zones surrounded by enemy influence will fall easier than the ones surrounded by allies.

Until then,