I created a game for the Mini Ludum Dare Compo… it’s called ArkaVaders. The theme of the game jam was Pong/Arkanoid type games. So I thought I’d add a Space spin to it and add Space Invaders to the mix. Here is a link to ArkaVaders… It might not work in Chrome… I am not sure if there has been a change again in the support of the Unity Plugin. I couldn’t get the WebGL version to work either. The game is ‘almost’ finished but could use some polish obviously.
Monthly Archives: March 2015
Space Warfare: Infinite on the Space Game Junkie Podcast!
At the beginning of the week I was lucky enough to be on the Space Game Junkie Podcast! The hosts of the podcast have a website devoted to all types of new and old space video games. (Space Warfare: Infinite even has its own wiki page on their site!) If you are looking for a new game to play, they have 99 episodes covering all sorts of games as well as video reviews of games. Its a big source of information and inspiration for me, so it was great to be on the show and chat with hosts about making space games.
Here is the link to the Space Game Junkie Podcast featuring Space Warfare: Infinite… (for the younger audience of this blog – some of the hosts on the podcast let a few curse words slip so perhaps make sure that it’s ok with your parents to listen if you are still living with your parents… )
All in all, the podcast was a lot of fun! I still think my voice sounds weird and I need to work on my elevator pitch about the game, but it was totally cool to see some people who really love space games play the game I am making. I also got some good feedback for things to fix like FPS controls confuse people when the shift key changes the controls…. the A/D key might be a slide instead of roll or at least I should add a slide/strafe feature since folks are expecting it after Elite, the targeting needs to be fixed because its confusing and not super responsive (I’ve already fixed the targeting subcomponents issues)–I need to add arrow indicators or make the offscreen target box larger and brighter so folks can track the closest target. I’ve got a few movies and games to check out as well.
Dev Log: Space Warfare: Infinite – New Game Modes, Gameplay Video for Capital Ship Battle and Patrol
This last week I’ve been polishing up the current build and sending it out to some testers to try it out. Also, on Tuesday I will be on the Space Game Junkie Podcast at about 10PM EST. Check it out! I’ve been a fan of the show and have really used them as a resource for inspiration and ideas.
Some of the major additions have been getting the Battle Editor up and running and adding an Instant Action mode which currently house some missions as well as a place to load player created battles. The game will also eventually include Dynamic Campaigns with a story line of the unfolding war as well as branching mission paths depending on the completion/failure of objectives.
After that I’m going to work on a Free Play mode where the player can visit the many star systems of the game to trade, take missions, fight and explore. I am hoping to figure out a way for the Battle Editor to add content to all three game modes – Players should be able to build their own campaigns and scripted missions, as well as make Instant Action battles and build missions / locations for the Free Play mode.
I recorded a video of playing the Capital Ship battle in Instant Action as well as a patrol mission.
Beyond the menu system, the battle editor saving and loading systems, and a lot of testing, I also added some other features. juskelis – maker of Starfire – offered to do a little alpha testing and had me make some tweaks to the roll of the ship as well offer the ability to invert the mouse. I also added warning messages for when power is low, armor is critical and when you take hull damage. I think it helps give the player some awareness about how much trouble they are in. Someday the console in the cockpit will spark etc.
Another thing I tweaked – the player can now swap through all the ships in their fleet and control them. Before it was designated ones, but after all the refactoring, the switching ships works for anything now. It could also work for turrets, but I disabled that for now as I don’t have a control interface for turrets yet-they are run by AI. I want to add more control eventually since it’ll be more fun to have it when flying the cap ships.
As for next steps, I guess I’d like to hear what Space Game Junkies think I should add and just keep plugging away. The power management system is still just a fraction complete – I want to add reactor components to ships and hook up the energy draws to them to balance ships. Then I want to create a custom load out screen so the player can select their weaponry. Particularly for the Instant missions as well as to be used on some campaign missions. After that, I really want to add a Frigate, Corvette and Battleship to the ship list. I have some ideas for some sick battles. I want to work in formations for all ship types as well. Currently ships don’t play nice when you have them form up. So I want to work on that. Oh and add more AI stuff since thats not complete yet either – maneuvers are their, but currently enemies just pick from them randomly. I want them to make some interesting choices.
Dev Log: Space Warfare: Infinite – Battle Editor, Projectile Pools, Bugs squashed, Unity 5 tutorial
It’s been a long week with lots of snow days to work on Space Warfare: Infinite. While I added some features, I have been spending a lot of time on optimizing and finding bugs.
Porting to Unity 5 – set-backs, opportunities
I converted my game over to Unity 5 only to find after many hours of fixing all my prefab connections and UI stuff as well as as many Red and Yellow warnings in the console that I could, that Unity 5 would not compile my game to stand-alone or when it did the game would be a black screen, a black screen with music or a the actual scene at 1 frame per second. Not good. I ended up starting a new Unity 5 project from scratch and began exporting component packages of my game as well as just importing assets one at a time. I figured as I developed I had lots of random scripts and tries at things that might be mucking up the code. Additionally I had a bunch of 3rd party stuff that I wasn’t using anymore or have pieces of but don’t need the whole thing. I left all that extra stuff behind. When I was done – although I am still bring in some non-essential or unfinished stuff – everything compiled and worked!! It was a bit of a wasted 8 hours, but I took the time to organize my code, make folders for everything, clean up the scene. In the end the project is more user friendly and easier to work with than before.
Here is a gameplay video of the latest build in action:
Start Menu and Unity 5 Tutorial
I made a new start menu! I put in place holder buttons and filled them with names for my aspirational game modes. Some day when all the buttons actually work, the game will be somewhere close to donish. I suppose there will be more to this menu and I need to build the sub menues like Options etc. Currently they take you to my test missions. I guess they are a kinda instant action more than a coherent campaign. The Instant Action button will someday take you to a menu of instant battle scenarios to select from as well as any user generated battles that were flagged as instant. The Campaign menu will have the list of selectable campaigns as well as the load and save functions.
This one has tooltips to explain the different modes and options when you hover over a button! If you can figure out a non-invasive way to explain stuff, I am all for it. I want people to be able to just play my game. (He says as he joins the time honored tradition of using every key on the keyboard). And generally you can just jump in with a 3 button mouse and WASD controls you can fly the ship and shoot at things. However, the game can also be pretty complicated as I add more and more systems. I want the player to be able to control all the things.
I also made a video on how I did the tooltips for other Unity 5 game devs out there. Now that Unity 5 is super free, perhaps I should my more of this videos for my students and other folks.
Object Pooling for Projectiles
Was this a problem I had to fix? Who knows! Mike Geig told me in a video that it could increase my frames per second by 10! Why not give it a whirl. Also I know that instantiating something big sometimes stutters a computer and I don’t want that to happen. I’m working in more loading screens. There is now a loading screen for the beginning of a mission, but it loads so fast you don’t see it. But, you might soon as I want to instantiate all the missions ships at the very beginning during the loading phase rather than one at a time. Once I set that up, the ship initialization can be have – plus they build their object pools at the same time. So I need to do all this on the front behind the load screen – can’t have things pausing in the middle of the action so another ship can warp in.
Battle Editor
The battle editor is one of the main things I want to set my game apart from others. A major inspiration for what I am trying to accomplish in Space Warfare: Infinite is Gratuitous Space Battles. I love the giant fleet battles and wonder what its like to be that little fighter in the midst of it (or the capital ship commander for that matter). I also share Cliffsky’s love of explosions. Building a simple drag and drop battle editor toy box is a huge part of making this dream a reality. I want the game to basically be modible from the start. Growing up my favorite thing about some games was being able to build my own maps and missions. Before we had stuff like the Unity and Unreal engines, and you had to read the 2000 page Tricks of the Windows Game Programming Gurus and wade through pages of DirectX code to make a game, having a map editor or an easy modding tool was the best. I loved making Doom levels of my own. I loved building Starcraft maps to play–especially filling the map with tanks and bunkers lined up against each other. I had a great time making 3D studio worlds.
Anyway, now kids have Minecraft (and make whatever they want all the time) and the first question people ask you about any game you are making is: is it sandbox based and will there be crafting? The short answer is – yes you will get to fly to an asteroid, don your space suit and your intergalactic pick axe and mine cubes of ore to forge it with your bare hands into an Ion Cannon–all while being shot at by a heavy cruise with a rail gun aimed right at your flying refrigerator ship. Wait, no. The short answer is no. At least I think so. I plan to have miners in my game. But they will mainly be there to get blown up by pirates. You can just have the Ion cannon. At the same time… I am building tool so that a player can add an item/ship/projectile/weapon to the game with a unique name, look and functionality. You just craft it in the Battle Editor and add it to your custom Campaign, mission, scenario, free play rather than in game while wearing your space suit.
Currently the editor is not much to look at. You can select ships and drop them in the sector. Currently everything will be on the same plane –in game things fly in all directions though. The sector distance I settled on is 50 kilometers in every direct from center. I think this is ok based on floating point limitations (which is the data type used in the position vectors). From what I understand you can have 7 digits of accuracy using floating points. Since each unity is a meter I can get down to a 100th of a meter-known to the rest of the world as a centimeter. I guess I could go from 50000.00 to 99999.99 but 50k in game already seems pretty large for a battlefield and I want room on the edges so that if combat takes place at the 50km mark there is lots of room around it before float point errors occur. I can only see this happening with an AI going haywire and running in a straight line out into the distance and a very determined player with a lot of time on their hands chasing them.
The editor will eventually have the ability to add scripted events like Comm messages, ships jumping in at certain times, check points, objectives to complete or fail.
Additionally, I envision that when you select to create a new battle you will be taken to a map of the universe first, allowing you to chose a system and then a sector of the system to use as the battlefield. At some point, when I player creates a new campaign, they will be able to generate a randomized universe or map out a custom one and then use that to build their battles. Each battle will be linked by a campaign editor which will be able to take into account objectives met/failed and choose branching paths.
In the near future, I want to get the basic place ships functions really working so you can save it and load different battle configurations in instant action. After that we will add controls over the more advanced events and objectives. Having a functional battle editing toy and a few default instant action missions will basically mean some sort of demo will be ready to send out to my pre-alpha testers.
Bug of Doom!
So I compiled my stand alone after rebuilding my entire project, everything awesome! Bugs destroyed. Let’s play this game… Game began crashing the moment a certain ship warps in on the 3rd play through only. I only noticed it after I built a stand-alone. My nightmares had returned. It was an insane bug. You could play a whole mission, no crash. You could restart on the start menu and play again. Nothing. But restart and play that third time and about 5 seconds in the screen freezes. Nooooo! I figured I was never going to get to build a stand-alone game in Unity 5. I spent an entire day debugging and finally pinned it down to using a static class for pilot names. I guess it creates a memory error after being reloaded (I believe statics stay in memory after a scene reloads). Since the game crashed, I could only watch my Unity Console up to the moment of the crash and if I was playing I couldn’t see it at all. I relied on the system console to read the debug.logs. I basically added debug.logs before and after every function call in the AI initialization until it became clear. I know Statics can be bad, but man, my game crashed because I wrote a dumb class to give my fighter pilots funny names.
On the plus side, before I figured all that out, I added garbage collection, making sure Invokes and Coroutines were stopped when the game reset. I tried to make the audio better. I began working on the object pooling. Lots of good coding practice came out of this nightmare. Sometimes you have to be tenacious as a programmer.
Little things:
- Cool new music – and a music player that chooses a random track so I (and you) don’t hear the same song over and over again for the last year…oh wait that was before I added this feature. The music is techno western-ish, need more. If you read this and make electronic music for games and can make electronic/western music or just music that won’t clash too much with that and be good for epic space warfare and won’t charge me lots of money….send me a twitter msg. Brown Coats forever.
- New yellow Power bar – gives you available power, all guns use a small amount, beams use a ton, engine thrusts have the green thrust reserve bar but can dip into the power after its gone. (or is this a huge thing?)
- Bleep sound when a comm message appears or changes so you remember to look up and read the story
- Made some fighter based lasers -will be continuous and pulse versions
- Made the J.I.M. anti-missile turret for fighters (still need to import to the newest build though)
- Added some anti-cap ship torpedoes – limited guidance, big punch if landed
- The player now flies my fighter model for better or worse