Tag: Ideas

Ideas for C Projects when learning it

Ideas for C Projects when learning it

Image by Gordon Johnson from Pixabay

Personally I always found the best way for me to learn a new language was to take an existing program- maybe something 500 lines or so long and completely convert it to the new language. It forces you to learn how to do things like string and file handling, organising the program, getting input and producing output and so on.

But having seen requests (on the C programming subreddit) for ideas to help someone apply their newly learnt knowledge, here’s a list of ideas of projects that are doable ion C. Nothing silly like database or operating systems!

  1. A simple calendar. Enter a date and show the month. Bonus points if you can use past dates and show the day that a date is on. Hint. Look up Zeller’s Congruence.
  2. Implement John Conway’s Game of Life. A cellular automaton that can be quite fascinating.
  3. Have a go at a Snake Game.  No cheating by looking at the Games Sources (link above on the top menu).
  4. Solve the 8 Queen’s problem. Put 8 queens on a chessboard so no piece can see and attack another.
  5. Create a maze generator. Make sure it includes at least one path from start to finish.

If you get through that lot, you go up a level and should look at this list.

An example of a game idea

An example of a game idea

Sometimes I wake up in the middle of the night and my brain is bursting with ideas. I’ve just finished reading Shaman by Kim Stanley Robinson that’s set 30,000 years ago and came up with ideas for a tribes game very loosely based on that (Absolutely nothing to do with the plot of the book!) .  I opened up my iPhone around 3:00 a.m. and these are the notes I wrote down in the Notes app.

I opened my email (Gmail) which picks up notes from my phone automatically, so I have the notes now here in my PC.  They are as I wrote them so they are quite rough.

“Tribe game. All players start with a small village and 50 tribes people.
Can relocate, hunt, plant etc. Can raid other tribes. Can split tribes spread over land. Have children. Found religion. Use animals. New options as tribe progresses. Discover and trade gold, furs. Tribes can move to other places or settle and form villages.
Raids build up resentment between tribes. Enough resentment leads to war. But can reduce resentment by gifts of women, food, furs etc st festivals.
Can do crafts, paint, culture, spirituality, warfare, building. Each has 1-10 levels with names. Orders focus on an area.
Better food means stronger, smarter.
Periodic festivals. Tribes get together and share attributes.
Run for 1,000 years. 100 turns x 10 years. “

And that’s how they go into WikidPad. Then I start fleshing them out into a fuller multi-player game.  Of course I come up with lots of ideas and few will make it into an actual game creation but its always a good idea to keep them. In the future it may yet become a game…

And how was the book? Very good.