Squid Game Dev Log – Animated 2d spites in Unity3D

After  spending about 5 hours total trying to figure 2d sprite animation AND keyboard controls in Unity, I think I finally have a decent workflow setup… – its also my birthday today!

I am using a free add-on called Orthello (WyrmTale Games) which has several great components for handling animated sprites, and a free app called Texture Packer (Code’n’Web – Mac, PC, Linux) to  create sprite sheets. Texture Packer generates an xml file that Orthello can read to map the sprites and give them unique numbers – which makes it easy to choose what frames go to what animation.

There was a bit of a learning curve, but I feel like I am much farther along, even though the end result is not as complete as my javascript browser version.

Here are a couple screens!

Squid Game Dev Log – Learning Unity3D

… I have been reading up on the Indie Games industry, and It seems that the only way to get by making browser-besed games is ads.
I hate ads!
So I looked into making games that would work on Mac or Windows, and found Unity.   Unity is a 3d engine, but there are a few good resources I have foudn that will allow me to create a 2d game using Unity.

I am following a video tutorial now and leanring a lot, it seems like Unity has a lot of flexibility and the Unityscript/Javacript language looks fammiliar to me so that’s a big plus.

I am working on rebuilding the engine for squid game, and trying to get it to look as flat as possible to create a 2d look. I really like the cameras and other things you can use in Unity, really cool stuff!

Heres a snapshot:

 

Squid Game Dev Log – re-done sprites!

(above) This is when the character takes damage in the game.

(below) The whole point of the game, avoid letting the squid fall asleep!

I will post some of the animated sprites soon, but they arent refined and smooth yet so I will wait.

Click on the images to view the Deviantart page, and comment, or leave a comment below.

Squid Game Dev Log – Enemies! and Pain!

Alex Bezuska Blog Squid Game

Try it yourself, using the working demo: squid.alexbezuska.com
The idea at this point is if you hit an enemy you start the level over, it’s not about fighting enemies, but instead collecting items and navigating to a goal.
The plan is to have moving pattern based obstacles like this Horseshoe Crab, and also stationary ones like sharp coral or pits not sure quite yet…

The next big goal is to have a goal, a way to beat the level even if its just a flag at the end.

The Beginnings of the first level

Alex Bezuska Indie Game Dev Squid Game

Not much here But I got the first stage started! I am using an app called Tiled (Mac or Windows) which is a general purpose map editor that allows for some pretty awesome stuff such as layers and makes setting up the collision detection with MelonJS pretty easy.

Check out Tiled here: http://www.mapeditor.org/

and MelonJS here: http://www.melonjs.org/

jQuery Tip – Different Keys for the same Thing

So here is something I was struggling with and found a solution that might help other people trying to do the same thing. My goal was to have two keyboard keys do the same thing, in this case move the character in my game. So a player could use W A D S or the arrow keys. My code before was this:

                 case 40:  //down
	         	squid.css('top' , position.top + 50 + 'px')
	         		.removeClass("idle")
	         		.addClass("down");
	         		break;

	         case 83:  // also down
	         	squid.css('top' , position.top + 50 + 'px')
	         		.removeClass("idle")
	         		.addClass("down");
	         		break;

But you can do this instead to help reduce the amount of code, and organize your code better.

               
                 case 40:
	         case 83:  //Use either of these keys
	         	squid.css('top' , position.top + 50 + 'px')
	         		.removeClass("idle")
	         		.addClass("down");
	         		break;

I am still trying to figure out how to have key combos like W + D to move up-right or A + S to move down-left so my character can have 8 different directions to move, making it a bit more fluid. If you know how to do this drop me a comment, if I figure it out on my own or have time to google around for it some more, I will post it here.