Hardcoding removal

From PSwiki
Revision as of 21:03, 21 March 2011 by Talad (talk | contribs) (Created page with ' == Introduction == Due to the fact the PlaneShift engine has been in development for years, unfortunately, it brings with itself some design faults which at the time allowed t…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Introduction

Due to the fact the PlaneShift engine has been in development for years, unfortunately, it brings with itself some design faults which at the time allowed to speed up development but now are an hindrance and will require editing of the project source for deployment. The scope of removing hardcoding is moving all the resources previously in code (like skills, money specifications, interfaces, database tables design) in order to be data driven (at maximum script driven) and not anymore hard wired in the internals of the engine. This is actually a lot of sub works some bigger and more difficult and some more easy and fast to accomplish.(easy to hard)


Skills needed

Our server and client are all coded in C++ and the database is MySql. For this project C++ knowledge is needed with some knowledge of mysql.

Details

This project consists of various changes needed across the whole codebase of PlaneShift. It mostly ends up in moving some parts which were originally hardcoded from the C++ code to the database, for example: skill tables, races, npc behaviours, expanding and making more flexible the crafting functionalities, allowing to define the char creation phase server side in place of client side, etc...

In addition we are still keeping some information in various XML files, for example data/npcbehave.xml and data/npcdefs.xml . Those files describe and define the behaviours of the NPCs, for example guards, fighters, wanderers. Keeping that into an XML file was good at the beginning when we just had one or two behaviours, but now those are becoming more and really it's not possible to edit that file manually all the time. So the minimum required here will be to create new database tables to hold that information and have each behaviour stored in a separate record of the db. Will be also then good to have the webconsole expanded so it can access and edit this information from a web page.