created by: kevin cherry. a library that creates a display to run on top of your game allowing you...

18
Created By: Kevin Cherry

Upload: ashlynn-morgan

Post on 03-Jan-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 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

Created By:Kevin Cherry

Page 2: 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

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

Page 3: 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

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

Page 4: 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

Interpreted languages evaluate source code Interpreted languages evaluate source code at runtimeat runtime Code is not compiled but rather parsed and Code is not compiled but rather parsed and

evaluated as needed.evaluated as needed. Examples: JavaScript, PHP, Python, RubyExamples: JavaScript, PHP, Python, Ruby

Compiled languages compile to assembly or Compiled languages compile to assembly or special/proprietary intermediate language special/proprietary intermediate language losing type information in the process, losing type information in the process, making arbitrary code execution at runtime making arbitrary code execution at runtime impossible.impossible. Examples: C#, C++, Java, VBExamples: C#, C++, Java, VB

Page 5: 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

Why it is possible to interpret strings containing Why it is possible to interpret strings containing code at runtime with a .Net languagecode at runtime with a .Net language .Net converts code into Microsoft .Net converts code into Microsoft

Intermediate Language and a metadata file. Intermediate Language and a metadata file. The metadata file contains all the information The metadata file contains all the information obtained from parsing the source types and obtained from parsing the source types and MSIL contains the instructions for execution. MSIL contains the instructions for execution. Querying this metadata we can obtain links to Querying this metadata we can obtain links to type members.type members.

Page 6: 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
Page 7: 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

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

Page 8: 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

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

Page 9: 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
Page 10: 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
Page 11: 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

Pressing custom set key shows/hides Pressing custom set key shows/hides displaydisplay

Page 12: 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

Invoke method for restoring health of Invoke method for restoring health of playerplayer

Page 13: 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

CastingCasting EnumsEnums IdentifiersIdentifiers LiteralsLiterals MethodsMethods NewNew Object chainsObject chains TypesTypes

Page 14: 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

Anonymous Types/FunctionsAnonymous Types/Functions Array indexing or initializationArray indexing or initialization ArithmeticArithmetic Collection initializationCollection initialization Conditional logicConditional logic GenericsGenerics Keywords:Keywords:

as, base, default (e.g. default(int)), fixed, is, out, as, base, default (e.g. default(int)), fixed, is, out, ref, sizeof, stackalloc, this, throw, typeof, ref, sizeof, stackalloc, this, throw, typeof, unchecked, unsafeunchecked, unsafe

Lambda FunctionsLambda Functions LINQLINQ Logic Operators (&, |, ^, &&, ||)Logic Operators (&, |, ^, &&, ||) Property indexersProperty indexers

Page 15: 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

Bugs in expression parsingBugs in expression parsing Common/Frequently used C# expressionsCommon/Frequently used C# expressions Bugs elsewhereBugs elsewhere Common/Frequently used C# keywordsCommon/Frequently used C# keywords New Terminal commandsNew Terminal commands Terminal UI improvementsTerminal UI improvements Speed optimizationsSpeed optimizations Other improvementsOther improvements

Page 16: 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

Email me at: [email protected] Email me at: [email protected] with subject “with subject “XNA Debug Terminal Source Code" XNA Debug Terminal Source Code" to obtain to obtain

the source codethe source code Look over code and decide on a single task to Look over code and decide on a single task to

undertakeundertake Email me details of the task (what it is and about Email me details of the task (what it is and about

how long it will take you)how long it will take you) Email back the original source code with all of your Email back the original source code with all of your

changes when donechanges when done All contributors will get name in Authors file and All contributors will get name in Authors file and

Getting Involved, News, and Download webpagesGetting Involved, News, and Download webpages

Page 17: 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

Document all types, fields, properties, and methods Document all types, fields, properties, and methods you add using the "///" xml documentationyou add using the "///" xml documentation

Add test cases to the test project that cover your Add test cases to the test project that cover your newly added functionality and ensure that each newly added functionality and ensure that each one passes. All previous test cases must pass as one passes. All previous test cases must pass as wellwell

Try to follow the coding convention used by the Try to follow the coding convention used by the existing codeexisting code

Only change existing code when it concerns your Only change existing code when it concerns your single tasksingle task

Page 18: 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

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