DevLog 2: Basic Level Blocking
Basic Level Blocking
This is the second devlog for my game, Agent X regarding basic level blocking.
Level Description
Figure 1: Example of a Level
The above picture represents how a level may look like in the game. Each level in the game has been manually hand-built. The basic platforms on which the player runs consist of multiple square sprites of varying sizes. The lower line kills careless players or enemies if they fall into the gap between platforms. To advance to the next level, the player has to reach the end of the level they are on (the example below shows the player going from Level 1 to Level 2).
Figure 2: Level Features
The above GIF displays the current features in a level. Some of the features that have been implemented include a player sprite that can shoot enemies, powerups that increases the player’s bullet damage, health pickups that increases the player’s health, and spikes on the ground that kills the player instantly on touch. One thing to note is that as of now, the enemies will be manually placed into the level individually without the use of a spawner system.
Implementation
Each square sprite for the level has a BoxCollider2D component attached to it to stop the player, enemies, and powerups from falling through the platforms.
Once the basic level was completed, I began to implement the powerups. Each powerup consists of a CircleCollider2D component – to enable collision detection, and a custom script – that determines the function of the powerup.
Figure 3: Health Powerup Sprite
The above picture illustrates how the health powerup looks like. For the health powerup, a custom script called “PowerupHealth” was created that detects when the player collides with the powerup, destroys the powerup icon, and references the “PlayerHealth” script to increase the player’s health by 1.
As can be seen in the GIF above, the player’s health increases by 1 when the player picks up the health powerup (look at the health system at the top left corner of the screen).
Figure 4: Bullet Powerup Sprite
The above picture represents the bullet powerup icon. This powerup was accomplished through a custom script called “PowerupBullet” that detects when the player collides with it, destroys the icon, and starts a timer that increases the player’s bullet damage by 1 for a certain duration. After the duration ends, the bullet’s damage is decreased back to its original damage.
The above GIF represents the player after collecting the “increase bullet damage” powerup. As can be seen, the player is able to kill the enemy faster – specifically with 5 bullets (trust me, I’ve done the math :P), as compared to the GIF below which takes 10 bullets to kill the enemy.
Figure 5: Spike Sprite
The above picture depicts what the spikes look like on a level. The spike has a BoxCollider2D – for collision detection and a custom script that destroys the player object upon collision.
As can be seen from the GIF above, the player dies instantly and respawns back at the start when they touch the spikes – oof!
Additional Features
Figure 6: Environment Effects
Added a foggy effect to the level. Besides that, dust particles emit whenever the player jumps.
Improvements
- Changing the bullet to not rely on velocity. This is because the bullet travels faster when the player is running in the direction of shooting, as opposed to the speed of the bullet when the player runs in the opposite direction of where he is shooting.
- Make particle systems such as blood spills when an enemy dies, or dust trails when the player jumps.
Feedback
Just some practical notes from me (applicable to everyone’s games) -- you may want to, in future iterations think about checkpoints or just some hidden cheat mode that lets me skip levels so that I can assess the whole game. If I struggle to make it past early levels and cannot get to later ones, you run the risk of me not assessing things like boss battles or more interesting/varied later levels — Lecturer's note
For this feedback, I will implement either a level option menu or design some sort of checkpoint system.
The second set of spikes is a little hard, but doable with a little practice. That second set of spikes is an immediate jump in difficulty for a bad player like me lol.
The second set of spikes is a little hard, but doable with a little practice.
I think that kind of spike layout could be good for a a bit further along maybe, for a bit more difficulty later on, and with some easier spikes earlier for the player to practice on and get used to.
The above feedback signifies that Level 1 may be too hard in some instances — especially for the spikes on the ground. To fix those, I have widened the distance between any two spikes to make it easier for players to avoid the spikes one-by-one.
Spikes and jumping across the building feel fun and add good difficulty to the game. Something small with the enemies I've noticed is that sometimes when you jump to a higher level, they sometimes will jump or will walk off the cliff and die. Seems pretty 50/50 but still works regardless. Overall solid progress.
For this issue, I will have to take a look at the EnemyAI script and fix it.
Great movement and one thing is that I'm not sure why there's this squared block? Maybe you can add arts instead of just a white block to make it cooler.
Will definitely keep that in mind. The reason I made the platforms a simple white rectangular shape is because I was trying to keep in theme with the game Vector, which features a simple running platform so as to focus the game-art towards other things such as the background and sprites.
Nice health placement.
Thank you to everyone who provided me with feedback to improve my game!
General Fixes and Updates
If I land on an enemies’ head, he seems to shoot up into the sky.
When you jump on the enemies’ head you get a massive jump boost, and the enemies seem to double jump sometimes even triple jump.
The bug whereby the enemy jumps multiple times has been resolved. This was done by adding a layer mask to the ground detection system on the enemy's movement.
Art style is looking cute from the start which is good, and movement feels fast without being uncontrollable. Maybe a bit oversized on the spike hit boxes, yeah.
The platforming movement is good, feels very tight and responsive. The spike collider might be a bit too big though.
The size of the spike colliders has been reduced. Side note: I'll definitely work to make the spikes not as hard to overcome, as people seem to be struggling on them :(
References
OpenGameArt.org, 2017, Heart_Health, viewed 9 September 2021, <https://opengameart.org/content/hearthealth>.
OpenGameArt.org, 2016, New Bullet, viewed 9 September 2021, <https://opengameart.org/content/tx-bullet-0>.
GoogleDocs, 2021, Spikes, viewed 10 September 2021, <https://drive.google.com/file/d/0B0osKu5IdBZgWmFVVVZBRUM3c00/view?resourcekey=0-OjvGwGZSYOSitU8_EKPggw>.
Agent X
Status | Released |
Author | brianSansBrain |
Genre | Platformer |
More posts
- Documentation + User GuideOct 15, 2021
- DevLog 6 TestingOct 15, 2021
- DevLog 5 Polish and UIOct 08, 2021
- Game TestingOct 06, 2021
- DevLog 4: Presentation and GraphicsOct 02, 2021
- DevLog 3: Enemies and InteractionsSep 24, 2021
- DevLog 1: Player MovementSep 09, 2021
- Game ConceptAug 26, 2021
Leave a comment
Log in with itch.io to leave a comment.