New to Allegro, what should I do?

11
Jul
0

First of all, welcome! Depending on your skills you might want to start with something different.

If you are a total beginner to C programming, Allegro won’t help you much. As a C library (C stands for the name of a programming language), Allegro presumes you know how to write C programs, compile and link them to produce executables. Sorry, you will have to learn how to do that first. You can use a search engine like Google to find tutorials and documentation about C programming or buy a book in a shop on the subject. C is a well known language with many years on its back, so you won’t have too many problems finding information about it.

If you already know how to write C programs but lack the knowledge for writing games, you will enjoy learning and using Allegro. Obviously you will want to download Allegro. We recommend you to get the stable version. Allegro comes with a good reference documentation and more than 40 examples which will help you to start with basic things and from there on improve your skills. You can even play a small demo game where your mission is to blast asteroids. The documentation bundled with Allegro can be found online, and there are many tutorials and even some books which can be used to further enhance your knowledge.

If you are an experienced game programmer you can quickly get an idea of how Allegro programs look like by skimming through the API or reading the bundled examples. Allegro tries to make the task of creating games as simple as possible to you, while maintaining the flexibility to utilize all the low level power you may want to use at the same time.

Whether you are a beginner or not, you should know that there are a few ways to get in touch with other Allegro users. There are a few mailing lists you can subscribe to. They are usually silent until somebody starts a nice discussion and everybody jumps in with replies. For the mail impaired, Allegro.cc is a Web based forum with a much higher participation (and also noise-to-signal ratio). Feel free to communicate your ideas and current projects. Everybody likes to see a game pushing Allegro to the limits, even more if you provide the source code for others to learn from it.

Aleph One File compatibility

10
Jul
0

 ”Images” - on Aleph One/SDL this is a data file and not a resource file
    as on the MacOS versions of Aleph One and Marathon, but the file format
    is exactly the same, and compatible across all platforms supported by
    Aleph One/SDL
  “Shapes” - fully compatible across all versions of Aleph One/Marathon 2/
    Marathon Infinity
  “Sounds” - fully compatible across all versions of Aleph One/Marathon 2/
    Marathon Infinity
  Map files - maps without resource forks are fully compatible across all
    versions of Aleph One/Marathon 2/Marathon Infinity; maps with resource
    forks need to be in one of three formats:
      a) data and resource forks in separate files, <name> and <name>.rsrc/
         <name>.resources
      b) an AppleSingle encoded file containing data and resource fork
      c) a MacBinary II encoded file containing data and resource fork
    All of these formats are fully compatible across all platforms supported
    by Aleph One/SDL.
  Saved games - fully compatible across all versions of Aleph One/
    Marathon 2/Marathon Infinity (but the MacOS versions save a small picture
    of the map at the current player’s position in the resource fork of
    saved games, which is not preserved or used by Aleph One/SDL)
  Films - fully compatible across all versions of Aleph One/Marathon 2/
    Marathon Infinity
  “Aleph One Preferences” - platform-specific, not compatible with the MacOS
    versions of Aleph One/Marathon nor across the platforms supported by
    Aleph One/SDL
  Themes - fully compatible across all versions of Aleph One/SDL; the MacOS
    versions of Aleph One and Marathon don’t support themes

What is Aleph One

10
Jul
0

Aleph One is an Open Source 3D first-person shooter game, based on the game
Marathon 2 by Bungie Software. It is set in a Sci-Fi universe dominated by
deviant computer AIs and features a well thought-out plot.

To compile Aleph One/SDL, you need an up-to-date C++ compiler. Using GCC 3.x
should give the best results. Users of pre-ISO C++ compilers need not apply.

Aleph One/SDL supports, but doesn’t require, OpenGL for rendering.

Tagged as:

Types and Mnemonics

10
Jul
0

The string mnemonics listed below can be used for assignment and as arguments to functions. Additionally, Aleph One’s Lua interpreter has been modified so that equality comparisons between userdata types and strings are possible.

For example, this script would move all players on the blue team to the red team:

for p in Players() do
  if p.team == “blue” then
    p.team = “red”
  end
end
And this one would damage all major compilers with 10 points of fusion damage:
for m in Monsters() do
  if m.type == “major compiler” then
    m:damage(10, “fusion”)
  end
end
Each type has a read-only .index field, which represents the game’s internal index:
> =ItemTypes["pistol"].index
1

Each type also has a .mnemonic field, which is handy for finding the mnemonic of a given type:
> =MonsterTypes["major compiler"].class.mnemonic
compiler

You can even use the mnemonic field to customize the mnemonics for your scenario. Note that you can only have one string mnemonic per type index:
> WeaponTypes["fist"].mnemonic = “puncher”
> =WeaponTypes["puncher"].index
0
> =WeaponTypes["fist"]
nil

If you do this, you should customize them all at the beginning of the script. Changing mnemonics mid-game will confuse anyone who tries to read your script, and probably yourself as well!

Sides

10
Jul
0

# Sides
number of sides on the level

Sides()
iterates through all sides on the level

Sides.new(polygon, line) 20080707
creates a new side

side must not already exist

Sides[index]
.control_panel
nil if the side is not a control panel

set to true or false to create/destroy a control panel 20080707

.can_be_destroyed 20080707
whether projectiles destroy this switch

.light_dependent 20080707
switch can only be activated if light > 75%

.only_toggled_by_weapons 20080707
switch can only be toggled by weapons

.permutation
permutation of control panel

.repair 20080707
switch is a repair switch

.type 20080707
type of control panel

.uses_item 20080707
i.e. chip insertion

.primary
.secondary
.transparent
.collection
texture collection

.empty
whether transparent side is empty

transparent side only

setting empty to false is a no-op; set collection and texture_index instead

.light
texture light

.texture_index
texture bitmap index

.texture_x
texture x offset

.texture_y
texture y offset

.transfer_mode
texture transfer mode

:play_sound(sound [, pitch])
play sound coming from this side

.line (read-only)
line this side is attached to

.polygon (read-only)
polygon this side is attached to

:recalculate_type() 20081213
correct the side type (Forge can generate incorrect side types)

.type (read-only) 20080707
type of side

Tagged as: