Showing posts with label Special Programs. Show all posts
Showing posts with label Special Programs. Show all posts

Sunday, September 13, 2015

Typing practice with bubble game

Many of us played this game in typing tutor. Bubbles are falling from the top containing a  character in it. We need to type that character to make that bubble disappear.
Same is here but there is no termination condition or scoring.
To terminate the code press ESC key.

Preview:

MS Paint like program in C

MS Paint Editor in C. It is having four function Circle, Rectangle, Line and Pen. Using this four function you can design whatever you want. And later you can save it by taking screenshot of it.

Preview:

Graphic program to design a moving car

Car looks like :

Happy Birthday sound in C

Graphic program to design calculator

In this program I used C graphics.
Not a big task, Only we need to know how to initialize Graphics then we can use inbuilt functions to design anything.
initgraph() is the function used to initialize graphics available in graphics.h library. It takes three parameter first one is reference to graphic driver, second one is reference to graphic mode and the last one is BGI library path.
Other functions I used are rectangle() to draw input box and buttons, line() for design, setcolor() to give color to shapes and outtextxy() to display text at specific x and y coordinates.

It looks like this :

Saturday, June 22, 2013

TIC TAC TOE Game in C lanugage

TIC TAC TOE using C

Again a game, I developed it when I was in my BCA second year.
Compiler I used is Turbo C++ , I know its old one but I used only this.
It is a well known game.......
I have a bug in this game. I am unable to determine the error cause.
Its giving me an error -
"Graphics error : Not enough memory to load driver"

The game runs fine for sometime but after playing 3-4 chances it gives this error and terminates automatically. Try playing the game if you like it please share it or if you have any solution comment below.



Instructions before you run the code:



Set BGI Graphics path in initgraph() function according to your pc's Trubo C BGI library.
Here mine is c:\\turboc3\\bgi



If your compiler's graphic library is not included then you will find many errors in this program.
To avoid this follow the steps:
1. Go to compiler's option menu (ALT+O)
2. Then select Linker option
3. Then select Libraries option
4. Then Mark X to Graphics Library option using space button
5. Then select OK

All done.
If you want to save this changes permanently then do this:
1. Go to Option menu
2. Select Save then select OK



Screen Shots:





Code:

Here is the code of the game copy and paste and follow the instructions and run the game.
Works fine.

Thursday, April 11, 2013

Program to print alphabet patterns

Love to generate different patterns with C or C++ compilers:
Check this program, this program is able to generate all alphabet patterns from A-Z.
A pattern for line I Love BcaStuff.

Pattern for all characters is generated separately, but I merged them all in a single collage to better view.

Try this code to generate pattern for all 26 alphabets and heart shape :

Program of falling colorful characters

One more colorful program:


Program to draw a hut pattern

Want to draw something new ?
Try this:

Program to print colorful heart pattern

Try this code:

Program to print Heart pattern

Have you tried generating different patterns in C or C++ ?
I know its easy but I am sharing what I tried.

Here is simple Heart pattern.
And will look something like this :

Sunday, March 31, 2013

Car race game in c++










Have you played this came before...
I have created this game in C++, Simple and sweet game.






Nice car game in C++ using Borland Turbo C++ Compiler.
Set BGI Graphics path in initgraph() function according to your pc's Trubo C BGI library.
Here mine is c:\\turboc3\\bgi.

Keyboard Controls to play the game ;
Controls
A - Move car left
D - Move car right
Enter/ESC to exit the game.

If your compiler's graphic library is not included then you will find many errors in this program.
To avoid this follow the steps:
1. Go to compiler's option menu (ALT+O)
2. Then select Linker option
3. Then select Libraries option
4. Then Mark X to Graphics Library option using space button
5. Then select OK

All done.
If you want to save this changes permanently then do this:
1. Go to Option menu
2. Select Save then select OK


Still having problem then ask me or comment below.
Enjoy the Game.

A JavaScript Calculator

Copy and paste this code in a notepad and save as a .html or .htm then open this file with any browser to run calculator program.



Output of code will be like this


Powered by Blogger.