Solved

snakes n ladder

Posted on 2006-06-23
6
1,381 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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…

746 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

12 Experts available now in Live!

Get 1:1 Help Now