Question:
some programming questions related to C# and XNA?
anonymous
2008-11-13 17:27:33 UTC
Im want to develop games and develop programs and c#, and learning Xna
What are console application for?
Should I learn console first or windows application in C# first?
Is C# good enough to make non video game programs?
How much Should i know C# before learning XNA?
What are some common math that I should learn to make 3D games?
Any C# books and Xna books?
thanks you so much!
Three answers:
anonymous
2008-11-13 18:33:20 UTC
Sorry, I have only answers for the first 3 questions...



A console application is that which is executed in a MS-DOS (Win 9x) or "Command Prompt" (Win XP-Vista) window. These applications are not very user-friendly. Usually you have to type the name of the program with some parameters. A simple example is C# compiler: you type csc.exe and some parameters, like the source file, the assemblies, and so... Before Win 9x there used to be some console applications that looked somehow today's windows applications: you had menus and mouse, but they were executed in MS-DOS in a single window - you could not execute another application at the same time. Technically the difference between a console application and a windows application is the way it's programmed. In a console application you have an entry point (in C++ is main() ) and you have to handle the parameters by parsing them. And of course, you don't have the windows-style dialogs (you still can have dialogs, but they are inside the console window). In a windows application you have also an entry point, but it's different, (in C++ is winmain() ), you create here the main window, and you have a function that handles messages (the commands sent by menus, toolbars, buttons...) So in conclusion, console applications in the past time were the only kind of applications for MS-DOS. Currently they are used for tasks that don't requiere user interaction (basically tasks that can be done without a Graphic Interface)

Now, in C#, I'd learn first a console application just to get started.



This is a simple console app to say hello:



class test //File test.cs

{

public static void Main()

{

System.Console.WriteLine("Hello");

}

}



You compile it with another console app: csc.exe test.cs



When you have learned the basics of the language you are ready to do a windows app -This is a windows app:



class test //File testw.cs

{

public class MainForm : System.Windows.Forms.Form

{

public MainForm()

{

this.Text = "Hello";

this.ShowDialog();

}

}



public static void Main()

{

new MainForm();

}

}



Compiled with: csc /r:System.Windows.Forms.dll,System.dll testw.cs



Note: System.Windows.Forms.Form handles the basic messages, like closing the window, but if you add a menu, you would have to add command handlers, which are basically functions.



Finally, yes, C# is good for making non video game programs.



About XNA & 3D games I don't know
Daniel B
2008-11-13 18:06:58 UTC
Most commonly a console application refers to application without a graphics user interface, it's all test input and output. Since you are talking XNA console could also refer to a game written for a game console since XNA can be used to make games for the Xbox.



C# is an excellent language for writing lots of different types of program. You will actually find that it's used more for other types of software then for games.



If you enjoy games, then building games in C# using XNA is a good way to learn the language. You will tend to stay more interested if you are writing something you enjoy.



As for book, there are a number of them out there, although I don't have any specific recommendations. You might want to go to your local book store and look through a few of them.
anonymous
2016-10-20 03:13:59 UTC
I have not have been given any concept approximately others, in spite of the undeniable fact that for me, assembly replaced into as quickly as purely like the glue that made all my computing device abilties come jointly. before assembly, I used to ask your self how all the uncommon application would paintings and how working structures and video games have been built, after examining assembly, those style of concerns grow to be sensible instructions that the computing device finished one by employing one. i've got faith that examining assembly makes your information of ways a computing device do what it does very sparkling. You get to hold close the interior workings of a computing device. Even regardless of the undeniable fact that I only recognize the basics of assembly language and am traditionally now no longer properly sufficient to enhance any variety of use-able application in it, I even regardless of the undeniable fact that have faith that examining assembly made a maximum suitable deal of exchange to my programming abilties. i've got faith that on a similar time as you study assembly, you quite completely carry close that computers are purely boring machines that do purely what you tell them to do. From there on, grasping some element is in basic terms sensible. then you get the means to no longer have faith approximately the modern-day application as doing magic, or an working equipment as a application that replaced into as quickly as made by employing skill of geniuses.... From there on, its sensible MOV, upload, SUB, ... recommendations that make all the magic interior the computing device paintings, even Linux or domicile windows!!! My advice, regardless of the undeniable fact which you would be able to traditionally in no way use it, study extremely approximately assembly. it would no longer take extra beneficial than an afternoon or 2, in spite of the undeniable fact which will traditionally circulate a procedures.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...