On 2/23/08, Philipp Hofmann <[EMAIL PROTECTED]> wrote: > hi, > > i recently spent some time on one of those programming games, you know > these games in which only ai players compete with each other. anyway > at some point i remembered my long time favorite civilization, an i > checked freeciv's website to see how things are going. > > i really would like to write my own client for the game. and i very > much would like to do that in my currently favorite scripting > language. i guess it would be possible to use SWIG to make the client > api written in c available to scripting languages like python, perl or > ruby.
I think your best bet would be expanding the scope of the existing lua bindings (in the server) to the point where AI logic could be implemented completely in lua scripts. This would be really cool and vastly lower the requirements for people wanting to experiment with the AI's playing strategy. > i admit i haven't done anything with swig, because i'm no c guy, but i > worked in a lot of other languages. i sure would help to work on > something like this, if there is something i can do. i'm not able to > guess how much effort would have to be put in it, though. You need a very good understand of c in order not to make a mess implementing the bindings (be they in lua or something else). You can't just rely on something like swig to magically do the work for you. Lucky for you that since you say you have worked in other languages it should not be very difficult to learn the nuances of c programming (get yourself some c programming ebooks from the web or p2p or whatever), and that there are some existing lua bindings you could use as example code to build on. But in my opinion it will still require a large amount of time and effort before appreciable results can be seen. > maybe there already is a project like this out there. surely, i would > be glad if it were. There is no such project as far as I know. Anyway it would really be a great help if the AI could be improved in this way (a very common complaint is that the AI logic is not very good); don't worry that you will be learning (to program in c) as you go along, people will help you out if you run into trouble. _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev