Latest Stable: Epiar 0.5.0
Download Hourly Tarball
Download Hourly Bz2ball
Home
Epiar 0.7.0 in Development
Join us in irc.freenode.net:#epiar
Main Page
Downloads
Screenshots
Documentation
Development
News
Forums
Bugs
The Community
Community Login
Username:

Password:

Remember me.     Not Registered? Sign up here.

0 active users logged in
Community Gallery
Should we use OpenGL (2D only) for graphics?
Most definately, better 2D graphics.
  6   28.6%
Eh, make it an option but keep software-rendered SDL around.
  14   66.7%
No, my computer can barely take SDL as it is.
  1   4.8%
Poll is out of 21 votes.


Latest News
Release Plans & CVS News

Follow Epiar on Twitter!

Chat With Us! Gamers, Programmers, Artists, Fans

New GUI

Epiar 0.7.0 CVS Module

Developer's Journal #01 - Converting to Autotools

Server Issues

Seasons Greetings

Epiar 0.6.0-rc2 Released

Mostly Monthly Update













Archives - News > 2006 > February > 23 > Developer's Journal #01 - Converting to Autotools
Back

Developer's Journal #01 - Converting to Autotools  -  February 23, 2006   11:23 GMT-8
Posted by Chris
    In the first issue of the Epiar Developer's Journal, I'll briefly discuss my experiences converting the Epiar source code to use the GNU autotools packages (which then enables us to do the standard ./configure, make, make install). Besides universal usability and the ease for people to now compile Epiar on multiple platforms this way, it also enables us to use GNU gettext, which pretty much needs the autotools' generated config.h to know which language to use.

If all these changes go well, we'll be able to provide translations in other languages. All translation contributions are welcome, but right away we hope to offer both English and German, being the two major languages of our players.

The large problem with GNU autotools is in the way we already organize our source code. In Epiar, the source code is organized by placing all the code under the src/ directory, and then from there we divide it up again into logical sections. So, for example, src/system/ contains system-related things (like initializing the video mode, setting up debugging facilities, etc.). src/ai/ on the otherhand, contains AI code, like how to perform manuevers, which variables to consider when making decisions, etc. On a minor side note, src/ai/ is expected to change dramatically as we make the shift over the scripted AI (like a real game would use) with Lua (www.lua.org, great, fast, ANSI C scripting language already popular with game developers).

The most common way of handling this little issue of subdirectories in subdirectories, according to GNU documentation, is to make anything in a sub-subdirectory (like anything in src/ai/) into a static library, like libai.a, and then link it against the main code. I spent two hours converting all the autotools files over to do this, only to discover that our sources don't depend on each other in a linear fashion; and a minor interesting thing about GNU GCC is that when using static libraries, all dependancies on a library must be specified on command line before that one, so if libvideo.a needs code from libsystem.a, you have to say: gcc libsystem.a libvideo.a, and not the other way around. Sadly, much of Epiar's code works like this: libsystem.a needs code from libvideo.a, but libvideo.a also needs code from libsystem.a. There is a workaround which I hope to implement tonight, but for now the Epiar CVS is very much broken.

For the next journal entry, expect something about the pros and cons and implementation experience of using Lua scripting to script the AI in Epiar. Thanks for reading.


Copyright © 2002-2008 Entropy Development Studios. All Rights reserved.