C# projects

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
mattykins
Posts: 203
Joined: Sun Jan 15, 2012 10:15 pm

C# projects

Post 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 :P )

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.
Xaleph
Posts: 897
Joined: Mon Feb 07, 2011 2:55 am

Re: C# projects

Post 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.
User avatar
mattykins
Posts: 203
Joined: Sun Jan 15, 2012 10:15 pm

Re: C# projects

Post 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.
Xaleph
Posts: 897
Joined: Mon Feb 07, 2011 2:55 am

Re: C# projects

Post 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?
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: C# projects

Post 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.
The indelible lord of tl;dr
Post Reply

Return to “General Development”