Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

1.) MMO From Scratch - Introduction

Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
This is the first tutorial in a series. This is my first go at creating an MMO from scratch, and so far I've run into several brick walls and code rewrites. Join me on my journey to create an MMO from scratch! Along the way I'm going to make bad decisions, use terrible programming practices, and document what I learned here.

I'm using Node.js for the server, and the target client is using HTML5.

The base of the server is documented in this thread: http://forum.ragezone.com/f578/event-driven-practices-classical-oo-1090935/

On the client I'm using .

In this introduction I'm not going to go over any programming at all! I'll just describe the game and jump right over to the second tutorial in the series. I'll also update this post regularly with a table of contents linking all of the tutorials in this series together.

Table of Contents:


  1. Introduction
  2. The AI
  3. Plant
  4. The Client
  5. Players
  6. Players 2
  7. Players 3
  8. Slire Herb
  9. Spring Cleaning
  10. Inventory
  11. Iron Mines & Ground Items

The Game

The game I have in mind at the moment should have the following basic features.

SurfaceTension
An open world pvp, open world construction survival MMO.
Skills


  • Construction: Build structures on claimed or unclaimed land.
  • Lumberjack: Chop down trees.
  • Medic: Heal yourself and other players.
  • Life: Gain more HP and develop a stronger immune system.
  • Melee: Hit harder, wield more sophisticated weapons.



Claim Land

Remember the pioneer days and the wild west? Players may claim 3 pieces of land to build their own private structures, or to simply hoard the resources! Claiming properties is free. Overtime, the player may expand the land. Player may distribute rights to other players. Claim land containing precious resources, and charge others a fee to mine! Plant herbs, wheat, or trees on your land and sell the resources gathered from the offspring. Breed sheep and sell the wool,or the offspring. Build a shop to buy and sell goods. Not good at construction? Hire a contractor to build a structure on your land for you!

Staying Alive


The world is a dangerous place! The player must tend to these stats, in order to stay alive. The life skill makes the player more durable in HP and wellness, but not hunger:

  • Hit-points: Damage is dealt when you are attacked by a player or animal. The more HP you have, the more damage you can take before you die.
  • Hunger: Everyone needs to eat- even the animals. If you don't eat before your hunger reaches 100%, you die! If you have tamed animals, you see their hunger percentage.
  • Wellness: When you get damaged, your wounds may become infected. You may heal over-time if you keep your wounds clean. If you neglect your wounds, your HP will decrease over-time, at a rate which depends on the severity of your infected wounds. Also, there are diseases and illnesses to watch out for! You may become ill from a variety of ways. A good medic can help you stay well. If you are a good medic, you can identify what is wrong with you, and usually fix yourself up!


Death

When you die, you drop everything you have on you, and lose some experience in each of your skills. You spawn at the property of yours which you last visited. If you don't have a property, you spawn at the last place you were at when you logged out, or if you haven't logged out, wherever you first spawned in the game. When you spawn, your stats are all reset. You are perfectly well, you have full HP, and your hunger is 0%.

Wellness Expanded


Hygiene is important. You may become ill if you tend to animals and then eat without washing your hands.If you are around other players who are ill, they may spread the illness to you. If you eat uncooked meat, you'll likely get very sick. If you are attacked by a wild animal your wounds will likely become infected. Different factors of wellness will stack, causing your HP to decrease at a certain rate over-time.

  • Illness: Every 2 minutes, your illness escalates to a later stage.
    • Minor Illness: 0.1 HP loss per 30 seconds.
    • Illness: 0.25 HP loss per 30 seconds.
    • Chronic Illness: 0.5 HP loss per 30 seconds.
  • Infection: Every 3.5 minutes, your infection escalates to a later stage.
    • Minor Infection: 0.2 HP loss per 30 seconds.
    • Infection: 0.4 HP loss per 30 seconds.
    • Chronic Infection: 0.8 HP loss per 30 seconds.
  • Disease: Every 5 minutes, your disease escalates to a later stage.
    • Minor Disease: 0.25 HP loss per 30 seconds.
    • Disease: 0.5 HP loss per 30 seconds.
    • Chronic Disease: 1 HP loss per 30 seconds.

Resources


Living Resources

In the wild, plants will routinely seed to reproduce. Sheep will eat the wheat and reproduce. Wolves will eat the sheep and reproduce,bears will eat the wolves and sheep and reproduce. In some cases, a pack of wolves may take on a bear! Once a living resource is exhausted, it is gone from the game forever. If you cut down a tree,another one will not spawn in it's place. A good citizen will plant seeds to keep the game alive. A greedy one will hoard the seeds for herself! Different plants grow and seed at different rates. Plants always drop at least 1 seed, and sometimes more- depending on the plant. Some herbs are known to drop up to 10 seeds, while other breeds (such as those used to treat chronic disease) almost always drop a single seed.

Mines


Iron mines are useful for gathering, well, iron! When you smelt iron ore, you may gather the iron bits. You can hold iron bits using a wool pouch. Iron bits are useful for crafting nails, weapons,armor, or simply as a form of currency. Everyone needs iron at some point. Iron tarnishes. Things made out of iron get rusty, and must be replaced. Structured held together by iron nails must be routinely maintained, or they will fall apart. Having a steady income of iron is essential for everyone in this world.

Player Socialization


It's probably necessary to make friends in this game if you want to survive. Players may form a group, join a group, or just go it alone. This game is player-vs-player. Under normal circumstances,your property is sacred- nobody can steal from or vandalize your property while you're offline.

PvP


If you want to attack somebody for any reason, you may switch to evil mode. When you're in evil mode, anyone can attack you. Once you hit a player, you become a villain. You remain a villain for 2 minutes after you last hit someone, or 5 minutes after you kill somebody. Another way to engage in pvp is to make enemies. If 2 players are enemies with each other, they may battle without going into evil mode, and thus without becoming a villain by hitting innocent by-standards. A player may also vandalize and steal from her enemy's property. The same rule applies to groups. If two groups are mutual enemies, there could be an all-out-war! Cities may be razed, countless lives lost, etc.
 
Last edited:
Back
Top