Devlog 1
Project B » Devlog
Preamble
In this project I went through Scripting tutorials 1-4. First two were originally meant for the Project A, but since I've made my own game for that this year, I made sure to follow through just to make sure I am on the same page - that's why I will comment on those experiences in this devlog as well as on those brought with the 3. and 4.
Also, during the writing of this project, my keyboard had an accident including broken table-slides, since which it's "i" key does not work properly, so keep that in mind if there is an "i" missing randomly throughout the text.
- Activity
- Throughout the first tutorial, I've added a shooting mechanic and multiple variants of bullets. During this, I discovered new approaches to altering prefabs (Variants), getting input from player and Implementing basic collisions and physics for fired shots.
- In second tutorial, I've made the collapsible column react to fired shots in a believable way. I quite enjoyed experimenting with physics while doing so.
- In third and fourth tutorials, I managed to add a pickup powerup, make it give main character a status effect, provide cooldown for picking it up repeatedly, animate it and give it a sound effect on pickup
- Notes
- Here I'll talk about my deviations and general thoughts about the steps the walkthrough made me go through
- Variants are really cool way to bring variety really easily, without the need of making adjustments to prefabs, or creating multiple prefabs.
- Getting input using GetKey() seems oddly obsolete to me - I believe there is a new official way of handling input using UnityEvents, which I used in my previous project and quite liked. I understand the ease of implementation of the first approach, but I would like the new way at least mentioned during the walkthrough.
- While implementing the shooting mechanic (spawning bullets next to player character), I quite hated the way the movement and bullet spawnpoints of main character were made. I think that rather than deciding on the direction facing and spawning bullet on a given spawnpoint with sprite flipped or not, it would be more elegant to have just one bullet spawnpoint (as long as there is no mechanc for shooting behind us) and flipping the transform.localScale.x on main character whilst moving. That way, every child object will flip too and we could use this to spawn properly facing bullets inherently. This also eliminates the need to set the collider to the middle or along the whole sprite (of the bullet) so it works for both sprite flipped or not. If I flip the localScale.x, the collider flips with it, so I can properly collide just with the core of the bullet, not the tail. I am still to find a benefit of not doing it this way and I assume that such approach was chosen for the simplicity and not cluttering the tutorial project with "techy hacks / optimizations"
- I also didn't in the end keep the implementation of "random" bullet variants shot - I made them change with R key to properly test the size of the bullet reacting with physics of collapsible column
- Making stuff react to fired shots was SO SATISFYING
- The pickup powerup was interesting - I spent so much time trying to stick more (and more interesting) arguments into functions that are then passed as UnityEvents and are Calling the private Coroutines. I'm still not sure if it just does not work or if I did something incorrectly - public functions with more than one argument or argument of type e. g. Color just... didn't appear at all in the inspector to choose in the first place.
- Animator is even more versatile than I thought while using it in this year's project A
- Why, for the love of god, would we put the health pickup SFX in the middle of repeating animation that does not require any interaction? I might've got things wrong, but in the case I didn't, I would like to specify that I, instead, put it into the idle animation and unticked the "loop", so it plays just once while waiting for it's collider to enable again. Hence it plays just once after each pickup.
- I came across an interesting bug, when I was using Unity.VisualScripting.ColorUtility.WithAlpha() extension method througout the development (to change the alpha of the pickup), but it couldn't build after I was finished with the project. In the end I just wrote my own private Color WithAlpha(Color, float) function instead, but I find it odd that it workes while working and claims it being unknown while Building the project. The Unity.VisualScripting was properly imported using "using" of course.
- Invested hours
- Not much really - Thanks to the experience I've gotten during the first project challenge, I managed to squeeze this whole shebang into just few hours and often picking up early what is about to happen and doing it before getting to it in the walkthrough. Due to that it is quite difficult to split the hours as precisely as last time, but I'm really confident that I spent:
- ~ 3 hours on Walkthroughs 1 & 2
- ~ 3 hours on Walkthroughs 3 & 4
- ~ 1 hour on this Devlog
- Bonus: 4+ hours on trying to properly setup Microsoft Arduino extension for VS Code, which I wanted for entirely unrelated project, but it kept me postponing starting work on this GameDev project until 3AM this morning, so I felt like it is important to mention.
- For anyone interested, >Arduino:initialize VS command breaks if you have diacritics in your username on Windows
- Not much really - Thanks to the experience I've gotten during the first project challenge, I managed to squeeze this whole shebang into just few hours and often picking up early what is about to happen and doing it before getting to it in the walkthrough. Due to that it is quite difficult to split the hours as precisely as last time, but I'm really confident that I spent:
- Outcome
- Quite a few new skills and knowledge regarding scripting and development in general
- New points of view for decision making in development process
- Project B hopefully up to your standards and liking.
Files
Game4.zip 88 MB
Apr 08, 2024
Get Project B
Project B
This is second homework project from summer course of Intro to GameDev on MFF UK
Leave a comment
Log in with itch.io to leave a comment.