Update for New Project (Scripting Edition)

New week, New day, New Project. Starting getting work on the new project done, an assembled sound library out of the way and some placeholder art placed into the Unity Engine and fiddled around with to test the paralax effect Richard had worked on. I was scripting the trigger for our Shadowy Figure to move off screen, working with an OnTriggerEnter2D (OnTriggerExit is where I’m leaning towards now, allowing the player enough time to see the shadowy figure) which was new for me, it involved some special things to work but due to the movement written by Richard, the player controller would move the world around the player rather than the player around the world. So moving a basic cube off screen proved difficult when nothing would move on the x axis unless it had the scrolling script attached (Which is not what we want). Having run into this problem, we’ve found that our player movement has to be rewritten, which puts a delay on the work for other mechanics. Due to time constraints for Richard we’ve had to give him the ASAP deadline for the new character movement, which we can live without for using Triggers, such as a trip wire and a mine, as well as the shadowy figure movement.

Having been handed some scripting to do for this project, it was much more akin to the first 2 week prototype in Studio 1. Gun Blaster Tank Ship Extreme 3, where I coded the RPG, working with instantiating and colliders on the enemies and player as well. Working with the mines, trip wires and the trigger for the 3rd prototype however was slightly different, as I’ve had more experience with coding from Gam111 (which I have been studying alongside Studio 1), it still proved troublesome because the entire game takes place in 2D, using sprites and 2D colliders, which require different code (slightly but it proved annoying to be missing a “2D” in the end of some code to get it to work. But for the issues I had, the major one was having the colliders trigger with one another, because of the simple change in code. As stated above a troublesome issue was the movement ‘broke’ the movement of any other object moving on the x axis. rigidbody2D.AddForce(speed,ForceMode.Impulse (speed set as a Vector 3 variable(Due to issues with the x axis not working, I tried changing to a Vector 3 instead of a Vector 2)) would not move the object on the x axis when the speed variable was set to 3,0,0, on the other hand though, swapping the numbers around to adding the force of the impluse to the y axis, pushed the block upwards (the way it should go) and it proved troublesome as to why it would move on one axis and not on another.

Richard then decreed that the movement system would not work for our game, considering the issues with such things like the shadow figure not moving and the mines not reacting the way we’d like, so its been scrapped for this project.

Condensed version of above for future reference;

Worked on some scripting for the third prototype, having not used 2D physics before it proved troublesome. Work on the RPG from the first prototype did not help the outcome of this trigger script for a simple 2D object to move. OnTriggerEnter2D was different and scary to use, OnTriggerExit2D fits the idea that we are aiming for anyway. The Movement scripts are being scrapped for something that moves the player rather than the background.

Some things I should consider for the future:

Allow more time for the project to go awry, such as the movement script needing to be rewritten, which puts a stop on the project and keeps other critical items from being worked on.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s