Solved

snakes n ladder

Posted on 2006-06-23
6
1,388 Views
Last Modified: 2010-05-18
I m making snakes and ladder game in C++ using turbo C++3.0 compiler(16-bit).i have made the board which contains 100 squares.now i need 2 draw snakes and ladders overlapping few squares of board.how do i go about?
0
Comment
Question by:shilpi84
  • 2
  • 2
  • 2
6 Comments
 
LVL 17

Expert Comment

by:rstaveley
ID: 16971524
First reconsider. Writing a Win32 application with a free compiler is likely to be much more popular and easier to accomplish. Tell me that you're not trying to do this with the Borland Graphics Interface!
0
 

Author Comment

by:shilpi84
ID: 16973958
yes i'm making it in that only. I dont know VC++ thats why i'm doing it this way only.
How can i do it in the way you are  suggesting?
(P.S. i dont want to learn how to program in VC++ right now)
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 16974354
I take it you mean you do not want to learn the Visual Studio, which is equivalent to what Borland calls the integrated development environment or IDE, but you are willing to learn C++.  If you don't want to learn C++, you need a different TA :-)

You need to familiarise yourself with a library to do graphics. A better choice than BGI is learning to work with the Windows API. BGI was fine for limited requirements, when you didn't have the wealth of Windows native capabilities at your disposal, but assuming you want your application to be deployed on Windows, the Windows API is the way to go. Unless you have a special need to deploy on Windows 3.1 - i.e. you have pre-Windows '95 targets and you really cannot write a Win32 application - go for Win32.

Your first step is to get yourself a compiler, which supports Win32. Take a look at the options available to you at http://www.thefreecountry.com/compilers/cpp.shtml for free compilers (NB: some of these are not Win32 so read carefully). You'll see Borland C++ 5.5 listed, which will get you up and running with Win32 development, but be warned I don't think Borland give you their IDE for free, which means you'll need to master the command line if you go with Borland. Before you ask, no... your Turbo C++ IDE isn't compatible with the Borland C++ 5.5 command line compiler. I am told that Bloodshed Dev-C++ is a great option if you want to use the GNU C++ compiler in an IDE. Free Microsoft Visual C++ 2005 Express is also a great option with Microsoft's IDE, but note that you'll not get MFC or ATL with it which are great class wrappers around the Windows API and would make your project easier to accomplish.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Expert Comment

by:JoseParrot
ID: 16974495
Hi,

Good advisoring from rstaveley. Go 32.
There are magazines that have included Borland Builder C++  6.0 for free. The Personal version 6.0 is less than $90. You'll find very low prices at ebay. I get mine for free from a magazine then registered it at Borland. I don't know if it is still free. Microsoft give VC++ Express for free.

If you don't use a graphics library or API, you will waste a lot of time to develop functions already available in the API. To later discover that your game runs well in a computer with 1024x768 but is unusable for someone that uses 800x600 or a graphics adapter different of yours.

Let me suggest to walk in growthing pace. First learn C and C++. Find elsewhere code samples to speed the learning curve. Actually, an answer to your question is harder than learn a little bit of C before higher jumps. And what you ask for isn't exactly C. It is 2D graphics. DirectX has all you need for drawing the snakes you want.

Take a look at http://www.thezbuffer.com/categories/tutorials.aspx and you'll discover a lot of hints and code to learn from.

One of the best source for DirectX and OpenGL is http://nehe.gamedev.net. Great!

Please note that a lot of people is developing games in C#. It is OK, except if the game need performance. C++ is around 30 times faster than C#.

Jose
0
 
LVL 18

Accepted Solution

by:
JoseParrot earned 500 total points
ID: 16996490
Hi,

Assuming a DOS application, with no Windows at all, and that the previous comments aren't applicable in your case, you can program graphics by using the BGI library, that is part of Turbo C++.

Take a look at the marbles game developed in TC++ 3.0 under DOS using BGI graphics at
http://www.sourcecodesworld.com/source/show.asp?ScriptID=815

Jose

0
 

Author Comment

by:shilpi84
ID: 17007310
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now