Presentation is loading. Please wait.

Presentation is loading. Please wait.

Created By: Kevin Cherry. A library that creates a display to run on top of your game allowing you to retrieve/set values and invoke methods.

Similar presentations


Presentation on theme: "Created By: Kevin Cherry. A library that creates a display to run on top of your game allowing you to retrieve/set values and invoke methods."— Presentation transcript:

1 Created By: Kevin Cherry

2 A library that creates a display to run on top of your game allowing you to retrieve/set values and invoke methods.

3 To understand how this is possible, we need to examine some basic and.Net specific concepts

4  Interpreted languages evaluate source code at runtime  Code is not compiled but rather parsed and evaluated as needed.  Examples: JavaScript, PHP, Python, Ruby  Compiled languages compile to assembly or special/proprietary intermediate language losing type information in the process, making arbitrary code execution at runtime impossible.  Examples: C#, C++, Java, VB

5  Why it is possible to interpret strings containing code at runtime with a.Net language .Net converts code into Microsoft Intermediate Language and a metadata file. The metadata file contains all the information obtained from parsing the source types and MSIL contains the instructions for execution. Querying this metadata we can obtain links to type members.

6

7  To query this metadata file, we use reflections. This part of the.Net framework provides information on the specified object’s type which can be used to retrieve fields/properties or invoke methods.

8 It converts your expression into subexpressions, then parses and evaluates them using reflections.

9

10

11 Pressing custom set key shows/hides display

12 Invoke method for restoring health of player

13  Casting  Enums  Identifiers  Literals  Methods  New  Object chains  Types

14  Anonymous Types/Functions  Array indexing or initialization  Arithmetic  Collection initialization  Conditional logic  Generics  Keywords:  as, base, default (e.g. default(int)), fixed, is, out, ref, sizeof, stackalloc, this, throw, typeof, unchecked, unsafe  Lambda Functions  LINQ  Logic Operators (&, |, ^, &&, ||)  Property indexers

15  Bugs in expression parsing  Common/Frequently used C# expressions  Bugs elsewhere  Common/Frequently used C# keywords  New Terminal commands  Terminal UI improvements  Speed optimizations  Other improvements

16  Email me at: kcherr1@tigers.lsu.edu  with subject “XNA Debug Terminal Source Code" to obtain the source code  Look over code and decide on a single task to undertake  Email me details of the task (what it is and about how long it will take you)  Email back the original source code with all of your changes when done  All contributors will get name in Authors file and Getting Involved, News, and Download webpages

17  Document all types, fields, properties, and methods you add using the "///" xml documentation  Add test cases to the test project that cover your newly added functionality and ensure that each one passes. All previous test cases must pass as well  Try to follow the coding convention used by the existing code  Only change existing code when it concerns your single task

18 http://www.protohacks.net/xna_debug_terminal


Download ppt "Created By: Kevin Cherry. A library that creates a display to run on top of your game allowing you to retrieve/set values and invoke methods."

Similar presentations


Ads by Google