I've downloaded and experimented with the code some time ago and found some possible improvements for the project on linux. I've done the most of it to a private version of the code. Since I'm using git, the code base I used may be to old. I also restructured the project and removed some code. You would have a hard time to copy&paste my code or apply patches. So I will list them and give a link to my changes if possible:
- It would be really nice if someone would remove fmod3.75 from the includes (maybe with a preprocessor directive) when building on desktops (at least when building on 64 bit architectures). That's because there is no 64 bit version of fmod prior to version 4.xx and it will build fine without it.
- It would also be fine if there is a possibility to use code that is already delivered by the platform instead of the code that comes with the project (like tinyXML, SDL, Freetype, zlib, libpng). Imagine there is a 32bit and a 64bit version of third-party code and you include just the 32bit one. It's hard to get the code compiling on 64bit withous messing with the code. There is a neat way to do this with cmake build scripts, what leads me to my next point.
- Can someone please include cmake scripts? They can search for dependencies, produce platform-specific makefiles and build the project just fine (at least on linux machines). At the time of writing this, I can build it by the following commands (on a fresh debian-testing installation - there is no difference between 32 and 64 bit):
Code: Select all
#install the cmake build system, git, ssh, make and compilers
$ aptitude install cmake git ssh make gcc g++
#get the source (you cannot access it without my passphrase, see below)
$ git clone ssh://loto@login.tu-chemnitz.de/~/PUBLIC/repos/wagic.git
$ mkdir wagic/build
$ cd wagic/build
#install missing dependencies
$ aptitude install libboost-all-dev libx11-dev qt-sdk libreetype6-dev libz-dev libpng-dev libjpeg-dev libgif-dev libtinyxml-dev xdg-basedir-dev
#generate makefiles (this will tell me missing dependencies, it also asks me for the build-type, installation dirs of files,...)
$ cmake -i ..
#finally build it
$ make
#install it (if build-type is release)
$ make install
It is also not possible to download the source like I did, because It used the private university's storage and not a public project hoster to be on the safe side (see the last point far below). To speedup compilation time, ccache is a good option.
So, cmake is probably a bit more complex, but way more flexible than pure handwritten makefiles.
It also supports installation so you can easily make deb-packages for debian. And: It can generate a configure header at compile time that can be included to deliver preprocessor constants (like LINUX, WIN32, ARCH, USERPATH, DATAPATH, and so on) to the source code.
- Also, it would be really neat if you can use xdg-basedir to set the user-directory to ~/.local/share/wagic. This will improve backupping and installation a lot and removes the data-stuff from the installation-folder which is needed to fit the debian-file-system-convention-stuff. (You probably wouldn't get permission to get wagic into a debian repository otherwise).
Basicly you add in jge/JFileSystem.cpp an JFileSystem::JFileSyste(...) below the Adroid pecific code:
Code: Select all
...
#elif defined LINUX
userPath = string(xdgDataHome(0)) + string("/wagic/");
#else
...
Code: Select all
...
#ifdef LINUX
#include <basedir.h>
#endif
...
- To come back to whats in the repo: I'm not sure about boost being in the repository. Shouldn't there be a nice way for every platform to install it? Generally removing some third party stuff from the project will reduce the space needed, shorten the time searching for specific stuff and checking the repository out, avoid licensing confusion and so on.
- A personal taste: I like to use git instead of svn, because it is somewhat faster and supports rapid branching. There are a lot of parallel developments and big changes from one day to the next in the code, so it's hard to keep own changes up to date before committing. But svn is of course fine too.
- More of a coding habit: Please do not use include-directives with relative paths that travel upwards, like:
Code: Select all
#include "../../src/jge/<whatever"
Code: Select all
#include "jge/<whatever>"
//or
#include "<whatever>"
- I also implemented some sort of a desktop-version of the deck-editor. It is a bit ugly but displays 12 cards in a grid to speed up deck-construction on big screens and with mouse-support. In my version, I've accidentally overwritten the psp deck-editor.
- It would also be nice if someone could add a doxyfile so every developer can easily generate a source code documentation.
Please don't shout at me if some points are already implemented or are just foolish. Like I said, I used a snapshot of the code to test some ideas of mine quite some time ago.
A last point: Is it OK if I upload the whole project with my changes to gitorious so you can just look at changes in the code, or would that mess anything up (license stuff)?
Best regards,
Zoby
PS: Keep up the good work and thanks for hundred of hours mgt fun on nearly all machines I have .