From: (ProteanThread) on 8 Feb 2005 18:40 http://www.programming.de/index.php?download.php These programs are all made with Borland C++ Builder 1.0 and are supposed to help you mastering the first steps to your own games and programs and to give you some inspiration for your first own projects. They rely on the Windows library VCL by Borland, so they won't compile if you don't have C++ Builder installed. Most concepts can be transferred to other libraries easily. The downloadable archive files contain all the sourcecode, project files and bitmaps, as well as the *.exe-files of the programs. You may freely use the sourcecode to learn from it and use it for your own programs. Most of the programs on this page depend on the SuperTimer component for high precision timing. This component is free and can be easily implemented. If you program in Microsoft Visual C++, you find lots of sourcecode on the Download page. Check also my Java tutorial with lots of examples and the new and growing C# page. Have fun and success! Lines and Circles Lines and Circles, an example for double buffered graphics drawing for flicker free animation. Bitmap Animation Example program for drawing bitmaps with transparency, using image lists. The vehicles move across the window with different speeds. The program also features a menu and an "Info about" box. Clock This little Clock program shows analog and digital time and calendar functions. Country specific weekday and month names in the registry are considered. The time format can be changed to 12 h / 24 h format and there is an optional chime sound every quarter of an hour. Settings are saved in an ini-file. Slot Machine A simple Slot Machine with nice, smooth reel scrolling and sound effect. The reels also get slower before they stop, giving a natural appearance. Two equal fruits make a $1 win, three equals $50, if no NULL is among them. Chancy Words An interesting little program for creating words at random. You can use one of three algorithms (V=vowel - C=consonant) or let the program decide. On every button click a word is added on top of the list. If the list contains more than 100 words, a word on the bottom is deleted for every new one. Shoot the Alien A funny little example to demonstrate game timing and graphics handling. Featuring sound effects, intro screen and evaluation. Move the gun with cursor LEFT and RIGHT buttons, shoot with SPACEBAR. Little Monsters This example demonstrates some more complex techniques used in video games: objects and classes, sprite animation, collision detection and a lot more, though I tried to keep it as simple as possible. Click at the monsters to let them disappear, if you can! Breakout An even more advanced example of a simple video game. Uses several classes and pointers, but no bitmaps this time. The game has all the basic features you would expect (ball is reflected with different angels from the paddle, for instance), but a real game ready for publishing, would need a bit more (like different kinds of blocks, that vanish only after more than one ball hit and several levels with different block configurations, bonus objects, animations when ball hits a block etc.). Notice that there are always lots of different (and probably better) ways to solve a programming task than those I have used. Lotto Simulator Test your chances! This program can make up to 1000,000,000 draws of your favorite numbers, single or timer controlled. It displays 4, 5, and 6 right numbers and the relative frequency they occur with. There are some pretty tough problems for beginners in this program: * guarantee that different numbers are set by user * no number is drawn twice * numbers are sorted ascendant * the right numbers are highlighted Worm Game One of the all time classics. Use the cursors to steer the worm. The worm's meaning in life is to eat all the yellow dots (food) and to grow. When he touches the borders or himself, he dies. There are several possibilities to do the game logic, I used a separate "Worm class" and a dynamically growing array of structures to keep track of the worm length. Also it has to be made sure that the yellow dots are not placed on top of the worm. Every five eaten dots, the level and speed is increased. Game stats are displayed in status bar panes. With sound and nice "dying animation sequence". This example is rather advanced and you can use the things shown here for a lot of similar games. Rotation This demo shows you how to rotate geometric figures around an axis. The functions which accomplish this can be used for any kind of polygon. To make this program even more interesting, I added some options to play with. When you check "Draw trails", the background isn't repainted. Sinus Demo program to visualize a sinus function. You can change the parameters Frequency and Amplitude. Nothing exciting, but little demo programs like this are always useful as a reference (you can never have enough of them). XML Adressbook (Freeware) is a full-featured, easy-to-use adressbook application with all the essential features you really need and without any overhead. You can add any number of entries you like or import them from an Excel file. The table can be rearranged and sorted in any way (by clicking the table headers) and you can add or delete rows to fit your personal needs.All settings are saved to disk automatically. The adressbook file is saved in the XML format! The program can also serve as a birthday planner - you can call a table with all the persons which are celebrating their birthday within the next 30 days, along with the days to go and their age. World Time Clock (Freeware) This program shows the time of five different timezones, with analog and digital clocks. Choose from a list of 150 countries and 400 cities or define up to 5 countries and cities of your own. Implemented daylight savings time rules, 8 available time formats (12/24 hours, with weekday, date, month, seconds), configurable colors. Alarm clock with user defined message and sound signal plus a little calendar. Always on top mode and hide in system tray mode. Multi Clipboard (Freeware) With Multi Clipboard you have access to nine clipboard texts (slots), which you can select either via mouseclick when the program window is active, or via Hotkey "Ctrl + NUMPAD 1.. 9", even if the program is inactive or minimized to the system tray. This copies the selected slot to the Windows clipboard, from which you can paste it into your active application (for instance with Ctrl + V). The hotkey "Ctrl + NUMPAD 0" hides or shows the program window, depending on the previous state. If nine slots are not enough and you need more, you can change to another of three available files. Week Scheduler (Freeware) Very useful to remind you of the lots of appointments you might have to keep during the working day on your computer.You can set 16 timers independently for each day of the week. When an alarm time has come, a blinking popup window comes up, with a message you can assign beforehand. Sound signal optional. Program window can be moved to the system tray, so it won't get in the way and it can be started iconized. If you leave your PC running overnight, the tab switches correctly to the next day. Multi Timer (Freeware) Ten independent Timers in one program, to count down to zero or up to max. 100 hours, with 1 second accuracy. Timers can be viewed one by one or all at once and can resume on a later computer session, all settings are remembered from the previous time ran. Sound signal (optional) and blinking message window (cannot be hidden with other windows) with user-defined message on alarm. Each timer can be assigned an individual identifier string. Always on top mode and hide in System Tray mode. Program Launcher (Freeware) If you need to start several programs simultanously, this program can be useful to you. It can start 5 groups of programs with up to 5 programs in each group, either manually or timer controlled. You can start *.exe files or document files, for which the standard program is started then. You can also specify arguments for the programs to start with. Choose from 50 icons to assign with your groups. Program can be iconized to the system tray. Optional sound signal on timer start. Metronome Timer (Freeware) A special timer program, developed for speed reading training. Counts up or down, with customizable metronome tick (emphasized or not, variable speed), plus extra sound every x seconds (when you count up) or x seconds before timer runs off, and when timer has reached zero. All settings are saved to disk. This program is made with Borland C++ Builder 1.0. Unit Converter (Freeware) Simple and intuitive to use tool for conversion of the most frequently used units of Length, Weight, Volume, Area and Temperature in both U.S. and metric types. Enter any value and convert it to the desired result unit. Result can be copied to clipboard. PacWorld (Freeware) Play the old classic arcade game in my new interpretation, with several worlds and levels, nice graphics and sound effects, bonus items, offscreen tunnels, locked rooms and highscore. Requires DirectX and a reasonable fast PC. Card Game: 1001 (Freeware) A very nice card game I used to play with my mom and my sister, when I was a kid. The rules are not hard to learn and there are some nice extras in the game, so I promise it won't get boring. With sound and evaluation. Card colors and player names can be changed, settings are saved. Block Game (Freeware) A nice, addictive game in the Color Tetris/Dr Mario style. Move four in a row with the same color to make them disappear. Use the cursor UP key to change the ORDER of the colors within the falling block, and the cursor DOWN key to make it fall faster. There are 3 different block styles to choose FROM and you can choose a fixed level or increasing levels FROM the options menu. With sound. Settings and highscore are saved to disk and loaded the next time you play. Wow, a new Highscore! I just managed to hit the PRINT key before the game was over. Played in Level 5 without automatic increase. Try to beat that! Update: Well, obviously someone has! Don Crowder, a dear cyberfriend of mine, used to be an addict of this game, his latest screenshot proved an incredible 71586 points highscore! Recall the Melody (Freeware) Not only for kids. If you have a musical ear, repeat the chancy melodies if you can. Use the right mousebuttton to hear the note before pressing a wrong key, but try to do without it. False notes are marked with a worried smiley. Several options to change. Concentration Game (Freeware) You need concentration and a good short-term memory to play it. There are 9 different themes (sets of pictures) to choose from. Monitor Test Screens (Freeware) Eight different testmodes, some with submodes. Test your monitor for sharpness, moirý, geometry, convergence, high voltage supply stability, brightness, color quality and more. Adjusts to any given resolution (even odd ones, like 1280x1024). Comes with a tutorial text. You can step through the screens with ENTER and "hold" the auto changing screens in the submodes with SPACE. Password Generator (Freeware) A useful tool for creating passwords that nobody can guess. Use a mixture of upper/lowercase letters, numbers and a selection of user defined special characters. Generate up to 1000 passwords at a time and save them to a file. RGB-Mixer (Freeware) When you build homepages or any other kind of graphic artworks, a tool like this comes in handy. Mix any desired color with the three sliders. The program saves its last used color and all the settings to disk. Press ENTER or click button to put colorstring into the clipboard. You can make the program window stay "always on top" by clicking the pin button. Multiple Choice (Freeware) Make up your own Quiz Show! Answer questions while picking the correct one among three or four available answers. The program comes with quite a lot of quiz files, which were kindly sent to me by several authors, but you can easily create your own! Text and background colors can be changed for every file. In the end you can review which questions you answered correctly and which you didn't. Easy and intuitive to use. Simple Paint (Freeware) This little painting program is intended to teach small kids to handle the mouse and have fun with colors and shapes. Use 40 different colors and 10 different sized brushes or use the 15 available clipart pictures as stamps. It is even possible to 'smear' lots of identical images while holding the mousebutton pressed. The drawing surface can be deleted by filling it with any available color. No saving or printing option (yet)! Kaleidoscope (Freeware) Enjoy beautiful mandala-style ornaments with this Kaleidoscope program. You can let the shapes rotate, draw only outlines, change the angle and create an "explode effect". It's amazing how many different scenes you can get from just 6 different shapes (square, rhombus, triangles, circle and star). This program is made with Borland C++Builder 1.0. Sourcecode These Zip-archives contain the complete project files and resources of the above programs. The Metronome Timer and the Kaleidoscope program are Borland C++ Builder 1.0 projects, all the other are made with Visual C++ 6.0. For the PacWorld game you need to include the CDX library (included) and the DirectX library. |