Difference between revisions of "Coding"

From UFO:AI
Jump to navigation Jump to search
Line 4: Line 4:
  
 
==Requirements==
 
==Requirements==
In order to compile UFO:Alien Invasion under Linux you need to install some packages. First of all make sure, that you have gcc installed.
+
In order to compile UFO:Alien Invasion under Linux you need to install some packages.
 +
 
 +
Tools:
 
* gcc/g++
 
* gcc/g++
 +
* make
 +
* pkg-config
 +
* python3
 +
* zip
 +
 +
Libraries (with headers)
 +
* intl (gettext)
 +
* libcurl header
 +
* libjpeg8 header
 +
* libpng header
 +
* Lua version >= 5.3
 
* OpenGL-header files (usually comes with your graphic card drivers; or you may use the 'mesa' source package)
 
* OpenGL-header files (usually comes with your graphic card drivers; or you may use the 'mesa' source package)
 
* ogg vorbis header
 
* ogg vorbis header
* libjpeg8 header
+
* SDL2
* libpng header
+
* SDL2_ttf (sdl2-ttf)
* libcurl header
+
* SDL2_mixer (libsdl2-mixer)
 +
* Vorbis
 
* zlib header version >= 1.2.3
 
* zlib header version >= 1.2.3
* SDL (incl. headers)
 
** SDL version >= 1.2.10
 
** SDL_ttf (sdl-ttf) version >= 2.0.7
 
** SDL_mixer (libsdl-mixer) version >= 1.2.7
 
* make
 
  
 
==Compiling the source==
 
==Compiling the source==
Line 52: Line 61:
  
 
==External Links==
 
==External Links==
* [http://sourceforge.net/projects/ufoai/ UFO:AI Project homepage] at [http://sourceforge.net SourceForge]
+
* {{https|sourceforge.net/projects/ufoai/|UFO:AI SourceForge Project homepage}}
* [http://cia.navi.cx/stats/project/ufoai CIA Bot] - Repository changelog with some statistics
+
* {{https|predef.sourceforge.net/preos.html|Pre-defined Operating System Macros}}
* [http://predef.sourceforge.net/preos.html Pre-defined Operating System Macros]
 
  
 
=== Coding help ===
 
=== Coding help ===
* [http://www.devmaster.net/ Dev-Master]
+
* {{https|www.gamedev.net/|GameDev.net}
* [http://www.gamedev.net/ GameDev.net]
+
* {{http|www.flipcode.com/archives/|flipCode Archives}}
* [http://gpwiki.org/ Game Programming Wiki]
+
* {{https|www.cprogramming.com/|C-Programming articles}}
* [http://www.flipcode.com/archives/ flipCode Archives]
+
* {{https|nehe.gamedev.net/|NeHe OpenGL tutorials}}
* [http://www.cprogramming.com/ C-Programming articles]
 
* [http://www.glprogramming.com/red/ OpenGL Red Book]
 
* [http://www.glprogramming.com/blue/ OpenGL Blue Book]
 
* [http://nehe.gamedev.net/ NeHe OpenGL tutorials]
 
  
 
=== Tutorials on the net ===
 
=== Tutorials on the net ===
 
some of them are Quake1 or Quake3 related but maybe give a starting point...
 
some of them are Quake1 or Quake3 related but maybe give a starting point...
* [http://webadvisor.aupr.edu/noc/CodingTutorials.htm Coding tutorials]
+
* {{https|www.quakewiki.net/|QuakeWiki}}
* [http://www.quakewiki.net/archives/code3arena/ Code3Arena]
+
* {{https|www.3delement.com/|Tutorialsfor 3D game development}}
* [http://www.3delement.com/ Tutorials] for 3D game development
 
* [http://delphi3d.net/ OpenGL Tutorials]
 
  
 
== Related Wiki Links ==
 
== Related Wiki Links ==

Revision as of 10:04, 20 August 2024

Contribute: Coding, Debugging, Scripting, Packaging

Getting the source

Just have a look at our Getting the source page to get more information about this.

Requirements

In order to compile UFO:Alien Invasion under Linux you need to install some packages.

Tools:

  • gcc/g++
  • make
  • pkg-config
  • python3
  • zip

Libraries (with headers)

  • intl (gettext)
  • libcurl header
  • libjpeg8 header
  • libpng header
  • Lua version >= 5.3
  • OpenGL-header files (usually comes with your graphic card drivers; or you may use the 'mesa' source package)
  • ogg vorbis header
  • SDL2
  • SDL2_ttf (sdl2-ttf)
  • SDL2_mixer (libsdl2-mixer)
  • Vorbis
  • zlib header version >= 1.2.3

Compiling the source

Don't forget to compile the maps when you are not using any pre packaged version. Otherwise the tactical missions won't start up.

Also make sure, that you compile the language files (po-files from src/po). Otherwise you will only see placeholders in the ufopedia and some other places.

You can now create the pk3 archives by typing

make pk3

- also see the packaging notes. This step is optional.

After compiling the source and maps you will most likely run the game.

Debugging the game

There is a debugging article available with more information about this topic.

The Debug commands will help you here as well.

Contributing

If you want to contribute to the project you need an account at sourceforge.net or submit your patches anonymously to our issue tracker. There is also a TODO-list and a Changelog available. Please also have a look at the coding guidelines.

Documentation

The Doxygen code documentation can be found here. It is most likely out of date, but you can always generate a current one yourself by typing:

make doxygen-docs

in the root of your ufoai working directory.

External Links

Coding help

Tutorials on the net

some of them are Quake1 or Quake3 related but maybe give a starting point...

Related Wiki Links