#5 | 2023-06-08 | Traps!
Hello!
Making the traps for this game has been a fun challenge. So far, there are 7 (technically 8) traps. Each one is unique and based off of things you would find in a factory (except for the spike and probably the acid barrel).
(You may have noticed that I love using tables)
Making the spikes was very simple and one of the first tiles I made. To make them have a collider, I added a Tilemap Collider onto the grid layer the are placed on.
I quite enjoyed making the Rotary Saws. To make them spin, I used a Hinge Joint 2D component. It was as simple as changing the motor speed vale to 1500 and checking the "Use Motor" box. One day I might make tutorials on this stuff.
To make the saw move back and forth, I wrote a script that makes it move between to points with variable speed. This will make for interesting trap layout in the levels.
The Machine Press/Hammer was an interesting challenge. I had to make use of a looped coroutine and accessing a Rigidbody2D's gravityScale to make this work.
Looping the coroutine was surprisingly easy. All I had to do was create a "while(true)" statement and write the function's code inside of it. One of the cool things about coroutines is that you can create a delay between lines of code being run with "WaitforSeconds". To set the hammer after it fell, I set it's position to that of the parent object minus the "hammerStartPos" Vector3.
I have yet to figure out how to make the drill, furnace, conveyor belt and the acid barrel. I'll come back to those later as the traps I've made so far should be sufficient for the first few levels.
Thanks for reading and stay tuned for the next blog!
Get Factory of the Damned
Factory of the Damned
2D Side-Scrolling Platformer!
Status | In development |
Author | Ice Diamond Studio |
Genre | Platformer |
Tags | 2D, Puzzle-Platformer |
More posts
- #27 | 2024-01-20 | Project EndJan 21, 2024
- #26 | 2023-09-24 | Beta v1Sep 24, 2023
- #25 | 2023-09-16 | New TrapsSep 17, 2023
- #24 | 2023-09-03 | Scaling Down DevelopmentSep 04, 2023
- #23 | 2023-08-25 | Development RoadmapAug 25, 2023
- #22 | 2023-08-24 | Alpha v2 ReleaseAug 24, 2023
- #21 | 2023-08-16 | Major Code OverhaulAug 16, 2023
- #20 | 2023-08-13 | PSAAug 14, 2023
- #19 | 2023-08-01 | Major Code OverhaulAug 01, 2023
- #18 | 2023-07-31 | Major Code OverhaulAug 01, 2023
Leave a comment
Log in with itch.io to leave a comment.