Kind request to resume code

Kind request to resume code

Postby paul424 » 04 May 2016, 08:49

I wrote long time ago , a prefix tree class plus code to autocomplete the console commands. Although it worked perfectly well it was removed. Could someone elaborate why it happened ?
I have written in my CV what I have done so far for OD and I don't want to turn out foolish nor my work got wasted ....
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Re: Kind request to resume code

Postby oln » 05 May 2016, 14:11

I rewrote the console code at one point, mainly because we moved to using a cegui window for the console rather than directly rendering text using ogre. From what I remember existing code was closely coupled with the text drawing and had memory leaks so I found it simpler to write something from scratch rather than trying to adapt it.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: Kind request to resume code

Postby hwoarangmy » 05 May 2016, 21:35

Note that nobody owns the code. If it has been changed, that's because someone thought that it needed to be (for adapting to the architecture or to improve the code). Then, the PR got merged. That means that reviewers agreed that the new code was better than the old one. That's how it works and that seems pretty good to me.

Concerning the console code, there have been many architecture changes. First, we merged the console mode into game/editor modes. Instead of being a mode itself, it became a component of game/editor modes.
Secondly, the console commands were supposed to be executed through Angel Scripts and the commands were listed in a txt file. That was not the best idea IMHO as console commands are closely coupled with the core code and subject to be changed. And using 2 different places for 2 things so coupled was not the best thing to do. @oln changes about defining console commands and what they do at the same place makes the code much easier to follow and understand.

I know you think everybody is against you and don't want to merge your code. But you have to understand that keeping a good code quality is essential in an open source project. You know as well as I do how hard it is to find someone willing to join. And I can guarantee you that if the code is not good enough, nobody will ever come and it will be the whole project that will go to the trash.

That being said, if you still want to contribute, you are welcome to do so. But keep in mind that the code will have to follow the guidelines and to be readable. The strange thing is that you seem to understand some advanced stuff like polymorphism and I've already read good code from you (I remember the code you had started for using polymorphism for console commands and it was pretty good). But sometimes, you produce unreadable code with meaningless variable names, no comments and code splitted everywhere.
If you want to contribute, I would suggest you to go for simple stuff (implementing a new room/spell) or something like that and get used to the code guidelines. The code quality is the first thing that anybody will see and if you show something bad, nobody will go further and try to understand what the weird code does. Nobody asks for knowing everything about C++ (I don't know as much as @oln regarding this aspect). But it is not needed. Just following the code guidelines and trying to not break the architecture is enough.
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Kind request to resume code

Postby paul424 » 06 May 2016, 08:53

Many thanks for definitive answer. Now I have my own problems, and could start working on OD at the end of the may , when I have access to mine computer and faster internet.

Secondly, the console commands were supposed to be executed through Angel Scripts and the commands were listed in a txt file. That was not the best idea IMHO as console commands are closely coupled with the core code and subject to be changed


Yes the separate file was a bad idea taken from the way code was tested.
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Who is online

Users browsing this forum: No registered users and 1 guest