New Space Wars Build – Missiles, Single Player Mode, Bigger Cooler Map #1GAM

Screen Shot 2014-06-19 at 6.59.45 PM

Ok so here it is, I’ve been posting video of this work in progress so now you can play it!  Here is the link to Space Wars Net. 

It’s not perfect – missiles don’t really work in multiplayer because of targeting. I have to rewrite the way I handle missiles to get that to work. They work fine against AI enemies tho.

The controls have changed a little – F or Right Mouse for Missiles. Space or Left Mouse for lasers.  Mouse Look to steer. Q-E to strafe.

Update: On further testing – I think I made the multiplayer cooperative… can’t seem to hurt the other player due to the collision detection. Didn’t want players to blow themselves up with their own missiles. I will fix this in the next update. Perhaps I need to add a teams dialogue to the log in screen.

 

Dev Log: Space Wars now has missiles! And it’s pretty… #1GAM

Screen Shot 2014-06-17 at 10.50.58 PM

A little more progress this week – I’ve added in multiple cannons and missiles to the mix. The missiles involve targeting enemies which I made automatic by just aiming at them. Aiming puts a red box around the enemy that is currently being targeted. From their a missile will chase the target for a period of time usually resulting in a hit. I tried all sorts of ways of doing the missile trajectory and while big arcing ones looked cool, they resulted in lots of misses. So the current missiles are pretty vicious and accurate. Check out the video of some highlights…

Another added feature is I’ve included Space for Unity assets in the game. They are much cooler looking than my stuff and I picked it up a long time ago so it’s best I put it to some use. In adding the cool planets and nebulas, I also expanded the map to about 4000 square units. Seems big enough to explore now. The mini map is a little crammed but I have plans to make it a little more zoomed in and then have an expanded area map UI at some point.

I’ve noticed with some of my updates, I need to test again online since some of the effects only show up for one player. Also the enemies are super jumpy if you are not the server it seems…

I’ve also been trying to figure out an offline mode but the Photon directions are unclear how to implement it… 🙁

Space Wars Update – Video with Scores, Sound, Hit Points!

I’ve added better(?) AI, explosions, sound effects as well as hit points and a score to the game. It might be getting too complex for the webplayer soon. We may need to switch to stand alone PC/Mac downloads. Here is a link to the web version of Space Wars…

Rewatching the video, I notice the AI is doing a lot of spinning. I am still trying to figure out how to make the AI better, I’ve tried a lot of things. Sometimes it works great, sometimes it does random silly things while it works out its rotation. I plan to implement a waypoint patrol ai, a search ai, a follow/guard ai and a defend area ai soon… Those will be sooner rather than later. Further on I’d like to have goal oriented AI and preferred targets where AI will assess enemy ships and decide what is the most important target. Fighters set to skirmish mode will rate other fighters highly as potential targets, but other fighters whose mission is to destroy a space station or carrier might skip other fighters to prioritize travel and attack their main target. This will be important as ships diversify, we can have capital ships chasing every little fighter buzzing around them if there is an enemy cap ship pumping them full of lasers…

Also up for the AI will be factions so that some AI bots can be on the player’s team. Then the real space war will commence…

 

Basic AI Ships added to Space Wars Net

I’ve added some enemy AI ships to the game to chase around players. You can team up and try to take them out. They are fast and vicious and they respawn just like you do.

spacewarsfight

Having been testing the game with by myself, it is pretty cool to have some ships to fight against. Now I just need to make them smarter and maybe easier. Next up capital ships – but I will need to program some turrets and some missile style weapons too.

Space Wars Net Update – Bigger Arena, Better Network-ish, Mini Map, Explosions!

This week I’ve been re-working my May game into a remake of an older Javascript game I made a year ago. I want to keep the networking part of the game while building out big space battles with AI. At the moment its more of a dog-fight game for multiple players. Here is a link to Space Wars Networked…

newspacewars

 

Mini Map! – One major upgrade that I also had in my old game – I now have a mini map that gives you some idea of where you are which will help as area to fight in and explore is bigger than before. I think the real levels will be bigger than this. Hopefully the mini-map will work even better in future iterations.

minimap

I haven’t come up with a graceful way to avoid using OnGui – almost every guide prefacesthe use of OnGui with a warning that one shouldn’t really use it in gameplay because it a framerate hog, but then no one has really offered up a different way to place semi-static stuff on the screen over the gameplay. Perhaps a second camera viewing Quads that don’t move that is overlayed over the main camera? How many camera would it take to become a framerate hog too? For now the gui works but that might be something to look into.

Syncing over Proton: One other problem I am noticing – at least on my machine is that positions aren’t synching too well. Shots that look like they will hit miss or don’t result in a hit/explosion while other times what appears to be a wide shot for one player, results in a hit… Not cool really. I may have to network sync all the lasers – but again that sounds like a very unoptimized way to do things…

Enemies: It is time to bring the war to Space Wars. I am going to spend some time tonight trying to get some enemies into the game. I am not sure how it will work exactly over a multiplayer game with syncing etc. I will start with simple AI like fly to waypoints and chase the players. There are no walls to worry about so pathfinding should be a breeze. I’ve been looking into more realistic steering behaviors, but I am going to brute force it for now…

Dev Log: New Space Wars Game, Trying Photon Networking

With the month of May behind me, I am fully immersed in Unity Networking. The month taught me that multiplayer game making is possible, but incredibly slow and frustrating. Many hours of potential coding were spent staring at the screen, reading the same tutorials and still not getting this old dog brain to learn new trick. In the end a game was made. Not perfect, not polished, but it worked! We played it in my school game club after school program and the kids loved it. Maybe it was because they didn’t have to do their homework and I don’t let them play Minecraft, but they seemed to enjoy blowing each others spaceships up and crashing into planets. The whole experience made me think that having some form of networking is needed in most future games, so the month of June will be partly devoted to that. But I’m also working on something else…

http---makeagif.com--media-6-03-2014-WLuzYn

My goal this month is getting a SpaceWars 2 remake up and running in Unity. (Above is a clip from the Unity version). Its been a crazy journey to get here, but the ridiculous thing is that I began learning Unity so that I could make this game better. I wrote the original SpaceWars 2 remake in Javascript using ThreeJs but quickly found that the whole thing wouldn’t come close to a compiled game in terms of frame rate when supporting the massive battles I had planned.

The game supported a pretty good amount of ships at a time and it includes turrets, capital ships, bases, as well as systems damage where if you take hits you potentially lose engine power, shooting ability, shields etc. A lot of complicated javascript! The ai wasn’t horrible either. But I am sure I’ve learned something in the last year in terms of game design.

Additionally, I want the big space battles to be able to include friends. Have buddies join the fight with you as a squadron in a giant battle. I think the idea could be lots of fun. Sort of Gratuitous Space Battles where you are one of the little fighters getting destroyed…

As for the networking component, I think I am going to try something new and move from the Unity native networking to the Photon network. The free version allows for 20 players and it handles a lot of the server hosting so we won’t run into the troubles of hosting servers on player computers.