Demo with text of how the Debug Data tool works.

DebugDataTool_ToolScreen.png

View of the Debug Tool and what it renders on screen.

Debug Data Tool

Year of production: 2020 October.

Time taken: 24 work hours.

Tool Programming

C#

Unity

About

I wanted to try a similar idea that I saw a programmer make in a video. It showed movement data as lines

The tool would show data in the editor as red lines. The user can then select a data file from a list of loaded files and look at where the player was looking in a preview camera.


As a added bonus, I created a button that replays the data in play mode to give a better view of what's happening.

The assets and game itself were downloaded from the unity store, which was a great help.

Setup

The general thought I had about this tool is that I wanted it to be easy to setup and use. It should be modular when it comes to what the user want to record.

 

I did not want the designers to hassle with keeping track of where to connect everything.

 

I might have sacrificed some data power, but I think that was worth it, since I got the tool and the recording of data to be easier to use overall.

DebugDataTool_SaveHandler.png

Save Handler that is needed to record.

Save Handler

The first thing needed is a SaveHandler object in the world. This controls how often the user want to record data.

The higher captures per second, the more accurate the data. But it will also require more space and power to view in the editor.

Code

Show the full code by pressing the button.

DebugDataTool_SaveLookDirection.png

Script to save look direction data.

DebugDataTool_SavePositionData.png

Script to save position data.

Save Data

To record data, I made a base class that will handle the functionality of recording data to files.

 

Then to record specific data, you would only need to create a child class and override the abstract methods needed, and add whatever data you would need there. The only other thing needed is to add a variable to a Data Holder class for it to work.

Two examples of this is a script to save positions and the other is for look direction.

SaveDataBase

Show the full code by pressing the button.

Debug data tool UI.

The Tool

I wanted the user to be able to scroll through the different data in an easy way and at the same time be able to preview the data in the viewport.

 

So I used the functionality already in unity, which is when selecting a camera a small window pops up with what the camera sees.


I also added a novelty way of viewing the data, which is through replaying the data inside the game when pressing the replay data button.

DebugDataTool

Show the full code by pressing the button.

Replay Data

I wanted the user to be able to replay data in play mode. For this I created a parent class with abstract functions that run before, during and after the replay.

 

This is to ensure that the class will give back control after the replay is done.

since the recorded data is not exclusive for a specific object, I wanted the user to control what they wanted to replay and on what object.

ReplayDataBase

Show the full code by pressing the button.

ReplayDataPlayer

This is an example of what you can use ReplayDataBase for.

FTP Uploader

Lastly I tried sending data over a FTP server, which was successful. The code itself was made by someone else, with slight modifications.

I wanted to simulate a real situation of sending data to the developer and see how flexible what I've done is.

The code is in the package, but I will not link it here, since it is not mine.

Future

I would love to try this in a bigger scale and see what works and not. I would probably change the viewing of data to basic "characters" to show their path.

Demo fo the different functions of the Mini map tool.

Minimap Tool

Year of production: 2020 October.

Time taken: 18 work hours.

Tool Programming

C#

Unity

About

One of the problems I've seen is when you have big scenes, it becomes harder to navigate around the scene, so I decided to make a top down mini map tool used while developing in Unity.


I tried to keep the user in mind and make it easy to navigate and move around.

Functions

To navigate the mini map, the user presses different buttons when on the mini map window.

 

Since some buttons are disabled or do wacky things in the editor, I decided to lock the controls to some standard camera controls.


I also decided to lock off the original functionality of the buttons while using them on the mini map, otherwise they would control the screen while navigating.

Left mouse button to navigate the map.

Navigation

Button: Left Mouse Button

Holding and moving outside the mini map will still work until the user let go of the button. This felt nicer than just locking the view or releasing the button automatically.

 

Middle mouse button pans the camera in the mini map.

Scrolling the mouse wheel will zoom the map.

Panning

Button: Middle Mouse Button

Zooming

Button: Scroll Wheel

Holding the Left control button and scrolling the mouse wheel, changes the camera depth.

Scrolling the mouse wheel will zoom the map.

Change Depth

Button: Left Ctrl + Scroll Wheel

Since levels can have different floors and depths, I made it so the user can move the cameras position, effectively changing floors.

This way the user can look at things under ceilings.

Moving Window

Button: Left Mouse Button

The user can move the window around freely if they hold the top bar of the mini map window.

To achieve this, I needed to make custom "Colliders". I added one for the top bar and one for the mini map view, so the left mouse button can do different things on either.

MiniMapTool

Show the full code by pressing the button.

Future

In the future I would like to make it so the user can change view as well, so it can be used for other perspectives.


I would also like to make the scaling of the window more dynamic, but for now, what I have works pretty well.

Problems

I wanted the user to be able to scroll off screen with movements of the mini map. This is default for Unity, but unfortunately some events do not run outside of the viewport screen, which made it impossible.

I had to make the buttons let go if the user holds a button and goes out to the Unity UI. This is not Ideal, but it was the least painful solution.

EditorWorld

One of the WIP classes I am working on. This handles the editor world itself and is where you paint in the sprites.

I wanted to show an example of my exploration of what works and not in modern C++.

Work In Progress

Demo of one of the maps in the Tower Defence demo.

Work In Progress

Mario Maker

Year of production: 2021 January

Time taken: TBA

Tool Programming

C++

SFML

About

Something I needed more training in is modern C++ code and also trying to make my own editor tools.


What better for that than trying to recreate a game I really like, Mario Maker?

This Editor and game is still a work in progress and I will continue the project in the coming time I have.

SFML

For this project, I used SFML for creating simple shapes, rendering and windows.

I switched from SDL to SFML since it is created in C++ and allows me to use the modern code C++ provides.

 

Reference video of Mario Maker 2, showing what I would like to add in the future.

Current Code

To see what I currently have made, click the download button.

Future

For now I do not have much to show.

I created a way to add and remove sprites from a grid.

For this, the mouse position must be checked on the window and converted to the grid position.

But later on, I will add more tools for selection, saving and loading and also a way to extend and scale objects.

 

Lastly, I will add switching between worlds so the sprites and background easily can be changed with a mouse click.

 

Demo of the achievements running in a project.

AchievementTool_DataAssets.png

The data assets created in the current project.

Click to enlarge.

Data Assets

The achievement data is stored in Data assets. This was easy to implement, easy to change and also very flexible.

Achievement Tool

Year of production: 2020 November.

Time taken: 18 work hours.

Tool Programming

Unreal

Blueprints

About

This was a experiment of what can be done in Unreal, and how to do it.


I also wanted it to be something that is used in modern games. And I ended up trying to make  a way to create and implement achievements.

This experiment gave me a good look at the restrictions of Editor classes and what is good to create in blueprints and not.

Since this was a pretty small project, I used some time to give the achievements popups a nice look.


Another bonus is that I added a way for the achievements to save, so the achievement progress will stay after quitting the game.

The tool UI to change the information of the achievements.

Tool

I tried different ways to make a list of objects for a tool, and I ended up using a list widget to display the items.

 

This took some time to understand and ho to implement, but in the end it turned out pretty good.

I also used functions to implement undo on most of the changes.

The achievement progress is tracked through integers, so to implement an achievement that requires to shoot a set amount of enemies, you would just specify that.

 

But if it is an area that the player needs to find, you would just put a one and then bind it to a collision.

Blueprint

Show the blueprint by pressing the button.

AchievementTool_ToolUI.png

Setup of the widget UI used.

Click to enlarge.

Tool UI

I tried having a clean and easily manageable UI setup.
For the lists itself I link to another widget, which is copied for each entry in the list.

Blueprint

Show the blueprint by pressing the button.

AchievementTool_GameMode.png

The game mode is where the achievements are run from.

Click to enlarge.

Implementation

The achievement functions are run through the Game Mode, this way it can persist through levels and have a central place to add new code. 

Blueprint

Show the blueprint by pressing the button.

Animation of the achievement popup. This plays through and when its done, palys backward to hide.

Click to enlarge.

Animation

the achievement pop up is by itself in a widget and bound to the character through the Game mode.


The animation  of the pop up is done through Unreals own system. When it closes, the animation is just reversed.

Blueprint

Show the blueprint by pressing the button.

Full Project

These have been some examples of blueprints used. What this doesn't show is the different functions and implemented objects used as examples.


To download the full project and try it out, just click the button to the left.

Future

In the future I would use C++, which has it's own problems of creating editor scripts. 

 

But it also gives a better way to broadcast Data Assets with the signal, which doesn't work with blueprints.


I would also get more insight into C++ in unreal.

Problems

One of the problems I had was storing the achievement progress inside the Data Assets.

 

This proved to be buggy when creating a build of the game. So to get it to work, I had to separate that data into a variable instead.

@ 2020 by Yunis Al-Breihi

  • Facebook Social Ikon
  • Linkedin Social Ikon
  • GitHub-Mark-120px-plus