Page 1 of 1
C# projects
Posted: Wed Jan 18, 2012 12:57 am
by mattykins
I wasn't quite sure where to post about this, so correct me if this is in the wrong topic.
So i'm going to lay off trying to learn XNA for at least a week or two, and devote some free time into better understanding C#. might write another text based game or something of that sort. I just realized after starting work on XNA that i did not yet comprehend enough of C# to learn XNA.
I was wondering if there was any small - scale C# projects you guys think I should try.
I was considering a farming - sim game, similar to harvest moon. (I'm a big fan of the Harvest Moon games

)
Just reply to this thread with some small projects you guys would like to see done in C#, it would help me because I dunno what I should work on, and I would like to start writing different things to learn C# better.
Re: C# projects
Posted: Wed Jan 18, 2012 1:47 am
by Xaleph
Hmm mighty fine question there.. What do you like to do? If you want to create a text-based game, I can`t really recommend C#.. Sorry. No, that`s not fair, it`s just that I can`t see how that would work out. My game design skills are very, very limited ( even using XNA.. ) When I think of C# I think of applications. Hmm, maybe what you should do is focus on C# in a way that`s usefull to gaming as well, like saving and loading files, handle input from the user, et cetera. Maybe something like a WordPad clone? Where you can create .txt documents, write a story and save it? That should help out as well once you start redigging in XNA.
Re: C# projects
Posted: Wed Jan 18, 2012 1:59 am
by mattykins
Why don't you recommend C# for a text-based game?
From what i've don in C# it seems able to do a great text-based game.
EDIT: I took your advice on the wordpad clone. It was actually a fun and beneficial to my learning little project, the first project i've done seriously in windows forms. And it actually saves a .txt file to a filepath of your choice

Thanks for the suggestion.
Re: C# projects
Posted: Wed Jan 18, 2012 2:31 pm
by Xaleph
Hehe good job, did you also look at how you can handle input from the user? Just using text isn`t enough, you want to bind certain actions to keys, like space -> jump or WASD for movement. If you know how to handle these buttons, you`l be 1 step further down the line of creating your game. You should also know that XNA isn`t an application like WF or WPF type apps, it uses a different architecture.
In XNA for example everything is going trough the game loop, which is different from normal applications. A normal application is based on events whereas the game loop keeps running no matter what. So you should check movement etcetera in the Update() of the loop to see if something changed.
I don`t know if you want to make a 3D or 2D game however I reckon you`ll need some sort of map you can use inside your game. For now, I would go with XML. Maybe start looking into how you can utilize XML for your game? For example, if you want a 2D sidescroller like Mario, how would you go about doing something like that? It`s quite easy if you load an XML file where all the blocks of the map are in. Try looking into that next, or better yet, try to create a map editor?
Re: C# projects
Posted: Wed Jan 18, 2012 5:16 pm
by Jackolantern
C# is excellent for text-based games. So much better than Java, which requires you to actively work with streams to get incoming data in a text-based (command-line) application. .NET languages also have superior text-processing classes compared to most other languages. Whenever I am going to be using tons of text, I almost always reach for C#.
And yes, if you need more experience to understand the OO nature of C#, Windows Forms is a great place to get it. Almost everything is done through objects in C# Forms, and it is a very logical, easily-understandable model.