|
From: matthieu L. <mat...@ya...> - 2011-12-05 22:41:13
|
Hi Josef, Great job ! That will save me a lot of time in the future. It is always great to see that I am not the only one working to keep the project alive. I am currently the main (unique) developer of trophy (mazipha). Andrew Mustun is the original developer but it doesn't work on it no more. Colin (lifo2) maintained trophy for a time and made some refactoring and then I've been working for adding new features (such as a championship, shop, etc...) and a more C++ refactoring, while Colin added some graphics for the new features. Lately, I have not work that much, but I still plan to release an official 2.0 version of trophy with the new features that are currently in the svn tree. The main problem with clanlib is that some distros use a 2.x version but others use a 1.x (that is the case with my ubuntu). That's why we still need a version that work with 1.x version of ClanLib, but we also need a version that work with 2.x so your job is very useful. If you succeed, we will see if it is possible to merge your version (with some #ifdef...#endif) to have code that can compile with both. I've got nothing against the idea of using git but I don't have experience with it. I would prefer to stick for svn for the version 2.0.0 (since there is not a lot of work to be done to finish and release it). When the version 2.0.0 will be finished. I think that we should merge to your version (that we will call 2.1.x version) Let me answer to your questions: 1) I have problem with hue transformation. What is exact purpose? Maybe clanlib already provide something that replace it The class CaImageHueSelection is used to change the color of the player (default:Red). It is used when you start a new game : You have to type a nickname and on that screen, you can change your car color by pressing up/down arrow keys. If you disable that feature, the car will always be default color (ie : Red). I don't know if clanlib provide something that replace it. 2) Why trophy have own GUI and don't use clanlib one with styling? Is there reason for it? I think the main reason for that is history. I guess that when Andrew started the development of trophy (more than 10 years ago) clanlib didn't have a GUI 3) Do you consider usage of clanlib fonts? It can decrease resources. Actually, I have very few knowledge or experience about clanlib. I am using it only because trophy use it. I have not modified the logic that Andrew Mustun used with clanlib and the code that deals with clan lib is probably very old fashioned (Colin had updated the code to follow the clanlib version from 0.6 to 0.8). Probably the clanlib fonts didn't exist 10 years ago. The refactoring I've done mostly concentrates on C++ but not on clanlib usage, so don't hesitate to do some refactoring if you have some experience with clanlib. 4) Is somewhere documentation of map format? Short Answer: No, the code is in track.cpp Long Answer: I keep the logic that Andrew used. Read the manual that explain how to create a new track. You will guess/understand what is the purpose of the 4 tga file and the .tck file The .tck file actually needs some documentation (Actually, the format needs to be rethought because it is confusing, I think that a xml format would be good). I will try to explain: The three lines (x,y, bridge) are the position (in pixels) of the bridge on a map startangle is the angle where the car starts on the start grid (0 when the start grid is in the right direction. The format is then like this (i, x, y, RP, x, y, RP, ..... i, x, y, RP, x, y, RP ...): These infos are for the AI. First let me explain how basically the AI work. You can watch how the IA work by running trophy with the --trackinfo option. For each track, there are 6 paths for a lap. Each path has 32 Route Points (RP) which are positions on the map. RP are displayed when you run with the --trackinfo option. At each lap an IA car is assigned a path. The IA will try to reach the next route points. When the IA car get close enough of the route point, it then try to reach the next route point, etc... i is the number of the path (from 0 to 5). When you have (x=,y=,RP=), x and y are the coordinate of the Route Points and RP is the number of the Route Point. Therefore for each "i=" You will get 32 sequences of "x=,y=,RP=" (RP from 0 to 31) I know this is not clear, it is not easy to explain by mail, ask me if you have more precise questions. Thank you very much for your help Matthieu (Mazipha) >________________________________ > De : Josef Reidinger <jos...@gm...> >À : ma...@us...; li...@us...; fla...@us...; and...@us...; tro...@li... >Envoyé le : Lundi 5 Décembre 2011 14h50 >Objet : Porting trophy to new clanlib > >Hi, >I like trophy game. I played it few years ago and now I've found that I >cannot no longer play it in my distro due to recent clanlib. >So I create separate project[0] for porting ( I think that for >cooperation is better git repo then svn, so I transform it, but it is >not problem to push it back to svn via git-svn ). >Now it is in state that it compile, but there is still a lot of TODOs >( migrate resources.xml, some issue which I mention below, test how it >run etc. ). >I have few questions: >1) I have problem with hue transformation. What is exact purpose? Maybe >clanlib already provide something that replace it. >2) Why trophy have own GUI and don't use clanlib one with styling? Is >there reason for it? >3) Do you consider usage of clanlib fonts? It can decrease resources. >4) Is somewhere documentation of map format? > >Thanks for your responses. >Josef > > >P.S. sorry for duplication of emails, but I am not sure if you use >mailing list. > >[0] https://github.com/jreidinger/trophy-clanlib2 > > > |