I have developed yet another simple and short game using Unity, which I am calling SkyWar. You can watch a brief intro of this game in the following video –
The goal of the game is to destroy enemy tanks by dropping bombs from the plane. Tanks can also fire at the plane and you need to save the plane from their attach.
The game would not work in mobile browsers, so please try it on desktop/laptop browsers.
It was fun developing this game and I learnt a few new things about Unity game development in the process. I created models of plane, tanks and bomb using Blender. I used sound effects from Pixabay. I used textures and tree assets from Unity’s Terrain Sample Assets.
This is another Unity game I developed recently, may be a bit silly one but I enjoyed creating it and learned a few new things.
In this game you navigate the fish to ‘eat’ numbers. Higher the number the fish eats, bigger your score. Numbers appear and disappear randomly and you need to make fish eat them before they disappear. Use the navigation control at lower left to move the fist. Here is the demo of the game –
Click here to play the game. It won’t run in mobile browsers. If you want to run the game on any Android device then you can download and install this APK file by sideloading. I don’t plan to publish it on Playstore.
I had previously blogged about the Snakes & Ladder Game I had created. That was a multiplayer game but was not an online game – i.e. multiple people could not play the game together remotely. I had planned to make a true online and multi-player version of the game since I created the earlier version. In the last few days, I have made sufficient progress on the online version of the game, that I can share it with you. Please watch the demo of the game below.
Since I am using the same server for the backend of the game as the one hosting my blog, I have limited the number of simultaneous sessions. There is also the session timeout of 10 minutes, if there is no activity in the session.
Creating the online version was certainly more complicated than the standalone version – I had to implement the backend logic to create and manage sessions and implement a broker to facilitate messages/events to and from multiple players. But I have done sufficient server-side programming in the past and was able to implement that part of the game fairly quickly. However, implementing the game client in Unity took some time. Implementing messaging protocol, making sure the UI is updated from multiple event handlers in the UI thread and in general synchronizing parallel event handling took some time. But overall, it was a great learning experience.
You can access the same at http://ramkulkarni.com/Games/Multi-SNL/. Try this on your desktop or laptop computer and not on mobile. It is not optimized for mobile and will not work properly.
I have implemented another game using Unity, after my first Unity game, Single Wicket Cricket. The new game is Snakes & Ladders. You can watch demo of the game in the following video.
You can play the game at http://ramkulkarni.com/Games/SNL. Though the game is multi-player, it is not truly online multi-player game. I do intend to work on that in future. Also, the game is not optimized for Mobile. It does not display correctly in portrait mode in the mobile browser and text input field does not trigger virtual keyboard. But it should work fine in non-mobile browsers, so give it a try.
I tried my hand at a low-poly 3D game development with ‘Single Wicket Cricket’ game. This is not a typical Cricket where two teams play against each other. In this game you are the main player – the batsman, playing against a team.
Tap/click Bowl to start bowling action. You will be able to ‘Hit’ the ball once it is released by the bowler. You will be able take a ‘Run’ only if bat touches the bat, so there are no byes or leg-byes.
By moving different sliders you can control position, rotation of the batsman, strength and direction (up/down) of the stroke. Tap/click ‘Help’ button for more details.
The game is available to run in Web Browser or as a standalone application on Android devices.
If you want to simulate motion with repeated display of a set of images, where each image correspond to one position in a series of positions in motion, then you can do this easily with sprite. Sprite is individual image in this series of images that constitute motion. The example of sprite is a person walking, where his/her motions of hands and legs are repeated during the walk. However sprite animation is not limited to repeated motion only. You can simulate, for example, explosion of an object, with series of images (sprites), each showing different stages of the explosion.
In my simple HTML5 game, the planet stops moving (and the game ends) when it hits any asteroid or boundaries of the Canvas. I modified it so that the planet explodes when it hits any obstacle. And for this I used Sprites. KineticJS makes animating Sprites very easy. This is how my sprite sheet looks like (sprite sheet is one image that contains small individual sprite images) –
I wanted to make the Simple HTML5 Game I had created a couple of weeks back a little more interesting. I decided that I would add some obstacles in the way of the moving object. The goal then would be to prevent the moving object from hitting the obstacles and boundaries of the Canvas. This required implementation of collision detection (between moving object and obstacles) logic. If shape of the image is rectangular, then it is easy to detect collision; this is something I had already implemented in the last game, where I checked if the moving object hits any of the four boundaries. But if shape of the image is irregular, then it requires a bit more work to detect collision. But first, try out the modified game below and see how collision detection works – Continue reading “Collision Detection in HTML5 2D Games”
My son is having summer vacation and he wanted to learn animation and create games. He had learnt Flash and ActionScript a couple of years back. So he started developing a game in Flash. However he ran into few issues and sought my help. Since I don’t know Flash, I could not help him much. But I suggested that if he develops his game in HTML5, I could help him. So while teaching him HTML5 and animation, I ended up creating a very simple game, which I want to share here. Continue reading “A Simple HTML5 Game”