Git Product home page Git Product logo

language-renpy's Introduction

The Ren'Py Visual Novel Engine

https://www.renpy.org

Ren'Py development takes place on the master branch, and occasionally on feature branches.

Getting Started

Ren'Py depends on a number of Python modules written in Cython and C. For changes to Ren'Py that only involve Python modules, you can use the modules found in the latest nightly build. Otherwise, you'll have to compile the modules yourself.

The development scripts assume a POSIX-like platform. The scripts should run on Linux or macOS, and can be made to run on Windows using an environment like MSYS.

Nightly Build

Nightly builds can be downloaded from:

https://nightly.renpy.org

Note that the latest nightly build is at the bottom of the list. Once you've unpacked the nightly, change into this repository, and run:

./after_checkout.sh <path-to-nightly>

Once this script completes, you should be able to run Ren'Py using renpy.sh, renpy.app, or renpy.exe, as appropriate for your platform.

If the current nightly build doesn't work, please wait 24 hours for a new build to occur. If that build still doesn't work, contact Tom (pytom at bishoujo.us, or @renpytom on twitter) to find out what's wrong.

The doc symlink will dangle until documentation is built, as described below.

Compiling the Modules

Building the modules requires you have the many dependencies installed on your system. On Ubuntu and Debian, these dependencies can be installed with the command:

sudo apt install virtualenvwrapper python3-dev libavcodec-dev libavformat-dev \
    libswresample-dev libswscale-dev libharfbuzz-dev libfreetype6-dev libfribidi-dev libsdl2-dev \
    libsdl2-image-dev libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev

Ren'Py requires SDL_image 2.6 or greater. If your distribution doesn't include that version, you'll need to download it from:

https://github.com/libsdl-org/SDL_image/tree/SDL2

We strongly suggest installing the Ren'Py modules into a Python virtualenv. To create a new virtualenv, open a new terminal and run:

. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
mkvirtualenv renpy

To return to this virtualenv later, run:

. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
workon renpy

After activating the virtualenv, install additional dependencies:

pip install -U cython future six typing pefile requests ecdsa

Then, install pygame_sdl2 by running the following commands:

git clone https://www.github.com/renpy/pygame_sdl2
pushd pygame_sdl2
python setup.py install
python setup.py install_headers
popd

Next, set RENPY_DEPS_INSTALL To a :-separated (;-separated on Windows) list of paths containing the dependencies, and RENPY_CYTHON to the name of the cython command:

export RENPY_DEPS_INSTALL="/usr:/usr/lib/$(gcc -dumpmachine)/"
export RENPY_CYTHON=cython

Finally, use setup.py in the Ren'Py module directory to compile and install the modules that support Ren'Py:

pushd module
python setup.py install
popd

Ren'Py will be installed into the activated virtualenv. It can then be run using the command:

python renpy.py

Documentation

Building

Building the documentation requires Ren'Py to work. You'll either need to link in a nightly build, or compile the modules as described above. You'll also need the Sphinx documentation generator. If you have pip working, install Sphinx using:

pip install -U sphinx sphinx_rtd_theme sphinx_rtd_dark_mode

Once Sphinx is installed, change into the sphinx directory inside the Ren'Py checkout and run:

./build.sh

Format

Ren'Py's documentation consists of reStructuredText files found in sphinx/source, and generated documentation found in function docstrings scattered throughout the code. Do not edit the files in sphinx/source/inc directly, as they will be overwritten.

Docstrings may include tags on the first few lines:

:doc: section kind

Indicates that this function should be documented. section gives the name of the include file the function will be documented in, while kind indicates the kind of object to be documented (one of function, method or class. If omitted, kind will be auto-detected.

:name: name

The name of the function to be documented. Function names are usually detected, so this is only necessary when a function has multiple aliases.

:args: args

This overrides the detected argument list. It can be used if some arguments to the function are deprecated.

For example:

def warp_speed(factor, transwarp=False):
    """
    :doc: warp
    :name: renpy.warp_speed
    :args: (factor)

    Exceeds the speed of light.
    """

    renpy.engine.warp_drive.engage(factor)

Translating

For best practices when it comes to translating the launcher and template game, please read:

https://lemmasoft.renai.us/forums/viewtopic.php?p=321603#p321603

Contributing

For bug fixes, documentation improvements, and simple changes, just make a pull request. For more complex changes, it might make sense to file an issue first so we can discuss the design.

License

For the complete licensing terms, please read:

https://www.renpy.org/doc/html/license.html

language-renpy's People

Contributors

ankushagarwal avatar aroben avatar benogle avatar cronos87 avatar dralletje avatar gitter-badger avatar justinnoah avatar karel-brinda avatar kennethreitz avatar kevinsawicki avatar koroshiya avatar mathiasbynens avatar maxbrunsfeld avatar morganwillcock avatar msabramo avatar peterdavehello avatar renpytom avatar ricpelo avatar syndbg avatar warunsl avatar williamd1k0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

language-renpy's Issues

Requests to add new keywords

If you noticed any keyword or statements missing or a new one was created, ask here to update the syntax highlighting, pull requests are also welcome.

โ„น๏ธ You can test if already exists a keyword using the GitHub Lightshow.

Simple request example:


Keyword:
dissolve > transition statement

Usage:

show bg washington
with dissolve

How can I contribute for a new language?

Since I don't know where I can contribute to add a new language, I believe this is the right place to ask.

Is there a way that I can add a new language?
The language that I want to add is Serbian.

If I need to post an example of the translations, please let me know so that I can attach the example.

EDIT: I am stupid. I just noticed that these are language packages for Atom.

Getting Started

It would be nice if the README covered how to get started with Ren'Py and Atom, at least for those of us who aren't familiar with the latter.

Remove the Python scope

  • "Remove" source.python
  • Solve multi-line string conflicts (override source.python)
  • Temporary update from source.python (if necessary)

default

the keyword "default" does not have any highlight. I think it should behave like "define".

Known issues

Some problems are not fixed yet.

  • Text tags
  • Menu and Label (GitHub)
  • Menu without name
  • Some keywords to add
  • Remove illegal keywords
  • Label comments and text tags with url search

Snippets suggestions

Write here your suggestion for a snippet.

Example:

keyword: dochelp
body:

## Visit the site for documentation or help of Ren'Py engine. ##
## Documentation:
    "http://www.renpy.org/doc/html/"
## Wiki-Old Documentation:
    "http://www.renpy.org/wiki/renpy/Wiki_Home_Page"
## Forum:
    "http://lemmasoft.renai.us/forums/viewforum.php?f=42"
## Package Documentation:
    "https://github.com/williamd1k0/language-renpy#getting-started"

Error publishing

Error

bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error

Symbols?

Is there any way to get labels into the symbols view for quickly jumping around a file/project? It looks like Atom uses ctags but I'm not sure how that would work on Windows, or even if language-renpy would benefit from it.

Colorblindness issue

Hey guys, I really like renpy and I've been having a blast getting to know the software, but I'm having issues with the color scheming in Atom. I'm slightly colorblind, and it makes it difficult to read certain words, especially in your custom-made theme for Atom. Would it be possible to make your theme more easily editable for an old coot like me?

Grammar attempts to include non-existant 'source.regexp.python.renpy' scope

๐Ÿ‘‹ I'm the primary GitHub maintainer for Linguist which is used for syntax highlighting on GitHub.com.

As part of this syntax highlighting, Linguist and thus GitHub.com, uses this grammar for highlighting Ren'Py files.

Our grammar validator has detected an error with this grammar:

  • repository vendor/grammars/language-renpy (from https://github.com/williamd1k0/language-renpy.git) (1 errors)
    • Missing include in grammar: source.renpy (in grammars/renpy.cson) attempts to include source.regexp.python.renpy but the scope cannot be found

This is caused by:

'regular_expressions':
'comment': 'Changed disabled to 1 to turn off syntax highlighting in โ€œrโ€ strings.'
'disabled': 0
'patterns': [
{
'include': 'source.regexp.python.renpy'
}
]

This section needs to be redefined, removed or the scope added to the grammar.

TextMate bundle for PyCharm support

TextMate is a MacOS editor. PyCharm has a TextMate plugin that allows to use TextMate bundle's for code highlighting purposes.

In order to do so, grammars/renpy.cson needs to be converted to a JSON and then to a PList file, which is a really easy to automate process through GitHub actions. The result would be a bundle that can be loaded into PyCharm and offer code highlighting capabilities.

Would this repository be a good place to host such an action so that at release time, an additional asset was created with the corresponding bundle? I can develop the workflow.

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.