Giter Club home page Giter Club logo

alan-by-examples's Introduction

ALAN by Examples

Build Status

Various collection of examples to learn ALAN IF v3 — the Alan Interactive Fiction Language. Provided as a public service by the Alan Interactive Fiction Development team.

Created by Tristano Ajmone in June 2, 2019.

Alan SDK v3.0beta6

Table of Contents


Project Contents

About ALAN

The Alan Interactive Fiction Language is a powerful tool for developing text adventure games. What makes ALAN unique amongst the IF authoring tools is that it doesn't provide a standard library (although various libraries are available if you need one, like the ALAN Standard Library by Anssi Räisänen); instead, ALAN provides all the basic tools for building your own adventure from the ground up, thus allowing you the uttermost freedom in tailoring your own adventure world and model.

This also means that ALAN is a truly locale-agnostic tool (i.e. it doesn't enforce any particular spoken language) because although it natively supports English, Swedish and German default message responses, you are free to override these messages with your own. Sine ALAN doesn't provide any verbs definitions, you won't have to translate any verbs to your native language, instead you'll be free to write your own verbs according to needs.

With ALAN being such a flexible and powerful tool, we need to be mindful of Benjamin "Ben" Parker's wise words of advise to his nephew (Peter Parker, aka Spider-Man):

With great power there must also come great responsibility.

The above motto holds true for IF authors working with ALAN, for the basic tools offered by the ALAN language can be combined in infinite ways to create a unique text adventure according to needs. The lack of a strict paradigm is both a blessing and a challenge, for you'll need to know how to wisely combine all the available tools offered by the language to maximize results and avoid pitfalls.

About This Project

Since most constructs of the ALAN language were thought as general purpose tools that can be flexibly adapted to fulfil most text adventures needs, without imposing any predefined paradigm, the best way to learn ALAN is by looking at practical examples by different authors.

This goal of this repository is to provide a wide collection of practical examples — ranging from the basics to more advanced and complex examples — and, most important, this project is community oriented — meaning that anyone can contribute their examples to the project.

Since there are many ways to implement solutions to common IF problems, different authors will have their own coding style and approaches to the various challenges of creating text adventures. The ALAN community is a small and friendly group that values diversity, freedom and group discussion — there are no "benevolent dictators" in the ALAN community, and everyone's voice is heard and taken into account whenever discussing new features, projects and change. Everyone's contribution is important to the ALAN community.

Project Organization

The project being in its early stages, we'd rather leave its structural organization open for now, and let it be shaped by the actual contributions. As examples start to flow in, we'll be able to organize them into categories by subfoldering them in a way to make consultation easier.

Currently, there are two sub-projects available: The Alan Recipe Book and Alan Syntax by Examples, both in the making. More directories will be added as the need arises.

Alan Syntax by Examples

A collection of examples to illustrate how to use the various constructs of the ALAN syntax, organized by topics. Intended as a supplementary tool for The Alan Manual.

The Alan Recipe Book

A collection of examples on how to implement various gimmicks and effects in pure Alan code. Examples are organized following The Inform Recipe Book that ships with Inform 7.

Contributing

Anyone can contribute examples to the project, via Git and GitHub. By contributing your examples to this project, you are donating your code to the Alan community under the MIT License (although it will still be attributed to you, and you'll retain its paternity).

More information on how to submit contents to the project can be found in the Contributors' Guidelines document.

For questions and discussions, you can either:

  • open an issue — for all matters directly concerning this repository.
  • post on the ALAN Yahoo Group — for all discussion involving the ALAN community.

Project License

The Alan by Example project is released under the MIT License. All examples code in this project belong to the Alan Interactive Fiction Development team — i.e. are donated to the Alan community.

MIT License
-----------

Copyright (c) 2019 Alan Interactive Fiction Development team:
https://github.com/alan-if

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

The above license doesn't apply to third party assets which might be included in this project, which are governed by their own license terms and copyright notice — as indicated by their license files, which shall be included along with those assets, as well as being mentioned in this section.

Third Party Assets Licenses

The project includes the following assets created by third parties, each governed by its own license terms.

Alan SDK License

The above folder contains the Windows executables of the Alan SDK, which are released under the terms of the Artistic License 2.0:

Alan Project Builder

The ALAN Builder tool was created by Tristano Ajmone and donated to the Alan Interactive Fiction Development team under MIT License.

MIT License

Copyright (c) 2019 Tristano Ajmone and the Alan IF Development team
https://github.com/alan-if/Alan-Builder

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Please, note that the ABuilderLICENSE file contains additional licenses for third party components used by the PureBasic compiler, which must be included with any distribution of the Alan Builder application in compiled binary format (but not necessarily so if only the source code is being distributed).

The full source code (in PureBasic) can be found on the ALAN Builder repository:

External Links

Documentation and Tutorials

Code Examples

Libraries

Editors

Miscellanea

  • Alan Goodies — A collection of assorted assets for Alan.

alan-by-examples's People

Contributors

tajmone avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

alan-by-examples's Issues

Travis CI Setup

This issue contains some notes on setting up Travis CI to run a build test on the ALAN by Examples project, as well as offering a discussion thread on the topic.

Alan Recipe Book

Works have begun to replicate the structure of The Inform Recipe Book (that ships with Inform 7) as The Alan Recipe Book inside the folder:

We'll be using the same organization into chapters and sections as the The Inform Recipe Book, for it provides us with a well established model of presenting the reader with common IF authoring problems — but the actual examples will be created from scratch using pure Alan code.

This approach allows us to focus our energy on creating the actual examples, without having to worry about the topics and organization, and at the same time it can motivate users contributions for the topics to be covered can be seen as challenges which need to be implemented in Alan.

Here is the The Alan Recipe Book TOC (identical to that of the i7 Recipe Book) and the current status of implementation of its chapters and section — links presence indicate that a Ch./Sec. is WIP; the number of examples is indicated within round brackets; checkmarks indicate completion of a section:

  • 1. How to Use The Recipe Book
  • 2. Adaptive Prose
    • 2.1. Varying What Is Written
    • 2.2. Varying What Is Read
    • 2.3. Using the Player's Input
  • 3. Place
    • 3.1. Room Descriptions
    • 3.2. Map
    • 3.3. Position Within Rooms
    • 3.4. Continuous Spaces and the Outdoors
    • 3.5. Doors, Staircases, and Bridges
    • 3.6. Windows
    • 3.7. Lighting
    • 3.8. Sounds
    • 3.9. Passers-By, Weather and Astronomical Events
  • 4. Time and Plot
    • 4.1. The Passage of Time
    • 4.2. Scripted Scenes
    • 4.3. Event Scheduling
    • 4.4. Scene Changes
    • 4.5. Flashbacks
    • 4.6. Plot Management
  • 5. The Viewpoint Character
    • 5.1. The Human Body
    • 5.2. Traits Determined by the Player
    • 5.3. Characterization
    • 5.4. Background
    • 5.5. Memory and Knowledge
    • 5.6. Viewpoint
  • 6. Commands
    • 6.1. Designing New Commands
    • 6.2. Writing New Commands
    • 6.3. Modifying Existing Commands
    • 6.4. Looking
    • 6.5. Examining
    • 6.6. Looking Under and Hiding
    • 6.7. Inventory
    • 6.8. Taking, Dropping, Inserting and Putting
    • 6.9. Going, Pushing Things in Directions
    • 6.10. Entering and Exiting, Sitting and Standing
    • 6.11. Waiting, Sleeping
    • 6.12. Other Built-In Actions
    • 6.13. Magic Words
    • 6.14. Remembering, Converting and Combining Actions
    • 6.15. Actions on Multiple Objects
    • 6.16. Alternate Default Messages
    • 6.17. Clarification and Correction
    • 6.18. Alternatives To Standard Parsing
  • 7. Other Characters
    • 7.1. Getting Acquainted
    • 7.2. Liveliness
    • 7.3. Reactive Characters
    • 7.4. Barter and Exchange
    • 7.5. Combat and Death
    • 7.6. Getting Started with Conversation
    • 7.7. Saying Simple Things
    • 7.8. Saying Complicated Things
    • 7.9. The Flow of Conversation
    • 7.10. Character Emotion
    • 7.11. Character Knowledge and Reasoning
    • 7.12. Characters Following a Script
    • 7.13. Traveling Characters
    • 7.14. Obedient Characters
    • 7.15. Goal-Seeking Characters
    • 7.16. Social Groups
  • 8. Vehicles, Animals and Furniture
  • 9. Props: Food, Clothing, Money, Toys, Books, Electronics
    • 9.1. Food
    • 9.2. Bags, Bottles, Boxes and Safes
    • 9.3. Clothing
    • 9.4. Money
    • 9.5. Dice and Playing Cards
    • 9.6. Reading Matter
    • 9.7. Painting and Labeling Devices
    • 9.8. Simple Machines
    • 9.9. Televisions and Radios
    • 9.10. Telephones
    • 9.11. Clocks and Scientific Instruments
    • 9.12. Cameras and Recording Devices
  • 10. Physics: Substances, Ropes, Energy and Weight
    • 10.1. Gases
    • 10.2. Liquids
    • 10.3. Dispensers and Supplies of Small Objects
    • 10.4. Glass and Other Damage-Prone Substances
    • 10.5. Volume, Height, Weight
    • 10.6. Ropes
    • 10.7. Electricity and Magnetism
    • 10.8. Fire
    • 10.9. Heat
    • 10.10. Magic (Breaking the Laws of Physics)
    • 10.11. Mathematics (1)
  • 11. Out of World Actions and Effects
    • 11.1. Start-Up Features
    • 11.2. Saving and Undoing
    • 11.3. Helping and Hinting
    • 11.4. Scoring
    • 11.5. Settings and Status Checks During Play
    • 11.6. Ending The Story
  • 12. Typography, Layout, and Multimedia Effects
    • 12.1. Typography
    • 12.2. The Status Line
    • 12.3. Footnotes
    • 12.4. Timed Input
    • 12.5. Multimedia Effects
  • 13. Testing and Publishing

Adopt New Official Extensions for ALAN3 Solution and Transcript Files

Switch to the upcoming official extensions .a3s and .a3t for ALAN3 solution files and transcripts, respectively (see alan-if/alan#2):

NOTE — Need to first check if the ALAN Builder tools needs to be changed to support these new extensions!

  • Change file extension of all:
    • Solution files: .a3sol.a3s
    • Transcripts: .a3log.a3t
  • Update all repo files accordingly:
    • Documentation (.md).
    • Git and EditorConfig settings files.
    • Scripts:
      • Bash .sh
      • Batch .bat
  • Update Wiki accordingly (if needed).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.