Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked multi-tile obj critters #198

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

arborinus
Copy link
Collaborator

@arborinus arborinus commented Aug 21, 2023

what this does

Object critters that create body sections on spawn, that are pulled behind them. Could be used for giant snakes and such. Very rough draft.

clowntipede.webm

problems (goals)

  1. The visuals could use some work. Sprites would have to essentially take up the entire 32x32 space to look somewhat right, which makes the critters massive. The code used to make the cord in Phonecord but fixed #185 might be able to be used to "link" the parts together? But I don't know how expensive it is to have every piece link to each other

  2. If there was a way to force the head (and parts?) to only move in cardinal directions the visuals would end up less glitchy but I'm not sure how to do that.

  3. If any part of the critter that isn't the head gets moved (someone pulling/pushing it), everything "above" that part will not move with it. This breaks the critter apart until the head pathfinds or gets pulled/pushed. This is also a problem with cargo tugs, which the code is based on. This is linked to problem no. 4

  4. The critter can pathfind onto its own parts, which can look messy. You can fix this and problem 3 by making the parts be density 1 and anchored, but then the critter will easily get stuck in small spaces which are pretty common.

  5. I add a reference to the head for all the body parts because I want to eventually have two types of linked critters. One where attacking the critter body sections will affect the head's health and kill the whole thing when the head dies. The second type would be giving each section individual health and splitting a new critter from the severed section if there's enough pieces (think the Terraria worm boss)

  6. My code kinda sucks, there could probably be better variable names in there. I'm also not sure how to make the code able to be used for new types, since it seems you have to directly reference specific object types in the variables for it to work.

@github-actions github-actions bot added size/M merge conflict didn't merge good labels Aug 21, 2023
@arborinus
Copy link
Collaborator Author

Okay I think I fixed the merge conflict issue (but it's a placeholder sprite anyways)

If anyone wants to poke at this feel free, I don't have any big plans for this at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge conflict didn't merge good size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant