Introduction
All of the game concept and models are described here. Each module library functions in brief.
PHP5 is used for coding, MySQL as the database back-end (with some table views). AJAX is also used for quick engine fight updates, as well as Facebook mock-Ajax for some screen update functions.
I'm indecisive of weather to use classes or not, while trying to keep it simple. The current version has no php classes defined. Suggestions are welcome.
Game images and icons are in the SVN but you might want to get own images, as some might have copyrights.
Details
THE MAP
The map is a 2D array of matrix.
To make the map expandable and with minimal use of resources, I have taken different approach than the conventional RPG map and creators.
Unlike RPG map creators, not all map co-ordinates are created in the database.
By default the visible matrix array is created with empty grassland values. Then a database fetch is done on the current matrix view co-ordinates, and data in the matrix array is replaced by data from the database.
This means a map can be 100 x 100 or 1000 x 1000 or even 100 x 2000, and important location x/y co-ordinates are the only data required. So a house at location x:25, y:25 will be the only record in the database (if we assume only have one valid location on the map), regardless of the total map size. The rest of the map is default vacant grassland.
This also makes adding locations or even allowing players to build homes or clan castles very easy, just add a new record in the MAP table of the database.
More example and info in the MAP wiki page.
THE PLAYER
The player (or the hero) is a simple record in the database that has all of the basic RPG game stats.
This includes health, strength, dexterity, experience, energy, stamina, skill & coins to list a few.
The description of each of these characteristics is explained in the PLAYER wiki page.
THE ITEMS
There are currently 4 different types of items; weapons, shields, armours & magic. It is possible to add more types later, but for starters, 4 should cover all required.
All the items are part of the game item records in the database. This makes it easy to add new items as new experience levels are needed or icon graphics are available.
Items are randomly found on selected map cells, bought & sold in the shops or market, traded between players & given by clan leaders to clan members from the clan armoury. Items can also be dropped if no longer required and no shop is close by to sell it.
Items have default power values depending on the type of the item. They also have double power multiplier use count that allows a player to double its power for a number of turns. These turns can be increased by mending the item in a workshop using skill points (See player full description on how skill points are acquired).
Items also have minimum experience level that the player (hero) needs to have, before being able to equip and use it.
The possibility of allowing a player to build own item, at a cost, is also available. So, a player can build a powerful weapon and use, as long as they can afford it. This option is not included in the initial version.
There is a limit on the number of items in total a player can own.
The description and available options of each type of item is described in the ITEM wiki age.
THE OPPONENTS
The opponents, including monsters are located in the same database table as the players, and have the same fields as a player. This makes accessing the data easy from one library code.
The other main reason of this approach, is it makes exchanging items from monsters, other players, shop owners and markets easy in the player_items relational table.
So, all item exchanges happen in this relational table, all is exchanged is the player_id.
I plan to have monsters or NPC (non-playing characters) have id range of 1 to 500 and shop owners, quest characters have a range 501 to 1000 or so. his should give enough room for sufficient number of monsters and NPC for starters.
QUESTS
CLANS
OTHER