Devlog #05 Pickups and Experience
Dev Thoughts:
Game Design is a thankless industry I feel, with very little tangible reward for what you actually put in. So is it really a wonder that so many of us suffer from some form of anxiety or mania or even depression? I mean, many creative people do, and the game industry is nothing if not demanding of creativity in some form. There's one mantra I try to follow when it comes to projects to try and combat this, 'Do Something'. What I mean is, even if you're in a funk or feeling hopeless, do one thing for your project. Even if it's as small as adding a few lines of code or assigning one or two colliders to your enemies or even planning out your design, do something every day or every period that's meant to be dedicated to your project. Do Something.
I think it's easy, when you feel out of touch with your work, to just not to anything at all so you end up doing nothing. Doing something small every day piles up over time and even if it's 0.01% progress you're making, it's still progress. And that adds up over time. Of course, don't take it as an excuse to just do one thing and call it quits if you've got the means to do more. This is more so for those who.. feel that oppressive listlessness that seems to halt all progress. I'll admit, I don't always follow this rule either, it gets difficult in an unexplainable, tangled and overly complex way, but I'm going to keep trying. Just one small thing, everyday.
Picks ups and Experience
So, funfact, I eventually ended up scrapping the experience bar later on when the game direction changed. Games change and transform over time, but it still stings a little to watch it go. Still, it was for the better and I'm still going to give you an overview of how I did it, along with the pickups.
Now I did pickups extremely simply. They're just a sprite with a trigger collider and a script that says 'whenever the player collides with me', destroy this sprite and do whatever effect it needs to do (aka heal the player). Sometimes its better to just go with Occam's razor and do the most basic straightforward way possible. That being said, I do think having a system with interfaces might be more robust and flexible? And it it isn' that much harder to do, so we'll see if I talk about pick ups again in future.
As for the way that these items spawn, it's really just a world script that spawns them a certain distance away from the player every few seconds with a % chance on whether they spawn or not. Right now they all just keep constantly spawning, and I've not done the smart thing like item pooling or having them delete themselves when the player gets too far, to save on memory, but it works for what it needs to do now. I wish I could say they were more complex than they are, but they're not and in a way, I'm proud of that.
The experience was another easy trick. Basically, every time an enemy dies, it calls the player script's function of 'AddExperience' and all this does it make a number go up. The script then checks if this number meets a certain threshold for leveling up and updates a ui slider bar. If it does meet the threshold, then the number subtracts the threshold, the level number goes up, and the slider bar gets updated to reflect whatever remains, while it's max bar number gets set to a new threshold done by the power of math. You could do it as simply as level x 100, so every level gets a higher and higher threshold to cross into the next.
i.e level 1 =100pts, lvl 2 = 200 pts etc...
Don't overthink it so much. Do it step by step. You'll get there.
Labyrinth: WIP- A Devlog Journey
Hades meets Death must Die
Status | Prototype |
Authors | Tene_Games, bobateacups |
Genre | Survival |
Tags | Casual, combat, elements, Narrative, Roguelike, Singleplayer |
More posts
- Devlog #07 Start Menu and Damage Pop ups!Aug 18, 2024
- Devlog #06 Fleshing out PowersJul 24, 2024
- Devlog #4 Player Skills and Enemy EffectsJun 26, 2024
- Devlog #3 The First Enemies and Coming to TermsJun 23, 2024
- Devlog #2 - Aiming and InspirationsJun 11, 2024
- Devlog #1 - Basic MovementJun 10, 2024
- Devlog #0- Zodiac: The Beginning! (Scrapped Start)Mar 18, 2024
Leave a comment
Log in with itch.io to leave a comment.