Another learning
outcome I have been working on is around making a API wherein I decided to make
a dll file , the reason I chose a dll file was because this is something new to
learn and it is a good way to protect my code from being used by unauthorized users
.
To start off on
learning how to make a dll, I started with looking at lots of guides but
noticed a lot of them were not using monobehaviour which is something I needed
to run my steering behaviors as they use man classes found in monobehaviour
such as transforms and vector3.
After some
assistance from my lecturer I have been able to find the right resources and
start working on the dll itself but more things are yet to go wrong as a life
of a developer constantly revolved around the concept of one step forward and
two steps back.
I started working
on my dll file in visual studio 2017 community edition with the target being the
highest version of dotnet which is 4.7 , the latest version at the time of
writing this post . After moving my existing code , I made the changes needed
to my steering behaviors , this included decoupling the code from the existing
parameters specified in the script by adding arguments to each behavioral state
instead . A step I skipped to mention was that I needed to add the unity dll to
the references in order to gain access to the unity based classes such as
vector 3, game objects etc.
For my spatial
portioning paper I am almost done, all I need to do is add a real world example
of a project where spatial portioning was used to improve performance along
with some basic pseudo code explanation to finish the paper and be done with
the submission.
A small bug I
discovered in our game was with in regards to collisions where in the
projectile the player fired would sometimes go through walls, this was
something very simple to fix by setting the rigidbody Collison detection to
continuous and interpolation to extrapolate. The problem was that the
projectile was going very fast and it would go through objects in between
frames, this was because the rigidbody settings were set to discrete which was
not able to predict the movement of the projectile in-between multiple frames.
Another minor bug
we had was with collisions where in the player object would go through walls
when it rotated in a corner which can be seen in the picture below.
The reason we had
this problem was because each child of the player object such as shields and
our barrel had a rigidbody and thus was detecting collisions with each
individual child rather than the object as a whole , to fix this we moved the
rigidbody to the object that all the items were chided under which fixed the
problem .
Now that we have
fixed most bugs, we will be preparing to publish the game for windows &
android which is out exotic platform for this semester but we will be doing
more bug testing before we do proceed to make sure the game works as is intended.
Comments
Post a Comment