[go: up one dir, main page]

0% found this document useful (0 votes)
20 views11 pages

2D Map Rendering and Algorithms

The document outlines a graduation project focused on developing a 2D Map Rendering and Algorithm library for the Gorgon Game Engine, which currently lacks this capability. The project aims to provide a user-friendly interface for game developers, allowing them to load and manipulate various map types while ensuring flexibility and ease of use. It includes modules for map loading, layer management, object loading, and algorithms for pathfinding and object retrieval, along with a risk analysis and future work considerations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views11 pages

2D Map Rendering and Algorithms

The document outlines a graduation project focused on developing a 2D Map Rendering and Algorithm library for the Gorgon Game Engine, which currently lacks this capability. The project aims to provide a user-friendly interface for game developers, allowing them to load and manipulate various map types while ensuring flexibility and ease of use. It includes modules for map loading, layer management, object loading, and algorithms for pathfinding and object retrieval, along with a risk analysis and future work considerations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

European University of Lefke

Faculty of Engineering
Graduation Project 1

2D Map Rendering and Algorithms

Abdüssamet ERSOYLU
192521

2D Map Rendering and Algorithm library for Gorgon Game Engine.

Supervisor

Cem Kalyoncu

i
Table of contents
Abdüssamet ERSOYLU i
192521 i
Cem Kalyoncu i
27.12.2023 i
1. Introduction 1
1.1 Problem definition 1
1.2 Goals 1
2. Literature Survey 2
3. Background Information 3
3.1 Required Software 3
3.2 Other Software 3
4. Modules 4
4.1 2D Map Rendering 4
4.1.1 Map Loading module 4
4.1.2 Layer Loader 4
4.1.3 Object loader 4
4.2 Algorithms 5
4.2.1 Path finding module 5
4.2.2 Finding an object with given parameters 5
4.2.3 Find matching objects 5
4.2.4 Find object(s) in a given area 5
5. Risk Analysis 6
6. Ethics 7
7. Conclusion 8
7.1 Benefits to users 8
7.2 Benefits to me 8
7.3 Future Works 8
8. References 9

ii
1. Introduction
1.1 Problem definition
What is Gorgon?

Gorgon is an open-source, free to use Game Engine and aims to be a easy, reliable and fast.
Gorgon Game Engine lacks some capabilities such as 2D Map Rendering capability. This project
will add that capability to Gorgon.

Gorgon doesn't have a standard for maps and neither aims to have a standard map system. It
aims to let's their user to decide. Users should be able to load from a JSON file, or an image or a
.txt file. Users should be able to decide. After users provide the necessary data to Gorgon, map
should be loaded and directed to rendering pipeline.

1.2 Goals
This project is going to help the game developers that are going to use the Gorgon Game Engine
load and manipulate their maps and objects on that map. This system should be generic enough to
support multiple map types.

User-friendly Interface: This projects top priority is ensuring an easy to use interface for
developers that are using the GGE.
Freedom of choosing different map types: Developing a system that is flexible and
adaptive enough to support multiple types of map styles such as Tile maps, Isometric maps
and etc.
Layer ordering: Layer ordering is a determination process that allows users to design maps
more intuitively. System going to automatically order the layer for rendering.

1
2. Literature Survey
There are multiple choices when it comes to game engines. And most of them supports
implementing different map styles.

Unreal Engine
Unreal engine is a game engine developed by Epic Games and free to use. The game
engine gives their users to ability of developing games with ease. Has templates for
different game types and has an a large marketplace for user developed assets and
plugins.
Unreal Engine supports both 2D and 3D graphics but we are going to talk about it's 2D
aspects.
Unreal engine let's their user to load a saved map [1]
Also supports height maps to generate or shape a given structure. [2]
Unreal engine does support importing levels from JSON. [3]
Unity
Unity is a game engine developed by Unity Technologies Inc. and free to use. Like
Unreal Engine gives their users to ability of developing games with ease. Also has a
marketplace and community support for user developed assets and plugins.
Supports both 2D and 3D graphics.
Unity let's their user to load a saved map. [4]
Godot
Godot is a game engine developed as an open source project under MIT license. Godot
is free to use and has cross platform support.
Godot supports 2D and 3D graphics
There's 3rd party application and assets to load maps from outside[5][6]
Note that this given application and asset are example. The game engine doesn't
support outsourced map. Map should be designed in it designer or if designed in any
other designer should be translated to it's map styles first.

Both Unreal Engine and Unity doesn't support outsourced maps unless they are
configured/translated to their supported file types. Unity has some support for 3rd party level
designers but it's not generic and limited.

Gorgon aims to have a support for a generic system which will allow users to load any kind of map.
This where GGE going to do different than other Game Engines.

2
3. Background Information
3.1 Required Software
g++ Compiler
GNU Compiler Collection's C++ compiler. It's fast and has extensions we require to
compile this project.
Visual Studio Code (Linux Only)
This code editor helps us to develop things faster thanks to LLVM extension and CMake
extension. We can build, debug and test the module.
Visual Studio Community (Windows Only)
This IDE helps us to develop things faster thanks to Intellisense and it's builtin compiling
and debugging tools.
Gorgon Game Engine
Gorgon Game Engine is an open-source, free to use Game Engine. Gorgon aims to be
a easy to use, reliable and fast game engine.
Gorgon Game Engine is the target of this module. The module aims to run with it as a
part of it.
This game engine aims to be used easily so module it self must be provide ease of use
too.
CMake
CMake is an integral tool for automating the building process and creating universal
building scripts.

3.2 Other software


Target operating system(s)
Linux
An open-source and popular operating system with community support.
Windows
Microsoft's operating system, used by billions of users globally.
Tiled
Tiled is a free and open source, easy to use, and flexible level and map editor.
Tiled supports multi layered maps and levels and can produce files for supported Game
Engines.

3
4. Modules
There will be 1 main module and 3 sub modules in this project. Main module will not have any
function but to call sub modules and act as an interface for them. Note that this modules are not
end modules and number of modules or the aim of the modules provided can be changed in the
later states of development.

4.1 Map Rendering


This library is the container for map rendering/loading modules
Module tree:

Map Rendering

Map Loading module Layer loader Object loader

4.1.1 Map loading module

The main module will be the module going to translate the given map to the our inner structure.
This module will take a map and it's information and going to translate it to a structure so it can be
sent to rendering pipeline.

4.1.2 Layer module

The layer loader module will determine layers on top of the map. Module will analyse the layer info
and translate the place the given resources on top of map making it more of a complete type. Also
this module will decide if a layer should be rendered at a given position or not making it more
optimized to use.

4.1.3 Object module

The object loader module is the final module and always going to be run after the other two is
done. This module will load the objects on their relative spaces in the map. Also this module is the
one that is going to determine if an object is passable or not.

Modules are going to be generic enough to support multiple types.

4
4.2 Algorithms
This library is the container for algorithms going to be provided by Gorgon.

Algorithms

Path finding Find an object with given parameters Find matching objects Find object(s) in a given area

4.2.1 Path finder module

The path finder module aims to find the most efficient way to travel between a start and an end
point. Module will have support for different map styles and different algorithms for those map
styles. (i.e A* algorithm[7])

4.2.2 Finding an object with given parameters

This module/function series will take series of parameters to find an object in our object structure.
So dynamically created objects can be determined later and accessed by user.

4.2.3 Find matching objects

This module will take advantage of other algorithms (4.2.1/4.2.2) to find a matching object and
determine if they succeed given parameters.

4.2.4 Find object(s) in a given area

This will help the user to find an alter or use the objects in the given area.

5
5. Risk Analysis
Project has very low-risk due to clear requirements and solo development. In-depth analysis
shows the potential risk is time limit (the probability of being late) and some non-functional risks. Of
course while planing ahead being careful should be a priority.

5.1 Time limit


Time limit is the primary and an actual risk. Illness or other disruptions may prevent me from
making progress and might cause block in the development.

5.2 Non-functional risks


Ease of use

Ease of use is the most important requirement of this project. The current capability of Gorgon
Game Engine allows users to load map data, but the process is complex and demands a good
understanding of the engine's capabilities. Not being clear enough is a big risk of course.

Reliability

Also an important requirement. Unreliable software can lead to extended development cycles. Also
since the users of the game engine didn't build it, it will take more time for them to understand the
bug(s) and error(s) and going to lead to more difficult fixing process.

6
6. Ethics
Ethical considerations of this projects are close to none. It may prevent some users of the GGE
from learning the algorithms used. But the project is clear from ethical issues.

7
7. Conclusion
Gorgon Game Engine's vision is being a free to use and easy to use Game Engine that allows
their user to develop games faster. The module respects that vision and aims to be a easy to use
and generic system to give users freedom of choosing their development style.

7.1 Benefits
Benefits to users

This project will help users to efficiently load their maps with associated objects and going to
simplify the development process.
Another benefit of this project is giving the freedom to choose any map editor and style to
users of GGE.

Benefits to me

This going to help me to understand how different algorithms works and how I can
generalize things with programming. Also this project going to give me insights about game
programming and map generating.

7.2 Future Works


Gorgon Game Engine may have a level designer, map editor and assets configurator in the
future.
Also a builder, and init system to init and build projects easier and faster.

Note these are not promised features. These are future possibilities. Not part of the main
project.

8
8. References
[1] https://docs.unrealengine.com/5.3/en-
US/API/Plugins/DisplayCluster/UDisplayClusterGameEngine/LoadMap/
[2] https://docs.unrealengine.com/4.27/en-US/BuildingWorlds/Landscape/Custom/
[3] https://forums.unrealengine.com/t/importing-tile-maps-from-tiled-as-json/301118
[4] https://docs.unity3d.com/Packages/com.unity.addressables@1.9/manual/index.html
[5] https://godotengine.org/asset-library/asset/250
[6] https://doc.mapeditor.org/en/latest/manual/export-
tscn/#:~:text=Godot%204%20revamped%20its%20TileMap,Tiled%20To%20Godot%20Export%20
extension
[7]https://en.wikipedia.org/wiki/A*_search_algorithm

You might also like