logo80lv
Articlesclick_arrow
Professional Services
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
Order outsourcing
Advertiseplayer
profile_loginLogIn

Developing Custom Unity-Based Engine For Underwater Action Roguelike

RetroStyle Games' Eldar Kalinin joined us to talk about a custom game engine, built specifically for the studio's debut game Codename: Ocean Keeper, delving into the engine's modular design and highlighting its flexibility and ability to integrate with any future project seamlessly.

Introduction

Hey there! I'm Eldar Kalinin, the game designer at RetroStyle Games. I've loved games since I could hold a controller, and now, with our latest indie project, Ocean Keeper, I get to turn that love into reality. Ocean Keeper is an upcoming underwater roguelike with dangerous sea creatures, hidden treasures, and never-ending adventures.

When we started development, we knew the Unity engine needed some upgrades to meet our high goals. So we built some improvements that fit our project and work for other game genres. These tweaks and tools are all about making our lives easier by automating the boring stuff and cutting down on repetitive tasks.

Overview of Custom Modules

Alright, let's look into the cool things we've created for Ocean Keeper. Our custom modules are created under the motto "suitable for any project". That means we didn't just adapt these tools for one specific game mechanic or genre – they're universal and can be used everywhere.

We needed tools that could grow with our projects. Whether it's a small indie game or a blockbuster hit, our modules are designed to scale and adapt. It's like a chameleon, constantly adapting to fit perfectly into any game environment we create. So, let's break them down in order:

DatabaseModule

This powerhouse is at the core of managing all the game data for Ocean Keeper. Well, what exactly does the DatabaseModule do? It takes all the raw data from our central database and turns it into game-ready formats. This happens both online while we’re in the thick of development and manually via CSV files. This two-pronged approach ensures that our data is always fresh and ready for testing and deployment. 

The DatabaseModule translates data from our central database into game-ready formats, either online during development or manually via CSV files. Such a dual approach guarantees that the data is always up-to-date and available for testing and deployment. Some key features:

  • Automatic Versioning: This is a lifesaver! It keeps track of all the changes we make and lets us revert to previous versions if something goes awry. It's super handy when we're experimenting with new game mechanics and don’t want to risk losing any crucial data.
  • CSV Converter: We built our own CSV Converter because the off-the-shelf ones just weren't cutting it. This custom solution fits our needs perfectly, ensuring everything integrates smoothly and nothing breaks during the build process.
  • LocalizationModule: This integrated tool provides flexible support for localization. It keeps project clutter to a minimum and allows us to update localizations on the fly without sacrificing performance.

Seriously, automation is your best friend. You can save a ton of time and focus more on the creative aspects of game development. Our DatabaseModule is a prime example of how automation can streamline data management and conversion. When designing your tools, think ahead & make sure they're versatile and scalable to adapt to future projects. This kind of forward-thinking will protect your development process and save you headaches in the future.

Input System

Probably one of the most important parts of any game. We've taken Unity's NewInputSystem and seriously updated it. The goal was to make input controls smoother and more intuitive, perfect for complex game scenarios. Our Input System module adds several powerful features to Unity's NewInputSystem.

First of all, this lets us enable or disable specific input maps and actions dynamically. For example, switching from combat controls to resource-gathering controls. Our module can automatically generate the necessary scripts for given input actions, which saves time and provides coordination across the entire project.

CodeGenerationModule

Imagine having to manually write the same chunks of code over and over again for different parts of the game (although you don't have to imagine it, it's a routine for developers). This is really tedious and often leads to bugs. Our CodeGenerationModule automates these tasks.

Within the InputModule, the CodeGenerationModule monitors changes to the InputActions file. When it detects changes, it automatically generates the scripts needed to handle those inputs.

SavingSystem

Managing game data efficiently is a big deal. In general, SavingSystem is a system that allows you to save and load data, divide it into profiles, and create backups. 

Our custom SavingSystem module is built to handle data across multiple profiles and keep everything secure. Plus, it has an automatic backup feature that makes sure players never lose their progress.

Our system works with cloud services such as Steam Cloud, Xbox Live, PlayStation Network, and Google Cloud.

ViewSystem

Creating an attractive UI/UX is an important step in making a good roguelike game. We've had dozens of iterations with different designs on our team. ViewSystem, based on the Model-View-Presenter (MVP) pattern, makes UI development flexible across all platforms.

The model handles the data, the view displays it, and the presenter manages the logic. It's a clean, maintainable setup. Make sure your user interface adapts well to different screen sizes and input methods. This is important to ensure a stable user experience across different devices.

AI System

Responsive enemies are key to keeping players engaged. We have developed a sophisticated artificial intelligence system based on the SAP (Sensor, Actor, Processor) architecture. This system gives us the ability to quickly design and customize the behavior of enemies, making the game world more dynamic.

So, what's SAP all about? It's a modular approach to AI design, breaking down the functionality into three main components:

  • Sensor: Collects information about the game environment. It detects player actions, changes in the environment, and other stuff. F.E. in Ocean Keeper, sensors can spot the player's mechs, note changes in the environment, or sense nearby creatures.
  • Actor: Determines how the AI character reacts to information received from sensors. This can mean moving, attacking, fleeing, or other actions. For example, an enemy may attack the player's mech or retreat depending on what the sensors have detected.
  • Processor: Would be right to say that it's the brain of the operation. It processes the data received from the sensors and decides what actions the player should take. This component can include complex decision trees, state machines, or even machine learning algorithms to create nuanced behaviors.

New behaviors can be added quickly by creating new sensors, actors, or processors. This is especially useful in Ocean Keeper, where we frequently introduce new enemy types and behaviors. But sometimes, it can lead to interesting bugs...

Custom Game Loop

It is required to better control and optimize the runtime behavior of the game. Simply speaking, the game loop allows us to determine exactly how and when different parts of the game are updated.

By controlling the order and frequency of updates to different systems, we can prioritize critical systems and update less important ones less frequently.

Purchase System

Handling IAP (in-app purchases) and advertisements across different platforms can be pretty hard. Purchase System integrates with various services, making it easier to manage and optimize in-game monetization.

Our purchasing system allows you to manage different aspects of in-game purchases, from creating new items to managing prices and processing transactions. It is highly customizable and supports integration with a variety of platforms including Steam, Xbox, PlayStation, and mobiles.

Asset Creator/Editor

Designed to make asset management simple for our game designers (that is me), artists, and developers by keeping everything organized. One of the coolest features is the ability to automatically generate assets based on predefined templates and rules.

For example, when we create a new item in the game, the Asset Creator/Editor can automatically generate all the necessary files and configurations. It's all about working smarter, not harder.

Additional Modules

While our core modules, such as DatabaseModule and Input System, form the core of our development infrastructure, we've also developed a few smaller but equally important modules.

Here is a list of some of them that are worth mentioning:

  • TimerModule: This little gem helps us manage in-game time and schedules. It is essential for handling timed events, timers, and other timing mechanics efficiently.
  • DialogueModule: Integrated with our MVPModule, this tool makes it easy to create and manage in-game dialogs. It uses a node-based system that simplifies writing dialogues.
  • Tutorial System: Designed to create and manage in-game tutorials with ease. It allows for the customization of tutorial sequences across different platforms.
  • BuildPipeline: This module automates the build process for different platforms. It takes care of configuring build settings, handling platform-specific requirements, and making sure the final builds are ready to go.
  • MatrixModule: This handy tool helps us work with multi-dimensional arrays by providing functions for inserting, merging, clipping, and other matrix operations. It is especially useful for working with complex data structures in a game.

By incorporating these advanced tools and modules into our workflow, we created a flexible development environment that keeps us focused on what we do best – making awesome games. Whether it's automating repetitive tasks as well as ensuring data consistency, these tools are the basis of our successful game development process.

Eldar Kalinin, Lead Game Designer

Interview conducted by Gloria Levine

Join discussion

Comments 1

  • Anonymous user

    I wasexpecting more details on how you made the modules generally applicable rather than just a list of normal game dev tasks.

    1

    Anonymous user

    ·a month ago·

You might also like

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more