Skip to content

Conversation

@tristanbob
Copy link
Contributor

@tristanbob tristanbob commented Aug 23, 2022

190040503-64c0ae9e-7f1c-48dd-919c-543a2da11c09

Playable game:

https://liluo.io/victrisgames/extension-health

Summary:

Manage health (life) and shield points of an object. Health can be assigned to players, enemies, NPCs, or even inanimate objects such as breaking doors and mining rocks.

How to use:

  • Set desired values in "Health" and "Shield" behavior properties
  • To apply damage use “Damage an object” or “Damage an object protected by a shield”
  • To heal health, use “Heal object” action
  • To activate the shield, use “Activate Shield” action
  • Health and shield regeneration will happen automatically based on properties

Tips:

  • While damage cooldown is active, no damage will be applied to health or shield
  • Try using the “Blink” extension while damage cooldown is active
  • Use the “Is just damaged” condition to trigger audio and visual effects

Health properties:

  • Health (life points) Used for starting health
  • Maximum health (0 for no maximum)
  • Damage cooldown (seconds) Use "0" for no cooldown
  • Rate of health regeneration (points per second) Will not exceed max health, even with overhealing enabled
  • Delay (seconds) before health regeneration starts after being hit
  • Allow heal to increase health above max health (will not exceed max health)

Shield properties:

  • Max shield points (Shield will start with this many points when activated)
  • Duration of shield (seconds) Use "0" to disable shield timer
  • Rate of shield regeneration (points per second)
  • Shield will block all excess damage when shield is destroyed
  • Delay (seconds) before shield regeneration starts after being hit
  • Regenerate shield when it has zero points

@tristanbob tristanbob self-assigned this Aug 23, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 23, 2022

Preview the game(s) changed or added in this Pull Request


This is an automatic message displaying links to the games in this PR - double check the JSON in case of doubt.

@github-actions
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 55.1%, saving 184.34 KB.

Filename Before After Improvement Visual comparison
examples/health-with-shield/assets/Big Grey Meteor (3).png 1.66 KB 1.62 KB -2.1% View diff
examples/health-with-shield/assets/BlueplayerShip2-1.png 3.86 KB 2.71 KB -29.7% View diff
examples/health-with-shield/assets/Glow.png 7.67 KB 7.32 KB -4.5% View diff
examples/health-with-shield/assets/Medium Grey Meteor (1).png 966 bytes 930 bytes -3.7% View diff
examples/health-with-shield/assets/Moon-1.png 1.39 KB 612 bytes -57.0% View diff
examples/health-with-shield/assets/Normal Potion Green_No Shadow.png 3.19 KB 406 bytes -87.6% View diff
examples/health-with-shield/assets/Normal Potion Green_Shadow.png 3.29 KB 460 bytes -86.4% View diff
examples/health-with-shield/assets/Silver shield.png 781 bytes 745 bytes -4.6% View diff
examples/health-with-shield/assets/tiled_black space.png 2.46 KB 1.47 KB -40.2% View diff
examples/health-with-shield/assets/Upgraded Potion Blue_No Shadow.png 3.26 KB 438 bytes -86.9% View diff
examples/health-with-shield/assets/Upgraded Potion Blue_Shadow.png 3.37 KB 503 bytes -85.4% View diff
examples/health-with-shield/Health_Panel-1.png 201 bytes 178 bytes -11.4% View diff
examples/health-with-shield/Preview.png 302.10 KB 132.53 KB -56.1% View diff
examples/health-with-shield/TopPanel-1.png 201 bytes 178 bytes -11.4% View diff

4343 images did not require optimisation.

@github-actions
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 20.1%, saving 35.58 KB.

Filename Before After Improvement Visual comparison
examples/health-with-shield/Preview.png 176.76 KB 141.18 KB -20.1% View diff

4356 images did not require optimisation.

@tristanbob tristanbob marked this pull request as ready for review August 28, 2022 03:06
@tristanbob tristanbob added the ✨ New example A new example label Aug 28, 2022
@tristanbob tristanbob requested a review from a team August 28, 2022 03:06
- This was too confusing so it was removed
@HelperWesley
Copy link
Contributor

Having a look through the extensions and these are the issues I found:

-I find 2 results for this when searching "damage".
image

-The healing for health and restoring/activation of a shield should work and be presented in the same way. Even if a shield didn't exist before and now does, and it isn't meant to take damage but just protect against a single hit, then giving a shield 1/2/3/etc points of health could be used to show how many hits it will take to break the shield.

image

The way it is now, the shield can't be restored for partial amounts, so if someone wanted to set up a system where 1 hit = 1 damage, and wanted multiple shields, they wouldn't be able to do that with this system.

Like this:
image

-Should % chance variables be 0-100 instead of 0-1? That reads clearer in my mind, since that's the way that information would be displayed to the player. 🤔
image

-After some testing with the "regen shield when it has zero points" option, I think it would be a strange mechanical choice to have a shield that regens until it's broken. I think people will want a hard shield or one that regens, but I can't think of any game off the top of my head that has regening shields that go away once broken. 🤔
image

@tristanbob
Copy link
Contributor Author

-I find 2 results for this when searching "damage". image

This is a good catch! One was for health and one for shield. Now they have descriptive words:

image

The way it is now, the shield can't be restored for partial amounts, so if someone wanted to set up a system where 1 hit = 1 damage, and wanted multiple shields, they wouldn't be able to do that with this system.

I have modified the "activate shield" action so you can choose:

  • Shield points to the shield
  • If shield duration will be renewed

-Should % chance variables be 0-100 instead of 0-1? That reads clearer in my mind, since that's the way that information would be displayed to the player. 🤔 image

Most of the time GDevelop uses a range of 0 to 1 to represent percent, so I left it this way.

-After some testing with the "regen shield when it has zero points" option, I think it would be a strange mechanical choice to have a shield that regens until it's broken. I think people will want a hard shield or one that regens, but I can't think of any game off the top of my head that has regening shields that go away once broken. 🤔

Good point. I have removed this property and related functions.

@tristanbob tristanbob requested a review from Bouh September 17, 2022 16:30
@tristanbob
Copy link
Contributor Author

@Bouh @HelperWesley @D8H

Any more thoughts on this?

The one thing I haven't tested is how well an old game works with the new health extension. I don't think I renamed any properties or functions, and I only added parameters to existing functions. Can someone do a test and confirm if this version is backward compatible with an existing game?

@tristanbob tristanbob merged commit f7c6322 into main Sep 20, 2022
@tristanbob tristanbob deleted the Health-with-Shield branch September 20, 2022 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ New example A new example

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants