1. ## TANKWARS! some questions

first off, hello this is my first post...
ive taken introductary c++ courses at my college, im not a CS major, i am a physics major.. but i figured with basic knowledge of c++ i should be able to make the simple tankwars game that was popular about 10 years ago... but i really can't figure out how many parts of this game were developed.

so #1) does anybody have workin code of the game so i can analyze it and hopefully learn a \$hitload in the process?

#2) if not #1, then how is the ground for each map randomly created?

hopefully i could see a working version of the game, or at least some insiteful clues as to how it should work. i have all the formulas and such for the trajectories of the projectile, but that is the easy part (for me at least) gettin it to work sux

2. I remember back in like 7th grade, Tank War was just the greatest game ever . I always wondered how they made it back then.

I am not sure how they actually generated the land, but you can do it yourself fairly easily. I'd say make your own (simple) terrain generation algorithm. Think of the height as a function of the horizontal. You basically want to have it the land slope. So, say, start at the x=0, leftmost part of screen with an initial displacement 0 (corresponding to say, the middle of the screen). The next part will either be the same height, a little higher, or a little lower. Keep track of the current angle. Randomly create a small change in angle for that given horizontal displacement, and change the height as neccessary. Iterate through the whole map, and bam, you have your own randomly generated terrain.

3. ## f

sounds easy enough.. but im still lost. i really am lookin for the code of the game so i can look it over.. i think ill learn alot faster that way.

4. ## Possibly what you are looking for?

Upon reading this post, I realized that I might have something related to what you want. I have an old "300 games" demo CD that I god about 3 or 4 years ago, and one of the games is an old 2D tank game. In the folder on the CD I found multiple .DLL files. I looked through them, and I honestly don't know if it is what you are looking for.

AIM: CarlosTheJackass
ICQ: 74616133

I can't include them with this message because you can only include 100KB, and the total of the .DLL files is about 300KB, but I could quickly send them over AIM or ICQ

Ok, well I really hope this helps you out

-Charles

5. ## Look at Sorched Earth (sp?)

Look for a game called "Sorched Earth", i think my spelling mght be wrong. Its was called "the mother of all games"
Just play it a bunch, and think of how they did stuff as your playing.
I have a few ideas for when i started to make a game like this, i never finished due to lazyness and not knowing windows graphics programming. I might try and make a tank wars clone now with direct x, we will see.
As for making the land, here are a few ideas.
Have an array int Ground[width of screen];
Loop throuh this array and for each pixel add or subtract 0,1 or 2 from the previous pixel.
If you want to throw in cliffs have a small chance of a bigger increase of 20 to 50. Its really up to you decide.
Then to figure out where the gound is at a given x coordnate, just use this array as a look up table
heighofground = Ground[Xcoord];

6. ## s

thanks that helps

7. If you're ever looking for source on a certain type of program/game, check out http://www.planet-source-code.com They have numerous examples for each program type, in many languages.

If you're wondering, I AM getting paid to tell you this.