C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.
0
votes
0answers
16 views
Top-Down Tile-Engine Problem [on hold]
I used a tile-engine tutorial for my game that uses text files to write out the levels, but my problem is that if I want to add, say a room extending off to the main room, it won't draw that extended ...
0
votes
0answers
44 views
A 12 year old learning to code C# [on hold]
My nephew is 12 years old and he got interested in C#. I bought him the book C# for dummies, and I let him know about codeacademy. Can you tell me of "learning route" for him that acknowledge his ...
0
votes
0answers
18 views
How to store and parse story actions in XML
I been working on a game in Unity that reads its story (Actions, scene descriptions, NPC's, ect...) from an XML and have been wondering there was a better way to store actions based on player data ...
0
votes
0answers
15 views
Monogame cant stop delay when playing sound effects
I am using monogame to make a simple game for WP8 and I am having some trouble with my sound effects. At the moment the sounds play just fine, but there is a noticeable delay between when the code is ...
0
votes
0answers
17 views
Player not able to move but still animates after jump [on hold]
My player can move left, right and jump when the game starts but as soon as i jump and collide with either the platform or the floor i cant move left and right but the player still animates. I've ...
-1
votes
0answers
49 views
Infinity Engine Code Structure [on hold]
I am building small components that will be used for a RPG later on, however my experience in this scale of project is very limited, which is why I choose to build them independant of each other. This ...
-1
votes
0answers
38 views
A* pathfinding question and problem [on hold]
I was trying to implement the A* pathfinding algo into my project with some success, but got some problem with it. If the target node's X coordinate is 0, then it couldn't find any path and I can't ...
0
votes
0answers
13 views
I'm having a problem with an XNA Vector2 array retaining signed values? [on hold]
I've got a problem that seems to be coming from the positive/negative sign of XNA vector2 objects not being reset?
I've got an array of vector2s that I use to determine the X and Y speed of on screen ...
0
votes
0answers
28 views
How to draw an OpenGL texture generated on different Windows Form? [on hold]
I'm using OpenTK to draw textures. When I convert the System.Drawing.Bitmap to an Integer usable by OpenTK on FormA, I can't do it on FormB because FormB is not yet opened, I'll just get ...
1
vote
1answer
64 views
Better way to handle ordering and visibility of renderable objects?
I'm just wondering whether there is a more effective way to handle the ordering and visibility of renderable components that fits into the design of my already existing engine.
How I do it now:
In ...
1
vote
0answers
67 views
Can the Source SDK support C#? [on hold]
Is there are way for the Source SDK to be able to make mods using C# instead of C++?
4
votes
2answers
80 views
Determining which edge of a box was clicked in Unity
How would I go about figuring out which edge of a box is clicked in Unity?
Quick image I created, colored in boxes represent edges on a face I would like to check for.
The current solution I have ...
2
votes
2answers
66 views
Is the GraphicsDevice.Clear call in XNA necessary in 3D?
It's a touch embarrassing to ask I think, but I've just never paid it any attention before and used it as I've seen in tutorials or the like in the past I believe.
Is there a need to use ...
2
votes
2answers
96 views
How can I measure the velocity of a drag gesture?
I want to measure the velocity of a drag(FreeDrag, VerticalDrag, HorizontalDrag) gesture on my Windows Phone. For example, if the measured velocity of a drag is 40 km/h, the player will shoot a bullet ...
0
votes
1answer
56 views
How to rotate model, around its own center?
I have a 3d Model that it wasn't made from the origin of the 3d program, lets say that it was built at (100, 100, 100), I know how to rotate a model, but around the model origin point, (0, 0, 0), now ...
0
votes
1answer
51 views
Was my horizontal drag performed from left to right or from right to left?
I want to determine if a horizontal drag was performed from left to right or from right to left.
In addition, I want to do the same with the vertical drag.
How can I do that?
How can I check if the ...
-1
votes
1answer
53 views
Starting game development on linux [closed]
So I'm considering beginning doing some game development using Ubuntu, however I'm a bit lost when considering how I'm going to start.
When I begun doing it on Windows, the choice was kind-of ...
0
votes
0answers
37 views
Simple Ping Pong Game in C# [duplicate]
Hi, I'm making this game called "Ping Pong". I made an algo for the movement of the ball. Now, I want that whenever the ball touches or collides with the player (pictured above), it should bounce ...
0
votes
0answers
48 views
Encapsulating variable elements into one drawable object - XNA/MVVM
Ok so I'm building a game and there is a class for an Object which gets the Values of a specific card from a XML Table and stores them in varibles. Note: I will have many "Card"'s instantiated at any ...
-1
votes
1answer
43 views
the basic or important thing that i need to learn from C# [closed]
I started to learn C#, and it's really big and have many things, but i want to learn the important things that can i use to programming my game.
any advice ?
3
votes
1answer
63 views
Cant get a Farseer Physics body’s rotation to follow the mouse
Here is what’s in my HandleKeyboard() method that is called from the Game1 Update method.
MouseState mState = Mouse.GetState();
// the Vector2 that will hold the angle from the player ...
0
votes
1answer
61 views
Implementing a Random Picker by Supplying an Outcome Table (Similar to a Drop Table)
Whilst trying to vary the draw color of some randomly positioned sprites, I really wanted to be able to just supple a table with 2 columns (colour and chance of picking) to some helper function that ...
0
votes
0answers
38 views
Spritefonts gets very messed up when scaling up
I'm recoding a retro video game, but because the original resolution is very low, I scale everything up. I render to a renderTarget and render the renderTarget to the target resolution.
I'm using my ...
0
votes
0answers
12 views
How can I move an object with the Windows Phone accelerometer? [duplicate]
I want to move an object with the Windows Phone accelerometer. If the Windows Phone device is getting tilt to the right, the object should move 50 pixel to the right. The same with the other three ...
1
vote
1answer
88 views
How can I control an object with tilt gestures?
I want an object (for example a ball) to move right when I tilt my Windows Phone device to the right. The same with the directions left, up and down. If the Windows Phone device isn't getting tilt in ...
10
votes
2answers
310 views
What is the standard C# / Windows Forms game loop?
When writing a game in C# that uses plain-old Windows Forms and some graphics API wrapper like SlimDX or OpenTK, how should the main game loop be structured?
A canonical Windows Forms application has ...
0
votes
1answer
63 views
How can I save an XML file with Unity on the Android platform?
I am writing a game that has a save function which looks like this
public void Save()
{
System.Xml.Serialization.XmlSerializer ser = new ...
0
votes
0answers
41 views
Bounding box not right rotation XNA blender object (.fbx)
I am importing .fbx models (a simple cuboid), the model itself displays fine (and is repeated to make a wall) however the bounding box seems to be on the wrong rotation. Below is a screen shoot:
...
4
votes
1answer
203 views
Why do my velocity estimates have such a large margin of error
I am writing a script in unity that applies a force to the object to advance it a set distance in an environment without friction or drag, producing a cosine force curve.
However, as the target ...
0
votes
0answers
45 views
Use opentk window handle to host wpf control - Monogame
well my boss asked me to try and get wpf controls rendered in Monogame.
From what I understand this was easly doable in Xna, however in monogame it fails.
Is there any way to make the window hadle ...
1
vote
1answer
43 views
How can I measure the velocity of a Farseer body?
I want to know how fast my body(a circle) is moving. How can I do that? How can I measure the velocity of a body?
In addition, I want to limit the velocity of a body. For example, I want that a body ...
1
vote
1answer
132 views
Is there any reason not to make all my components a single class?
What would be the downside to using a generic all-encompassing Component class versus specific classes (PositionComponent, InputComponent, et cetera) for each component in an entity/component system?
...
0
votes
1answer
71 views
Why is XmlSerializer adding junk to the end of my file?
I'm making a game and I am serializing the save game data. The data is simply a few lists of bools, ints and floats.
But about 50% of the time I get an error when the data tries to save or load that ...
0
votes
1answer
19 views
Monogame mouse handlelike touche panel style
I work wwith XNA Monogame, i made a game for windows phone that i want to port on windows 8. But touchPanel and windows don't correspond.
I'm stuck with mouse event.
I want to reproduce these :
...
1
vote
1answer
66 views
Can I trigger input/controls via code?
I have the 3rd person controller in my game, which moves with the WASD keys.
But since I am developing for a mobile release, I want touch controls.
I have already the touch control-script in a new ...
5
votes
3answers
168 views
How do I create a color picker with variable hue and saturation?
I am trying to create a Color Picker similar to that of MS Paint.
Unfortunately, I can't figure out the algorithm for saturation.
This is what my current algorithm creates.
Anytime I try to ...
0
votes
1answer
44 views
XNA Float values don't work as parameter
With the Microsoft XNA Framework I can change the color of a tinted texture by changing it's integer values like so:
Int x = 255;
if(true) { x--; tint = new Color(x, 255, 255); }
Draw(texture, ...
2
votes
2answers
110 views
Unity3d NullReferenceException: Object reference not set to an instance of an object
I'm making a script to climb ladders in my game.
These are the variables used in the function.
private Vector3 climbDirection = Vector3.zero;
private Ladder currentLadder = null;
private bool ...
0
votes
1answer
38 views
XNA 3D Model doesn't drawn out at all?
I am trying to draw a 3D Model in XNA 4.0, but the Model doesn't show up. I guess I made it correctly, but.... Below is my code :
Here is the LoadContent and Draw method of my Main Class. Spaceship ...
-1
votes
0answers
20 views
Stuck when want to make the AI in Turn-Based Strategy Game [duplicate]
I can already make the movement grid via pathfinding and avoid obstacles for the player. Now I want to make the AI move itself based on the movement grid and available action points (just like the ...
1
vote
1answer
58 views
How can I use touch input for 3rd-person controls?
I have a 3rd-person controller in my Unity scene, which I can only control with the WASD buttons. But since I plan to make a smartphone game, I wonder how I can change these controls t swipe ...
0
votes
1answer
85 views
Ship Controls modeling Real life Physics
I am working on a 2D ship that will fly around in space (for now, no friction or gravity). The controls are similar to the game Asteroids. My problem is that I am having trouble connecting some ...
0
votes
2answers
100 views
How can I reuse objects going off left side of screen, by putting them offscreen on the right side?
I have an array of roughly 10,000 tiles over a 2d grid. When a tile goes off screen, I'd like to recycle it by disabling the renderer, repositioning it just before it comes on screen again, then turn ...
0
votes
1answer
34 views
How can I move an object diagonally on Windows Phone?
I want to pull a sprite from point A(vector2) to point B(vector2) in my Windows Phone XNA game. GestureType.HorizontalDrag moves it horizontally and GestureType.VerticalDrag moves it vertically, how ...
0
votes
1answer
32 views
Farseer Circle Body Problems, Please help!
I have created a circle body class, but in game my player body just passes through it. the circle will not move, only rotate.
however when i create the circle body just straight up, raw in the game1 ...
1
vote
0answers
40 views
Neclex spritefont not found
I am using MonoGame to port my XNA Windows Phone app to iPhone. All is well except that my fonts look distorted/smudged on the iPhone.
Turns out this is due to the way that MonoGame builds the ...
4
votes
2answers
272 views
How do I make a 2D game resolution independent?
I'm working on a simple 2D game. I've finished the mobile phone version.
However, my boss wants the game to works on his RT.
I'm doing the "conversion" but my buttons are in the wrong places, because ...
0
votes
1answer
48 views
AABB SAT code detects collision wrongly [closed]
I've been having trouble getting my SAT code working using AABBs, and I've been trying to find a solution but, I'm scratching my head.
For some reason, it detects collisions very wrongly, as shown by ...
2
votes
1answer
95 views
How do I check if a surface is sloping?
I'm implementing gravity over a 3D terrain and I'm struggling with how to check if surface "under your feet" is flat or sloping.
I read some tutorials but gravity is always considered along a single ...
1
vote
1answer
161 views
Lighting Covering Up Sky ( XNA / C# )
I have a 2D tile-based lighting system which is drawn onto a Render Target.
I am also drawing a background which involves mountains, sun/moon, and clouds.
There is also the unlit game; blocks, ...