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

Primitive multicellular matrix attempt #5673

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

Conversation

CI09
Copy link
Contributor

@CI09 CI09 commented Nov 11, 2024

Brief Description of What This PR Does

This PR does some stuff...

Related Issues

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

Copy link
Contributor Author

@CI09 CI09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some tips regarding prints

{
if (multicellularPositions != null)
return false;
GD.Print("olelo");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one keeps on printing meaning dataSource.MulticellularPositions is null, for some reason

GenerateMembranePoints(hexPositions, hexCount, membraneType);
GenerateMembranePoints(hexPositions, hexCount, membraneType, cellPositions, thisCellPosition);

GD.Print(cellPositions == null);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it prints false, thus cellPositions is not null

{
CacheableDataExtensions.OnCacheHashCollision<MembranePointData>(hash);
cachedMembrane = null;

GD.Print("uhm");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one keeps on printing, like, constantly. Membrane keeps on re-generating

@@ -479,6 +484,30 @@ private void GenerateMembranePoints(Vector2[] hexPositions, int hexCount, Membra
startingBuffer[i] = closestOrganelle + movement;
}

// Multicellular matrix
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this approach actually work or (in terms of making a good visual end result)? This is not how I would try to approach the intercellular matrix graphics at all (I'd make a separate mesh or a set of meshes to connect the cells), so I don't really want to spend a bunch of time trying to help debug this approach if it doesn't end up working in the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't really tell you if it looks good as I can't get it to work in the first place, that's why I need help, so it's up to you. I don't really like the idea of some filler meshes inbetween cells as it isn't quite clear what such thing is (cell? connective tissue?) but if you really want that, I'm ready to scrap this solution

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not ready to make a decisions on this, but my guess is that stretching the individual membranes will be a very hard to thing to get right. Though we don't know for certain until both approaches are tried as to what they can achieve. Sadly though I don't think it is good use of my limited time right now to try to get the code in this PR working, so that's up to you for now. Or if some other programmer is willing to help, that could be another way this PR gets working.

@dligr
Copy link
Member

dligr commented Nov 16, 2024

I have added a Voronoi diagram-based vertex manipulation algorithm, so that the vertices projected onto the diagram's edges.
It still needs to be more smooth though.

image

@MatterNoise
Copy link

Hello!, how is this going? Will it continue when we are at the multicellular stage? Thanks!

@hhyyrylainen
Copy link
Member

I think this will be stuck until someone else takes over this PR.

@CI09
Copy link
Contributor Author

CI09 commented Jan 21, 2025

I couldn't really figure out how shape generator works, or how to make my code work well if it. It ended either scaling up entire microbe, making "cliffs" in membrane or other stuff. I was thinking of another way to approach this but I didn't start yet nor even planned to do so. The purpose of this PR was solely to show code to others so they could work on it too.

Either way sorry if I made you unnecessary hopes for multicellular matrix being sooner then planned, it was just an experiment.

@MatterNoise
Copy link

I couldn't really figure out how shape generator works, or how to make my code work well if it. It ended either scaling up entire microbe, making "cliffs" in membrane or other stuff. I was thinking of another way to approach this but I didn't start yet nor even planned to do so. The purpose of this PR was solely to show code to others so they could work on it too.

Either way sorry if I made you unnecessary hopes for multicellular matrix being sooner then planned, it was just an experiment.

Dont worry!, i still waiting for another solution... thanks for answer!

@Patryk26g
Copy link
Contributor

image

I might be onto something even though I'm not quite sure what I'm doing. Need to smooth out these edges for sure

@Patryk26g
Copy link
Contributor

Patryk26g commented Jan 22, 2025

I think that that's the best I was able to get it to now. If we still want to go with this approach we would need to redo the caching of the multicelular organisms' membranes (bacause they don't update when the organism grows, you need to leave the game and turn it back on. And you can also see the organisms species that have only one cell and it's pointy) and maybe consider packing the cells closer to each other? Also would need to improve the smoothing in some corner cases... (I also don't quite like the smoothing functions that I came up with, they need to be redone probably)

Screenshot_20250122_230322
Screenshot_20250122_230635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: started but stuck (help wanted)
Development

Successfully merging this pull request may close these issues.

5 participants