C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.
3
votes
3answers
562 views
How to parse & “pack” network commands?
I'm currently creating a game which should be multiplayer (client-server-client), but I'm stuck.
I have been doing crazy things like building a text chain like
string networkMessage = userHash+" ...
21
votes
4answers
1k views
Why does my object move faster at 45 degrees than at 90 degrees?
I have objects in my game that move faster at 45 degrees then at 90 degrees.
Each object has
Point (x,y) position
Vector2D (x,y) direction
Int speed
And what I do during a update is that new ...
-1
votes
1answer
1k views
C#: What graphics library would be best to use? [closed]
I am making my first game with 3D graphics, and I wanted to decide on a graphics library before I do any graphics work. I am using C# VS Express 2010. I have seen suggestions for XNA, Tao, and just ...
4
votes
3answers
535 views
IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
Earlier, I posted a question asking how to swap fixtures on the fly in a 2D side-scroller using Farseer Physics Engine. The ultimate goal being that the player's physical body changes when the player ...
5
votes
3answers
686 views
Can I swap out Farseer physics fixtures at runtime?
I am working on a 2D side-scroller using Farseer Physics Engine v3.3.1.
In order to create a realistic physical skeleton for the player, I am using a method similar to the one explained here (See ...
2
votes
2answers
745 views
How can I map thumbsticks to cardinal directions?
I've got a tile based game that has notions of moving up, down, left, right and the diagonals (by alternating horizontal/vertical movement).
I've found that if I use the default ...
3
votes
1answer
824 views
Create a rectangle struct to be rotated and have a .Intersects() function
In my XNA program, I am trying to swing a sword. The sword starts at an angle of 180 degrees, then rotates (clockwise) to an angle of 90 degrees.
The Rectangle struct that XNA provides,
Rectangle ...
3
votes
1answer
205 views
Does ContentManager.Load<T>() re-read an asset if I have loaded it before?
Or is it smart enough to know I have asked for it before and return an in memory copy created from the first call?
For example if I have a projectile's texture:
Texture2D projectile;
If then I ...
2
votes
3answers
2k views
How do I check collision when firing bullet?
I'm currently creating 2D game from top perspective. I'm having problems with bullets. Yes, I currently simulate their movement so user can see them (about 2x ). Moving them with
// this is static
...
3
votes
2answers
715 views
Rendering a lot of Models at once with XNA
In an hexgrid based game, I render all terrain tiles as a separate model, reusing the same texture objects on all similar tiles. The tiles is a pretty simple model.
When the terrain is set to be at ...
1
vote
0answers
154 views
Input in OpenTK
How to use Input in OpenTK 1.0? There is not much info around, some classes are unfinished.
What I want to achieve, is to be able to use input not only in OnUpdate function, but also in other classes ...
8
votes
6answers
678 views
How can I store all my level data in a single file instead of spread out over many files?
I am currently generating my level data, and saving to disk to ensure that any modifications done to the level are saved.
I am storing "chunks" of 2048x2048 pixels into a file. Whenever the player ...
0
votes
1answer
189 views
Creating a vertexbuffer to define vertices arranged in a grid with the view for easy editing later
I'm using the marching square algorithm (2D version of marching cubes) to generate vertices.
I end up with vertices arranged in a grid.
I want to enable destructible terrain, and the way i was ...
-6
votes
2answers
902 views
How can I convert the 3D Object designed in MAYA or 3D Max to OpenGL Object?
I'm try to convert the 3D Objects created in the Maya or 3D Max to Simple OpenGl object anyone please guide me how can I do so???
0
votes
2answers
234 views
Can I create mods for a D3D game made in C#?
There is a game currently in development in C# (using Direct3D for graphics) that I want to make mods for.
Ideally, I would like to make the mods in C#, but after that I am lost. How would I (or ...
0
votes
1answer
813 views
Open source component-based game engines? [duplicate]
Possible Duplicate:
Are there existing FOSS component-based frameworks?
What open source game engines with component-based design of game objects do you know? And which best of them? I mean ...
5
votes
1answer
742 views
Things to do to port game made for iOS in Unity to Android?
I have just made my first game for iOS and submitted it to app store. I was thinking of porting my game to Android also. I would like to know things one need to do/remember to port game made for iOS ...
3
votes
2answers
1k views
Collision Detection problems in Voxel Engine (XNA)
I am creating a minecraft like terrain engine in XNA and have had some collision problems for quite some time. I have checked and changed my code based on other peoples collision code and I still have ...
0
votes
1answer
334 views
Best Algorithm for attacking in the Risk Game
I apologize in advance for my English.I'll try to explain my problem.
I am working on new version of the Risk game. I want to change the attacking algorithm to make it more similar to real life war. ...
3
votes
1answer
675 views
Creating a Model out of Math primitives
Here is a litte sample that I drew in Blender to visualize what I am planing to create:
Cone with spheres sample
I already have the code to generate the cone and the spheres as mentioned in my ...
0
votes
1answer
172 views
A few queries about my Map Data (& ideas of improvement, seconded opinion required)
so like the title says i'm trying to think of ways that i can basically improve my level/map data. Currently it's "alright" but i don't feel it's great. There's certain things that i'd like to-do to ...
2
votes
1answer
247 views
How can I get the texture color data from GLEED2D's level file?
I've hit a little snag in my game. It's a 2D platform game and I need to check for collisions against the level. I'm using GLEED2D to create the map.
I'd like to do per-pixel collision checking, but ...
14
votes
9answers
2k views
How should I go about learning XNA?
I want to start learning how to make games in XNA, but I have no idea where to start! If someone could advise me on what pieces of software I need and some good books or tutorials to look at, that ...
1
vote
1answer
861 views
Multi texturing in XNA
I am attempting to make a map editor for my game, just so I can visualize how the end result would be.
To my world I can add cubes (2 triangles) or corners (1 triangle), which are then added to a ...
2
votes
1answer
260 views
When animating sprites, why subtract frametime when switching between sprites instead of resetting elapsed time to zero?
I am currently on chapter 3 of the book "Learning XNA 4.0". At the end of this chapter is a section on changing the animation speed of sprites.
timeSinceLastFrame += ...
6
votes
3answers
1k views
Behavior/Attribute GameComponent Architecture
I am a college student, and game development is a little hobby for me. I am writing a new game and I have been looking for a new approach to developing the game engine as to make it more flexible (and ...
3
votes
2answers
435 views
What is the metrics of vectors in XNA?
When exporting a model from 3ds Max as FBX to import it into XNA, what metrics should I choose to make 1 unit in 3ds Max equal to 1 unit in XNA?
For example: I have a sphere model with 1m radius ...
3
votes
2answers
948 views
Depth buffer and render target
When I use this RenderTarget:
renderTarget = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width,
GraphicsDevice.Viewport.Height, false, SurfaceFormat.Color, DepthFormat.Depth24);
...
1
vote
1answer
491 views
How to import the .fbx scene with multiple objects in XNA so that the objects retain their scene position?
I have a scene that contains mutiple objects. How can I import it in XNA and maintain each object position? Right now I export the scene in .fbx and load it in a model like this:
cube.model = ...
0
votes
1answer
458 views
How to achieve this style of view in XNA?
I would like to use a Perspective projection to create the following effect in XNA:
Cubes are simply made up of 8 vertices and drawn using DrawUserIndexedPrimitives().
Any extra suggestions, are ...
4
votes
4answers
546 views
Weird block selector selection (to floor or not to floor)?
Well, I am creating a Minecraft like engine in XNA, and since I first implemented the block selector (the cube that allows you to select blocks in 3D space) it has always been very inaccurate. Here is ...
3
votes
2answers
253 views
Issue with loading XML
So recently i've been changing my XML files that i'm using in-game, to add in a bit more data to the files but i've also changed the way in which i load & save files, by now using the XDocument ...
3
votes
1answer
340 views
How should I handle shared classes between the Game project and the Content Extension Library?
I've been using XNA for a while but recently I've needed to write a content extension library which I haven't done before. I need to import a TextureAtlas class from a file that is exported by a tool ...
3
votes
3answers
643 views
Non-GPU Noise for 2D side-view terrain generation?
I really couldn't find a correct answer while scowering all the forums for Noise Generation.
My goal is simple, I really want to have two distinct layers for my terrain, a white layer representing ...
6
votes
0answers
301 views
Rotating platform glitch in a 2D platformer [closed]
So I'm making a tiled platform game in C#/XNA where the whole world is constantly rotating. The huge hurdle was to find out what side of the tile the player was touching, and what angle it was. I ...
4
votes
1answer
759 views
Are there any good engines for isometric collision detection and platforming?
I've decided to resurrect an old game idea I had years ago. I currently have zero experience with programming, but I'm going to begin studying either C#, Python or both in the near future.
The issue ...
0
votes
2answers
444 views
Load XNA Content Type from File
I'm writing my own level editor and recently got the exporter working so now I'm working on the importer. My save file structure looks essentially like this:
[ObjectType]
Property=Value
...
2
votes
1answer
1k views
Xna, writing XML </Asset> end element
got another question here. Its not about actually writing/reading files in XML, i already know how to-do this. But rather something that has bugged me for awhile.
Ok, so when i write out my files, ...
8
votes
3answers
466 views
What is the state of the art at shipping game graphics such as lots of small BMP files?
We have lots of small BMP files which I think would be easier to copy if we had them combined in a big TAR/ZIP/whatever.
What is the state of the art at shipping game graphics?
We are using C# and ...
2
votes
1answer
1k views
How to “swing” bounding box and update collision for sprite swinging a weapon?
I have a simple question about sprite swinging weapons. I am making an RPG and would like something other than stabby-swords, so why not swinging swords?
I have a bounding rectangle for them, and the ...
2
votes
1answer
1k views
Offsetting image position when scaling in XNA
What Im trying to do is pretty simple, offset the rendering position of my image when scaled up/down. I honestly can't remember how to-do this :(
if (newAnim.texture != null)
{
// Set Source ...
2
votes
1answer
841 views
Is it possible to animate the texture of a model?
Below is how far I've got. I just made a simple block with user primitives to test it. But I haven't found a way to crop the spritesheet.
textureLava = frames[activeFrame];
This line is how I want ...
1
vote
2answers
489 views
How can I implement a “boost pad” with Farseer/Box2D physics?
I'm trying to implement a boost pad in my XNA game using the Farseer Physics Engine. (This question applies to Box2D too, I would be happy to port working Box2D code to C#.)
By "boost pad", I mean an ...
2
votes
2answers
337 views
Rotating a planet around a ships axis
I have a planet rotating around its own axis (like regular planets, and Pluto) and a spaceship that can fly around in space.
The idea is to lock the player (ship) in a deadzone "above" the planet and ...
8
votes
2answers
2k views
What are the pros and cons of Lua vs. Python as a scripting language for XNA/C# platform?
I am thinking about giving a go to one of my ancient ideas for a game. The core point of this game would be the possible level of functional customization of the game environment and objects (such as ...
2
votes
1answer
600 views
Unity3D animation and world collisions?
I'm using death animation for my enemies but the problem is that when enemy dies he crosses the walls/world. I want enemy/animation to be pushed back into world when he dies (animation is playing). ...
2
votes
1answer
1k views
Simple WP7 pong game with real time multiplayer using sockets
I'm making a pong clone for Windows Phone 7 and I'd love to add a multiplayer option. I've been trying to use this Ricky Tan's tutorial:
...
8
votes
2answers
730 views
How to make a world-to-player inventory system?
I am running into an issue of trying to implement an inventory system within XNA (doesn't really matter, could be any platform) but so far. Here is the issue I am trying to wrap my head around:
How ...
1
vote
1answer
825 views
2D platformer multiple rectangle collision cause jitter
I posted this question two weeks ago: 2D platformer corner collision and I implemented NoobsArePeople2's solution.
Problem is, when player intersects two rectangles that are inside each other, he ...
2
votes
1answer
311 views
How do i make player input object spawning data driven?
I'm using component based design and am at the stage or re-factoring simple player input to be data driven.
Currently i have a PlayerControlComponent, which an entity has if it should be player ...