We are now diving head first into the more complicated script that were made for this game jam.
These are the variables used in the script. In the public ones we have a value for timing the spike changes. Then we have a string to identify what the tag the player has on it is. we then have a value for how much damage we deal to the player and a timer value that is not really used in the final version of this. We also identify the player and the spikes to make sure we can change values on them. The last public value is a value to tell how long we wait for the spike to activate.
In our private variables we have two timer values used for resetting timers. and two booleons, the second of which stopped being used towards the end, the first tells us if the spikes should be up or not. We also have an integer which helps to stop values switching too much.
In the start function we set the timer values that we use as constants later and we set a value to false that we don’t use in the final version.
This update function is a large one that could use some explaining. At the start we let our delayed start timer count down and when it hits 0 the rest of the script can go. after it hits 0 it starts the timer for the spikes itself and when that timer goes to 0 we set i to 1 and switch the spikes between on and off depending on what it was on previously and reset the timer. When the spikes are active we make them have collision however they are a trigger when they are inactive
In this part we test for if the player collides with spikes and if it does then we access a part of the players script which is an open void that lets us apply damage to the player. We also tell the script that the player is trapped however this wasn’t part of the final product.
We are still on the simple scripts with this one. In this blog post we will look at how the player moved in my Ludum Dare 40 game.
These variables are reasonably simple, we take a power value that will later be set and used to determine how fast the player moves. We also find the rigidbody that we need to make the player move.
In the start function we simply take a value from another script and set the power variable to be equal to it.
The move function is where everything happens in the script. We find the direction the player is moving in by using the axis’ that unity provide for us to access. We then take this value and multiply it by the power from earlier to give us a value we use for our velocity. We then take this function and call it in the update function however since it is the only thing in the update function I won’t cover it here.
I will be making a series of blog posts describing how my game for ludum dare worked by explaining the scripts I contributed for the game. To start I will be showcasing the simple scripts and working up to the major core ones.
These are the variables used for this script, these are both selected in the engine and one of them just needs to identify the player and the other will keep a certain distance away from the player to simulate a camera following the player.
In this Update function we make the position of the camera equal to the players except the Y value has the camera distance added to it so that it will keep a distance from the player and we set this every frame.
I have recently completed my imagined worlds and overall I enjoyed the whole project. The teamwork from Matt and Scott made the project smooth and easy and together we managed to work through most problems we encountered however we had some problems getting some things to work which taught me that I need to place objects into the full scene as early as possible to make sure that it works.
This is the feedback my lecturers gave me and overall I can agree with it, there was some problems with the camera like they said as it was jarring in the way it moved around the room and this proved to be a problem with the project in the end and our fire sound effect was off from what the visual was making it weird for viewers of the project but overall I am happy with this project having gotten a Distinction for it and I look forward to my next one.
Overall I am happy with this product as we started it with an art style in mind and I feel like I have successfully hit that art style. The post Processing we use also helped as it made the shadows look nicer as well as color correct to have everything look as good as each other. Technically, I ran into some problems throughout making this such as the substance file I initially used for this had been corrupted in saving however thankfully I had plenty of time to remake the textures so it wasn’t a problem. There was also a problem with the normal map where the handles baked onto the cauldron which I think is a setting I missed within Substance when I baked it however you can’t see it thankfully.
I would probably think more about how it would be animated and how it would look after post processing as this was items I gave little thought to this time however thankfully it worked it but it may not work as nicely in the future. I also didn’t learn about Unity’s post processing effects until the middle of this project so that is something new I can test my objects through in the future.
I have completely textured my model now and I’m quite proud of the final product as it looks quite nice both in substance and in unity. One thing I would do to improve this is have the UVs have more bevels in to make the model itself a lot smoother looking as it can be jarring to see, also currently in the scene you can see it fall into place which we will be covering up with a visual effect so it won’t be as distracting.
Whilst my pre-production documents are quite simple. This is all I need to be able to know the direction. In the top image I identified the model, the components that were apart of it and the materials I would use in it. since I drew this, we have added a green plane with an emission and particle effects to add to the feel of the cauldron which overall makes the model better.
On the bottom of this page I have described the ladle used in the model, whilst I modeled and textured it, it was animated by Matt from my group so I can’t take credit for that bit.
I have participating in this game jam. The theme this time is the more you have the worse it is and to complete this my group will be making a game where you have to collect keys to progress however the keys will make the character weaker or hurt the character in some way so that your progress is also hindered by them. This will make a challenge for the player where they need to be cautious about when to get keys and whether or not they need them to progress.
My project that I will be working on in my own time is a twin stick shooter where the player will have power ups that they can use to help take down enemies or to maneuver around them. This is still in early stages of development however there is still plenty to show about it.
These are the variables that are used for this script, as you can see there is a lot to them so I won’t go to explain them. Most of them are used for calculations or timers or as you can see there are some sliders identified there at the bottom which are the visualization of whats happening on screen.
This is the start function that does most of our calculations that we will use for the later scripts. The first 2 lines are for the players speed. It remembers the original power and creates a new value that is twice that of the normal speed to be used when the player speeds up. Next is the timer which just sets the timers max value for use later. The next few lines are just managing our sliders by giving them max values and making both the shield and the timer slider invisible until they are used later on. There is also a bonus HP value which helps determine whether we are taking away from the shields or normal HP. There is also a value for how much damage is dealt however this hasn’t been completed yet.
This is a normal timer that determines how long the player has a power up. This one only works for speed right now as shield and HP don’t need timers and attack is incomplete as of me writing this. The speed timer only counts down and sets the values back to their original when it is done. This script also handles the slider to give the player a visual representation.
This is just a basic script that finds out if the player hits an enemy and does half damage to the player which is a choice we made so that the player doesn’t take or deal too much damage from collisions when compared to shots. This script also determines whether or not the player should take damage to their shields or their health, shields take damage first and transfer left over damage to the health.
This script determines what happens when the player hits the tokens that will give them upgrades. As it is right now it will just set values to be true that are needed for the player to use an upgrade and this will affect other areas of the script that will allow the player to use them.
This function is a movement script that I have used before so I won’t go into too much detail explaining it.
These next 4 functions handle the upgrades the player can have. For the most part they just set values to be true or add HP or activate sliders used for visuals so these are pretty simple and shouldn’t take too much to understand.
Now for the biggest function in the script. The update function handles most things such as keeping the sliders correct with the current HP and shields. This also calls the movement and the timer once a frame to make sure that they work. It also checks if the player presses E in which case it will check which upgrade the player has and call the relevant function for the player to use.
Overall, I’d say that the teamwork that has been happening within my group has been reasonably good so far.
Thus far, Matt has been taken a role in updating the asset list and the burndown chart as well has tackling the pre-production and a large part of the modelling and so far this has been very helpful and will prove to be so at the end of the project as without his work the project will seem empty and unorganized. He also always tries to help in any area that he can which helps build towards the overall completion of our project.
Scott has been helping me with the coding side of this project and whilst there may have been a lot of stress and trial and error, we have managed to work through every present problem with our code to make working products all around. He has also contributed towards modelling and texturing.
Overall, the team work has been really good and continues to be consistent throughout and I look forward to continuing work on this.