finished projectvtd page

This commit is contained in:
Scott-G-GD 2022-11-16 21:05:50 +01:00
parent 37f3305a5b
commit c1f61c638b
4 changed files with 59 additions and 3 deletions

BIN
assets/tower-vr-cover.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

View file

@ -33,6 +33,16 @@
For school my projects are mainly in Unity with programming in C#, though recently I have gotten opportunities to work in Unreal Engine 5 with blueprints and C++ which is rather fun. For personal projects I like working in C or C++ depending on the project's complexity.
</p>
<div class="project-grid">
<a class="internal" href="projects/hlo-projectvtd.html">
<div class="project-card" tower-vr></div>
<div class="project-labels">
<p>unreal engine</p>
<p>team</p>
<p>hlo</p>
</div>
<h2 class="project-title">Tower VR</h2>
<p class="project-card-role">C++ Programmer</p>
</a>
<a class="internal" href="projects/ruins-of-edis.html">
<div class="project-card" ruins-of-edis></div>
<div class="project-labels">

View file

@ -11,7 +11,7 @@
</div>
</head>
<body>
<h1>VR Tower Defense</h1>
<h1>Tower VR</h1>
<section class="project">
<h2>Info</h2>
@ -21,10 +21,15 @@
</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 builds towers by drawing patterns on a magic circle.
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>
@ -32,7 +37,44 @@
</p>
<h2>Code</h2>
<div indented>
<h3></h3>
<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/Scott-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/Scott-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/Scott-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/Scott-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/Scott-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/Scott-G-GD/portfolio-code-highlighting/main/vtd-spell-orb-c.html");});</script>
</div>
</div>
</div>
</section>
</body>

View file

@ -74,6 +74,10 @@
background-image: url('../assets/gml-tile-movement-cover.jpg');
}
.project-card[tower-vr] {
background-image: url('../assets/tower-vr-cover.jpg');
}
.project-labels {
margin-top: 20px;
}