-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unity+FyreVM demonstration application. Requires Unity.
- Loading branch information
1 parent
4c5ebd4
commit 3f582f9
Showing
53 changed files
with
12,718 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
Unity/Inform/Extensions/HitPoint Studios/FyreVM Unity Support.i7x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Version 1 of FyreVM Unity Support by HitPoint Studios begins here. | ||
|
||
Include FyreVM Support by David Cornelson. | ||
|
||
Every Turn (this is the FyreVM Unity Demo Support rule): | ||
printLocationOutput; | ||
continue the action. | ||
|
||
When play ends: | ||
printEndGameOutput; | ||
continue the action. | ||
|
||
The nTempNum is a number variable. | ||
The nTempNum is 0. | ||
|
||
The nRoom is a room that varies. | ||
|
||
To printEndGameOutput: | ||
[--output for the game ending] | ||
select the EndGame channel; | ||
say "GameEnded"; | ||
select the main channel. | ||
|
||
To printLocationOutput: | ||
[--output the location of the player] | ||
select the Location channel; | ||
Let zxcRoom be location of player; | ||
say "[zxcRoom]"; | ||
select the main channel. | ||
|
||
FyreVM Unity Support ends here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"FyreVM Unity Demo" by HitPoint Studios | ||
|
||
Include FyreVM Unity Support by HitPoint Studios. | ||
|
||
Redhall is a Room. | ||
Bluehall is a Room. | ||
Greenhall is a Room. | ||
|
||
Redhall_Exit is a door. | ||
The Redhall_Exit is north of the Redhall and south of the Bluehall. | ||
|
||
Bluehall_Exit is a door. | ||
The Bluehall_Exit is north of the Bluehall and south of the Greenhall. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# FyreVM Unity Integration Example | ||
|
||
## Overview | ||
|
||
This project is a basic example of integrating the FyreVM library into a Unity3D project. It illustrates basic interaction between Unity objects and FyreVM. The project was built using Unity version 4.6.2. The project may or may not work on earlier versions. | ||
|
||
## Inform 7 | ||
|
||
### Building | ||
|
||
Install the latest version of Inform 7 (http://inform7.com/download/). | ||
|
||
Install the FyreVM Support extension found elsehwere in the FyreVM GitHub reporsitory. | ||
|
||
FyreVM Support - handles the Channel IO communication protocols implemented in FyreVM. | ||
|
||
Install the included Inform extension located under "Inform\Extensions" in this repository. These extensions include: | ||
|
||
FyreVM Unity Support - handles the output of Unity-specific data into the apporpriate FyreVM channels. | ||
|
||
To verify that the extensions are installed and working properly, open the 'FyreVM Unity Demo.inform' project in Inform and hit play. You should be able to navigate between the three rooms defined in the simple Inform script provided. | ||
|
||
### Editing | ||
|
||
To add extra functionality beyond the simple room navigation illustrated in this demo, you must add a new channel to the FyreVM Support extension and an output for that channel in the FyreVM Unity Support extension. | ||
|
||
After adding any new functionality, make sure the settings are set to build a Glulx file and that "Bind up into a Blorb file on release" is not checked. | ||
|
||
Select the Release option and it will generate a .ulx file for you. | ||
|
||
Change the .ulx extension to .bytes and copy it over to the Unity folder: "\Unity\Assets\Resources\". This will allow unity to be able to read in the new Glulx file. | ||
|
||
## Unity | ||
|
||
### Building | ||
|
||
Open up the Unity project located under "\Unity" in this repository using Unity 4.6.2 or later. | ||
|
||
Press play in the editor and you should be able to navigate between the rooms defined in the Inform script. | ||
|
||
### Editing | ||
|
||
The scripts are located at "\Unity\Assets\Scripts\" | ||
|
||
All of the glulx Channel IO processing is done via "GlulxStateService.cs" | ||
|
||
To add new channel support, edit "eStateOutputChannels" in "GameConstants.cs" to include your new channels. Then add parsing logic to "GlulxStateService.ProcessGlulxOutput" to parse data from those new channels appropriately. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.