Solved

snakes n ladder

Posted on 2006-06-23
6
1,417 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

752 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