Sunday, August 21, 2011

(Open)Tyrian on Ubuntu 11.04 (and 12.04)

When I was a young child, my dad worked as an IT professional at Boeing. Our household computer, which was a rare occurrence in our neighborhood, was built from old Packard Bell surplus parts. I grew up playing several DOS games on this machine. Among them were Dune 2, Jazz Jackrabbit, and Tyrian.

Recently, I was reminded of the game and decided to relive a part of my childhood all over again. OpenTyrian is the C and SDL version of the Tyrian game. It was originally written in Pascal with DOS.



Download the Tools

You will need to get some existing libraries before you can compile the game:
sudo apt-get install build-essential libsdl1.2debian libsdl-net1.2 mercurial
Update 08-09-2012: Ubuntu 12.04 or later:
sudo apt-get install build-essential libsdl1.2debian libsdl-net1.2 mercurial libsdl1.2-dev libsdl-net1.2-dev

Download the Source and Game Data

Check out a copy of the source code from the Google Code repo:
hg clone https://code.google.com/p/opentyrian/

You will also need a copy of the game data. It is available here: http://sites.google.com/a/camanis.net/opentyrian/tyrian/tyrian21.zip.

Build and Run OpenTyrian

You're almost there! All you need to do now is unzip the tyrian21.zip folder into the opentyrian source code folder.

unzip tyrian21.zip
mv tyrian21 opentyrian/data

Now you can go into the opentyrian folder and compile the code:


make clean release

To run the game:


./opentyrian

8 comments:

  1. Hi,

    To compile the game (on Ubuntu 12.04), I also had to install libsdl1.2-dev and libsdl-net1.2-dev.

    But then, it is as AWESOME as it used to be when I was 12!

    ReplyDelete
  2. Now you can go into the opentyrian folder and compile the code:

    make clean release

    what is meant by that???

    ReplyDelete
    Replies
    1. If you look in the Makefile for the OpenTyrian project, you will see 'clean' and 'release' as targets at the very bottom: http://code.google.com/p/opentyrian/source/browse/Makefile

      Running 'make clean release' will run those targets in order. To find out more about how 'make' works, you can go here: http://mrbook.org/tutorials/make/

      Delete
    2. thx but did it work?
      zez@Gertrud:~/opentyrian$ make clean release
      rm -rf obj/*
      rm -f opentyrian
      cc -c -o obj/animlib.o -std=c99 -I./src -DTARGET_UNIX -g3 -O0 -Werror -MMD -pedantic -Wall -Wextra -Wno-missing-field-initializers '-DHG_REV="ef4a71214303 default"' -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/animlib.c
      cc -c -o obj/arg_parse.o -std=c99 -I./src -DTARGET_UNIX -g3 -O0 -Werror -MMD -pedantic -Wall -Wextra -Wno-missing-field-initializers '-DHG_REV="ef4a71214303 default"' -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/arg_parse.c
      cc -c -o obj/backgrnd.o -std=c99 -I./src -DTARGET_UNIX -g3 -O0 -Werror -MMD -pedantic -Wall -Wextra -Wno-missing-field-initializers '-DHG_REV="ef4a71214303 default"'

      Delete
    3. AAND



      zez@Gertrud:~/opentyrian$ ./opentyrian

      Welcome to... >> OpenTyrian ef4a71214303 default <<

      Copyright (C) 2007-2009 The OpenTyrian Development Team

      This program comes with ABSOLUTELY NO WARRANTY.
      This is free software, and you are welcome to redistribute it
      under certain conditions. See the file GPL.txt for details.

      warning: failed to open 'tyrian.cfg': No such file or directory

      Invalid or missing TYRIAN.CFG! Continuing using defaults.

      warning: failed to open 'opentyrian.conf': No such file or directory
      warning: failed to open 'tyrian.sav': No such file or directory
      initialized video: 640x400x32 windowed
      no joysticks detected
      assuming mouse detected
      error: failed to open 'palette.dat': No such file or directory
      error: One or more of the required Tyrian 2.1 data files could not be found.
      Please read the README file.

      Delete
    4. Did you unzip the contents of tyrian21.zip into the 'data' directory of opentyrian? Looks like you are missing a file in that data directory.

      Delete
  3. For Debian, Ubuntu, Mint... there is an DEB installer on the web http://www.playdeb.net/app/Opentyrian or launchpad ppa:mqchael/opentyrian

    ReplyDelete