| Profilo di AndreFurtaSpace - www.afurtad...FotoBlogElenchi | Guida |
|
28 febbraio [DSL Tools] VS package load failure? Look for corrupted .prf files!
For a Visual Studio package developer, one of the most frustrating error messages is the Package Load Failure, that tells that your VS Package was unable to load in the IDE. For some of my projects, including the FeatureModelDSL, I was able to notice that the root cause of such an error was the eventual corruption of the windows.prf file under C:\Documents and Settings\username\Application Data\Microsoft\VisualStudio\9.0\. Deleting this file (so that it can be automatically re-generated by Visual Studio) makes the package work again. I’m suspecting a custom toolwindow I have created for such a package might be causing the corruption. To be investigated… BR, Exporting a XNA Project as a Project Template
A XNA project contains a nested project: the Content project. If you export your game as a Visual Studio project template, unfortunately such nested Content project doesn’t get exported by default as well. Therefore, when you create project instances based on your template, the Content stuff is not loaded. Unless… you do this awesome hacking over here! Kudos for those who published it! BR, 26 febbraio [DSL Tools] How to handle a model (diagram) Load event
Suppose you have a domain concept (class) with a Namespace property, which will be used in code generation. It would be cool if such a property was automatically filled with the value of the project root namespace when the model (diagram) is loaded for the first time, wouldn’t it? So how to handle the model Load event? The trick is to add a partial <DslName>DocData class to your project, then override the OnDocumentLoaded method. From there, you can get the this.RootElement property and cast it to your root model element. For instance, that’s exactly how I’m doing with my GameDefinitionDSL (yet to be released): internal partial class GameDefinitionDSLDocData This approach follows the “Convention over Configuration” design paradigm, setting an appropriate default value for the game namespace, that can still be modified by the user later. BR, 22 febbraio Input Mapping DSL: add input mappings to your XNA/FlatRedBall game[Input Mapping DSL: adicione mapeamentos de entrada para seu jogo XNA/FlatRedBall] The SharpLudus project bits are finally getting ironed to release. The ArcadEx game factory, under development, is one of the factories created as part of the project, and it’s focused on streamlining the creation of arcade games in XNA. As a software factory, it provides (visual) languages, code generators, frameworks and tools to improve the development experience. Many of its assets are built atop the FlatRedBall game engine. The first announcement for ArcadEx is the Input Mapping DSL (domain-specific language), a visual designer and code generator integrated into Visual Studio the help you to add to your XNA/FlatRedBall game, very easily, mappings from a Xbox360 controller to the keyboard. In other words, if any of the players does not have a Xbox360 controller available, you will still be able to handle their input from the keyboard, while still programming against the controller buttons. Simplifies your code; saves you time. The input mapping does the magic for you. The project is also a nice example on how to replace the default DSL designer by a custom designer in the Microsoft DSL Tools. PS: the project is open source, and the code is also available. Feedback is always welcome. Thanks! The statements or testimonies I offer in this post represent my own personal views. English - Portuguese 21 febbraio Programmatically checking valid identifiers
Have a string and need to check if it’s a valid C# identifier (to use as a method name in code generation, for example)? Try this code:
I recommend checking other useful methods of the CodeDomProvider class as well. BR, 19 febbraio [echo post] Mobile phone with a built-in projector
Not bad to have a projector in your pocket! (wait until the end of the video)
More here. BR, 18 febbraio SharpGames mini-game competition
Friends from SharpGames (the Brazilian XNA games community) just released a video with the games that were submitted for the mini-games challenge. All games have less than 100 lines of code, and that makes some of them really impressive!
It’s at least 10 times less source lines of code than the first game I’ve ever created in my life: Alien Attack, 10 years ago, in C programming language. BR, |
|
|