raduprv / Eternal-Lands

http://www.eternal-lands.com
Other
157 stars 57 forks source link

Spring cleaning #126

Open gvissers opened 3 years ago

gvissers commented 3 years ago

It's spring in the northern hemisphere, and I really should start painting the window frames in the front of my house. So obviously, instead of that, I have been looking a bit at the various compilation options for the client in an effort to find out if we can cut back a bit on the sheer number of them. A number of these options have been in released clients for years, and could IMO just be enabled unconditionally. For others I wonder if they will ever be used. I will admit that I'm only looking at this from a PC user point of view, though, so it is possible that I miss some information.

To start with, I think the following options could just be enabled unconditionally (and the code paths where these are disabled removed):

Options I think we could remove:

Options I think we should keep around for the time being:

Category "I honestly don't know":

I would like to invite everyone who compiles their own client (and especially @pjbroad who has a much better overview of all EL related projects than I have) to weigh in with their opinions on what flags should be kept or removed. I am willing to do the work to clean up the code, but let's try to build some consensus first.

pjbroad commented 3 years ago

There's a lot here to discuss but generally its a great idea. I'm going the make excuses that sound like I'm not supportive... :roll_eyes:

I'll do a more thorough check but some obvious choices to remove cannot be done right now for example NEW_SOUND. Sound is not yet supported for the Android client so it is compiled without the option. Its the same for CUSTOM_LOOK and CUSTOM_UPDATE. There are undoubtedly others. Another obvious but not-possible-currently choice is NEW_EYES, the Other Life client does not use NEW_EYES, the feature it is not supported and so the Other Life client compiles without it. Again there are are undoubtedly others.

Some caution: We are hopefully close to a 1.9.6 release which will include some nice map updates and possibly some new sounds and a corresponding sever update. I'm a little concerned to introduce so much churn in the code base unless that's way off and we can do lots of testing and checking. In the past when we have stripped out #DEFS there have been mistakes. For example one time we lost thunder sounds, another time all the ground textures orientations got scrambled. These were not noticed for a while and took time to fix because it was not immediately clear what had happened and its hard to find a bug in code that has been deleted.

If we are going to do this, may I suggest limiting single #DEF changes to a single commit or pull request. Perhaps make sure we review changes too, to avoid the above issues. Changes should be checked (at least compiled) for the Map Editor, and the Android and Other-Life clients too. If we do the candidate checking and get a definitive hit list, the task could be shared around.

gvissers commented 3 years ago

I'm going the make excuses that sound like I'm not supportive..

Not at all, feedback like this is exactly why we need to have this discussion.

I'll do a more thorough check but some obvious choices to remove cannot be done right now for example NEW_SOUND. Sound is not yet supported for the Android client so it is compiled without the option. Its the same for CUSTOM_LOOK and CUSTOM_UPDATE. There are undoubtedly others. Another obvious but not-possible-currently choice is NEW_EYES, the Other Life client does not use NEW_EYES, the feature it is not supported and so the Other Life client compiles without it. Again there are are undoubtedly others.

Alright, as I wrote, I am not aware of all the various platforms and combinations the client is built for, so your input is invaluable. It would be great if at some point you could walk through the options and see what needs to be kept and what can go. No need to hurry, we can take our time for this. As a side note: perhaps it would be a good idea to also store information like the above somewhere in the source tree, perhaps by annotating the options in the makefiles or by creating a small document.

Some caution: We are hopefully close to a 1.9.6 release which will include some nice map updates and possibly some new sounds and a corresponding sever update.

So let's hold off until that is done. I agree with your concerns over code churn and possible mistakes. Everyone knows I've made enough of those :grimacing:

If we are going to do this, may I suggest limiting single #DEF changes to a single commit or pull request. Perhaps make sure we review changes too, to avoid the above issues. Changes should be checked (at least compiled) for the Map Editor, and the Android and Other-Life clients too.

Sounds like a good plan.