82 lines
5 KiB
HTML
82 lines
5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Project VTD - Sara Gerretsen</title>
|
|
|
|
<script type="text/javascript" src="../shared/jquery.min.js"></script>
|
|
<link rel="stylesheet" href="../shared/style.css">
|
|
|
|
<div id="site-header">
|
|
<script>$(function(){$("#site-header").load("../shared/header.html");});</script>
|
|
</div>
|
|
</head>
|
|
<body>
|
|
<h1>Tower VR</h1>
|
|
<section class="project">
|
|
|
|
<h2>Info</h2>
|
|
<div indented>
|
|
<p>Project Type: Unreal Engine VR Game</p>
|
|
<p>Project Timeframe: 2022</p>
|
|
</div>
|
|
|
|
<h2>Video</h2>
|
|
<iframe
|
|
src="https://www.youtube.com/embed/BtUpfEFvFr4?mute=1&loop=1&autoplay=1"
|
|
class="embed" youtube>
|
|
</iframe>
|
|
<!--BtUpfEFvFr4-->
|
|
|
|
<h2>Product Overview</h2>
|
|
<p indented>
|
|
A VR tower defence game where the player can fight enemies with their sword, or build towers by drawing patterns on a magic circle.
|
|
</p>
|
|
<h2>Project Overview</h2>
|
|
<p indented>
|
|
The game was made at a 'Hybride Leeromgeving' (Eng: Hybrid Learning Environment) or HLO. Which gives students the opportunity to work in an environment closer to that of a professional game company. The game was made with a team of five programmers and one artist.
|
|
</p>
|
|
<h2>Code</h2>
|
|
<div indented>
|
|
<h3>Tower Selection</h3>
|
|
<div indented>
|
|
<p>
|
|
One of the mechanics I was responsible for was the tower selection circles. The code calls them spell circles as they were initially supposed to cast spells.
|
|
Spell circles spawn a pattern of orbs with colliders, these orbs have their own logic to send a message to a 'spell map' contained within the spell circle.
|
|
</p>
|
|
<i>spell circle - interface declaration</i>
|
|
<div id="spell-circle-h" class="code-content code-box">
|
|
<script>$(function(){$("#spell-circle-h").load("https://raw.githubusercontent.com/Sara-G-GD/portfolio-code-highlighting/main/vtd-spell-circle-h.html");});</script>
|
|
</div>
|
|
<i>spell circle - implementation</i>
|
|
<div id="spell-circle-c" class="code-content code-box">
|
|
<script>$(function(){$("#spell-circle-c").load("https://raw.githubusercontent.com/Sara-G-GD/portfolio-code-highlighting/main/vtd-spell-circle-c.html");});</script>
|
|
</div>
|
|
<p>
|
|
These 'orbs' all know their own index within the spell circle's list of orbs. When an orb is hit, it sends its own index to the spell map component of the spell circle. This number is then converted to a string and appended to the spell map's pattern string. Because of the way the system works, only 1 digit indexes are used, though the code does not enforce this.
|
|
Whenever a new character is added, the spell map compares the formed string to a list of 'correct' patterns.
|
|
If the string produced after the last addition does not match a substring of the same length in a 'correct' pattern, the pattern is considered failed and the corresponding event is triggered.
|
|
When the string produced is equal to a 'correct' pattern, the event signalling a correct pattern is triggered.
|
|
Because a large part of the team prefered working with blueprints, a lot of the C++ architecture was designed with an eye on its blueprint interface. This lead to some odd decisions regarding the "success" event, as blueprints were unable to interact with the map of delegates to patterns that was used in the initial version of the spell map (hence the name).
|
|
</p>
|
|
<i>spell map - interface declaration</i>
|
|
<div id="spell-map-h" class="code-content code-box">
|
|
<script>$(function(){$("#spell-map-h").load("https://raw.githubusercontent.com/Sara-G-GD/portfolio-code-highlighting/main/vtd-spell-map-h.html");});</script>
|
|
</div>
|
|
<i>spell circle - implementation</i>
|
|
<div id="spell-map-c" class="code-content code-box">
|
|
<script>$(function(){$("#spell-map-c").load("https://raw.githubusercontent.com/Sara-G-GD/portfolio-code-highlighting/main/vtd-spell-map-c.html");});</script>
|
|
</div>
|
|
<i>spell orb - interface declaration</i>
|
|
<div id="spell-orb-h" class="code-content code-box">
|
|
<script>$(function(){$("#spell-orb-h").load("https://raw.githubusercontent.com/Sara-G-GD/portfolio-code-highlighting/main/vtd-spell-orb-h.html");});</script>
|
|
</div>
|
|
<i>spell orb - implementation</i>
|
|
<div id="spell-orb-c" class="code-content code-box">
|
|
<script>$(function(){$("#spell-orb-c").load("https://raw.githubusercontent.com/Sara-G-GD/portfolio-code-highlighting/main/vtd-spell-orb-c.html");});</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</body>
|
|
</html> |