So some of you may have read my previous post about showing off our groups game at a local game dev meetup. It's now just over a week since the event happened so I figured hey! now is probably a good time for an update!
Overall the game gained quite a good response and got a large amount of attention and had quite a good response from everyone who tried it out. The interest the game gained was also a good chance for us to promote our end of year show and hopefully drive some traffic towards it for when it happens. The biggest plus of the night for me was not only seeing the game get such a good response from people but also seeing some of my programming in action. One of the main scripts I had created for the game was the camera script which follows the player around the screen and zooms out at certain times in order for players to get a full view of the room they are currently in. For me it was the first time I had more than just a couple of people experience using my code and see how they responded to it, at the same time it also helped me see that if this code was working as intended and people had no problems using it then maybe the code I have been writing in my tutorials will also have the same response?
In the next couple of weeks we'll all be working together to make our game, Ponder as good as it possibly can be before the end of year show on the 24th of June. I have quite high hopes for the game even despite the problems we've had during the games development. Everything seems to be going well so far, the gameplay is forming slowly and the game already looks absolutely fantastic, hopefully I'll have some more to post as well as maybe some footage after the event.
Alongside this project I'll also be continuing development of my own projects with the intention of displaying them at the end of year show, keep an eye out for more on those projects soon!
Showing posts with label gamedev. Show all posts
Showing posts with label gamedev. Show all posts
Sunday, 5 June 2016
Saturday, 26 March 2016
Unity C# Tutorial: Creating Checkpoints
Checkpoints are a commonly used game mechanic in pretty much all games and surprisingly enough they're a lot easier to make than you may think. Using Vector3,tags and triggers you can create a simple checkpoint system to implement in your game.
To start this one off you need to declare a Vector3 variable which will be used to store the location of the checkpoint. Open up your script and add in the code shown below.
Now you have the checkpoint set up open up your script again to add a new void, this new void will be an OnTriggerEnter void. This void will take care of storing the checkpoints position in the Vector3 that you created earlier. Add the code shown in the screenshot below underneath void Update.
To start this one off you need to declare a Vector3 variable which will be used to store the location of the checkpoint. Open up your script and add in the code shown below.
This Vector3 will be used store the position of the checkpoint when the player enters it. It will also be used to reset the players position when they die or are killed, depending on the type of game you're implementing this in. Next you need to set up the checkpoint. For the purpose of this tutorial I'm going to use a cube as the trigger.
![]() |
| The Red box will work as my checkpoint. |
Now you have the checkpoint set up open up your script again to add a new void, this new void will be an OnTriggerEnter void. This void will take care of storing the checkpoints position in the Vector3 that you created earlier. Add the code shown in the screenshot below underneath void Update.
This is almost all of the code you need to make the checkpoints work. Before adding the last bits of code you need to create a new tag, if you look at the if statement that you just added in the new piece of code you will see that the script will look for a "Checkpoint" tag whenever it enters a trigger.
![]() |
| Clicking the button highlighted in the box will open the drop down tag menu. |
![]() |
| This is the drop down menu that will appear after clicking on the tag option. |
From the second menu that pops up click on one of the empty boxes and type the word Checkpoint into one of them. Go back to the Hierarchy and select your checkpoint object and set its tag to Checkpoint by selecting the tag you just created from the drop down list. Now this tag is set scroll down to the objects Box Collider and make sure the Is Trigger box is ticked.
![]() |
| Make sure this box is ticked. It's key to making the code work. |
Now you have the main parts of the script setup and the necessary boxes ticked to make things work you need to add the last pieces of code. Open up your script again and add in the code shown below.
![]() |
| Final piece of code! |
Adding in this code now means that whenever the players Y position becomes less than 0 it will reset the players position to the same position as the checkpoint. Alternatively you can add the code shown below to make it so that when the player enters a trigger tagged as Death or Dead, essentially creating a death zone/barrier.
![]() |
| This code isn't necessary but still works as a good alternative. |
This is pretty much all there is to this tutorial! Let me know if this works or if you have any problems with this tutorial by contacting me on Twitter @markimo2 or alternatively leave a comment on this post. Also keep your eyes peeled for a video version of this tutorial.
Thursday, 28 January 2016
Experiment Blossoming Into A Game!
(Sorry about potato quality, yet to find a good video editor for free)
Earlier today I came up with an idea to try and make my own AI in the free version of Unity seeing as though it doesn't seem to feature any definite AI system. I started experimenting with the idea when I eventually made it to college and I couldn't seem to make the concept work. However all was not lost!
As my first attempt at making the system work included some input from the player I decided to try and make more of an AI behavior that would respond to the players movements. I set up a group of four cubes and went about creating the code that would then make the AI (The red cubes) move in response to the player. The more I coded the more I realized, hold on a sec! The more I code of this the more separate scripts I'm using. I quickly hit that idea on the head and switched to using Unity's tagging system to give each AI a tag and then have them only react to a certain bit of code which was all compiled into one script (With many many if statements!). After a while of writing the code fully and testing to make sure it worked I started to come up with a new idea to turn it into a completely new game.
For some reason I'm stuck on the idea lately of taking any form of power or attack away from the player, I'm not entirely sure why but I do think it gives the player a bit more of a challenge. I've started out with the basic idea of creating a score based game with multiple different types of AI that spawn in with the plan of once this main mode is down and concrete adding another "Challenge" mode with a variety of different tasks for the player to complete. I'm intending to add a few different characters as well to try and add a little variety to the game to keep players from getting bored (Check back for updates on that soon!).
This update ended up being a little longer than intended but hey! Trying to make these posts a heck of a lot more frequent so check back for more!
Subscribe to:
Posts (Atom)







