ckx / gameconsole_xna Goto Github PK
View Code? Open in Web Editor NEWXNA 4 port of XNA Game Console by vos
XNA 4 port of XNA Game Console by vos
Text from the console should be copyable.
Need a way to filter command output if the command is logged, behavior similar to piping grep in unix.
Arguments should autocomplete if a command is sitting in the input box.
Map aliases to commands, for example "p" or "get" might execute a command titled "print". Aliases should be set in AddCommand.
Add new properties for DefaultValue and CurrentValue in the Command class, optionally settable when you run AddCommand.
Some commands aren't usable when a game is initially launched, because they rely on members of classes which aren't instantiated yet (especially for debug stuff). I dislike that these commands are not added to the commands
output, so in one game project, I wrote a helper function to add unavailable commands to the console.
InitialConsoleCommands.Add("Scene", new List<string[]>() { new string[2] { "list_scene_entities", "Lists all entities currently in a scene." } } );
InitialConsoleCommands.Add("DrawSystem", new List<string[]>() { new string[2] { "draw_hitboxes", "Draws all hit / hurt boxes on screen." },
new string[2] { "draw_wireframe", "Enables wireframe mode."} });
foreach (KeyValuePair<string, List<string[]>> kvp in InitialConsoleCommands) {
foreach (string[] sa in kvp.Value) {
devConsole.AddCommand(sa[0], delegate {
devConsole.Log($"Unavailable command. {kvp.Key} object is required before usage.");
}, sa[1]);
}
}
This is a problem that might be better solved in the game console library. A simple "AddUnavailableCommand" would do.
commands
While doing this, consider loading commands from a data file to make the whole skeleton command process simple across different projects (and to keep command documentation out of code).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.