Hardcoding removal: Difference between revisions

From PSwiki
Jump to navigation Jump to search
No edit summary
Weltall (talk | contribs)
Line 15: Line 15:
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...
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.
In addition we are still keeping some information in various XML files. 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 use them from there or send them to clients. Will be also then good to have the webconsole expanded so it can access and edit this information from a web page.

Revision as of 07:52, 19 January 2012

(Go back to the main GSoC 2011 page)

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. 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 use them from there or send them to clients. Will be also then good to have the webconsole expanded so it can access and edit this information from a web page.