u/NecroDeity

Need help to design a module and scalable Power Up system

Hi, I am trying to switch to game development as a programmer (I have worked as a web developer before). I am new, and I'm working on my first few projects. The goal here is both to learn the best practices, as well as to prepare entries for my portfolio.

Currently, I am working on a endless runner, where you avoid obstacles and collect coins. I am trying to introduce a power-up system that will give the player many kinds of temporary powers/benefits.

As I mentioned, I am trying to work on this project in a way that prioritises learning the best practices and architecture, following proper OOP practices and SOLID principles (which I am new to, at least at implementing). I want to learn to write code that can be easily understood, scaled, and maintained.

I have come up with an initial idea of how to approach my power-up system, and i need reviews and suggestions

The types of power-ups I have come up with (and will come up with) might fall into different archetypes, which need to be supported. The two archetypes I have as of now are:

  1. Powerups that only expire naturally when their duration expires (and can not be deactivated before)
  2. Powerups that can get deactivated before their duration ends, if certain conditions are met (e.g. Shield powerup gets deactivated if the player gets hit)

I have thought of a way to make this work, but I am not sure if that is the ideal way to do it.

My current idea:

  1. There will be an IPowerUp interface that will contain all common properties of powerups of all archetypes
  2. Each archetype will be represented by an abstract class, which will extend IPowerUp. Each of these base abstract classes (representing archetypes) will have generic methods (e.g. logic for activation, natural expiry, forced deactivation on certain conditions, etc) that will be used by all different types of powerups that fall under that specific archetype.
  3. There will be a PowerUpManager script that will manage the power-ups.

Am I approaching this with the right mindset?
Please suggest improvements/details that will help me figure out how to approach this mentally. Any help is appreciated. Thank you.

reddit.com
u/NecroDeity — 1 day ago

Need help to design a modular and scalable Power Up system

Hi, I am trying to switch to game development as a programmer (I have worked as a web developer before). I am new, and I'm working on my first few projects. The goal here is both to learn the best practices, as well as to prepare entries for my portfolio.

Currently, I am working on a 2D endless runner, where you avoid obstacles and collect coins. I am trying to introduce a power-up system that will give the player many kinds of temporary powers/benefits.

As I mentioned, I am trying to work on this project in a way that prioritises learning the best practices and architecture, following proper OOP practices and SOLID principles (which I am new to, at least at implementing). I want to learn to write code that can be easily understood, scaled, and maintained.

I have come up with an initial idea of how to approach my power-up system, and i need reviews and suggestions

The types of power-ups I have come up with (and will come up with) might fall into different archetypes, which need to be supported. The two archetypes I have as of now are:

  1. Powerups that only expire naturally when their duration expires (and can not be deactivated before)
  2. Powerups that can get deactivated before their duration ends, if certain conditions are met (e.g. Shield powerup gets deactivated if the player gets hit)

I have thought of a way to make this work, but I am not sure if that is the ideal way to do it.

My current idea:

  1. There will be an IPowerUp interface that will contain all common properties of powerups of all archetypes
  2. Each archetype will be represented by an abstract class, which will extend IPowerUp. Each of these base abstract classes (representing archetypes) will have generic methods (e.g. logic for activation, natural expiry, forced deactivation on certain conditions, etc) that will be used by all different types of powerups that fall under that specific archetype.
  3. There will be a PowerUpManager script that will manage the power-ups.

Am I approaching this with the right mindset?
Please suggest improvements/details that will help me figure out how to approach this mentally. Any help is appreciated. Thank you.

reddit.com
u/NecroDeity — 1 day ago
▲ 0 r/unity

Need help to design a module and scalable Power Up system

Hi, I am trying to switch to game development as a programmer (I have worked as a web developer before). I am new, and I'm working on my first few projects. The goal here is both to learn the best practices, as well as to prepare entries for my portfolio.

Currently, I am working on a 2D endless runner, where you avoid obstacles and collect coins. I am trying to introduce a power-up system that will give the player many kinds of temporary powers/benefits.

As I mentioned, I am trying to work on this project in a way that prioritises learning the best practices and architecture, following proper OOP practices and SOLID principles (which I am new to, at least at implementing). I want to learn to write code that can be easily understood, scaled, and maintained.

I have come up with an initial idea of how to approach my power-up system, and i need reviews and suggestions

The types of power-ups I have come up with (and will come up with) might fall into different archetypes, which need to be supported. The two archetypes I have as of now are:

  1. Powerups that only expire naturally when their duration expires (and can not be deactivated before)
  2. Powerups that can get deactivated before their duration ends, if certain conditions are met (e.g. Shield powerup gets deactivated if the player gets hit)

I have thought of a way to make this work, but I am not sure if that is the ideal way to do it.

My current idea:

  1. There will be an IPowerUp interface that will contain all common properties of powerups of all archetypes
  2. Each archetype will be represented by an abstract class, which will extend IPowerUp. Each of these base abstract classes (representing archetypes) will have generic methods (e.g. logic for activation, natural expiry, forced deactivation on certain conditions, etc) that will be used by all different types of powerups that fall under that specific archetype.
  3. There will be a PowerUpManager script that will manage the power-ups.

Am I approaching this with the right mindset?
Please suggest improvements/details that will help me figure out how to approach this mentally. Any help is appreciated. Thank you.

reddit.com
u/NecroDeity — 1 day ago

Help me find the best Xiaoxing wine I can (Non-chinese here, very few options)

Hi, I am an Indian person who is fascinated by Chinese cuisine. I am trying to get some of the essential pantry staples for Chinese cooking, and I have managed to get Light and Dark soy sauce, oyster sauce, toasted sesame oil, MSG, and I could find some of the other basic stuff (Lee Kum Kee has some of their catalogue available here).

Where I am really struggling is finding decent Xiaoxing wine. There's barely any available, at least on amazon.in. The only one I can find is this:

https://www.amazon.in/Gourmet-Cooking-Hsing-Seasoning-Vinegar/dp/B0BQBWVFTP/ref=sr_1_5?crid=99O7LZU5UCNI&dib=eyJ2IjoiMSJ9.jcTTm7gisF9sbxmDUHpbjA.DSlTZZ18eHVLuZAHN4uNAAEk0hlenJavjK9sDkSnqgs&dib_tag=se&keywords=xiaoxing+wine&qid=1778959628&sprefix=xiaxing%2Caps%2C638&sr=8-5

And this (no reviews):

https://www.amazon.in/Shaos-Chubang-Scallion-Ginger-Cooking/dp/B0GYF212C9/ref=sr_1_1_sspa?crid=99O7LZU5UCNI&dib=eyJ2IjoiMSJ9.jcTTm7gisF9sbxmDUHpbjA.DSlTZZ18eHVLuZAHN4uNAAEk0hlenJavjK9sDkSnqgs&dib_tag=se&keywords=xiaoxing+wine&qid=1778959628&sprefix=xiaxing%2Caps%2C638&sr=8-1-spons&aref=2KCnmx9psi&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1

I found another one in a very low-profile (kind of shady-looking site):
https://www.exoticeats.co.in/search?q=wine (shared the search results as 2 of them look interesting

Are any of these any good? I don't have many options here, I'm afraid.
Any help is appreciated.

u/NecroDeity — 5 days ago

Something that really resonated with me

I find this video quite relatable, and I thought some of you might appreciate the content in it as I did. Also thought that the video deserves more views.

youtube.com
u/NecroDeity — 10 days ago

Suggestions: 2H Melee / Caster Spellsword with Non-elemental/"Dark" Spells - 9 Warlock / 3 Sorc

I want to make a spellsword for my Durge playthrough (currently running 9 Warlock/3Sorc) that utilises spells with a "dark" vibe, especially disabling/Control spells. I wanted something other than the traditional fire/cold/lightning. Hence, I chose Warlock. The 3 Sorc is for access to metamagic, so I can have more fun with the spells. Currently, I have started with The Fuend subclass for Command.

The build will be 50/50 melee and spells.

The whole Idea of the build is a "dark" warrior (to fit with the durge vibe) who enters the battle with dark spells that disable enemies (or maybe even damage them sometimes), and finishes them off with his 2h sword.

Currently using Hunger of Hadar and Fireball (ik its fire, but it's too good).

If you have ny alternative suggestions that you think might be better, please suggest. Thank you.

PS: I don't want to use Shadow blade since I played it recently, and also cuz I don't want to trivialize the game too much

reddit.com
u/NecroDeity — 15 days ago