9

Method 1 You don't have to create a solid white version of every sprite in your game manually - you could just as well automate the process at load time. In other words, you can use Texture2D.GetData() to access the pixels of your texture (and retrieve them as a simple Color[]), iterate over them replacing any non-transparent pixel with solid white , and ...


8

Draw a shadow sprite like you draw your character before the character (to make it appear behind him). Make sure its X position is updated according to the character, but the Y position stays on the tile. You have got a shadow.


7

There are two general approaches I would take. 1) The polygon-based approach. Each of your zones is defined as a series of points. You can then do point-in-polygon testing for whether or not your cursor position is inside a given area. You can also do things like tessellate it and draw an image on it. 2) The image-based approach. Author an image where ...


6

I recommend tIDE its open source written in XNA and comes with a rendering engine, and is an excellent starting point.


5

I'm going to look at how some pre-existing implementations work (that I have actually used) - and hopefully that will give you some ideas on how to integrate it with your game engine. Operation Flashpoint Operation Flashpoint (original release) has a command and control system for entities. This is essentially a list of commands that entities had to ...


5

In a multiplayer game, every gameplay-relevant decision should be made by only one system. When multiple systems make a decision, like in your case the trajectory of the ball, and they disagree due to timing issues, the game gets out of sync. When each client calculates the angle only after its own collisions and sends the new trajectory of the ball to the ...


4

I'm not sure I understood what your problem is, but here's how I do it. First I create a static class on my project to provide an extension method for SpriteBatch that lets it know how to draw textured line. Example (just the class, it's missing the using directives and the namespace so place it wherever you want): public static class LineRenderer { ...


4

I have no first hand knowledge in this field, but here are the "Google answers" to your question. You could use GLEED2D if you want free form levels, or you could use Tiled Map Editor if you want tile maps. See also: Tools for creating 2d tile based maps Depending on your choice of map editor you might be able to find a suitable importer for XNA, ...


4

This is not a direct answer to your question, but some advice. You want to hit every market you can. Especially as s mall indie/hobbyist developer, every single potential customer matters. Developing for a single platform (even a popular one) is a very unwise decision in today's world of 6+ highly popular gaming platforms. At the very least, you want to ...


4

The problem is that you're trying to build the XML file using the XNA's Content Pipeline. However, in the source code you posted, the XML file is being loaded at runtime using the LINQ to XML API (XDocument) so it doesn't need to go through the content pipeline. To solve the problem, go to the Solution Explorer, browse into your Content project to your XML ...


4

Your texture is a 32 bit texture. Somewhere between loading it and displaying it, it is getting downsampled to 16-bits (or some other low bit-depth). The loss of precision gets rid of the smooth gradients and gives you bands of colour like that. None of the things you have mentioned (loading it with LoadStream, drawing it with BasicEffect with that vertex ...


4

It looks like XNA games are always clamped at a maximum resolution of 800x480; even changing the PreferredBackBufferWidth and PreferredBackBufferHeight parameters doesn't prevent it from using a scaled-up + letterboxed framebuffer.


4

You could develop your own SOAP or REST API, host it on a website and have your apps connect to that. You'd have full control over it and wouldn't have to pay for anything (other than hosting, of course). There is more of a development cost up front than using some kind of pre-built package, but you have the control to scale as you need to and make the API ...


3

From the various reports, tweets, articles I've read it still seems that unless you're an Xbox Live game the best way to earn money is via ads. For example and the most successful indie dev so far Elbert Perez *(based on 12 month old data). He's recently tweeted that his ad revenue for the past two months (as at July 2012) has been abysmal though. Our ...


3

By default, in Windows Phone 7 all apps use 16 bits per pixel graphic mode. To switch it to 32 bits, see here: https://stackoverflow.com/a/10313783/126995. This is only available since WP 7.1 Mango, but since every WP7 device can be upgraded to WP 7.1, it's no big deal.


3

Speaking to Android specifically, there is a 2D drawing API available as documented here that is not OpenGL ES based: http://developer.android.com/guide/topics/graphics/2d-graphics.html If you aren't specifically looking to avoid OpenGL ES entirely and are just looking for a convenient abstraction on top of it to prevent you from having to work with it ...


3

Windows Phone is limited to C# 3.0 and .NET 3.5. You have to use the Task Parallel Library to achieve this.


3

It's something you should look into. There's an article on MSDN about this warning. Essentitally, it's a matter of optimizing you code, but it's important to profile the code so you know what to optimize. These are the steps listed in the article: To investigate high CPU usage on the UI thread To investigate a high CPU usage warning, click the ...


3

You can't. Important parts of their infrastructure are contained within the Game class. (Also, GameComponent's constructor takes a Game.) My advice (as always) is to not use GameComponent. Like the Game class itself, game components are a completely optional part of the framework. And often they're more trouble than they're worth. You're better off just ...


3

Using the information from your previous question, you know what the delta of the drag was. This gives you distance. The only other thing you need to get velocity is a time. So, record the time when the touch even started, and when it finished. The difference in those times is the time it took for the gesture to complete. Now you have distance and time. So ...


2

You seem to have the content file properties right. The next thing that comes to mind is that maybe your redRect.jpg is not in a root of your content project. This would be the issue. If you have the content file in a subdirectory of content project, lets say "textures", you need to specify path to the asset including that folder name like this: redTexture ...


2

CamStudio will allow you to record video from your computer for free. This is probably the best solution, since I don't know of any way to record video from a Windows Phone on the phone itself. Though you could point a camera at the phone and record things that way.


2

You might find this property useful: BasicEffect.DiffuseColor


2

Unless you are actually playing with the Depth, you should be using SpriteSortMode.Deferred. MSDN Doc Here If you are drawing everything at Depth 0, I'm pretty sure that XNA will pick a draw order for you. There are others discussing a similar issue here: http://forums.create.msdn.com/forums/p/72055/439545.aspx. In 3D, this is usually called Z-fighting.


2

I've tried your code and it appears to be working on an empty project for the most part. But there are a few things that could make it fail: You need to enable VertexColorEnabled on your effect otherwise it will be rendered white: effect.VertexColorEnabled = true; If you don't see the board being rendered you're probably looking at it from behind. By ...


2

If you really want to use XNA as your framework of choice to build your game, you should have a look at MonoGame. Support for 3D is quite new to the framework and probably not ideal, however it would let you write in C# and reuse the vast majority of your code for both platforms (WP7 Marketplace and Windows 8 store). Game are already being submitted to the ...


2

Unless you pasted your example wrong, you're not even using the logoPosition you calculated when drawing, and you're not showing what the contents of centreand baseOriginare, so it's hard to tell you where the problem is. But anyway I'd use the position and origin parameters of SpriteBatch.Draw in order to draw the image centered. In two steps, although ...


2

It took me some searching but WP7 does not support DLC and Micro-Transactions so you can't expand your game with extra levels via the marketplace so that's why you couldn't find the functionality to browse for extra files in your game directory. What you can do: On WP7/XNA you have full socket access, you could put up a web service and download extra ...


Only top voted, non community-wiki answers of a minimum length are eligible