Jump to content
  • Advertisement
  • entries
    45
  • comments
    143
  • views
    52942

Missile Command Challenge

Eck

1723 views

I caught wind of the Missile Command challenge earlier in the month and figured I'd knock it out during Christmas break. I was planning on coding more on my Car Wars prototype but the challenge took up most of my programming time. Sleeping late, hanging out with my family, and playing video games took up the rest of my free time. All in all, it was a great way to slide into the new year.

I spent some effort keeping the code clean (mostly) and even did a couple of hours worth of commenting and code reorganization before zipping up the package. Many sample projects are quick and dirty affairs so aren't really a good learning resource for new programmers. Hopefully my project isn't too bad to look at. :) 

MissileCommandMainMenu.thumb.jpg.53e16876043af9bf05ff71d233ae24e2.jpg

What went right?

Switching to Unity a few years ago. This was definitely the right call for me. It helped me land my dream job and allows me to focus on making games rather than coding EVERYTHING from the ground up. 

KISS (Keep It Simple Stupid) - I started thinking about doing my own take on Missile Command but decided on doing just a simple clone. The known and limited scope let me keep the project clean and kept development time down to something reasonable. Playing the original at http://my.ign.com/atari/missile-command was a big help for identifying features I wanted.

Getting the pixel perfect look of old-school graphics was a little bit tricky, but thanks to a well written article I was able to get sharp edges on my pixels. https://blogs.unity3d.com/2015/06/19/pixel-perfect-2d/ I had done some research on this earlier so I knew this would be a problem I'd have to solve. Or rather see how someone else solved it and implement that. 

Using free sounds from freesound.org was a good use of time. There are only 4 sound effects in the game and it only took me an hour or two to find what I felt were the right ones.

What went ok?

Making UI's in Unity doesn't come naturally to me yet. I just want some simple elements laid out on the screen. Sometimes it goes pretty quickly, other times I'm checking and unchecking checkboxes, dragging stuff around in the heirarchy, and basically banging around on it until it works. 

I got the minimal core features of Missile Command, but not all of it. You don't really think about all the details until you start making them. I'm missing cruise missiles, bombers, and the splitting of warheads.

Dragging the different sprites into position on the screen was manual and fiddly. There's probably a better way to do this, but it didn't take too long.

You can't shoot through explosions, which makes the game a little more challenging. And you can blow up your own cities if you shoot defense warheads too close to them. It was easy enough to fix, but I left it in there.

What went wrong?

I spent a ton of time getting the pixel perfect stuff right. Playtesting in editor, it was set to Maximize on Play. There wasn't quite enough room to see the full screen so the scale was at 0.97 making the display 97% what it should be and thus, blurred all my sharp edges. I didn't see that setting though... >.< I pulled my hair out trying to see the problem in my math, and even downloaded a free pixel perfect camera which was STILL showing blurry stuff. Finally, I built the game and ran it outside the editor and saw things were just fine. There's also an import setting on sprites for Compression that I cleared to None.  I'm not sure if this second step was necessary. I've been bit by the Editor not being 100% accurate to final game play and wished I would have tried that sooner.

UnityScale.jpg.e4edd922ee6c624e1c77a8f231f915c6.jpg

I had trouble with the scoring screen. I wanted to put the missiles up on the score line like Missile Command does, but ran into trouble with game sized assets and canvas sized UI elements. After 45 minutes or so I said screw it, and just put a count of the missiles and cities up. 

I didn't data drive the game as much as I wanted. The data is in the code itself so users can't mod the game without downloading the source code. I'm also only using one set of colors for the level. If I put any more time into this, I'll probably tackle this issue next, and then worry about the features I missed out on.

Final thoughts

Working on this project makes me appreciate how awesome the programmers of old really were.  With the tools I have (Unity, Visual Studio, etc.) it took me a couple of weekends. And even then I didn't recreate all the features of the original. I'm including a link to the zipped up project in case anyone wants to see the source code to play around with it. Hopefully someone finds it useful. If so, let me know. 

EcksMissileCommand.zip - Executable if you want to play.

EcksMissileCommand_Source.zip - The project if you want to mess around with it.

Sound Credits

freesound.org
https://freesound.org/people/sharesynth/sounds/344506/ - Explosion.wav
https://freesound.org/people/sharesynth/sounds/344525/ - LevelStartAlarm.wav
LevelStartAlarm_Edit.wav - I used Audacity to edit the above sound. I took the first six beeps then faded them to silence.
https://freesound.org/people/Robinhood76/sounds/273332/ - MissileLaunch.wav
https://freesound.org/people/sharesynth/sounds/341250/ - ScoreCount.wav



4 Comments


Recommended Comments

Nice, I have to admit, I was tempted to get in on this challenge, as someone who played lots of Missile Command, but got distracted by the holidays.

 

Whats this about a Car Wars prototype?  I feel like we need a blog post about it =)

Share this comment


Link to comment

Lucky for you ferrous, the challenge extends through January. Get on it!

I'll try to post something about Car Wars in a week or two. Right now it's a hacked-up jumbled mess of not much. Long story short, I'm working on a port of old table-top Car Wars rules to the computer just for fun.

Share this comment


Link to comment
ferrous

Posted (edited)

Ah, I never played Car Wars tabletop, though I did buy a copy of the rules not too long ago.  It looks like it might be a little complicated to implement as a video game, should be a good challenge to make it flow well.

I need to get off my duff and at least post about my adventures learning UniRX.  Maybe I'll try pivoting over and doing Missile Command using it.  

 

EDIT: Also Grrrr, not being able to shoot through your own explosions was annoying! =)

Edited by ferrous

Share this comment


Link to comment

Hummm, nice the idea of explosion to destroy things.

I should really give a try to unity.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By sausagejohnson
      All games written with Orx have a profile screen that can be called up to monitor for any inefficiencies or bottlenecks.
      Iarwain will be demonstrating the Profile Mode for Orx over twitch tomorrow night at:
      Come along if you're interested to learn about it. There will be an opportunity to cover any topics after the demo.
      Here's some time zones as a guide to when it's on:
      Montréal, Canada      Tue, 11 Dec 2018 at 1:00 am EST     
      Rome, Italy           Tue, 11 Dec 2018 at 7:00 am CET     
      San Francisco, USA    Mon, 10 Dec 2018 at 10:00 pm PST    
      Sydney, Australia     Tue, 11 Dec 2018 at 5:00 pm AEDT    
      You can check other time zones here: https://www.timeanddate.com/worldclock/converter.html?iso=20181211T060000&amp;p1=165&amp;p2=215&amp;p3=224&amp;p4=240
       
       

    • By GameDev.net
      GameDaily.Biz spoke to Improbable about its new shortcuts to multiplayer game development for Unity and Unreal. 

      Improbable helps game developers build believable online worlds with its bespoke technology, SpatialOS. Now, that task is much easier and accessible for those building games on the technology with the recent release of the SpatialOS Game Development Kit (GDK) for Unity. With these kits, Improbable hopes that developers find it easier to create vast, dynamic and unique worlds.
      This GDK for Unity includes a 200-gamer, first-person project that allows developers to experiment and tinker with their ideas for what their vision of a multiplayer game will look like.
      GameDaily.Biz met with Improbable’s Head of Product Marketing, Paul Thomas, and Head of Comms, Daniel Nye Griffiths, to speak about the SpatialOS GDK for Unity, as well as the upcoming launch of the SpatialOS GDK for Unreal Engine.
      In its first week, the SpatialOS GDK for Unity achieved over 2,000 developer sign ups to use it. “What we're trying to do is basically make it really fast for people to build multiplayer games,” said Thomas. “It comes with all the multiplayer networking so that developers don’t have to do any multiplayer networking. It comes with feature modules to allow [easy] solutions to common multiplayer problems, like player movement and shooting. And it comes with a cool starter project where you have 200 players in a free-for-all scenario. You can obviously use the power of SpatialOS to scale that project up to more players, with NPCs, and things like that. It gives people a really good base to start building multiplayer games.”
      There are several games currently in development or early access that utilize SpatialOS. The first into Early Access was Spilt Milk Studios’ Lazarus, a space MMO where the player becomes a pilot in a universe that ends every week, complete with a map that’s twice the size of Austria. Additionally, Bossa Studios released its survival exploration game Worlds Adrift into Steam Early Access earlier this year.
      Also using SpatialOS is Scavengers from Midwinter Entertainment, a studio founded by former 343 Industries studio head and Halo 4 Creative Director, Josh Holmes; the game is heavily inspired by his Halo 5: Guardians’ multiplayer mode, Warzone. Right alongside that company, Berlin-based Klang Studios is working on Seed, a simulation MMO that, according to its developers, lets players “interact and collaborate to create a world driven by real emotion and aspiration.”
      According to Thomas, for those looking to use the SpatialOS GDK for Unity, there is no limit to  what their games can do with Improbable’s tech.
      “What we're doing is expanding the possible gameplay you can do. Traditionally, when you make a multiplayer game, you're constrained by one single server. So you can say you have a 64-player game with a handful of NPCs or you could have a world that's 3km by 3km. With Spatial, you can go beyond that, test a much broader canvas to start thinking about different gameplay.”
      “You can go for a massive online persistent MMO with 10,000 players and hundreds of thousands of NPCs, something very, very vast and big like that. But you can also have smaller experiences. For example, there's a lot of interesting space in just extending what you see in the Battle Royale genre and session-based gameplay.”
      Thomas continued: “Our partners at Automaton have a game in development called Mavericks. The interesting thing there is they have a Battle Royale with 1,000 people, but what I really find interesting is the gameplay mechanics they've put in, like footprints so you can track people. They've added a cool fire propagation mechanic so you can start a fire that  spreads across the map and changes the world. Or you can add destructible buildings and things like that.”
      “So I think even looking at smaller scale games, we add a lot of value in terms of the new gameplay you can start adding. I'm just interested to see what people do with this extra power - what they can come up with.”
      While Battle Royale games and MMOs are obvious standouts for genres that best fit with SpatialOS, Thomas introduced some other ideas of genres that could benefit from the technology.
      “I also think there's a space for very interesting MMORTSs as well,” he said. “An RTS where you have persistent systems, like telling AIs to do things and then coming back to them a week later and seeing what's happened is an interesting space.”
      “I also see interesting mobile experiences that could come up. Having these worlds where you lay down some interesting things and then come back a few weeks later to see how they've evolved and changed, and the massive player interaction. Say for example with Pokemon Go, we can actually roam around the world and battle on the streets. I can see something like that working very well. Again, these are just ideas we've had and talked to people about. It's about giving people that flexibility and the ability to explore these ideas.”
      Klang’s Seed
      Griffiths added the possibility of events in a game that will have a massive, rippling, and lasting impact on its world as something that has people excited. One example he gives is how someone on one side of the map can do something that’ll have a knock-on effect for the rest of the world in real time.
      “There's a whole bunch of different angles you can take, some of which are about much larger player numbers or a much larger map, but there are other things you can do which are taking a relatively constrained game experience, a smaller map, a smaller number of players and adding richness to the game as well.”
      In fact, this is something that Thomas refers to as a “persistent in memory database,” meaning that for every object in the game world, there’s a history. Two examples cited by Thomas: “...a player could chop down a tree and that tree stays disappeared forever. Or a player can kill a big monster that was raiding a town and that town no longer gets raided by that monster, and this changes the dynamics of the world. Worlds can have a history. That means players can have a lot more meaning in these MMO worlds.”
      “Normally in MMOs, they're kinda like roller coaster rides: you go into a dungeon, you kill the boss and that guy respawns. It all resets,” Thomas continues. “But in Spatial MMOs, you could have these persistent effects that should change the gameplay meaningfully for all the rest of the player base.”
      “The other one I think that is interesting is the level of dynamism that you could have. So because you can have so much more server-side compute, you could potentially have NPCs roaming around the world changing their mind and deciding all of a sudden, 'oh, we're going to attack this player's base' or 'we're gonna go attack this town' and they have a lot more range and emotion and intelligence to them that you'd not see in other MMOs.
      “Normally in MMOs, NPCs sit there tethered. You go near them and they come and attack you, you run away, and they go back to where they were. In a Spatial MMO, that NPC can trace you across the whole map or a group of them can decide to get together and attack someone..”

      Bossa Studios' Worlds Adrift
       

      Next week, Improbable plans to launch its SpatialOS GDK for Unreal Engine, which will have a big focus on ease of use for access to Unreal, as well as a big emphasis on porting your projects to SpatialOS.
      “One of the things we'll be trying to push is a porting guide so you'll be able to take your existing Unreal game, move it onto SpatialOS and then you can grow to expand it with new and extra gameplay,” says Thomas. “ You can bring across your existing Unreal game and it feels very, very native and similar to Unreal if you're familiar with Unreal.”
      Griffiths continued, explaining how testing these experiences includes free cloud deployments, to a certain point. “If you're developing in SpatialOS in other ways, we provide a sandbox environment so you can get your game running. When you’re happy, you can port it over and sort of experiment with it in a free sandbox environment with a small number of cores to get started.”
      Based on what we learned, Improbable’s SpatialOS GDK for Unity will give developers enhanced flexibility to produce more in depth and engaging videos games. That said, we look forward to catching up with the company in the near future to see how this exciting technology is being used in the different games that we play.
    • By Batcloud
      Hello, my name is Giovanni Bruno and I developed a game in a week that creates a casual experience of reflex and focus on the iOS platform. I'd love to hear your take on the game. Would you have 20 seconds to watch a little gameplay?   Gameplay link: https://www.youtube.com/watch?v=A7aGA9yVpEQ Download link: https://itunes.apple.com/us/app/levita/id1445334524?ls=1&mt=8   More about me: I've been an iOS developer since 2017 when I joined Apple Developer Academy Mackenzie in Brazil, I had a great opportunity to be a WWDC 2018 scholarship winner and attend the event. Now I'm venturing into the development of casual games for iOS, I hope to create ever better experiences that enchant people from all over the world. I know that the game is very simple, but I hope that someone play it!
    • By MiniDarkOF
      Hello Again,
      I'm trying to create a "sound expansion"

      The Example:
      a nuclear explosion sound has 1000ft of audible sound area
      players who is next to the explosion hear it first
      players who is far to the explosion will hear after some seconds
      when the sound reaches its area limit, it ends with a "fade-out"

      The Point:
      i already know how to create fade-out sound effect in Unity
      know i want to know how i can create this "sound expansion" effect
    • By Florian Gionnane
      Hi everybody !
      We are an indie startup called Darkstar Games !
      We are just creating our first game called Greater powers, a novel type medieval fantasy TCG MMORPG with which we use unity. 
      We develop our games for Android, PC, iOS, and we have a software kit developer contract with Microsoft to adapt them to VR Microsoft HoloLens and VR Magic Leap in the future.
      We are developing our own alpha for the Kickstarter campaign at the moment !
      So we are actively searching for motivated programmers willing to take place in our project to build the engine we are creating of our own right now ! The game is coded in C# and any unity experience is greatly appreciated! 
      We collaborate to the startup worldwide remotely !
      Programmers collaborating to the project such as building the alpha become shareholders and are hired in the start-up launch !
      Here are some links about the project:
      https://www.artstation.com/floriangionnane
      https://www.facebook.com/DarkstarGamesCorp
      https://connect.unity.com/p/games-greater-powers
      If anyone interested, please send your resume to flosambora123@gmail.com
      Have a nice day !
       


×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!