[PLEASE HELP] how would I make these mechanics for my game?

Hey there,

As said in the previous post How to make camera position and orientation fixed I’m making a Rouge-like game similar to Hades.

I just started and I wanted to lay down some foundations like parts that turn invisible when blocking the player, and, layered health bar.

  1. For example, the NPC GUI starts at a bluish-colored health bar, and when it reaches a certain health Ex; 56 it turns yellow and etc.

  2. how would I manage player buff, debuffs I was thinking of like some rarity system of some sort it drops a “circle” after an enemy is killed, players would interact with it via proximity prompt this could be managed via module script however i don’t know how to do that

  3. how would I create 4-Directional movement similar to pixelated games (Most important)

like this:
image

instead of this:
image

Now, in the game, Hade’s parts that are blocking the camera’s view from the player become slightly transparent how would I accomplish this?

I know this is a lot in one post but I didn’t want to constantly make posts :sweat_smile:

2 Likes

I know this is a lot in one post but I didn’t want to constantly make posts :sweat_smile:

as per forum rules you might have to anyways, what you’re asking for is guidance for an entire games framework, I think that would fall under the rule of not asking forums for complete systems.

Some quick notes though:
Clamping movement to four-way directional is simple, add a debounce such that if a player presses multiple keys only the first applies; that is, have WASD controls share this debounce. If I press A then W, the debounce locks the movement to A, thus stopping me from walking diagonally.

Your healthbar description could be done as simple as if/else-if statements comparing their health to thresholds fo the colors, or more complex but elegantly with UIGradients and tweening its Offset vector2.

For invisible parts - Raycast from the camera to the players’ character. Anything it hits, grab its parent model and make all its descendants transparent.

Buff/debuff will have to be a modulescript. That’s a lot of work I can’t simplify to a paragraph.

2 Likes

Ok, I understand now and thanks for helping me understand what I have to do

1 Like

is it possible you can give an example code I’m having a really hard time understanding this part