Astrofighter.Net is my new game development project for learning Unity and C#. During the past week on every spare moment I've been able to find I have been developing and creating assets for the game. When I'm not on the computer I am coming up with about a billion ideas for the game, or at least so it feels like.
If you want to read about Astrofighter.Net directly - skip this next section =)
The dangers of being in a situation such as mine is starting a tremendous amount of projects and never finishing them. With "a situation such as mine" I mainly refer to the wide spread of hobbies I have, all of which must fit in to an otherwise normal life. Non-computer based hobbies aside (motocross, photography, martial arts, spending time with wife, two children, and friends) I am, as many of you are aware, currently dedicating much of my time to:
- Being the independent electronic artist Imphenzia with 85 tracks and 6 album releases to date - this includes maintaining my custom created artist site, maintaining presence at Spotify, Youtube, Facebook, Twitter, Soundcloud.com, Soundclick.com, and Ubetoo.com. The custom web site is created in PHP and I think it's the 6th generation (each being a complete rewrite.)
- Being the composer Imphenzia Soundtrack with over 250 songs/loops and 260 sound effects available for licensing - this also includes maintaining the custom created site.
- Being the game developer and graphic artist Imphenzia Games with completed 3 game releases (Beat Ball, Beat Ball 2, and Netris.) Again - maintenance of the custom created web site for the official site and Beat Ball 2.
I'm proud of my achievement over the years, especially fitting all of it in next to my every day that normally takes up 8h + 2h commuting every weekday. I have one project, however, that has been my bad conscious for a long time. It's been nearly 10 years since I started "Computer Touring Car Championship" (CTCC) which was later renamed to "Performa Cars." This game is still unreleased but as I recently announced in a blog post I will release the game but without network multiplayer (only split screen), and it will be freeware since it's using such dated technology.
I have to accept defeat when it comes to implementing multiplayer in Performa Cars simply because I didn't consider the nature of network gaming when I started making the game. It would take a complete rewrite of the game (more or less) to make networking work and it would not be time well spent since it's using unaccelerated 2D graphics that probably utilizes less than a single percent of today's graphics cards. Seriously.
There is new hope, however. I've used BlitzPlus, Blitz3D and BlitzMax to develop Beat Ball 2 and Performa Cars and I've really enjoyed the Blitz-range of products over the course of 10 years. Lately I discovered Unity3D and I first dismissed it a year ago. Who want's to make a game in an "editor" I thought?
How to waste time
No, I thought. I want full control of my game development. I need to see every line of code and be sure I structure the games exactly how I want. This is how you waste a lot of time by the way =)
In Unity I trust
When I gave Unity a second chance, I looked at a whole bunch of video tutorials on YouTube. The tutorials explained Unity in a step by step manner, going through the editor, all the windows, hierarchy, types of game objects and so forth. Unfortunately I can't remember which series of tutorials I watched - but Google the topic and I'm sure you'll find many great tutorials. Giving the step-by-step demonstration of Unity a chance helped me tremendously and I fairly quickly started to make some simple scenes with a bouncing ball, colliding objects, particle systems, etc.
My ultimate goal is to re-create "Performa Cars" as what I refer to as a "2D-but-3D" game with the multiplayer functionality it so much deserves. Using Unity instead, I'll be able to cut down development time and also make great use of the power of modern computers and graphics cards.
My "2D-but-3D" approach, as seen in Beat Ball 2 and in the coming Astrofighter.Net game, is making the game look like an old-school 2D game but using the visual and physics power of 3D engines. I think many developers are too tempted to tilt the camera down into the 3D scene since "it's possible." And I agree 3D games are awesome, but I am fighting the temptation to tilt the camera as I want to make 2D games and I know there are a lot of fans of 2D games out there so this one is for you =)
Rather than jumping straight into making the new top down racer in Unity I wanted to make sure I know how to develop a multiplayer game. This is why I am first attempting to make a simple multiplayer space shooter game.
As I mentioned early on in this post, I've dedicated a lot of my time the past two weeks when I started a real stab at creating a game in Unity. I am amazed at how fast I am able to make progress in Unity being such a novice at it. In just a matter of two weeks, Unity has enabled me to create the basic foundation of space combat game that already supports server side authoritative network multiplayer with client side prediction.
I captured the footage above today as I tested the current build of the game with two of my mates. It runs very well already although latency is very low at 30ms so I'll do more thorough testing using a 3G modem with 150+ ms latency. The YouTube version of the video is choppy since YouTube reduces the frame rate from 60 FPS to 30 FPS. You can download the 60 FPS H.264 version of the video to see exactly how smooth the game flows.
So far I've implemented the basic networking code, the spawning of player ships with the choice of two weapons. A Blaster and an 80mm Gatling Gun Cannon =) The blaster is single fire and the Gating Gun fires 800 rounds per minute. There will be loads of ship types and weapons with upgrades - I have an excel sheet with loads of goodies and ideas.
The game uses true physics with rigid bodies and real life forces. I'm really happy with how easy Unity is allowing me to just assign my ship, for example, a weight and what force it should apply during movement and the physics is just "taken care of." It also looks very promising how I can use the physics aspects even during multiplayer.
To prevent cheating, and to ensure collisions don't behave differently, the server takes care of all the physics and collisions in an authoritative way. The clients also animate the objects but if a cheating player hacks the game to move twice as fast on his own computer the server will warp the player back to where he belongs. Feminists can attack me now since I referred to the cheater as "he" but surely women don't cheat, right? =)
Is it a felony to have this much fun?
I'm having so much fun with this project that I even feel stressed when taking a break. This lengthy blog post is also hogging time from Astrofighter.Net but I want to make sure to post about my progress.
Today I also registered Astrofighter.Net - and I know I know - there was a game from 1980 named "Astro Fighter" but I don't have a space and I added ".Net" to emphasize it's a networking multiplayer game.