Kebab Lala
Authors: Alicia Sudlerd
The project is initially created during UT Game Jam April, 2023.
'https://github.com/Alitcher/KebabLala'
'A kebab restaurant simulation game, serving a variety of quirky animal customers! 🐱🐶🦥'
As the player progresses through the levels, the orders become more complex. The player has to be faster and more careful about specific orders. The game has a retro-style pixel art aesthetic that looks realistic for unimportant reasons.
The controls are simple and intuitive, with the player using the mouse to grab ingredients and drop them on the plate. Then, give the plate to the customer by drag and drop. The player can buy new ingredients by simply clicking on the "BUY" button during the game.
Objective: The game's objective is to unlock all the ingredients and make sales as much as possible. Features: 2D retro-style pixel art graphics Simple and intuitive controls New menu items to collect Increasing difficulty in orders
Target platform: PC/Mac
Target audience: Casual gamers who enjoy cooking games and funny-looking animals.
Final result:
https://emoxic.itch.io/kebablala << check it out!!
In the end there should be a link to the final build, repo and a 10-20 sec final result video.
https://docs.google.com/presentation/d/1Jt5y-GBcUVZIXswD5SxHHOgO8a9ExZc6ICq5LrwXXFE/edit?usp=sharing
Milestone 1 -- Pre-production(10.10)
- Migrating the existing project from Unity to UE5 (2.5 hr)
- Project architecture (2 hr)
- Import Game assets (without codes) (0.5 hr)
- Learn UE5 c++ (9 hr)
- Drag-and-drop mechanic
- Items and NPC interaction
- UI and Score system
- Grid layout?
- Screen space, canvas??
- 2 Drinks to sell to customers
- Scriptableobjects?
ps. what's in Milestone 1 is already in the Unity's version.
+ UE5 Project Architecture
```
ProjectRoot │ ├───Content │ ├───Art │ │ ├───Backgrounds │ │ └───Sprites │ │ ├───Animals │ │ │ ├───CatSparkle │ │ │ ├───Chihuahua │ │ │ └───SlothPapa │ │ ├───Emojis │ │ ├───Food │ │ │ ├───Drinks │ │ │ ├───Ingredients │ │ │ ├───Meals │ │ │ └───Snacks │ │ └───Utensils │ │ │ ├───Audio │ │ ├───BGM │ │ ├───Octave │ │ └───SFX │ │ │ ├───Blueprints │ │ ├───Actors │ │ │ ├───Customers │ │ │ ├───Foods │ │ │ └───Utensils │ │ ├───GameModes │ │ ├───Managers │ │ └───UI │ │ └───Widgets │ │ │ ├───Fonts │ │ └───Press_Start_2P │ │ │ ├───Materials │ │ │ │ │ └───Scenes │ └───Source ├───Game │ ├───Actors │ │ ├───Customers │ │ ├───Foods │ │ └───Utensils │ ├───GameModes │ ├───Managers │ └───UI │ └───Utility ├───Audio ├───Singleton └───Miscellaneous
```
Gameplay Architecture
+ Accomplistments
Drag and Drop in UE5
It is proved to be successful using Blueprint to drag and drop UI objects. Colliders are not required to detect any interaction.
In order to make `drag-and-drop` UI works. We need at least two `widget blueprints`, assuming the main UI is already attached to the `level blueprint`. The required blueprints are listed below.
- Draggable Item
- Destination
- Dragging Image (Optional)
Draggable Item
Destination
In this case, the destination is the customer, as a widgget plueprint.
9-Slices
UE5 doesn't have Sprite Editor comparing to Unity. The closest feature that could split an image into 9 parts is Box>Margin.
It promises to keep the image or texture in a stable shape. However, it doesn't blend well.
This is the result produced by Unity; the corner shape and style are completely reserved for pixel art.
In the other hand, UE5 doesn't seem to reserve the sharpness for each pixel.
Slate UI
Slate is a underlined UI system for UE5.
1. UI Development
Unity is often praised for its user-friendly UI development tools, including a visual editor that allows you to create and arrange UI elements directly in the scene, as well as prefab support for UI components. If your game heavily relies on UI and you find Unity's UI system more intuitive, it may be a strong argument in favor of using Unity.
2. Pixel Art:
Unity has a long history of supporting pixel art games and features that are well-suited for this art style. Margin is not the replacement of 9-slices.
Game Engine Decision
I'm jumping back to Unity!
+ UE5 Drawbacks
1. UI Workflow Complexity:
UE5's UI development workflow can be more complex compared to Unity. To create UI prefabs, in UE5, UI elements are typically created as Widgets. Managing them involves more steps and may not be as intuitive for UI-centric development.
2. Pixel Art Support:
KebabLala relies on pixel art, so there will be challenges in getting pixel-perfect rendering and scaling in UE5, as it has traditionally been more geared towards high-fidelity graphics.
3. Performance Overhead:
Unreal Engine is known for its advanced graphics and rendering capabilities. It will be overkill to use UE5 for 2D pixel game.
Milestone 2 (24.10)
- Fix NPC UI bug (0.5 hr)
- Fix colliders
- NPC Design (2hr)
- Add countdown on NPC
- Customer spawning rate
- Tutorial Design (4hr)
- Import animation (2hr)
- Dotween
+ Cutout mask
A cutout mask(aka. inverted mask) is commonly used in tutorials or highlighting specific elements. Unlike traditional masks that show what's inside them and hide everything outside, a cutout mask works in reverse.
Implementation
1. Create a shape (circle, rectangle, etc.) as a parent where you want your "window" or "cutout". Make sure you add the "mask" component. 2. Create an image inside the mask(parent), and set it dark but leave alpha around 200-230 like a darkened overlay. Expand it outside of the screen. 3. Work with materials, please visit CutoutMask.cs
Result: Result:
+ DOTween Implementation
During Gameplay: DOTween assists in creating movements and alpha transparency, transitions, and animations, making the gameplay more dynamic and engaging.
During Paused Game: A special feature of DOTween was utilized, allowing animations to run even when the game's timescale is set to 0 (paused). UI transitions and feedback are still presented to the player.
+ MVC Pattern
I chose Model-View-Controller (MVC) as the backbone pattern for this game. This architectural pattern separates the game's logic into three interconnected components:
Model: Represents the core logic and data of the game. It consists of all the game mechanics, rules, and data storage, ensuring the game behaves as intended.
- In this case the model is any `scriptableobject` files where it contains the data of the object.
View: It represents the visual elements and UI of the game. This is what the player interacts with – everything they see, from characters to menus.
Controller(Manager): Acts as an intermediary between the Model and the View. It takes the input from the players through the view, processes it (with possible updates to the Model), and returns the output display to the View.
By adopting the MVC pattern, the overall scripts became organized. Issues could be isolated to one of the three components. Furthermore, it is efficient if the project grows bigger and open for collaboration, as multiple developers could work on different components without causing conflicts.
Milestone 3 - 4 (07.11 - 21.11) (Delayed)
- New Features (7 hrs)
- Full Recipe (9 hrs)
- Lettuce 100000000
- Tomato 010000000
- Tortilla 001000000
- Onion 000100000
- Fries 000010000
- Cucumber 000001000
- Doner 000000100
- GarlicSauce 000000010
- Ketchup 000000001
- Restaurant upgrade
- Full Recipe (9 hrs)
Rank/Mixtures | Lettuce | Tomato+Onion+Cucumber | Tortilla | Fries | Doner | Cola | Ayran |
---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 5 | 10 | 1 | 1 |
2 | 5 | 5 | 5 | 10 | 20 | 3 | 3 |
3 | 10 | 10 | 15 | 20 | 50 | 5 | 5 |
- Level Design (3 days)
- Make up to level 5 (Final) where all menus are present.
Milestone 3 is delivered along with Milestone 4.
+ Accomplistments
Drag-and-drop system(80%)
- Able to deliver both drinks and kebab plates to customers.
- Still have some bugs from its collider
Level Config
- The game is playable in every level. From level 0(tutorial) to level 5(Final)
- The config includes:
- Dynamic shelf activation; the updated code structure allows shelves to appear based on the level.
Level 1 Settings
Level 5
How does the config work?
Core Classes and Architecture
Singleton class | Responsibilities |
---|---|
KebabLalaSystem | Configuration of the whole application: Sound settings, Scenemanagement |
LevelSelectManager | Keep record of the current level progress, pass data to GameSystem |
GameSystem | Hold data for GameManager for other classes to have an access |
GameOverlayManager | Popup some panel that results the game to be paused |
SoundManager | Manage sound ststems |
- LevelSelectManager
Customer Countdown and Reaction
- Within a given time for each customer, serve the order before the time runs out.
- The customer will get upset and leave.
Food ID with StringBuilder
- Drinks have 4 digits id: 0000(cola), 1111(ayran)
- Look at Full Recipe as a reference:
- The plate has 9 digits. The ID will be 000000000 if the plate is empty
- The more products we add to the plate, the more 1 will appears in the id.
- 111111111 means the plate contains all mixture
Milestone 5 (05.12)
- Implement Upgrade System (9 hrs)
- Fix kebab order bug
- Dotween on Summary Panel