Week four started to see an interactive product come together and so I began work on scripts that would allow designers a modular approach to modifying existing prefabs when designing level sections. This week, I worked on generic scripts that would allow an object to float on any given axis with adjustable speeds and distances. This component was simple to create, so I then built upon the concept by implementing a check which halts the objects movement only when collision with the player occurs in the axis of movement specified, in a MovingPlatform class, as this feature is specific to moving objects that the player will use as surfaces.
The method of checking the angle of direction is implemented by using the global hit direction of a raycast generated from the collision, and checking this against the member variable for the movement axis -
I also create a basic pickup script that would serve as the base class for any future pickups implemented. This was tested by combining it with a moving object script on a temporary object and creating simple prefabs that would eventually become the coin pickups -
I also began work on implementing a more advanced jump mechanic but encountered some drawbacks in team communication. Ideas for the jump mechanic were not being properly conveyed to the entire group and as such I had several mechanics put forward without getting confirmation that it was the final say. On top of this, the ideas, ranging from a single/double jump to a three-tiered landing-rythm based jump boost, were often agreed upon, and after some days of implementation, were tested and then decided to be unfit in comparison to another idea without much justification.
While this can be a little frustrating, it should be expected by a games programmer that many implemented/prototyped features may not make it into the final product, and so it is important that a professional programmer while putting high quality effort into his/her work, should remmeber not to be personally attached and sacrifice the quality of the game just to ensure that their work is seen by the players at release.