Giter Site home page Giter Site logo

unity-raconteur's Introduction

Raconteur

This library is no longer in development or supported.

Raconteur is a Unity3D library that provides support for Ren'Py scripts.

To set up Raconteur, please refer to the Setup guide on the wiki.

Licensing

Please see the file named LICENSE.md.

unity-raconteur's People

Contributors

exodrifter avatar ismirlian avatar wilsonvillegas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

imclab

unity-raconteur's Issues

Loop command does not loop music

Currently, using the command:

play music "theme.ogg" loop

Does not result in the music being looped. The music plays once and finishes, which is not expected behavior.

It appears that the issue lies in the Update function of RenPyAudioSource.cs where it needs to be checking if the music is already looping.

Leaked objects when saving project

The Unity Console reports that objects have been leaked if an asset has been imported during the current session and the user tries saving the project.

For example, the message looks like the following (as an info message):

Cleaning up leaked objects in scene since no game object, component or manager is referencing them
 RenPyComment has been leaked 19 times.
 RenPyScriptAsset has been leaked 1 times.

This does not occur when the asset has been created in a previous session, which is the expected behaviour.

Implement dynamic scoping of _return variable

Related to #32 from Milestone 1. Currently, the _return variable is being treated as any other variable but it should be dynamically scoped as it is in the Ren'Py doc:

return_statement -> "return" expression

If the optional expression is given to return, it is evaluated, and it's result is stored in the _return variable. This variable is dynamically scoped to each context.

Add an example Ren'Py project

Add an example Ren'Py project in the folder Examples/RenPy.

The example Ren'Py project should cover all of the available commands on the Ren'Py wiki.

Specifically, the project should include the following features:

  • comments
  • call statements
  • define statements
  • if, elif, else, and endif statements
  • image statements
  • init statements
  • jump statements
  • label statements
  • menu statements
  • pause statements
  • play statements (including playlists)
  • pass statements
  • python statements (only for variable assignment operations =, +=, -=, *=, /=)
  • queue statements
  • return statements
  • say statements
  • scene statements
  • show/hide statements
  • stop statements
  • window statements

Remove delay at run time caused by skipped lines

As noticed in issue #41, the number of init statements that were executed before the first block effected how long it took until the first line of dialog was rendered on the screen. Similarly, whenever a line that doesn't need to be rendered gets skipped, Raconteur waits until the next update cycle before moving to the next statement. This causes a noticeable delay to the player, especially when multiple statements are skipped in a row.

Remove the delay caused by the RenPyDisplay.cs or RenPyViewBasic.cs scripts waiting for the next update loop when a line is skipped.

RenPyPlay does not recognize the voice channel

Although there is support for the voice channel in the RenPyAuralState, the RenPyPlay statement will not parse play statements using the voice channel.

For example, the following statement will not be parsed correctly:

play voice "audio.wav"

Raconteur Ren'Py throws exception when return statement is missing

Raconteur Ren'Py throws an exception when reaching the end of a script that is missing a return statement. For example, consider the following Ren'Py script:

label start:
    "Hello world!"

Raconteur does not stop the script, which is what Ren'Py would do, causing dependent Raconteur Ren'Py view code to fail.

Write the technical spec for Ren'Py statements

Write the technical specification that will be used for the Ren'Py component of the library concerning statements.

It needs to include a description for every Ren'Py statement that is or will be supported in Raconteur. This includes:

  • Specifics of how the statement is structured
  • Specifics of how the statement should work
  • Any applicable edge cases and how they should be handled
  • How much of the statement is currently implemented in the master branch
  • Links to any issues that concern the statement

The technical spec will be used in Milestone 3 to determine precisely what needs to be done.

Examine performance of run time versus import time

In issue #16, the behavior of Raconteur was changed to parse the script at import time instead of at run time. This was done to avoid a performance impact at run time.

It is not evident if there was any change in performance, but it is clear that the custom asset files generated by Raconteur are much bigger in file size now (about 8-9x). For this reason, it should be considered if it would be worthwhile to change back to the old behavior .

The benefits of both behaviors should be analyzed and the one with the lowest impact on run time should be used.

RenPyReturn parsing breaks when there is no expression

The RenPyReturn statement does not parse expressions correctly when there is no expression after the return. For example, the following script.rpy file will not serialize:

label start:
    return


Note the two newlines at the end of the file. A similar script with one or zero newlines at the end of the file will be parsed correctly.

Additionally, any return not at the end of a file will fail to parse correctly as well. For example, the following example will not be parsed correctly

label start:
    return
label hello:
   "Hello world."

Parse the Ren'Py script at run time instead of at import time

Examination done in issue #41 has determined that the process of parsing the script at import time is overall more costly than parsing the script at run time. Change the Ren'Py script asset (RenPyScriptAsset.cs) to store the original script and parse it at run time.

Create a wiki page explaining how to use the Ren'Py feature of Raconteur

Create a wiki page explaining step-by-step how to use the RenPy feature of Raconteur.

Ideally, it would have the following features:

  • Suggests an ideal workflow
  • Explains briefly how the Ren'Py project is imported by Raconteur
  • Shows what MonoBehaviours are needed to display the Ren'Py script in the game
  • Talks about the Raconteur debug panel and what it can potentially be used for
  • Can be easily found on the wiki homepage (via a link)

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.