C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.
2
votes
1answer
68 views
Support for different resolutions in a tabletop environment
Right now I am experimenting with XAML and C# to write a small Windows Store App which supports displaying a playmat with cards. However not everyone uses the same resolution and with a somehow fixed ...
0
votes
1answer
364 views
3D Texture Mapping (Atlas)
This is a pretty simple question. If I was to use multiple images in a single texture for a 3D cube, how would I go about re-using each vertex (having 8 total vs 24)?
With a single buffer of 8 ...
3
votes
1answer
71 views
Stitching meshes together
I have a voxel engine that generates a mesh per chunk and now I want my meshes to be 1 mesh, but if I create them as a single mesh I kind of lose the benefit of chunking the data in the first place.
...
4
votes
0answers
153 views
Producing a smooth mesh from density cloud and marching cubes
Based on my results from this question I decided to build myself a 3D noise map containing float values in place of my existing boolean point values. The effect I'm trying to produce is something like ...
-7
votes
2answers
43 views
How do i create a Xna 4.0 Creating BoundyBox [closed]
I understand what other people have done and when creating it myself it just seems to go wrong or the version is different so doesn't work in first place. Any easy code for this?
-1
votes
1answer
54 views
XACT support outside of XNA?
I was building a new game in Monogame when I realized that it didn't have XACT support like XNA did. I was wondering if anyone knew another framework that could be used with or instead of MonoGame ...
1
vote
1answer
68 views
graphics.GraphicsDevice.Clear strange result (XNA)
I have such Execution:
graphics.GraphicsDevice.Clear(new Color(255, 0, 0, 0));
Alpha is 0. So why it draws me Red color?
graphics.GraphicsDevice.Clear(new Color(255, 0, 0, 255));
Also draws the ...
-1
votes
1answer
110 views
Server Based High Scores
I'm currently using the following MySQL example to make a server side high score table: Unity Server Side high score
The above example allows me to create a top 5 player high score table that sorts ...
1
vote
2answers
137 views
Level editors compatible with MonoGame? [closed]
I'm thinking about a future project using MonoGame and it seems there are no level editors that outright support it, though obviously there are those for XNA that may possibly be compatible. So I ...
5
votes
2answers
235 views
Black bars on 720p emulator?
I'm making a game for Windows Phone 8 using XNA 4.0 in Visual Studio express 2012. I'm trying to add a background image to the game with a size of 1366x768 (as i believe WP8 only supports up to 720p). ...
1
vote
3answers
132 views
Creating an update “Tick” on tiles for simulating growth of plants
In my 2D tile based platformer I have added plants to be able to farm such as the simplest, grass, to other things like corn. Now each of these speacial tiles must be updated to show how much it has ...
9
votes
1answer
249 views
How do I prevent XNA from pausing Updates while the window is being resized/moved?
XNA stops calling Update and Draw while the game window is being resized or moved.
Why? Is there a way to prevent this behaviour?
(It causes my network code to desynchronise, because network ...
-1
votes
2answers
78 views
Loading a texture2D in a separate class using c# and xna [closed]
I have been adding a bunch of textures to my game in xna so i decided to make a separate class to load and draw the textures.
this is what i have so far
using System.Text;
using ...
1
vote
2answers
138 views
Resolving 2D Collision with Rectangles
For about a week I've been trying to grasp the basics of collision, but I've been driven to the point of wanting to just give up on everything when it comes to collision. I just don't understand it. ...
1
vote
2answers
115 views
One or multiple VertexBuffers
I'm currently working on a personal project where I'm trying to load the levels and all of the geometry from the game "Medal of Honor Allied Assault" into my own C# code-base based on SharpDX.
I ...
25
votes
3answers
3k views
2D water with dynamic waves
New Super Mario Bros has really cool 2D water that I'd like to learn how to create.
Here's a video showing it. When something hits the water, it creates a wave. There are also constant "background" ...
2
votes
2answers
280 views
Understanding marching cubes and voxel data relationships
in case it matters i'm doing all this in unity with C# ...
I think I missed something or maybe don't understand the logic correctly.
I have an existing voxel engine that looks very "minecrafty" at ...
0
votes
1answer
55 views
Putting a 2d camera into a gamestatemanagement sample [closed]
Hello everyone i am new to xna and i am trying to implement a simple 2d camera that follows my sprite around the level i am using a gamestatemanagement so i have the basic platformer with screen ...
0
votes
0answers
65 views
How can I efficiently store Vertex data in C#/XNA?
I am creating a terrain system using voxels in a somewhat minecraft-like style and I was wondering if there was anything I could do to increase the number of vertices I am able to store (and therefore ...
-5
votes
1answer
91 views
camera2d class will not work [closed]
using System;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using ...
-2
votes
3answers
140 views
Can I use a list to spawn enemies? [closed]
I need to have about 10 enemies in my game, can I use a list to spawn them all in?
This is what I was working on but it only spawns 1 enemy in the coordinates of the last added to the list.
Here are ...
0
votes
3answers
242 views
How do I create a 3rd person camera?
I currently have a camera class set up and have my model/player loaded but I can't get my camera in the correct position by changing the x,y,z coordinates.
I have set up my "game" with a separate ...
0
votes
3answers
359 views
Xna Equivalent of Viewport.Unproject in a draw call as a matrix transformation
I am making a 2D sidescroller and I would like to draw my sprite to world space instead of client space so I do not have to lock it to the center of the screen and when the camera stops the sprite ...
0
votes
1answer
469 views
Move Object Around Sphere in Unity3D
I am trying to get a GameObject to be able to be controlled to move freely around a sphere using a virtual on-screen joystick. I am building this for iOS and Android in Unity. I am using the standard ...
0
votes
2answers
149 views
3d to 2d Collision
I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
-1
votes
1answer
156 views
Creating physics in xna
I am creating a racing game using visual studio 2010 and xna 4.0. I'm trying to create some simple physics so my car sticks to the heightmap I have created within my game world and the model adjusts ...
0
votes
1answer
48 views
What is the point of the XNA.Input.Button enum?
I am trying to make an InputManager class that will let me basically bridge XNA's various input methods and do a corresponding action in my game. Part of this is designing different keybindings.
...
1
vote
1answer
92 views
Defining a random irregular shape in a bool array
I need to find out how to populate an array bool[x,y] with a random filled shape.
lets say I want a triangle depicted in my array i would define an area within the array and set all points to "true" ...
-1
votes
2answers
132 views
Collisions and camera tilt in XNA C# 3D Game
I am working on a game programming class project and need some help. I cannot find a good tutorial on how to get these 3 frictionless spheres to collide with each-other, the surface and the walls of ...
0
votes
0answers
23 views
Syncing texture animations which can be created at any given time
I have a texture animator that will advance animation frames based on the time that has elapsed since it was instantiated.
timeElapsed += (float)gameTime.ElapsedGameTime.TotalSeconds;
...
2
votes
0answers
101 views
Implementing Branching Conversation Dialogue in C# with XNA
How could I add logical branching conversation dialogue in C# with XNA? What I mean by this is a dialogue tree similar to this:
If the user is wearing red:
DisplayText "You're wearing a red ...
1
vote
1answer
110 views
c# opentk - converting screen coords to world coords
I'm making a windows forms application with opengl view. I need to get the mouse coords converted to the opengl world coords. Well, my Y coord gets converted wrong. It's hard to explain, so here is ...
1
vote
1answer
122 views
Player positions in a race game through arrays or…?
First time posting on these forums so go easy on me!
I've been programming a race game which has been going quite well. I've just discovered now how hard it is to set up player positions!(As in 1st, ...
0
votes
1answer
73 views
Lerp an object based on timers
I'm trying to make a target lerp between two objects based on a timer.
At the moment, I have the following code:
float distCovered = (Time.time - waitTime) * speed;
float fracJourney = ...
4
votes
1answer
125 views
Why does this Unity code work as expected only with the while loop?
In unity, in C#, I have the following code in Awake():
Awake()
{
Transform obj = InstantiateTarget();
//the bizarrely required and "working" loop
while (transform.childCount > 0)
{
...
0
votes
2answers
144 views
Hex tile systems and the efficient use of classes
So I've built myself a system of classes for what I think is an efficient way to describe an entity that would live in my game.
Is this an effective approach or am I creating entities that are too ...
4
votes
2answers
253 views
Changing game controls using .txt file
I'm using XNA to create a simple block breaker game. At the moment I have controls set in the standard way:
if (keystate.IsKeyDown(Keys.s))
I've figured out the file handling problems involved and ...
2
votes
1answer
203 views
Movement on the X an Z axis are combined?
This is probably a stupid question, but I'm trying to simply move a 3D object up, down, left, and right (Not forward or backward).
The Y axis works fine, but when I increment the object's X position, ...
-1
votes
2answers
1k views
C# XNA Handle mouse events?
I'm making a 2D game engine called Clixel over on GitHub. The problem I have relates to two classes, ClxMouse and ClxButton. In it I have a mouse class - the code for that can be viewed here.
...
-1
votes
2answers
98 views
Jittery effects with collisions [closed]
I have been having some problems with my coding lately. I am trying to create a platform-based game and I have been having some troubles.
A friend of mine said that some update functions are out of ...
1
vote
0answers
101 views
tex2dlod and tex2d giving different values [closed]
I've been having trouble with vertex texture fetch for a terrain system I am implementing. I'm using C++/DirectX9.
I have already implemented exactly what I want as a prototype in C#/XNA and now ...
-1
votes
1answer
76 views
XNA Framework doesn't recognise controller [closed]
So just a little bit of XNA code:
if (this.IsActive && (Keyboard.GetState().GetPressedKeys().Length > 0 || Mouse.GetState().LeftButton == ButtonState.Pressed || ...
2
votes
1answer
119 views
Pixel Shader gradient problems
I have pretty much zero experience working with shaders as my first couple phone games were just 2d games that didn't use any sort of shaders. Now I'm working on a PC game that has a day and night ...
2
votes
4answers
210 views
Can I transfer C# coding I do in Unity for practice to another 3d engine?
If I use a C# coding in Unity 4, can I transfer that coding into another non-Unity engine as long as it accepts C# too? I hope this question makes sense. Thank you in advance.
7
votes
0answers
269 views
Implementing water effects (splashes) into XNA 4.0 game
I am creating a 2D XNA game and came across a tutorial on adding water effects (splashes) to an XNA game but after implementing it into my game I can't get it to scale down. Currently it takes up the ...
2
votes
2answers
92 views
Moving character on x axis
I am new to unity scripting.
I am trying to move my character towards right side(on x-axis) to create a running effect, I've imported the character from blender which contains two animations, "jump" ...
0
votes
0answers
90 views
Xna problem drawing tIDE map
So i was trying to add tIDE to my project but i hit a Keyntfoundexception
map.Draw(mapDisplayDevice, viewport);
Any help would be usefull here is the rest of the class:
using System;
using ...
-1
votes
1answer
109 views
Two characters controlled by one set of controls? [closed]
I am using Unity 3D to make a multiplayer game using the Photon Network package in the asset store.
I have initiated two characters controlled by a Mecanim script, and they both have animations. ...
1
vote
0answers
105 views
How to achieve supersampling / anti-aliasing in pixel shaders?
I am trying to write a couple pixel shaders to apply to images similar to Photoshop effects. For example this effect: ...
0
votes
2answers
535 views
XNA Health Bar continually decreasing
As per the Health bar tutorial on ... http://www.xnadevelopment.com/tutorials/notsohealthy/NotSoHealthy.shtml
I have set up the above, how do I make it decrease by 1 health per second?
I want to ...


