How do I set the window / screen size in xna?
How can I adjust the size of the window in XNA. Default it starts in a 800x600 resolution. ...
How can I adjust the size of the window in XNA. Default it starts in a 800x600 resolution. ...
Hello, I have problem with class design. I have core class for my game objects. While drawing I need to retrieve position from the object. Unfortunately object is seen as it's base type so the position is not retrieved from derived class but from it's parent. Defining field as virtual would fix my problem, but it's impossible :(. How ca...
Hello, This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model class I'm usin...
What is the best size for an individual tile in a 2D sprite sheet? I am creating a sprite sheet and am trying to figure out what the best resolution is to use for each sprite. Is there a standard size I shouldn't go above or below? ex. 64px X 64px, 512px X 512px, etc. I am trying to get HD quality sprites. Think Alien Hominid, Castle...
I am using XNA and I want to save files to Vista's "Saved Games" folder. I can get similar special folders like My Documents with Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) but I cannot find an equivalent for the Saved Games folder. How do I get to this folder? ...
I was wondering if there is any benefit to using an orthographic projection camera, to make a 2D game with 3D models (as opposed to making sprites and using 2D). Also, on a related note when I use orthographic projection, my 3d-model is stretched. Does anyone know why this is happening? I know that aspect ratio only influences the persp...
For some reason the LoadContent method does not get called in my Components. For example I have Game class in which I do: //Game.cs protected override void LoadContent() { editor = new Editor(...); Components.Add(editor); } //Editor.cs public class Editor : DrawableGameComponent{ Game game; public Editor(Game game, ...):base(ga...
Ok, so I ended up writing my own game engine based on top of XNA, and I am just wondering what else I need to make a complete engine. This is what's in the engine: Physics (Farseer Physics) Particle Engine (Mercury Project) 2D Cameras Input Handling Screen Management (Menus, Pause Screen, etc.) Sprite ( Animation, Sprite Sheets) And ...
This is a C# question. I was just wandering if anyone tried storing their data (like config files for example), in the *.cs file, instead of XML? I really hate XML. The whole idea of parsing html-like structure every time you need some data seems stupid. Are there lightweight alternatives (like YAML) to XML? In my case I actually need...
Hey I'm currently playing about with some XNA stuff learning to program AI. Anyway, here's my situation: Class A has a function which takes a reference to an instance of class B, does some stuff to to it, and returns it. Class B contains an instance of Class A, and then calls the function from it. Example in code: Class A { B clas...
Hello, I have a problem and I am not sure how to approach the solution. I need to create a 2D map editor for my XNA app., with a certain number of tiles. Say a map will be 50x100 tiles. I am not sure what data structure to use for the map, tiles and how to store it on the hard-drive for later loading. What I am thinking now is this. I ...
I am quite lost with where and how to store the *.txt level files in my game. What I want in my game is the availability of a few "prebaked" levels that come installed with the game but also the ability for users to create their OWN levels. So what I did is created a new directory inside visual studio in the "Content" called levels, an...
I don't really understand how Content importer/processor works in XNA. I need to read a text file (Content/levels/level1.txt) of the form: x x x x x x where x's are just integers, into an int[,] array. Any tips on writting a SIMPLE .txt importer??? By searching google/msdn I only found .x/.fbx file importer examples. And they seem t...
I am developing a game in which the logic is written but the visuals are not. Although the graphics are drawn, I need a way to get this graphics onto the screen to be manipulated, as well as a menu system. No one in my small three man dev team has experience with XNA and thus I am worried we will not make our intended deadline. Is the...
I am just playing around with XNA, and I have several different models I need to draw in each frame. at the moment, the Game object holds references to all my models, and draws them one after the other. Each with his own different way of drawing - one has two separate textures, the other might be mirrored to the other side, etc. I was w...
I know most commercial games development is done in assembly or C/C++ but has anyone tried using XNA with VS 2008 to create a real time intensive application that would be fit for release in the high street as oppose to just on XBOX Live. What are the limitations you encountered and what sort of frame rates were you getting and in what r...
I am using XNA for a 2D project. I have a problem and I don't know which way to solve it. I have a texture (an image) that is drawn to the screen for example: |+++|+++| |---|---| |+++|+++| Now I want to be able to destroy part of that structure/image so that it looks like: |+++| |---|---| |+++|+++| so that collision now will work ...
I'm fooling around with the XNA framework. To help me around I made a helper class that looks like this: ActorHolder + SpriteBatch (SpriteBatch) + ContentManager (ContentManager) - drawables (IList<IDrawable>) - updatables (IList<IUpdatable>) + ActorHolder(GraphicsDevice, ContentManager) + Draw(GameTime) + Update(GameTime) + AddActor(I...
I've been looking for a good general purpose binary network protocol definition framework to provide a way to write real-time game servers and clients (think World Of Warcraft or Quake III) in multiple languages (e.g. Java backend server and iPhone front-end client written in Objective-C and Cocoa). I want to support Java Flash clients...
I was wandering if it's possible to mock a Game object in order to test my DrawableGameComponent component? I know that mocking frameworks need an interface in order to function, but I need to mock the actual Game object. edit: Here is a link to respective discussion on XNA Community forums. Any help? ...