Programming Challenge: Battle Ships

14 Mar

I have been studying programming for about a year now and want to challenge myself to see how much I know and still need to learn so I decided to make a small game based on battle ships.

Its going to be a fairly simple console based version to which I am hoping to add features and functionality as I learn more and more.

Specifications:

  • Written in C language to be ported later to C++ or C# and made a console program
  • Should display the screen using X
  • The ships will be displayed using DDDD for destroyer, and be allowed to place vertical or horizontally
  • Basic battleships rules apply
  • It will have single player initially and hopefully multiplayer on both the same machine and over a network
  • Cross platform compatibility on Linux and Windows
  • Specs maybe changed or updated at a later date

Software Used:

  • I am planning on using all open source software as much as I can
  • Development IDE: Code::Blocks
  • Compiler: GNU C/C++
  • And that would be it hopefully everything will work out well :).

    Advertisements

2 Responses to “Programming Challenge: Battle Ships”

  1. pizer March 14, 2009 at 7:08 pm #

    “Written in C language to be ported later to C++ or C# and made a console program”

    It seems like a good exercise if you want to learn to code in C as well as C++ or C#. But don’t learn C if you’re not interested in C. The programming styles of the other languages will be totally different (even though C is mostly a subset of C++). Nowadays, C isn’t considered worth learning as prerequisite for C++ because C++ offers much better alternatives to some things you would write in C.

    Good luck!

    -P

  2. toughaspixels March 14, 2009 at 10:36 pm #

    I was going to write program in C++ but I’m only familiar with the C libraries (ncurses.h for linux and conio.h for windows) for console programming and although they would be compatible with C++ Id rather use native C++ libraries once I figure out what they are.

    Thanks for the tip though I’ll keep it in mind.
    -kenji

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: