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.

Networked Space Wars: My May One Game A Month is Online #1GAM

The month is just about over and my attempt at creating a multiplayer game has yielded some interesting results. First of all, I did make a multiplayer game where players can host and join a server and then fly space ships around and blow each other up. I haven’t tested it too excessively, but I know it works on multiple computers over my home wifi. I am not sure how many servers can be created or how many players can join!? Here is a link to the networked Space Wars Online – you will need a friend to join you to make it fun…

Screen Shot 2014-05-29 at 10.09.20 PM

Game controls:

WASD – Move and Rotate

Space – Fire weapon

-+ Zoom in and out

I couldn’t get points or multiple hits working in time. Every change you make to a networked game seems to break it and require lots of debugging. I hope to refine it in the future and make it more fun. I’d like to be able to show who you are targeting, have ships that can take more than one hit. Selectable types of weapons to use.

Screen Shot 2014-05-29 at 10.08.57 PM

The start page has a place for players to enter their names and also customize their ship color. While not mind blowing, since I am still learning, it took forever just to get these two simple pieces of information to be shared across the multiple players. Colors would not show up for the longest time. I think I am getting the hang of it, the names are an attempt at a larger player management system with a shared scoring system but I need to wrap my head around handling collisions of projectiles and giving credit to the player who shot them. One day!

I used a lot of references to make this thing work –

Paladin Studios Unity Networking Tutorial – helped me figure out RPCs the best…

Palladium Games Unity Networking Tutorial

Unity Cookie networking tutorial -its in Javascript though so I had to change it to C#

Unity Multiplayer Games book by Alan Stagner

Unity Networking book by Lawrence Grant

Thanks to all of you for doing your best to explain a super complicated topic. After going through all that stuff, I can see the need for a few more tutorials. Perhaps if I ever understand it well enough I will give it a try.

Dev Log: Updates on Tap Invasion, SpaceWars, Giant Pixelated Robots and GIFs

#Screenshotsaturday Making gifs is an easier process than I thought! Enjoy this Tap Invasion action gif.

tapinvasiongif

Above is one of my students making an epic run in Tap Invasion.

Dev Log Updates:
My April game (Tap Invasion) has stretched far into May! While the game was mostly completed in May, I wanted to port it to the Android Google Play store and get it out to the mobile audience for which it was designed. In that I succeed by about mid-month. I still need to port it to iOS. It was really created with the iPad in mind.

With that being said, I still am making good on my #1GAM challenge. I originally had noted that my next big attempt would be multiplayer. This weekend I finally got something working! The basic game for May is a multiplayer player vs. player SpaceWars game. It may not be super polished by the end of the month, but my goal is to have a game 4 players can join with one player hosting the server, a bunch of obstacles to fly around and hide behind and a scoring system.

Screen Shot 2014-05-24 at 5.35.39 PM

Currently the game has been tested on the desktop and through the webplayer on a server and both work so far. I will be adding interpolation optimization to the game to make everything smoother  in the next few days and then I will probably publish for folks to try out. Maybe one day I will rig up one of my old computers as an always on server for folks to log on to.

One of my main frustrations has been loading new players with their own perspective camera so that they could all fly around a bigger area on their own. The problem seems to be something a lot of Unity programmers have to deal with. I have tabled it for now, but I am hoping to make the space wars concept a little more massively in the future once I figure this thing out. So in the spirit of completing things in a month, the game now just takes place arena style on one screen with really small players.

Additionally, I came up with a one screen game – sort of smash-brothers meets joust meets explosions. I’ve been calling it Robot Destruction Dome for short. I couldn’t really make it this month because it took me so long to launch Tap Invasion and then learn networking (still learning that!). The RDD would require lots of new pixel art and I want to do it right! Here is my drawing of the game…

robotbrainstorm The guys with the motorcycle helmets are player one and two. They fight an infinite army of procedurally configured robots.

More updated version of SpaceWars Cubed

The latest version of SpaceWars has a few different bad guys and a boss. There is level/wave progression now. There is some bonus for dispatching enemies quickly in each wave. The difficulty curve is still a little tough I think, but the boss fight is actually kinda easy. There is a mock level one and two – each ending with a boss battle…

Here is a link to Space Wars Cubed.

Updates coming soon:

  • enemies with different attacks – chasing missiles, area attacks, multi attacks, collision
  • better bosses
  • power ups- 1up, shield, dual gun, bomb
  • PC / Mac download for folks whose browsers aren’t cutting it

SpaceWars Cubed Update

The newest version now has the enemies with a little different AI – finding random waypoints and taking shots at the player. They come for off screen in waves now as well.

Screen Shot 2014-02-03 at 8.13.00 PM

The laser graphics have been tweaked a little as well and a rudimentary score system is in place. It’s uploaded to the exact same spot and filename so if the nebula in the background is not purplish then you may have to clear your cache. Here is a link to the SpaceWars Cubed.

SpaceWars Cubed

Behold! SpaceWars Cubed! This is a super early demo with super basic bad guys and a super basic good guy. Just about everything needs to be refined. But I am looking to make it a lot like my original space wars with a space of 3D. The pixelly space ships are actually 3D cubes so I may tilt them a bit as they turn or strafe to so off the 3D bits. I am thinking of polishing with more lighting effects too. Here is the link to SpaceWars Cubed. Takes a while to load too….

Look for lots more enemies – varied attacks, powerups, waves, levels, bosses in the future.

This was my mad dash attempt at making / starting / doing something for the month of January which obviously got away from me. I’d say this is more like #1PrototypeDemoAMonth but oh well. It’s certainly not done!

WASD or Arrows to move. Up – is Forward thrust, Down is Brake and reverse.

Space Bar to shoot

Escape to reset game – sorry no start screen or game over screen!

New Ship Mesh, New Version Uploaded of Space Wars

New ship meshes, missiles, distant planets, space jump gates to nowhere! I uploaded a new version.

Updates:

  • New mesh designs for the enemy fighters. I think that look pretty cool. Not too original but I am excited to get the hang of it. Really this mesh is probably the mesh of the player ship or at least human style fighters. Alien races will have more interesting looks.
  • Targeted Missiles: Center mouse or left cmd key (left alt on PC? not sure) to lock on. And then Right click or option button since I just realized that it wont work in a browser game… mash some keys to see what does what i suppose – to launch missile
  • Capital Ship: Its just a place holder experiment. It has turrets that can be destroyed. The rest of the ship cannot. Will be working on a 3D mesh for cap ships and turrets so we can get rid of giant rectangles.
  • Distant Planet background: Now the planets are set in a 3D sky box of sorts using a camera trick. Unlike normal sky boxes, you can actually move closer to the planets — when you get close enough it  will one day ask if you want to land… not yet. I think you end up flying through the planet at the moment, but it will take longer than most attention spans to do this.
  • Jump Gate: Spinning blueish particle thing. I am working on this concept, probably will oneday look more like a nebula cloud or something. Anyway now it jumps you to another scene in which I think controls are messed up and everything is broken – yay!

Anyway, not a huge amount of progress really. The AI still stinks and there isn’t really a game or mission or anything but turrets and bad guys that attack and the satisfying feeling of watching the enemy explode when they get hit by a missile is nice.

Todo Shortlist:

  1. AI Choosing Targets Script – move away from just focusing on the player will allow NPC friendlies and we can set up real battles.
  2. Friendly ships, non-combatants (helpless space miners being chased by pirates?)
  3. AI Behaviors – Patrol points, search and destroy, defend, attack, flee, tactical moves, etc. Expect a few of these soon.
  4. Working jumps to other sectors. Will just take some time to figure out how to make it work.
  5. Ship meshes – more and probably more component based so we can build and modify them in game. Front middle and back portions that you can swap. Cap ships will probably be built out of lots of middles parts. Also had some ship model ideas:
    – Porcupine Class – two top mounted missile launch boxes with semi-guided missiles – fires like 6 from each box
    – ECM Class – creates interference over a set radius that shows up on radar like additional ships – masking actual ship locations
    – Capital Ship with Launch Bay for Fighters
  6. More weapons –
    – Energy weapons that are strong but get weaker over distance
    – Classes of projectile weapons – light, medium, heavy, capital
    – Different Missile Types:
    – Dumbfire – they fire straight at what you point them at – good for slow moving / stationary targets
    – Targeted – initial lock-on followed by dumbfire behavior
    – Seeking – lock on that must reacquire target after a certain turn radius – can get confused by counter measures
    – Guided – lock on and chases target – most accurate

Modeling 3D Space Ships in Blender

I spent part of the morning playing around with Blender. I made a smallish space ship model that looks better than the flying rectangles I am currently using. I will play around some more until I have something cool. The plan is to have a good enemy model and a good capital ship model sometime soon.

The trick to Blender is watching lots of Youtube videos. I have a couple books, but watching someone model something really helps. There are not alot of helpful tutorials out there on using Blender to model machines and vehicles. People focus on sculpting characters. Getting the right info for what I am trying to do has been difficult. My biggest barrier (other than how complicated Blender is) was that I needed to understand how to use a Mirror modifier so that I could make symmetrical ships. BornCG has very helpful tutorials on Blender and one is about the Mirror modifier. Now I know how to do that! You can see the results above.

Screen Shot 2013-12-07 at 3.44.43 PM

Block Art Capital  Ship – see I need to learn 3d modeling

Game update: Planning on uploading a new version soon. Not sure how much longer the game will work ok in the browser. Seems to be ok so far. Recent updates have included –

  • missiles that lock on and chase target,
  • a giant capital ship over a km long with turrets that track and destroy the player,
  • a 3d skybox set up removing the ability to crash into a planet,
  • jump gate that takes you to a new level albeit with a lot of bugs…