Cellular Movement

Isn’t cilia for turning, I thought that was the plan.

If that’s the case then excuse me for being new and not knowing that.

That’s fine. I’m not sure if that’s STILL the plan though it was the last time I started getting involved again. Though I personally like it as an idea. It really separates the two organelles.not trying to upset you or anything.

Cilia is not purely for turning. The plan is that flagella are more ATP expensive but give a large force in one direction with less manueverability, while cilia are less ATP expensive but give a smaller force with more manueverability.

1 Like

Adding these 2 statements we should basically replace the total force equation with
total_force = sum max(0, button_press_direction dot flagella_force_direction)
total_force += sum max(x, button_press_direction dot cilia_force_direction)

where x will be some value greater than 0 so that cilia increase force in any direction which satisfies the “more manueverability” idea.

Just an idea. Thoughts?

1 Like

Personally I think it would be good to get flagella into a good place and then work on other methods of locomotion.

I like the idea of cillia too however we need to think about how the gameplay will be different. It needs to be differentiated enough to make it worth spending part of the complexity budget on it, the idea of more maneuverability at the cost of speed is an interesting one.

I’m working on a prototype right now. My code includes an editor mode where you can build your cell (no MP or ATP) and then a test-drive mode where you can see how fast it moves. I still need to make it so new organelles snap to the hex grid and implement the directional dependence (I’m not up to date on microbiology, is the center of the nucleus pretty much the center of mass like an atom or no?) But I’ll post what I’ve got later this week. Also, you can adjust variables like force_per_flagella, global_top_speed, and the masses of each organelle.

1 Like

Sounds cool :slight_smile:

We were talking about having a prokaryote section of the game, so basically you start without a nucleus and add it later so it may be that, in the future, some cells don’t have them.

More info is here

Alright so I didn’t implement grid-snapping and my mitochondria don’t rotate well (start vertical, hold right click to turn 60 degrees) but I figure I’ll share what I’ve got. It’s worth mentioning that to ensure nothing strange happens make sure that force_flagella is no greater than flagella_mass (otherwise the sigmoid function might take an argument outside the domain [0,1]).
Click a button to change a value or add an organelle, enter places the organelle where the mouse puts it, escape goes from organelle placement -> editor menu -> test-drive -> close
“E” opens the edit menu.

My stuff
https://pastebin.com/Z6V2kgtU

And a little tool that I borrowed and edited (little bit of laziness on my part since it’s only like 50 lines)
https://pastebin.com/crMvhrWK

That is really cool! I am super impressed by how fast you have come up with that :slight_smile:

Hopefully it will be a great tool for balancing things.

In general it’s good to have prototypes in the git repo so I added rotation in and put it in the prototypes repo (if you need any help with git feel free to ask, I’m a bit of a noob with it myself but it is great, when you are working with the prototypes repo feel free to push to master without pull requests or anything). I put that other rotation thing in paste bin just because it seemed quite inconsequential but your think is def worth holding on to.

Hope that is helpful!

Literally first time using pygame too so I’m sure there’s tons of stuff that could be done better. I just wanted to play around with it. I’ll add the snap to hex grid deal tomorrow if nobody gets to it before then. It should just be a matter of rounding the mouse position.

And yeah, I wasn’t sure if I’d be allowed to push to github at this stage or if I should for such a thing so I just went to pastebin.

1 Like

Alright, if anybody wants to play around with balancing some constants to see what feels good here’s my Movement/Editor Prototype (If there are more organelles or I got any wrong let me know and I’ll add them / fix their properties). There is no ATP system so the only properties that matter are the masses of each organelle, the strength of each flagella, and the global top speed. The code calculates the center of mass of whatever cell you’ve created and the relative positions of each flagella to that point to influence your speed in each direction. I have no artistic skill so things are a bit ugly but it’s just a testing tool so cut me some slack.
Hopefully the controls are simple enough (they’re written on screen most of the time) If anybody has any suggestions or feedback let me know.

1 Like

How do you calculate the center of mass? If it is different than what the physics engine does the prototype might not perfectly translate to how the parameters work ingame.

@andross I added rotation to your prototype and had a quick go at balancing the numbers. To everyone what do you think (if you can run it)?

Just a nucleus on it’s own is pretty grindingly slow but you can move. The Fastest you can possibly go (speed = 8) is pretty zippy but not ridiculous. I made all cells rotate at the same speed which is pretty fast, that can be changed.

The most important factor for balance I think is how long do you spend just swimming around because it feels nice?

1 Like

@hhyyrylainen

I calculate center of mass by giving each organelle a mass value, assuming that that mass is evenly distributed through the organelle, adding then the mass of each hex * the distance from the center of the screen (where the cell will always be drawn) then divide by total mass. I don’t know how the physics engine does it but it can’t be that terribly different can it?

I’m not exactly sure how it calculates it. But in it each organelle is represented by a sphere (size of HEX_SIZE) and with the mass of the organelle. And I just let the physics engine figure out the center of mass and the inertia matrix from that.

It should be the same then. The center of mass of each sphere is the center of the sphere and in my simulation the center of mass of each hex is the center of the hex.

Alright prototype is available on github If some people want to playtest to see if the constants feel good and if they prefer the fixed turn rate or the one that depends on the cell properties. Please and thank you. (If you don’t use python you’ll need to get it and “pip install” numpy and pygame to run things)

1 Like

Awesome work guys! I got the prototype running and I thought it felt pretty good. The only thing I’d suggest is that the cell be able to get a bit larger before getting very slow, but these things will be easier to balance once we’ve got it in the game and are able to playtest.

1 Like

I have yet to try this prototype.
But I will have to soon.