C# Resources!
GREAT video tutorials in C# that hybrid made a while back

Some ones I wrote up explaining how to relate basic programing principles to Conquer pserver development. Not as useful to most people as it's not as generic.

Some really nice C# tuts (Note: I haven't read most of them but I saw a few and they looked very useful)

C# For dummies PDF file.

Ok so now you know some basics of C# and are thinking "what now!". Chances are you aren't at a level where you can code something super difficult but it's always good to have some goals set for yourself. Here's some simple ideas for programs you can make to test out your new skills.
Sample Program Suggestions:
Make a program to ask the user some questions. Store these variables and return them later
EG: Ask the user for their first name, last name, then return a string along the lines of "Hi: First Name, Last Name. How are you today?"
Make a program that asks the users to enter one number at a time. Take these numbers and store them and when the user is finished entering numbers, take the average of them.
Hint: I'd suggest an array to store numbers. For added complexity, check user input for validity, handle any exceptions with nice user friendly comments and such.
Make a program that accepts user input and then saves it to a file (name of their choosing)
For added challenge, check if the file name is already existing, then ask if the user wants to overwrite it, add to it or use a different file name.
Make a program that asks the user to enter a username and password. Check to see if it already exists in a text file. If so check if the user/pass match and print out a msg. If not ask if they wish to create the new account (if so, add to the accounts text file)
Make a program that does a similar thing using sql databases!
Mini Projects:
Game of Nim:
Simple marble game where you can take up to half the current stack of marbles and no more. You play vs a computer and the person who leaves 1 marble left loses.
Rules for program:
User enters number of marbles for round (between 10-100) (check for validity)
50/50 chance that computer will play "smart" or dumb.
50/50 chance that player goes first
Player and computer will alternate between turns (player entering a number of marbles to take. Check for validity and that it is < 1/2 current marbles). Check win conditions.
If computer is playing smart then you will want to follow a few rules (I think it was something like square root of current marbles -1 or something like that... look it up on google). If computer is not playing smart then have it chose a random valid number of marbles to take. Printing out the choice it made and the remaining marbles obviously.
On round end, print out who won and ask if the user wishes to play another round. If not, close the program.
Population simulator
Ok... I'm very forgetful on the details for this program... it was the first thing I ever had to code for some damn class (which I dropped after seeing the second assignment lol!) so bear with me..
On program start, the user will be prompted for a number of things.
Initial population:
Maximum population:
Years to simulate:
Death rate (0-100):
Birth Rate (0-100):
You will now run a simulation through the number of years entered printing out the result for every year.
Note: All initial population is considered to be Adults.
Each year the following things should happen in your program.
Adults give birth (to babies) X the birth rate
Adults die X the death rate
Babies grow into youth
Youth grow into adults
Population is checked VS max population. If this happens, the population is cut in half (no decimals) and a msg is printed out during the yearly report.
Population is checked to ensure that it is > 0.
Deaths are rounded UP (you can't have a partial death)
Births are truncated DOWN (you can't have a partial birth)
When the years are up you should print out the final results and ask the user if they wish to start a new simulation at which point the program starts from the beginning.
(yes... this was the first program they ever tried to get me to write when I'd never even used the language before... I was less than impressed)
Image Manipulator
Ok so this is the point where I switched classes so I'm again, rough on the details...
Basically you want to write a program that will manipulate a png photograph to find outlines of objects.
To do this you will want to load in the data from the photograph using a binary reader and examine each pixel (they are stored as values in the photo, try opening a png with notepad and you will see what I mean).
You want to use the header information to grab the width/height of the photograph and then the remaining information to create a proper database storing information in your program. You then want to compare each pixel in the photograph to each one around it (checking for edges of course). You will then round each pixel either to 0 or 255 (full black or full white) [note... this was intended to be run on black and white photographs...]. Once finished, save the new file to a new .png and examine results.
This is a basic version of the program, there was alot more needing to be done in the actual version but you can use this type of thing for all sorts of image manipulation/checking *cough* Dmaps in conquer converted to png are a great way to run checks to see if the target coords are valid.
So yah... I'll try to think of some more sample projects people may want to try to teach themselves coding and I'll also try to add in a few more helpful links to fill this out some. If anyone can think of any, just lemme know and I'll add them to the list (credit given of course). Hopefully this will help a few people who are actually trying to learn some coding but if not, try to enjoy ^^
Pro4Never






