XNA is a game framework by Microsoft that allows deployment for Xbox Live Indie Games as well as Windows Phone 7.
3
votes
2answers
46 views
Skip processing individual triangles or vertices of the mesh
In my game I have a billiard table, and a floor below the table. In typical situation the table covers 80% of the screen, so only small amount of the floor is visible. And I render the table first, so ...
1
vote
1answer
32 views
C# XNA colliders, physics, inclined plane/terrain/colliders
Currently I'm working on a project to learn game programming. But I'm not sure if I have the right approach on several things, and that's what I'm here for.
What I'm trying to create is a small world ...
0
votes
0answers
19 views
monogame - how do I distribute a lib / package with content?
I wrote a UI lib for a monogame hobby project I'm working on, and I want to distribute the UI code / lib as open source for others to enjoy.
My question is - what do I do with all the content that ...
0
votes
1answer
20 views
Error loading “SpriteFont1”. File not found
I have an issue while trying to load a font file with the extension ".xnb" and I am receiving following error:
Error loading "SpriteFont1". File not found.
For following code:
public static ...
0
votes
0answers
40 views
Drawing Pixels to Texture
I have some bitmaps for grass and snowy grass. I am using them for a tiled based map and for a little experimental weather scene.
The current state is that I always need to create a new Bitmap for ...
0
votes
1answer
78 views
What are the practical limitations of using XNA?
Since development on XNA has long since stopped, it is unlikely that it will ever be updated to be in line with modern graphics technology, however aside from the obvious fact that it's Windows-only - ...
0
votes
1answer
22 views
Xna c# picking model with Ray mouse cursor select the wrong model
i made a small 3D game and i just try to apply a basic sample from here : http://rbwhitaker.wikidot.com/picking
for picking model by the mouse cursor.
For that i use the Ray object and check if some ...
0
votes
1answer
52 views
Generate a random number of enemies to appear on screen
I am currently trying to create 2d shmups. I am trying to:
Generate a random number of enemies to appear on screen
Whatever number is generated will then be added to my List (the list is used to ...
1
vote
1answer
38 views
Drawing & transforming matrices upwards
I'm drawing a hierarchy of 3D objects in C# XNA where each objects has a transform that holds position, rotation and scale.
I get my expected results If I draw my objects from my root node in this ...
0
votes
0answers
65 views
Pixel-correct collision affected by scaling?
So I've come to the point where I need to implement a proper and accurate pixel-correct collision, as using any other form of collision methods such as rectangles, circles and etc, are very unreliable ...
0
votes
0answers
25 views
XNA Randomly crashes if not attached to Debugger
My XNA game crashes after about 10 sec if not launched from Debugger.
When I launch it from Visual Studio the game doesn't crash, but without the Debugger it crashes.
I have no idea what happens.
I ...
1
vote
1answer
19 views
DirectXTK C++ : How do you use the Spritebatch.Draw() function with overloaded for RECT?
I am trying to make use of the DirectXTK's SpriteBatch for the C++ version on github. Which is heavily based on the one for XNA. However I can't seem to get the darned thing to work properly.
I have ...
0
votes
1answer
13 views
Change color of a texture in a specific matrix location
I have following bool matrix:
bool[,] centerPiece = new bool[,] { { false, true, false }, { true, true, true }, { false, true, false } };
Using a method, I put a texture down every time the boolean ...
0
votes
2answers
45 views
Setting up a draw class giving exceptions
I'm currently trying to set up a class to draw tiles for me in different shapes, but it's currently giving me a hard time, as it's giving me nullreferenceobject errors in my secondary class.
My Game ...
0
votes
1answer
41 views
Placing sprites properly to form an object
I'm working with XNA in Visual Studio, and I'm trying to draw this sprite:
https://i.imgur.com/Dy5nSuG.png
Only using this sprite:
https://i.imgur.com/6T8TeTQ.png
My current attempt relies on a ...
0
votes
1answer
44 views
XNA / MonoGame - render transparent background using stencil buffer problem (3d)
I'm trying to render 3d texture quads with the following properties:
With lighting (rule out "AlphaTestEffect").
Transparent background (no opacity levels, just binary opaque or transparent).
No ...
0
votes
1answer
53 views
What is more performance friendly?
I'm wondering what is more performance friendly:
1) Rendering a texture (in a seperate RenderTarget2D) and reuse it. (That will use multiple spriteBatch.End() / spriteBatch.End() calls, every drawing ...
1
vote
1answer
54 views
Using a single square sprite to create tetris-like objects
I'm currently working on a project in XNA, Visual Studio, where it is crucial I can create the classic tetris figures solely based on one square sprite (So I can return to each individual square at a ...
0
votes
0answers
17 views
Scrolling a multi-directional background in XNA
I created a class for a multi-directional scrolling, from a class to a scroll to the right. The problem is that when you go back, sometimes the background is not drawn until certain conditions are met....
0
votes
0answers
28 views
Vertices not colored when using custom vertexDeclaration monogame
I am trying to color the vertices of a Mesh Part object which has been loaded from a .obj model.
But since the obj model's vertex declaration does not have color info defined and only normal and ...
0
votes
1answer
14 views
how are the vertex properties of meshpart decided based on model format in xna
Exactly how the question says , how does the vertex properties like vertex stride and the data stored in the mesh part decided based on the format of a model and how would i determine that and then ...
1
vote
1answer
43 views
Find the closest point on a ray
I've got a ray defined by P1 and P2, and then a target P3, and I want to find P4. How do I go about this? I've come to understand that I should use vector projection, but I can't get it to work. Any ...
0
votes
1answer
36 views
Roll a 6DOF camera to a plane direction
I've been working on a 6DOF camera that I want to be able to "align" to any walls orientation to make it feel like I'm standing on that wall.
I'm thinking it's a simple matter of finding the right ...
0
votes
2answers
60 views
Correct velocity on collision between two rects
I have two moving objects. The objects consist of a velocity vector2, a rectangle and a vector2 as position (origin in the middle of the rect).
Some rough pseudo code for my collision checking ...
0
votes
1answer
31 views
XNA player/tile collision not working perfectly
So I've built a map tile engine in XNA, and have been working on the player/tile collision. The method I'm using works well to some extent, but the player will often move through the walls and get ...
0
votes
0answers
29 views
XNA - 2D camera orbit around sprite
OK, I have a 2d sprite in a scene and I would like to know the theory behind the camera orbiting around it with an analog stick.
I know the basic code to get the input from the gamepad, but I'm having ...
1
vote
2answers
111 views
How Should I Go About Updating My XNA Game?
So, I've created an XNA game, but I'm not selling it... it's just a private game to give away to my friends, more of a practice project. But say I find a bug, or think of a new feature...
I don't ...
0
votes
1answer
55 views
only one tile being drawn xna c#
I have been looking at tile engines for the past few days and decided to have a go at my own one for educational purposes. I want to use different textures for the tiles of my map, for example 1 = ...
0
votes
2answers
66 views
How to use Monogame Content Pipeline with XML
I have an XML file that I'm trying to import into my MonoGame project using the content pipeline. I'm having trouble getting the MonoGame Pipeline tool to convert the XML file into a .xnb file before ...
1
vote
0answers
64 views
My Character objects are complex, how should I organize their structure?
I'm using Monogame to make a fighter. I have created an abstract Character class that has basic character functionality such as HP, meter, update boilerplate and such, and will be overridden as each ...
1
vote
1answer
37 views
Why does RenderTarget2D only output a black texture after a few seconds?
I encountered this strange problem where my UI drawing to RenderTarget2D
works for a couple seconds and then suddenly goes black.
This is the RenderTarget2D function:
public RenderTarget2D RenderUi(...
0
votes
1answer
41 views
Jitter Physics not working correctly. Going through objects and getting pushed back when touching walls
I am trying to use the Jitter physics engine, however, I can't get it to work correctly. For example, when I touch the side of a cube, it pushes me far back in the opposite direction. While I am ...
1
vote
0answers
42 views
1.5d Engine need pointers [closed]
So I'm gonna start on a new project and were surfing around google images and found this image. Basically its almost pure 2D where there is no 3d object and everything is represented in 2d images as ...
0
votes
1answer
56 views
Planar mapping/projecting UV coordinates from normal
I've got set of vertices, and would like to calculate their UV coordinates by projecting them by a given normal. Similar to what "planar mapping" does in 3ds max.
Another way of looking at it is ...
-1
votes
2answers
57 views
Collision Detection XNA Using Vector2
How would I convert this into C#?
This is for a pong game and I am having a difficult time understanding.
This is detecting the collision between a ball and a paddle. Can you comment please to help me ...
0
votes
0answers
47 views
Monogame/XNA 3D Floor/Wall Collision
I am trying to make collision work in my game, however, I am so lost on how to do what I want. I have a player model and a floor model with a BoundingBox around both of them. The floor is just a ...
1
vote
0answers
40 views
Anti-Aliasing Issues in MonoGame
My anti-aliasing is not working in MonoGame. I'm not sure if I'm doing something wrong. See the image below (rotating the screen -- coordinates are all overlapping/adjacent, so should blend them):
...
0
votes
1answer
41 views
XNA - Isometric View not rendering mesh correctly
New to XNA (3D) -- familiar with OpenGL (but it has been a few years).
I've been working on an engine that should be a 3D Isometric View, but I'm having issues with things rendering. I wouldn't be ...
0
votes
0answers
26 views
XNA - How to not cap update frequency at monitor refresh rate with variable timestep, vsync enabled?
I want my XNA game to update as frequently as possible (to keep factors such as audio playback and input latency to an absolute minimum) and have vertical sync enabled at the same time. I set graphics....
3
votes
1answer
131 views
How to do multi-agent 2d pathfinding when agents can block each other?
I recently restarted on my long time game development project and had a few questions about how to improve my games AI.
I am a little stuck on the best way to implement my Enemy path finding when ...
0
votes
0answers
20 views
Monogame Android FileNotFoundException but iOS works fine
I'm creating Monogame shared game for Android and iOS modificating this tutorial https://www.youtube.com/playlist?list=PLE500D63CA505443B but I got stuck at 11th video.
I need to load file Splash.txt ...
0
votes
0answers
10 views
Using model in XNA with point helpers as bones
So I have a model that uses point helpers as bones. When importing the model to XNA using the skinned model processor provided by the devs, the point helpers are not recognized as bones. Is there ...
0
votes
1answer
49 views
Migrating from OpenGL to XNA (MonoGame)?
I just started working in MonoGame with 3D code. I've used OpenGL before in the past, and I've also built engines with 2D Sprites/SpriteBatch's in MonoGame.
However, I'm getting extremely stumped ...
0
votes
1answer
56 views
Switch axes and handedness of a quaternion?
I have a quaternion, coming from a system with the following:(intertial sensor)
Right handed.
Forward direction: Y axis
Right direction: X axis
Up direction: Z axis
I need to convert this into a ...
3
votes
1answer
65 views
Is it possible to have a diagonal movement animation in monogame/xna?
Is it possible to have a diagonal movement animation in monogame/xna?
As far as I can tell it's not possible to recognise multiple keypresses (ie "A && W" or "S && D") as unique ...
1
vote
0answers
17 views
Defining collision rules in Farseer XNA
I'm trying to integrate Farseer into my XNA game.
Since I'm using an EntityComponentSystem approach, I've added the Body inside a component and added it to the players' components.
One thing I'm ...
0
votes
0answers
27 views
Converting an XNA game from WINDOWS to XBOX
I have an XNA game for WINDOWS which I want to work on XBOX also.
I've designed the game so that when I want to connect it to an XBOX, all I have to do is supply a different input class,
And I would ...
0
votes
1answer
72 views
How to unit test XNA Game object
I'm doing a hobby game project using Visual Studio 2015 and XNA, via the MonoGame implementation. I wanted to do some unit testing, as I recently discovered this feature in Visual Studio, and want to ...
0
votes
2answers
127 views
Tile Map Collision in 2D Platformer (C# Monogame)
I am trying my hand at making a small 2D platformer. Currently I am trying to implement collision on a tile map. I have been trying to experiment with different ideas but can not find a way for the ...
0
votes
2answers
39 views
Bounding box messed up for .fbx models
I am trying to make bounding boxes for my models. My code works fine if the model is imported as a COLLADA (.dae) file. When I try to import a model that has .fbx extension, my bounding box messes up. ...