XNA is a game framework by Microsoft that allows deployment for Xbox Live Indie Games as well as Windows Phone 7.
-1
votes
1answer
24 views
XNA draw a rectangle 3D perpendicular to camera
I need some ideas how to implement the Draw method.
Need to draw a rectangle (actually a million of them, all same texture) that is in 3D, starts at point p and ends at point q and is always ...
0
votes
0answers
25 views
rendering technic for water in pipeline game
For fun I want to clone a waterpipe game, where the player places pipe pices on a gridfield and after some seconds water starts flowing from the start, through all places pipes and hopely reaches the ...
0
votes
2answers
53 views
Collision Detection works 2 sides - Minkowski Sum xna
This might be really simple but it is giving me a lot grief and I wondered if you guys would be able to shed some light on it. Basically I have a tile map which draws tiles at 64 * 64 and that works ...
0
votes
0answers
23 views
Vertex showing above other in XNA, when seen from afar
I am trying to code a landscape simulation, but I have a problem when rendering.
As you can see on this image:
when I am far from a point, the blue vertex is showing above many brown vertices, the ...
0
votes
1answer
34 views
tile map collision with player not working - 2D c# xna
Currently the tile map is drawing fine but I am not sure how to proceed with collisions between the player and some of the tiles. Would it be better to specify certain tiles that the player can't move ...
0
votes
2answers
132 views
Collision code is creating allocations on heap every frame
I've been profiling my app trying to reduce allocations and garbage collection during gameplay.
The following code is SAT collision which i use for hill/ramp collisions, when the player is standing ...
0
votes
1answer
39 views
Monogame/XNA rotating a sprite around its center
I also use Farseer Physics and Artemis ECS. Here is RenderingSystem Process method:
public override void Process(Entity entity, TransformComponent transformComponent, RenderingComponent ...
3
votes
2answers
58 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
48 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
22 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
23 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
44 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
87 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
34 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
75 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
39 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
82 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 ...
-1
votes
0answers
26 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
24 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
16 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
46 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
42 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
57 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
57 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
60 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
22 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
38 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 ...
2
votes
1answer
60 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
38 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
61 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
33 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
32 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
121 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
58 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 = ...
1
vote
2answers
104 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
68 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
48 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
46 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
46 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
64 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
65 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
49 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
46 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
28 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
137 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
23 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
12 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
56 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 ...