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.
I am writing this post more for my own reference. I wanted to created a character in Blender, rig and animate it and then use it in Unity. Following videos show how I did this. I created a simple, stick-figure like, character in Blender and used it in Unity. In Unity I used Character controller, new input system and animation controller to move the character.
Stick-Figure Modelling in Blender
I started with an empty project (other than the default cube) in Blender and created a stick-figure character. I collapsed all the vertices of the cube to a single vertex, applied mirror modifier, skin modifier and subdivision surface modifier. Then extruded different parts of the character.
In the last blog post I created a terrain with trees and hills in Unity and added a First Person Controller (FPS) to navigate it. In this blog post I will add an asset from Blender into Unity with all the textures preserved. The default export options in Blender do not package textures. In the export (to FBX) dialog, you need to set Path Mode to ‘Copy’ and turn on the button (next to the select box) to embed textures. See the video below.
In the above video, I add a house (with textures for roof, wall and floor) created in Blender into the Unity scene created in the blog post mentioned earlier. The player can navigate inside the house. To prevent the player passing though the walls, I add a mesh controller.
Recently I attempted navigation of the player in Unity using its FirstPersonController component in a terrain environment. I had created character controller from scratch for the player navigation earlier, but wanted to use FirstPersonController because it makes development easy and has many features which can be controlled using configuration settings. And I wanted to do this in a terrain environment using Unity Terrain tools.
I have documented my learnings and steps I took to implement the above in following sections and videos. The focus was more on “How To” than creating a beautiful game scene. The final outcome looked like this –
Recently I attempted to run Jupyter Notebook in Ubuntu Docker container for a project requiring OpenCV and PyTorch. Sharing the Docker configuration files I used here.
Jupyter notebook listens on port 8888 by default. So, I am mapping it to the same port on the host machine. I have also created a folder ‘shared’ in the same folder where above docker-compose.yml is located. And I have made this folder accessible to the container using volumes declaration. The above file instructs docker to build Dockerfile in the same folder. Content of the Dockerfile is as follows –
Ubuntu comes installed with Python3. I started with creating a new environment for the project. I switched to the folder where I was going to create projects/files for using HuggingFace
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 managed Adobe Animate team for a couple of years and during that time wrote a few blog articles and created feature videos. These articles and and videos were published on Adobe blog and Animate YouTube channels. Here I am just providing links to them –