It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have made a game in C# with XNA. And I would like to make it playable online.
I want to be able to host a game on one machine and be able to connect to this game on other machines. Kinda like a listen server in Half Life.
This might seem like a pretty common problem that should have been solved a million times. But I have googled my ass off and i cant really seem to find any useful information.
I want to know exactly what I would need, concerning network-stuff, in order to create an online game with XNA, without using the microsoft-Live thingy.
A Library? the using-thing located in top of a class.
Code for initializing this stuff
How to look for another computer playing this game.
How to get/send data between the computers.
On which client are things calculated. If one guy would fire a bullet, should this bullet be created as an object on both clients? Or is one having the object,(checking for collisions etc.) and the other one just gets positions for draw?
I would like someone who has made a game like this to answer, what would be a standard approach.
The built-in XNA libraries are Live-focused, so you'll either have to live with that, or use a different network library.
The .NET UdpClient and Socket libraries are pretty straightforward.
Alternatively, have a look at the Lindgren open source network library. It includes some extension methods for sending XNA types like Matrix, Vector3, etc. which can be useful when you're getting started.
I wrote an answer for a question about making an MMO using lidgren, as mentioned above. It's got a few links to resources you can use to learn how to use it. I've used it personally to have a small test app with 5 users running around together, but I haven't taken it any further than that just yet.
Massive multiplayer in xna
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm creating a MMO game. I will be using TCP client/server communication. At first my approach was to write both client and server in C++, but now I'm starting to think if it wouldn't be easier to write server in C#.
Client is going to be written in C++ because it needs to be cross-platform, but server will always be on Windows system. I consider choosing C# because it has an easier way of handling threads, built-in XML parser, etc.
My question is if it would be a good solution? Performance is still important to me, so if choosing C# over C++ would have a drastic influence on performance, I'd stick with C++.
Also if you think it's good idea, do you know if there are any tutorials that present communication between C# server and C++ client?
Thanks in advance for answers.
The performance difference between C++ and C# is not as large as you might think.
For the communications, if you're bothered about performance, use sockets and something like Google Protocol Buffers or Thrift. If you're less bothered about performance, use HTTP and JSON or XML.
Using different languages for client and server forces you to rewrite quite a bit of things in separate languages I would personally want to keep in sync:
Serialization and deserialization, although you could of course use some library for that. Google Protocol Buffers come to my mind, as they are explicitly designed to save bandwith and work "cross language".
Almost every entity of your game will have a more or less common set of properties. When going with different languages, you would have to keep these in sync manually and probably write them twice. This is especially annoying with more complex setters ;)
You will want to have some shared logic to "emulate" server answers on the client. Its important to predict on the client side what the server does to get a "snappy" behaviour. And what could emulate that behaviour better then using the same codebase for server and client?
I would't see a great problem with performance when using C# on the server though. That shouldn't be an aspect that strongly influences your decision.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm new here and have a problem. I am having to pick up C#, but I have no experience in it. I'll mainly end up (probably) doing tooling type stuff, but I haven't programmed in awhile and I don't know a huge bunch about it.
I have to write a class that depicts an enemy spaceship, but I am not quite sure how! I seem to have forgotten everything I learned in Java and VB about writing classes. Where might I find good resources for re-learning to write classes, learning to write a class in C#, and learning to write classes for video games?
Specifically, I have to show how it interacts with other enemies, weapons, how big it is, how it looks, etc.
I'm not asking for code, just for resources on learning.
Maybe you should ask on the gamedev stackexchange platform in order to get more pertinent responses : Gamedev Stackexchange
Also, MSDN is a good solution : Learn Visual C# on MSDN. They describes the basics a lot, concepts, classes, structs, interfaces, with a lot of tutorials and resources (like Creating a Maze for example).
Not a direct answer but:
http://www.3dbuzz.com
They have incredible tutorials on c# and C and for the most part - programming logic is programming logic, once you have a way of thinking its a lot easier irrelevant of what the language is. They also have XNA stuff to help you with that.
You should stick to the MSDN Documentation. It's a good source of information for everything you need to know about C#.
Once you get a good hold on C# you should look into XNA Platform.
It's a free Game Development Engine by microsoft for C#.
You can make games for Windows, Xbox360 and Windows Phone.
http://www.microsoft.com/en-us/download/details.aspx?id=23714
This is the best tutorial I know to learn how to use XNA.
Well if you're starting from the ground up I would suggest download Microsoft's Visual Web Developer. It's a free IDE that will be very helpful for you when programming.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express
Once you have that installed, you can follow csharp.net's introductory tutorials:
http://csharp.net-tutorials.com/basics/introduction/
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Right, this "might" be a tough one, as I do not even know where to start with this.
Ok, I am working on a program, which can load visual studio solutions and display them within a form when debugging.
Actually, the program does a whole lot more, but what it does, is strictly classified, so I can not go into that.
Anyway, whatever it does, does not matter in this case.
Here is the plot:
You create a project in visual studio, but when you debug it, it does so on your desktop.
What I need it to do, is debug it within a form, effectively acting as a desktop with a different resolution.
So if the specific program for example, uses Screen.PrimaryScreen.Bounds.Width - 30, as a this.left property, it needs to think that the boundaries of the form it is displayed in, is in fact the Screen.PrimaryScreen.Bounds.
I am having difficulties, trying to find out how to handle this.
Should I perhaps catch this type of code and then covert it, to work within the form?
Is there perhaps another way, to make windows simulate a different PrimaryScreen size, based on the size of the form?
EDIT: Perhaps a little more simplified.
I want the from to act as if it was my windows desktop, so any solution i load into the program, get's debugged and viewed in that form.
Handy for if you need to check how your application will look on a phone or simply in another resolution.
Point is that the program itself is going to be an IDE, but rather an online one, in which a group of people can work together on the same application/file, at the same time.
People tend to use virtual machines for these kinds of 'challenges'. It's surprising how efficient this method is! :-)
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
we are in the process of determining what would be the best technology to write our signage player . Although we are a C# house with some experience in Java, all the talk has been about Java and Mono. Also the platform we are going to build on would be a linux box.
The player has to be very intelligent and support scheduling, content change triggers by external applications (by web services), time synchronization of content, content show in different portions of the screen, video/live streamed feed etc.
We will also need to create a designer to allow the design team to create webgl content.
There is some OpenGl experience in the company so we could leverage this.
Would this be a good choice?
JD
That would be an excellent choice IF and only IF you have a good grasp on Javascript or your timeline isn't too tight in case you don't dominate Javascript. If going on a linux box, chances are you're better off with a custom build of Firefox or Chromium running your app alone without the browser parts (menus, tabs, etc).
My team here is working with HTML5+Javascript+Canvas/WebGL on the client side almost exclusively now because it is very fast to develop and needs almost no setup.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Hey so I want to create a 3D chess game (3D glass pieces), like the Chess game Vista provides, Chess Titans, but I'm not sure how to get started. I know I should probably use Blender for the modeling and Visual Studios for the programming. Can you provide links to comprehensive tutorials that can help me get started? Thank you
You should use Microsoft's XNA Game Studio:
http://creators.xna.com/en-US/
It's a great API actively maintained by Microsoft and there is a HUGE list of samples and tutorials to help you get started making 3D games right away.
Here's a link to a 3D Othello game written in C# and XNA:
http://creators.xna.com/en-US/minigame/minjie
If you're just getting started, Microsoft's XNA community site is a great place to get going. They have free screencasts that literally start from 0 knowledge and build up from there.
If you've never made a game before, it's probably a good idea to start simple and work your way up. I taught a High School computer class this past summer in which we first wrote the game as a text-based command line game, and then re-wrote it using XNA's game engine. It seemed boring of course at first, but the students came to realize that the objects which represent the game on the back end are inevitably identical no matter what the graphics are like.
Coding simple first and worrying about graphics second is a good way to get your feet wet without becoming completely overwhelmed by learning tons of things at once.
Why not start with creating a 3D board and get the AI logic done, with 2D chess pieces.
This way you can get most of the way on your game and then you can change the textures on the board, improve the chess pieces and better control how the light sources will work.
Googled some resources for you:
Creating an Interactive 3D World in C#.NET
Games Programming in C# - Tutorials, Articles, Source code, FAQ, Discussions, Blogs
Creating an Interactive 3D world with C# and DirectX
For the 3d part, check out unity 3d (http://unity3d.com/), the indy version is now free and support the C# language among others.