Tower Defense Arcade Game and Box
Every journey begins with one step. A single forward movement of bravery and determination,symbolizing commitment and perseverance. This is our first step in the war against Global Warming: a battle that we can't fight ourselves, but instead can spread awareness of using a medium everyone loves: a game.
This is a blog of our building process for the creation of our Tower Defense Arcade Game. We are making an old-style, 8-bit arcade game, where the player places various trees and ponds to help rid the air of Greenhouse Gases (represented by cars). Just as you would see in an arcade, we are also designing a big heavy arcade box with which to play the game! (with cool pretty pictures on the side. Our final goal is to ultimately rid the world of the greenhouse gas threat, and perhaps continue with our efforts and present this game at Maker Fairs, Save the Air Events (we have future ideas of perhaps making this game solar-powered), hopefully making an impact on others and encouraging them to partake in what may be the greatest challenge for the human race: fixing Global Warming.
Once we got to know our group, we realized that we were missing one crucial person: a programmer. Since no one in our group has any idea how to program in Flash (which is the language we are using to make this game), we thought we would try to download the source code to a basic tower defense game and then modify it to fit our purpose (with permission from the author of course).
After about three minutes of searching (which involved opening Google Chrome, typing in "how to make a basic flash tower defense game", and pressing the first link), we found a pretty cool and very basic game from a website called http://makeflashgames.com (which could not be more conveniently named) . After visiting the site, looking through the 15 or so tutorials, and thinking "oh, this should be easy. We can do this!", we downloaded the 1000 or so lines of gibberish and set of to decoding it!
When we tested out this un-modified game, we really liked it. The graphics were incredibly basic (which we liked), there wasn't any bizarre clutter (which we adored), and we knew how we could make this basic game into the final project (which took my heart). There was one monster type, which we thought was fine for now, three towers, and a really easy tower placement setup. At the time, it was an idea come true!
After some high-fives, fistbumps, and cheers, we thought we had this project in the bag.. on the second day of the internship. We had our design, all our plans, and felt totally ready to get started! So embarked we went!
From our sketches and designs, the process seemed all nice and easy until we started (which is how all projects are I guess). We first tested our boundaries with Flash, and were able to modify the very bare-boned basics of the prototype game, such as how much damage a tower dealt, or how far away it could shoot. After feeling incredibly happy with how easy life was, then the dreaded question came up.. The one that our minds had been subconsciously forgetting while we basked in our ecstasy: we wanted 5 towers, not 3..
So our towers, in progression from least powerful to most powerful:
Grass, bush, normal tree, pine tree, pool/puddle/lake
The larger, and the more surface area a tree has, the more carbon dioxide it absorbs, which explains going from grass to normal tree. Pine trees also absorb the largest levels of carbon dioxide, which is why there is a pine tree. The ocean absorbs two thirds of the worlds carbon dioxide, which explains have the lake as the most powerful.
The attackers, going from least powerful to most powerful:
Methane cloud -> lawn mower -> robot w/ exhaust -> hummer -> molten something in a giant pot
Overall, out of the different uses of energy, agriculture produces th least, then Commercial, then Industrial, then transportation, then Electricity. The different attackers represent these different areas of energy.
Since no one in our group knows how to program, and our we had no choice but to follow a path that we with our current non-existant coding abilities could follow: Taking a game and modifying the graphics and variables to suit our wants. We downloaded the game, and set off on the first step: changing the tower designs.
There were three towers already included in the prototype game: Fire Tower, Ice Tower, and Lightning Tower. Our first task was to change the pictures of the towers.. a task easier said than done.
After a few hours of trying to figure out what the heck we werte supposed to do, we decided that Frankie, Audrey and Jack would go draw out the arcade box, Noah would design the buttons (which we are currently printing out on the 3D printers), and that left Brandon to explore the dark lonely cavern which is Adobe Flash.
Sure enough, after 30 minutes, everyone completed their tasks, and we were proud to have completed all three of our tasks: Detailed dimensions of the arcade box, a nice 3D model of our button design, and lo and behold we saw Brandon fighting cars with an army of trees.
We are all very excited about this project, and each Monday and Wednesday morning passes with angst from each of our group members, as we are all deeply enamorated with this creation that we can call *kind of* our own, and we can not wait to get over to the Clubhouse and continue the development.
In the next few days we hope to exponentially improve our designs, and let Brandon improve his seemingly magical talent of using flash to expand our project to new heights.
We then designed the basic blueprint for the arcade game. We are planning on making the box around the screen out of plywood, and holding the plywood together with nails and duct tape. The dimensions are not exact, and depend on the size of the screen, but if we get the screen that fits our materials list then none of our hardware dimensions will change. We are planning on painting the plywood with acrylic paint to add color and make our game more eye-catching.
Today, our group made a lot of progress on both the hardware and the software for our game. while some of the group members worked on the dimensions, one of our members, Noah, worked on 3D Printed buttons to control the game. it started as an idea, then a draft in Tinkercad ( a 3D design program ), and then finally a first draft 3D print. Still a work in progress, the button will hook up to a Makey Makey ( a microcontroller ) and will control most functions in the game. --> link to the model https://tinkercad.com/things/jKSmxT6fZq8-3d-button-model
At 4:12 pm, a collective sigh as emanated from our group members as a monumental goal was at last achieved: version 1 of our game was COMPLETE!!!!!!!!
Right now, our game is exactly 47% complete. Our next goals in the software department are:
1. A customized background featuring a city (where the cars come from) and the countryside (where the sheep reside)
2. Original car artwork for our CO2 producers
3. Better pond artwork/animation
4. Debugged Waves/Gold/Definitions/Lives
5. More Towers!
While the following days are certain to be wrought with terror and distress, I alone seem to have total confidence in our group's future, progression, and completion of our project.
As for now, bottles of Martinelli's Non-Alcoholic Sparkling Cider are flying open, cheers being given, glasses clinked, and our under-aged group is rejoiced with the happiness and enthusiasm of a professional game development studio.
Today was a grandeus day, as our group acheived a goal that we had previously thought insurmountable: a complete, originally-designed, game. We are now able to play this basic game, whose features we may add to later on, and our second complete, fully playable version is ready to be released for people to play!
Changes since V1:
- Original Car design!
- Added grassy hills, a city, and a sheep in the background!
- Changed the "You Win!", "You Lose!", and other screens to feature our original, beautiful, 8-bit pixel art
Someone asked us what a wave is... so here is the best example I could come up with!:
When you play the game, at first just one car appears and travels the road. That car is the first wave. once you kill (*disperse*) that car, 5 more cars come out from the city and start traveling along the path.. That is the second wave. Once you kill those, 10 or so cars come out.. They are the third wave. Each set of cars that you have to defend against are a wave.
As our deadline comes near (next wednesday!), the time is approaching for our team to combine the two branches of our project into the final product. To do this, there are quite a few things we need to change on the software end in order to create the bridges that shall bind the two components.
Our first step is to integrate a mouse into the game. We have already arranged for a trackball that we will place in the box, and the idea is to have the trackball along with four buttons: one button for selecting each tower, and then another "select" button to be used for placing. We have rigged the box and the buttons so that by pressing a button it simulates a keyboard press, however we need to modify the code a little bit in order to utilize this to it's full potential.
Right now, the game works by using the mouse to click and place towers. However, for the final product we want to change this so when you press a key (I will use "w" for the examples), it moves the mouse cursor to a certain place and clicks on that spot. Not only would that be more arcade-like than using the trackball to move the cursor to the tower and then clicking on it, but we want to remove the cursor display so that you only have to press button and move a trackball to place towers. Cursors kind of ruin the vibe.
After we figure out how to select a tower using the keyboard, then we can use a device circuit-board thingy called a Makey-Makey to connect the buttons to the keyboard commands. With all this done, our game will be on the verge of completion!!
Now that we are in the final stages of development, there are a few bugs that we dearly need help squishing. The next posts on this branch will contain information about each bug, everything we know about it, and screenshots of the code and the bug in game.
Any help with any of these bugs will be GREATLY appreciated, and anyone who helps lead to their arrest will be duly compensated with a spot on the Credits section giving our many thanks, hugs, and kisses! These bugs probably are not hard for your average programmer to figure out.. but since our group has VERY minimal programming experience, these dilemmas seem impossible for us to solve.
Many thanks to everyone in advance!
We successfully figured out this bug. THANK YOU JOSEPH!
Name: Wave/Life/Gold Bug
Issue: Our Wave/Life/Gold values always display 0
Notes: Even though you play the game as you are supposed to, and you lose lives, the waves continue, and the gold changes as it's meant to, the display always shows a 0 for those variables. The code seems fine (we haven't modified any code, only .fla stuff), however since beginning this project this bug has been very prevalent. Attached are screenshots of the bug, and you will be able to view the code by downloading the source files.
How to help: If you have any ideas on what may be causing this issue, please leave a comment below!
Funny Introduction that Jack wrote..:
The first and foremost bug we encountered was the Life/Wave/Gold/Desciption bug. Definitely the most annoying and soul-cringing bug in this game, it has taken all of our bravery, valor, and self-determination of pure will to hunt down this vile creature and squish the life out of this treacherous beast. However, the battle isn't over yet.. while we successfully unencrypted the descriptions, and a value is now displayed for the gold, wave #, and life, IT LIES TO US!!!! Before being squished, that blasted bug must have unleashed a terrible curse upon those three variables, causing them to be unchanging, unmoving, and forever displaying a 0.. as though the beast is reminding us of how petty we are, and how nothing can stop his eternal reign of terror over our project. We had thought he was finally gone, rid from our out innocent game, but no! He is still here. Still causing trouble.. Getting the last laugh.
As we are nearing the end of the software department of our project, three branches will come from this post.
The first branch will be modifications, and the final tidbits we are trying to add in order to create the final product.
The second branch is the Debugging Section (codenamed the Bug Bounty Board). It is where we invite all our readers to help us track down those bugs!
The third branch is where we will upload the latest versions of our game, primarily for our group members to be able to work outside of the internship, but also for anyone who wishes to view them.
This is the final stretch of our game, and we are all extremely proud of our progress and are excited for the days to come.
Now that the game is just as we want it, we need to find out how to remove the mouse cursor. We first thought that this would be a lot of extra work and time, however with our deadlines being met ahead of time I thought I would tackle this stretch-goal of ours! Luckily, this is VERY simple to do, and it took us a total of 3 minutes to complete this!
All we had to do was add this small phrase to the main function of our game:
And that's all! This step was very easy, very basic, and did the perfect job. I have uploaded pictures of the code where this was placed in, and what it looks like ingame!
One of our final finishing touches was adding Points. Since we are making an arcade game, we thought it fitting for the player to receive points based on the cars they have killed.
To add points, we thought that we would simply copy everything Gold does (since points would essentially be Gold that can't be spent) except rename it points! That's exactly what we did, and to our great surprise and enjoyment that worked!!
The next thing to do is make an endless amount of waves, and perhaps add additional cars or maybe boss cars!
One of the biggest things that we've had to figure out has been making the buttons do stuff in the program. Our tech-guru, Noah, at last solved the puzzle! By using a thing called a Makey-Makey, which connects to something called an Arduino (both of which are beyond me), he was able to make it so by touching a wire it would simulate a keyboard press. Now, by pairing this up with our other challenge on the Software side of things, "Keyboard-Selected Towers", we successfully ran a test run where Noah was able to essentially play the game by using the mouse (representing our trackball), and the wires (representing our buttons). AND IT WORKED!! I embedded a small youtube video that we made (it would be longer, however our camera ran out of card memory), and I must say that I am thoroughly impressed with how far our game has come.
Uploaded July 16, 2014
-Points! Now you earn points based on your number of car-kills!
-Removed the Pond background color.. lots of people said it was annoying
-Fixed the Forest animation, the tree colors were wrong
On our final stretch, we are at last piecing together all the different parts and making our final product: an old-style arcade game with it's own box!
We had to:
Fortunately, we got all of the list done.. and on Wednesday we shall be presenting our final product to all who decide to stop by and see it!
Our camera currently isn't working very well.. so I will have to stop by and take some pictures to share with you all!!
So.. as the internship is wrapping up, so are our group's feelings. Our group members come from many different schools, and the separation of our new-found friends will be very sad.. also we probably will never see each other again!
This internship, and project, has been one of the greatest experiences of my (and hopefully my group's) life. I am VERY proud of all the work we have done, all the things we have learned and the achievements we have strived for.. It is very sad to see this all come to an end.
Our final product looks fabulous, and during the presentation worked wonderfully. Amazingly, during the presentation I was approached by someonewhowon'tbenamedforprivacypurposes and asked whether my group would like to present our project in a Mini-Maker Fair this September! Of course we accepted, so during the next few months I (and hopefully my group as well) will come in and finesse the product so that it is 100% beautiful and done for the maker fair.
This project has come a LONG way, from our original idea of "Carbonopoly" to a wonderful 8-bit tower defense game. We have successfully built our game, and can't wait to see where our paths shall lead in the future.
Thank you everyone who gave advice, feedback, suggestions, and help. There are too many to name, so you know who you are!! Thank you for making this the most favorited, most posted-upon, and most commented project on Build in Progress.
We all had a wonderful time.
At the end of this project, we finally completed the final version of our game.
The upload here is primarily for our testing purposes, however you are more than welcome to play the game!
The Zip File contains the many development releases of our game.. The highest "V#" should be the latest!
The controls were optimized for our Arcade Box and its buttons.. But you could possibly play on your home computer: use "W", "E", and "R" to select the towers, and the mouse to move / place them!
We we were unable to resolve the issue where if you select a tower while moving one to place it ruins the game for you, and have no plans to ever return to the code, so be careful! Only press the tower button once!
Beyond that, good luck with the game! It will take a lot of skill to get past the first few levels!
While we had originally decided on having points and a leaderboard for our game, someone asked us: "Hey, since there are a certain number of cars, you can only get a certain amount of points.. so why go through the trouble when everyone who beats the game has the same score?"
The logic behind this.. and it's honesty, has influenced us to decide that maybe Points aren't the best thing for our game!
Unfortunately, we had to make a lot of code modifications to add in points.. So I have spent the past few days finding and undoing all the changes that were made. Since in AS3 (Actionscript 3) if there is just one error then the program doesn't work, I had to be quite meticulous and precise in my adventures!