C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.
2
votes
1answer
46 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 ...
3
votes
1answer
37 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
63 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 ...
-6
votes
2answers
31 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?
-2
votes
0answers
57 views
C# XNA: How do i create simple 2d TileEngine [closed]
i want to create a simple tileengine for a small rpg-ish game.
I have a picture with 7 different tiles each at a width and height of 48px.
What i want to do is to split the image into those seven ...
-1
votes
0answers
56 views
Web based text Rpg in c# [closed]
Okay, so me and some people are going to be creating a text based rpg that focuses on a nice story to get people hooked, while including some Rpg elements such as skills, equipment and such.
Now I ...
-1
votes
1answer
45 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
votes
0answers
27 views
Normal mapping in XNA (WP8) possible?
Information regarding this topic is pretty scarce.
But is normal mapping possible on XNA for Windows Phone 8?
If so, are there some gems of articles out there you could point me to?
1
vote
1answer
45 views
Raytracer texture mapping (to triangle mesh) leaving artifacts
So I am trying to get OBJ loading working in my raytracer. Loading OBJs works fine, but I am having some trouble with getting the texture mapping working.
Here is an image of my result. It is ...
-1
votes
1answer
75 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 ...
0
votes
1answer
53 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
vote
2answers
79 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 ...
-1
votes
2answers
58 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
109 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. ...
0
votes
0answers
44 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 ...
0
votes
1answer
45 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 ...
2
votes
2answers
122 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 ...
1
vote
3answers
97 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 ...
-5
votes
1answer
74 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 ...
10
votes
1answer
450 views
+50
How to blend two cameras when traveling through a portal in Unity3D
Before I get to my question, I know the most obvious solution would be to use the normalized view port rect, however I need more complex shapes than a rectangle, and I've looked in to using the view ...
-2
votes
3answers
100 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 ...
1
vote
1answer
76 views
Pixel Shader - apply a mask (XNA)
I'd like to apply a simple few masks to few images.
The first mask I'd like to implement is mask like:
XXXOOO
I mean, that on the right everything is masked (to black), and on the left everything ...
3
votes
1answer
114 views
How to optimise mesh data
So i have some procedurally generated mesh data and i want to reduce it down to its minimum number of verts. In case it matters this is a unity project.
Working on the basis of a simple example, ...
0
votes
1answer
43 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
68 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" ...
0
votes
0answers
19 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;
...
1
vote
1answer
108 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, ...
2
votes
0answers
84 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
votes
1answer
145 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 ...
4
votes
1answer
114 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
1answer
59 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
2answers
246 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 ...
1
vote
1answer
70 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 ...
3
votes
1answer
51 views
Set a 2d camera's position so that a building is under the players feet
My issue is this: i am making a scrolling game in XNA, and the camera updates based on the players velocity, but the player never actually moves, he is always in the center of the screen. When he hits ...
0
votes
3answers
211 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 ...
1
vote
0answers
57 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
2answers
91 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 ...
6
votes
0answers
190 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
4answers
187 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.
2
votes
1answer
94 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 ...
0
votes
2answers
130 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 ...
-1
votes
1answer
57 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
2answers
57 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" ...
1
vote
0answers
75 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
1answer
72 views
Weird behavior with XNA SpriteBatch.Draw origin
I have a texture with 256x256 pixels.
Consider this piece of code:
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
...
-2
votes
1answer
77 views
Texturing using PBO in OpenTK (OpenGL) [closed]
I'm learning OpenTK (OpenGL) and am trying to generate texture using PBO in OpenTK. However,
my code does not work. I have read lots of examples and tutorials online:
for example Map and fill texture ...
0
votes
0answers
108 views
Accessing Bluetooth data via SerialPort (Unity/C#)
So I'm working in Unity3D, programming in C#, and I heard that one can read data from a Bluetooth adaptor via SerialPort. I have several Bluetooth USB adaptors that I've tried to connect on my PC ...
1
vote
1answer
93 views
Spawning enemies at way points [closed]
I'm trying to have my game spawn enemies when ever the player reaches a way point.
Right now, I have this functionality working. When my player gets to the first way, the enemies spawn. He only moves ...
1
vote
1answer
97 views
Collision Detection - Slide Around Sprite
I'm creating an RPG using XNA/C# and am trying to add some complicated collision detection code. I have the playable character 'Wizard' and when it collides with something, a method gets called in his ...
2
votes
3answers
161 views
How should I calculate the new angle/direction of my ball hitting a wall? [duplicate]
I'm building a Pong game and I am stuck at how the ball should bounce when hitting a horizontal wall.
I tried a few methods but none seems to work.
So far I have an update method, which is called ...