by uckelman » 01 Aug 2011 21:03:
Hmmm. It all depends on which part of a multi-platform project you work on. We always estimated that 90% would be platform independent and 10% platform dependent but the effort would be 50-50 for both parts. We were writing in objective-C so had ported the GNU compiler to each platform (so avoiding problems where system X’s compiler optimises your code to not working).
The basic problem is that nothing worth doing ports easy and anything that ports easily is trivial.
Don’t forget the Java implementation on any system stands on the image i/o libraries for that system. The implementors of Java didn’t re-invent the wheel. Any code you write will need to sit on the same libraries and hit the same bugs possibly.
Don’t forget the major testing headache. Now you can assume that Vassal will run on 90% of machines which can install JRE but if you write in C++ you’ll have to build it and test it on all possible environments including old versions of MacOS and Windows and Linux.
You know it works on whatever you’ve built it on. Don’t forget most users are not at the leading edge of Windows, Linux or MaxOS and their machines have old libraries which may have old bugs. You’ll not be able to carry your new libraries around with you as they may not work on older software and/or installing them on older systems may break other programs on the machine. Not to mention 64-bit and 32-bit version of the libraries.
If you don’t want to wait for a bug to be fixed join openJDK and fix the bugs there. They’ll get into mainstream Java and openJDK is porting to Mac so you’ll have 1.6 on the Mac plus bug fixes.
I would hope so!! But if just speed was the goal would it be better to go for Java Native classes for the bits that need speeding up
Don’t forget that no one writes a post on the forum to say his JRE installation worked perfectly! You’ll get a very distorted view if you take the forum posts to represent the general experience. There are thousands using Vassal who’ve had little or no problem.
Do our users care if they are in a code ghetto? They just want their modules to work. As they do now for the most part. The number of bug reports is minimal compared to the number of games played on Vassal.
Hmm, to be a little cynical but perhaps realistics, I suspect someone will be saying the same about your new design in five years time. A design is only clean if you’ve thought everything out beforehand and never extend it. In reality any program grows by accretion after its initial release as users request thing never thought of which don’t quite fit the design or do things with your product which the designers never imagined - and with scripts the module developers will be able to really go to town. Consider what has been done with traits which never crossed anyone’s mind.
But I do agree with the major rewrite, just not with abandoning the Java platform to do it.
by uckelman » 05 Sep 2011 22:58 :
Looking at the code even just quickly shows that it wasn’t written to be multi-threaded and the layout of the packages etc is all wrong. So a major rewrite is called for but this does not mean leaping into something totally different.
Yes, I accept all my custom code will be broken, reluctantly but I do accept it. I suspect that mkiefte and I account for most of it anyway.
I suspect the users would just like the new version to load existing modules and save files without them having to re download new modules (assuming you convert all those on the web site).
Conversion in Java would be easiest as you could just replace existing classes in the buildFile by stubs which collected the data and then created the new classes from that. You could do something like that in C++ but would have to re-write the stubs rather than just stripping surplus code out of existing classes.
I think you are making yourselves a lot of work going to C++ and I don’t think you’ll reap as many benefits as you think especially for portability.