Adobe Flex Authors: Matthew Lobas, PR.com Newswire, Shelly Palmer, Kevin Benedict

Related Topics: Adobe Flex

Adobe Flex: Article

Creating Games in Macromedia Flash MX 2004

Escape from reality

Creating games in Macromedia Flash MX 2004 is one of the most rewarding endeavors an aspiring or seasoned programmer can pursue. People could choose to develop games using Flash MX 2004 for the sheer enjoyment of seeing a creative idea come to life, a specific project for a client, an exercise to learn the details of programming in Flash, or as a way to express themselves artistically.

Before we look at the motivation, let's briefly look at the history of computer games in general.

A Brief History of Games
Ever since the early days of humankind, games have been an integral part of our existence. Games allow us to escape from reality, while at the same time allow us to mimic reality in ways that we might never be able to experience in real life. My perfect example is when I ran around the fields as a child playing soldiers in a war, or explored far-off lands in my backyard.

Enter the computer. The computer allows us to delve into worlds as never before. The computer can be a portal into distant lands, and can place us in the storylines of the greatest science fiction and fantasy stories.

Before the electronic game era, we had mechanical pinball machines. Pinball is sometimes considered a precursor to modern video games, and moreover as the catalyst that spawned the first general interest in computer games. Looking back at the history of games, it is amazing just how far they have come in a relatively short period of time.

In 1958, Willy Higginbotham, a physicist who'd worked on the Manhattan Project in 1947, created the world's first electronic game. It was a basic tennis game entitled Tennis for Two. In the 21st century, the use of the third dimension in games is almost a necessity. However, over 50 years ago this 2-dimensional game showed how electronics weren't limited to performing business and scientific functions, but could be used for entertainment as well. Although Tennis for Two felt like a computer game, it was really hardwired electronic circuitry set up through an oscilloscope, and did not technically involve a computer.

The origins of the modern computer game can be traced back to the early days of computer science and the invention of the transistor. At this point, the computer actually became somewhat accessible to enough people to warrant making the first games. These games were very simple in their nature, and the earliest example of a true computer game, Spacewar! was created in 1961 to run on the first PDP-1 computer at MIT. This game consisted simply of a CRT screen showing a few dots meant to represent spaceships, which were controlled by primitive handmade joysticks, but even then the potential for future game advances became evident.

Ralph Baer, considered by many "The Father of Video Games," was at the forefront of video game development in the 1960s. A pioneer of the television itself, it was his goal to merge both the computer game and television to create the home console video game. His earliest achievement was the chase game, which consisted of two objects, such as a fox and a hound, moving along the screen. By the late 1960s, Baer and his team of developers created a shoot-the-dots style of game, and followed that with a table-tennis game for two players. Ultimately, what Baer developed was what he referred to as the "Brown Box," which was the original incarnation of the home-based console. PlayStation 2 and Nintendo GameCube are examples of today's home-based consoles.

By the 1970s, a new but humble computer game industry had emerged. Games such as Pong and Space Invaders filled the conversations in many homes. One of the largest companies that emerged from this revolution was Atari. Behind it all was video game pioneer Nolan Bushnell. Although other creators, such as Baer, believed that the idea for Pong was taken from earlier forms, it was Atari that marketed the game first. Pong to this day is still a landmark, a milestone in the advancement of the gaming industry. The 1970s and early 1980s also saw the exponential rise of other games such as Pac-Man and Frogger.

The emergence of handheld games (today's equivalent being the Nintendo Game Boy) unfortunately did not help the already growing stigma that video games were too violent or anti-social. This concept originated in the 1970s and it is still a controversial issue today. Nevertheless, all these achievements paved the way for advancement in the computer gaming industry in the coming decade.

By the 1980s, arcade games were the central hub of an entire cultural generation. Children filled the arcades, spending most of their pocket money so that they could try the new Donkey Kong, Ms. Pac-Man, or the improved version of Space Invaders through game systems made by such manufacturers as Galaga and Galaxian.

Perhaps the most important development allowing for the rapid advance of video games was the affordability of home computers that first occurred in the early 1980s. In 1982, the Commodore 64 was considered by many the computer to have. Many games had become a permanent fixture on the Commodore 64, for example The Olympics and Mission Impossible. Eventually, the personal computer allowed for the everyday person to learn and use computer programming in their home, thus opening the door to many an aspiring programmer to begin creating their own PC games, and players playing at home rather than solely at the arcades.

In the years that followed, games have expanded into many areas of life, and have spawned many genres from works of fiction and nonfiction. Today, many of the best games feature real-time rendered 3D graphics with thousands of polygons of detail, millions of colors, lighting, reflection, and full surround sound. In this book we'll be looking at several genres of games including the top-down action game, the side-scroller, the behind-the-player 3D, and others. We'll be pushing Flash to its limits.

Whatever your reason for making games, Flash provides the perfect medium to do so. Its interface is very straightforward and easy to use, while its programming language is robust and powerful, yet simple once you get the hang of it.

On top of all that, creating a game with Flash allows you to deploy your games to millions of people within minutes, giving game developers today more opportunity to make a name for themselves and gain exposure than ever before.

There's no denying it; it's fun to make games. Once you've overcome the technical hurdles, nothing is more satisfying than watching your creations and ideas come to life.

The Potential
One of the most critical roles that Flash plays today is to provide people with the ability to entertain an audience. In the online world of mass marketing, this audience translates to advertising revenue. When this happens in a medium such as the Web, we inevitably see an emergence of corporate clients who want to make use of that technology. In the case of Flash MX 2004, games are a perfect way to generate advertising revenue through the Web.

In the Words of Craig Swann
Value of Gaming in Today's Industry
Craig Swann, CEO of CRASH!MEDIA (www.crashmedia.com), had these words to say on the importance of games in Macromedia Flash in the modern online world.

"There should be no doubt about the importance of gaming in the online community. In an industry in which content is king and the medium is nearly as flexible as thought itself there is almost no limit to what content can be. Since the birth of the World Wide Web, we have seen a shift in people's experiences. Before the Web, we were living in a world in which we received our content in a 'lean-back' form of communication. Very little was expected of us. So there we sat on our couches, in a vegetative state, leaning back and accepting whatever was broadcast to us as information; the only interaction being the clicking of the remote. When the Web came along everything changed. We entered the age of 'leaning forward.' We began leaning into our screens, searching for information. We were slowly gaining some control, and more importantly, interest in getting involved with data, information, images, text, videos, and of course games.

"I was lucky enough to have been born alongside the birth of mainstream video games in the early 80's. Pac-Man, Donkey Kong, Frogger, Space Invaders. I was in the arcade popping quarters into the machines on my tippy-toes when they first came out. I've seen these classic games transformed over the decades into games that are now very close to real-life multi-player simulations. It's incredible, and the one thing that has continued to advance is the interactivity of the games - the feeling of the games and how they are played.

"Games take us into a world, the world of the developer. Through the clever use of motion, sound, music, animation, and most importantly interactivity, entire worlds are created. Games take us to another place. Our minds focus on the environment of the game - everything else fades out in our perceptions. It really is amazing how mentally involved and focused we become when we play games. This is one of the main reasons games can play an important role in online development of interactive brands. Games give something. As developers, any time we create something that goes online we are vying for a piece of a person's life. Think about that: their time; their existence. Yet games are something that most of us are guilty of spending hours and hours playing. A good word for it is 'escapism.'

"Without a fancy survey to back me up, and going only on my personal experience of eight years on the Web as both a developer and surfer, I would have to say that as far as entertainment on the Web goes, games take the cake. In my experience, online games are the number one overall activity for people around the world looking for fun on the Web - clean fun that is! This is largely due to the very existence of Macromedia Flash. People have been producing the most amazing variety of games using Flash for years now. Flash, due to its ubiquitous nature, has evolved rapidly to become the number one platform for online game development."

Advantages of Flash as a Platform for Games
"Macromedia Flash is an excellent tool for creating games due to several factors. First, its scripting environment is sophisticated enough to enable real-life physics and motion element to games. Secondly, being a vector-based application allows for the creation of tiny graphic elements. This means that sophisticated interactive games can be created and experienced with a very little effect on bandwidth. Whether on an ultra-fast optical T3 connection or on a 28.8 dial-up modem, Flash games, as long as they are created properly, can provide the same experiences.

One of the unique aspects of games is the fact that they take us into a world, a world where, as developers, we create the rules. We create the characters and the environment. When you have the ability to code an environment with its own sets of natural laws and physics, you truly do create unique interactive experiences. The rich integration of sound and music games allow you to go even further and create strong experiences that tie in all of the senses, as they are tightly focused on gameplay.

This sort of intense user focus can be channeled to help strengthen a brand or concept to to the user. Unlike the average visiting times of other types of Web sites, users will often spend as much as an hour playing games. This unusual length of time on an Internet property offers many ways to communicate to the user, whether it is through the game concept itself, or through interstitials and other ads, and marketing.

The Internet by its very nature is viral. We tend to hear about things and check them out. The ease of communication on the Internet allows us to easily pass along ideas as well as share things that we find in this seemingly never-ending universe. Games are an amazing way to get people to talk about something and participate. Contesting for high-scores has proven to be an excellent way to generate traffic to a site. What better way is there to win something than by playing fun games!

With Flash, we don't have to stop at single-player games either! There are many ways now possible including XML sockets and the Flash Communication Server to facilitate real-time multiplayer games. This is where things start to get really interesting! Today we can create games and environments that can involve any number of people based on the concept of the game. From our experience, we had the opportunity to create a multiplayer game as part of contesting for a large beverage distributor. The game allowed people from around the world to play and battle each other head to head in real-time. The ability to experience an event with someone halfway across the world is something new to us, something that is continuing to grow and flourish. This is the direction we are headed. To communicate, collaborate and most importantly play with each other. We are living in fabulous times - where the power is truly in our hands to create the very things we envision. It blows my mind to imagine what sort of ways we'll be gaming and sharing our lives with people through the amazing ways we can create games and experiences with Macromedia Flash MX 2004."

We've seen that games have a rich history, and as young as the games industry is, it's a large and growing one. The propagation of the Flash 7 player across the Net allows us to take these games to a new level, bringing them instantly to an audience of hundreds of millions, creating limitless opportunity for creative expression and commercial success.


  • DeMaria, Rusel, and Wilson, Johnny Lee. High Score! The Illustrated History of Electronic Games. McGraw-Hill Osborne Media. (2002).

    Excerpted from Creating Games in Macromedia Flash MX 2004, Charles River Media.

  • More Stories By Glen Rhodes

    Glen Rhodes (Toronto, Ontario) has been developing games professionally for 10 years. He is CTO of CRASH!MEDIA. Glen has developed games such as Catch the Train for Nike and Domino Dementia for www.shockwave.com. He has also written and coauthored a number of successful titles on Flash MX.

    Comments (2)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    IoT & Smart Cities Stories
    Every organization is facing their own Digital Transformation as they attempt to stay ahead of the competition, or worse, just keep up. Each new opportunity, whether embracing machine learning, IoT, or a cloud migration, seems to bring new development, deployment, and management models. The results are more diverse and federated computing models than any time in our history.
    At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
    At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
    Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
    Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
    IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
    The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
    Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
    Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...