Tag: development

  • I Created This Mobile Game in a Week.

    I Created This Mobile Game in a Week.

    I recently published a mobile game that I developed in about 1-week. The whole plot was a rocket ship that is travelling and on the tap it flips the direction. My brother told me about this while we were playing Apex Legends and I created a Unity project before we went back to lobby and by the weekend, I had an early prototype ready for his review. The objective for me was to create a game that my daughter would love to play.

    If you’re interested, check out Distant Ride Fail on the Play Store. I’ll appreciate that.

    Distant Ride Fail

    The whole plot of the game is a single-touch based mobile game. The whole objective of the game is to allow the user to use single-tap and help the ship cross the space. The space is infinite, and so the ship must traverse the area and avoid the incoming obstacles.

    You can play the sessions unlimited numbers of time. You do have to restart the game session when you hit the obstacle.

    Development

    The game is created using Unity engine. The game is a simple loop of C# script that performs all the operations:

    • Generate the obstacles and set their translation and rotation.
    • Apply “wobble” movements to the rocket.
    • Track the movement and collision.

    At the moment there are no trackers or analytics in the game.

    The game code obviously has scripts that do “one task”, such as “wobble” and “obstacle detector” are all different script that use the main loop and update the state of the game. I tend to write the game logic with state so that the UI only renders the processed state and data on the screen, while the background processes can continue to run in the background.

    Assets and UI

    I used the Low Poly assets for the mobile-based interface. Also, the UI was created responsive. The UI stretches to accommodate the different screen factors and sizes.

    Instead of Unity Input System, I used the Rewired package to handle the input as I intend to expand the actions and handlers to other input providers (mouse and keyboard, controllers, etc.). I will write more on that once I have published the game on Microsoft Store as well. For now, the only input being handled in the touch input.

    Publishing Experience

    I have only published the game to Android and Windows platforms. In my experience, Apple is always a tough platform to crack and getting your app (or game) published.

    The game is currently live on Play Store, and undergoing a launch on the Microsoft Store as well.

  • Production Data Loss for twodos App: Minimal Impact on Users

    Production Data Loss for twodos App: Minimal Impact on Users

    The database for the twodos app was dropped because of a misconfigured environment variable, causing existing users to be logged out of accounts and unable to access their data for a while.

    The problem has been resolved since and data has been restored. You can access the service here on twodos.app website or download the client apps.

    Cause

    The Docker image used for the deployment of backend API had an extra environment variable NODE_ENVIRONMENT added. The objective was to make the Docker image a development instance by default. On production, environment variables would be configured to override the development/staging values.

    There was a data layer code that reads this variable on app start up and purges all the data from the database.

    The sequelize database being force created when the Node environment is development.
    The sequelize database being force created when the Node environment is development.

    This line was not gated properly and read a single variable to make such a big decision. The gate has been two-factored and an additional environment variable is now expected before the data can be purged making it difficult to enter this gate by mistake. Especially on production environments.

    Impact

    The misconfigured environment variable caused the database tables to be dropped with the data being truncated. This led all the existing users to lose the access to the application and the data that they had created.

    This was detected first on staging environment and then was propagated to the production environment.

    Resolution

    The impact on existing users was minimal. The data is now recovered, and the application is performing normally.

    To prevent this from happening again, the data layer environment gates have been two-factored to prevent single environments from purging the databases. Moving forward, to make such changes on a database, two variables need to be set that indicate the intention to remove or modify the data.

    The data backup was used to rollback to an earlier version of the database.

    Sincere apologies for the inconvenience caused.


    The changes applied are part of a wider effort to make the application simpler, stable, and scalable on the UI-part. The changes in the API will make it possible to extend and improve:

    • Users and account management, to allow easier account creation, login, sharing, and access management for privacy reasons.
    • Lists and tasks management, to better expose the lists and tasks actions so that native platforms can compliment the data (add reminders, change the themes, etc.)
    • State management of the application to make the application faster.
    • Improved testing of the platform (API + app) to ensure the application performs and delivers what it aims to deliver.

    We’ve received feedback from you all, especially around:

    • Emails and tokens not being delivered.
    • Application breaking (especially state management).
    • Lists and the tasks management UI being unclear.

    We’re moving slowly toward releasing the application with all the improvements deployed a) first to our API and then b) a new version of the app on the client platforms.

    Thank you!