Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

snakes n ladder

Posted on 2006-06-23
6
Medium Priority
?
1,458 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Expert Comment

by:Jose Parrot
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:
Jose Parrot earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

916 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