- Car movement script working more realistically.
This week, I worked on getting the deletion script. It now removes everything I want it to from the scene. Now, all I have to do is set it back an adequate distance, and it will delete everything behind the truck that I need it to, reducing the strain on Unity, as there is an issue that after a while of dropping into the void, objects gain such high values in their transform that it crashes. I also worked a bit on the car movement script, though I didn't make much headway into making it realistic movement. Next week:
- Car movement script working more realistically.
0 Comments
The project is going great. I've been setting goals for myself, and I've been achieving them with my own skills. Be it coding, rendering, modeling, I've been able to power through and solve problems myself, and while my methods might not be the best, most streamline in the world, they work, and that's what matters. This project is going to prove that I know in ins and outs of every step of the game design process, and that is going to go a long way in the game design industry. Once it's done, I can add it to my portfolio, and actually have a fully fleshed out game to point to when people ask "Why should we hire you?". And honestly, I'm excited to see the final project. I've still got a long way to go, and the final project probably won't be exactly what I imagine it will be. Though, I will admit it's extremely satisfying to have everything exactly how I want it to be, and only settling for changes when I realize I genuinely just can't do what I set out to do, instead of having other opinions (as much as I should probably be asking people for those).
This week I got random cars to spawn, including an edited truck asset. However, to do this I had to change their tags, and this made what little of the deletion script I had stop working. I'm currently working on trying to get that to work. I also tried to make a duplication script for the terrain, which did NOT work. In fact, it crashed unity so hard that it took 2 hours for it to unfreeze long enough for me to close the program. So, I'm going to have to look over that script quite a bit before I try and run that again. It didn't even do anything, it just ran for a single frame before just breaking everything, and it wasn't even supposed to do anything in that one frame. I think it tried to instantiate multiple pieces of terrain at once. Oh, and the enemy trucks that I've been instantiating have been changing their trailer height with the player truck, and as I'm writing this I realize that that script is applied to the trailer itself, instead of the asset as a whole, so it makes perfect sense that would be happening and I just need to delete the script from the trailer. Overall, lots of problems, but the random cars are fun. Next week:
- Deletion script - Terrain duplication that doesn't break everything This week I got the bridges to spawn at random heights along the road, although they still choose only from int values instead of doubles, so their choices are limited. I also placed limits on the stretch of the trailer, so you can't go into the negatives nor go up infinitely. I also played around with the wheel values, and made them much more realistic, making the truck easier to control. I also worked on a deletion trigger that currently gets rid of cars as they go through it, but will eventually delete bridges and buildings as well. This will help these computers run the game better, though I'm still worried about implementing the buildings. Unity just really doesn't like them for some reason. Anyways, getting different colored cars to spawn is going to be a tad difficult, but I don't think impossible. Will just have figure out how to instantiate a random prefab out of a selection. Next Week:
- Deletion script deleting more - Random car colors - Maybe instantiate buildings. This week I made a lot of progress, mostly due to basic programming finally clicking. I managed to hammer out a few basic scripts that have let me actually implement some of the key game mechanics of the game. Right now, you can change the height of the truck, though I need to put restrictions on this as you can make it infinitely high and give it negative values, the car obstacles spawn and drive down their lane, and I'm currently working on a script to make the bridges spawn at random heights. I had to edit the prefab a bit for this, so that I only have to move the object in the Y direction rather than change the stretch in the script. I also decided that the camera script I downloaded was too complex for my purposes, and wrote one myself that just holds the camera a certain distance behind the truck. I'm actually really excited that coding is starting to make sense, as the difference between types, bools, integers, and the different parameters starts to click. I certainly can't do anything particularly complex, but it will serve my purposes for now, and that's all I really need. Next week:
- Get the bridge script done - Get different color cars spawning - UI work |
AuthorI am 17 years old, and currently enrolled in Durham School of the Arts. Within the Game Design field, I'm looking to become a game writer or a programmer, preferably a combination of the two.
The views and opinions expressed in this blog are solely those of the author and do not represent those of Durham School of the Arts or Durham Public School Archives
June 2018
Categories
All
|