This project is read-only.

Readme Contents

Part I The introduction to the Runa Engine

1.1 What is Runa

1.2 Runa highlights

1.3 Why we need Scripting

1.4 The power of XNA and IronRuby

1.5 The system requirements for Runa Engine

1.6 How to Install the Development Environment

1.7 How to compile the project

 

Part II The architecture of the project

2.1 The basic framework of the project

2.2 Execution flow of the Windows port of the engine

2.3 About the Windows Phone port

 

Part III Script and API reference

 

Part IV The future plan for the project

4.1 The known issues

4.2 The future plan

 

Appendix Recommended References

 

Part I The introduction to the Runa Engine

1.1 What is Runa

IronRuby + XNA = Runa. As we call it “ルナ” in Japanese, we call it “露娜”(lù'nà) in Chinese.
Runa is a simple engine for rendering game contents at runtime based on the XNA framework and IronRuby.
Runa can separate the render apart from the game contents and game logic.
IronRuby is a .NET DLR based version of Ruby.
XNA is Microsoft’s game framework for Windows, Windows Phone and Xbox 360.

1.2 Runa highlights
Comparing to most exist similar engines, Runa use IronRuby instead of Python or other custom script language.
Ruby is much simpler than Python and more similar to Basic which is very easy to lean.
IronRuby is based on .NET platform. So you can take full power of the .NET.
XNA is a cross-platform game framework and can be transplanted to other platforms like Android, iOS and Silverlight 5.

1.3 Why we need Scripting

Similar to most exist game engine, we also choose to use script language to realize the user’s logic instead of a configuration file.
Games need some AI features, so logic is very important. Expression in configuration file is OK but that would be a very complex work.
Simple logic, such as page navigating effects, can be expressed in XAML. But without the code behind, we can’t extend more effect types.

1.4 The power of XNA and IronRuby

XNA is a cross-platform game framework and can be transplanted to other platforms like Android, iOS and Silverlight 5.
XNA is not only a 2D framework but also a 3D one. It support a lot of hardware accelerating features.
Ruby is much simpler than Python and more similar to Basic which is very easy to lean.
IronRuby is based on .NET platform. So you can take full power of the .NET.
Now only IronRuby has been transplanted to all the popular platforms including Windows, Mac OS X, Linux/Unix, Android, Windows Phone, Windows Mobile and iOS. And it even can run on the Web Server. For example, Ruby on Rails runs well over the IronRuby with ASP.NET. You can also use IronRuby with your Silverlight applications.

 

1.5 The system requirements for Runa Engine

1.5.1 For the end users

1.5.1.1 Supported Architectures:

  • x86
  • x64 (WOW)
  • ARM (Windows Phone)

1.5.1.2 Supported Operating Systems:

  • Windows XP (x86) with Service Pack 3 - all editions except Starter Edition
  • Windows XP (x64) with Service Pack 2 - all editions except Starter Edition
  • Windows Vista (x86 & x64) with Service Pack 1 - all editions except Starter Edition
  • Windows 7 (x86 and x64)
  • Windows Server 2003 (x86 & x64) with Service Pack 2
  • Windows Server 2003 R2 (x86 and x64)
  • Windows Server 2008 (x86 and x64) with Service Pack 2
  • Windows Server 2008 R2 (x64)
  • Windows 8 (x86 and x64)
  • Windows Phone 7.5 and later

1.5.1.3 Hardware Requirements:

  • Computer with a 1.6GHz or faster processor
  • 1024 MB RAM
  • 1 GB of available hard-disk space (Depend on the specific game)
  • 5400 RPM hard drive
  • DirectX 9 capable video card running at 1280 x 1024 or higher-resolution display

1.5.1.3 Prerequisites:

  • .NET Framework 4.0
  • XNA 4.0 Redistributable
  • A Windows Phone 7.5 Device

1.5.2 For the developers

1.5.2.1 Supported Operating Systems:

  • Windows Vista (x86 & x64) with Service Pack 1 - all editions except Starter Edition
  • Windows 7 (x86 and x64)
  • Windows Server 2003 (x86 & x64) with Service Pack 2
  • Windows Server 2003 R2 (x86 and x64)
  • Windows Server 2008 (x86 and x64) with Service Pack 2
  • Windows Server 2008 R2 (x64)
  • Windows 8  (x86 and x64)

  An x64 edition of Windows Server 2008 R2 is recommended.

1.5.2.2 Hardware Requirements:

  • Computer with a 1.6GHz or faster processor
  • 2048 MB RAM
  • 5 GB of available hard-disk space
  • 5400 RPM hard drive
  • DirectX 10.1 capable video card running at 1280 x 1024 or higher-resolution display (For Windows Phone simulator and advanced APIs support)

1.5.2.3 Prerequisites:

  • Visual Studio 2010 Professional or Ultimate with VB.NET and C# installed
  • Visual Studio 2010 Service Pack 1
  • Windows Phone SDK 7.1 RTM
  • A SVN client such as AnkhSVN

  Please ensure the language of the SDK is the same as the VS2010.
  English version is recommended.

1.6 How to Install the Development Environment

Follow the steps below to configure your development environment.

  1. Visual Studio 2010 (Professional or higher)

  2. Visual Studio 2010 SP1

  3. Visual Studio 2012 (Professional or higher)

  4. If you are using Windows 8, please install the Game For Windows software pack

  5. XNA Game Studio Refresh 4.0

  6. Download the following pack: 

    http://files.cnblogs.com/fhmsha/XNA_Game_Studio_4.0_vs2010_templates.zip

    and extract all things into your Visual Studio 2012 installation directory:

    Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0

    Note: Visual Studio 2010 and 2012 must be installed into their default directory.

  7. Modify the vision information of the extension:

    Use any text editor you like to open extension.vsixmanifest

    Change <VisualStudio Version="10.0"> into <VisualStudio Version="11.0">

  8. Start Visual Studio 2012 with administrator role.

  9. Enjoy yourself!

1.7 How to compile the project

Please download the latest source code package from the Codeplex download page.
We will provide a daily build version in the planned tag.
Open the Runa.sln and make sure the build configuration is set to x86.
Then click the Build Solution, and the Windows port of the Runa Engine will be compiled.
For Windows Phone port, we haven't gotten ready for the migration.
A few days ago, we made a technique test version of Windows Phone port, and have made sure that the architecture could be running on the Windows Phone.

Part II The architecture of the project

2.1 The basic framework of the project

We have two entry point applications for now.

One is for Windows, and the other is for Windows Phone.

The two entry point applications is for the hosting the XNA Render and other UI elements.

Runa.Core is the core library for the implementation of Data structures, Resource manager and other runtime objects.

Runa.UI is the assembly for Windows controls presenting.
Runa.Scripting include the script parser.


2.2 Execution flow of the Windows port of the engine

Here we are mainly talking about the Windows port of the engine.

The program started in the Startup Event defined in file ApplicationEvents.vb.

In this file, we override and implement some event and procedures for the Windows Application Framework.

In the Startup event, we load the application configuration settings for debugging aid.

Then the control flow moves to the Program.Main() function defined in Program.vb.

This Main function is just for the capability for the XBox 360 port and Windows Phone port.

We should initialize the Isolated Storage object here.

Then after the execution of the Main() function,

the default form, the Application Framework show the FormGameChooser form.

This form is used to show the users the game list in the DownloadedGames directory.

We choose a game and click the Load Button.

Then the control flow moves to the event handler of the Load Button.

We start a new thread to hold the Game object.

After the execution of the constructor of the Game class defined in GameMain.vb,

the XNA framework auto invoke the Initialize() function to initialize the GameParser and ScriptTask objects we need.

The ScriptTask and GameParser are defined in the Runa.Scripting project, which provide the services for game resource management and script hosting.

Later then, the XNA framework auto invoke the LoadContent() function to invoke the OnLoadingContents.rb script to load contents for the game. But attention please, we use asynchronies to load the contents.

Then the XNA framework start the Game Loop, which means the periodic invoke of OnDraw() and OnUpdate() function.

 

2.3 About the Windows Phone port

For Windows Phone port, we use the Silverlight and XNA Project to build both welcome UI and game render.

The execution logic is almost the same as the Windows port, but a little different in Input Event handling.

In the Windows port, we can not render a regular WinForm, WPF or Silverlight controls in the Game Rendering Window.

But in Windows Phone port, we can render regular Silverlight controls in the Rendering page.

 

Part III Script and API reference

Go to the Script and API reference page on wiki.

 

Part IV The future plan for the project

4.1 The known issues

Because of the missing of the full support of reflection on Windows Phone, we still have to make up the missing assemblies so that IronRuby can run properly on Windows Phone.
We need to wrap up a lot of runtime APIs to simplify the script.

 

4.2 The future plan

The engine will transplant to more than one platforms.

Appendix Recommended References

101.Windows.Phone.7.Apps,Volume.I:Developing.Apps.1-50

Professional.Windows.Phone.7.Application.Development

Professional.Windows.Phone.7.Game.Development

Programming.Windows.Phone.7

Programming.Windows.Phone.7.Microsoft.Silverlight.Edition

Programming.Windows.Phone.7.Microsoft.XNA.Framework.Edition

Windows.Phone.7.Developer.Guide:Building.connected.mobile.applications.with.Microsoft.Silverlight

Windows.Phone.7.Game.Development

Learning XNA 4.0

Professional XNA

Last edited Sep 12, 2013 at 12:16 PM by LonghronShen, version 14

Comments

No comments yet.