Its not really a blue screen, the camera goes straight up mostly outside of the map boundaries, i discovered a fix by just installing bepinex (BepInEx-BepInExPack_IL2CPP-6.0.698) and running the game with it, dont really know how or why but it fixed it, probably bepinex try/catch some errors im not sure.Same here, mostly because in the JP I get a blue screen in every H scene
View attachment 50961
Already tried everything I could think, but with no success.
You are allowed to link to a store page, what isn't allowed for Loli/Shota are direct download links.Like most of theirs it involves impregnantion/pregnancy. Also like most of theirs it involves loli so I won't be posting a link.
I agree with you on that sentiment. There is actually a need for 2 types of games when it comes to male protagonist in at least 2 different formats, one of which FOBS actually managed to almost meet to the full criteria.Addendum: Pregnancy games with a male protagonist are dead, since of your list only two qualify, I think. Actually, I think male protagonists in general are in decline; games these days tend to be less "do fuck" and more "be fucked."
To each their own, I guess. But I'm sad; I want to impregnate, not be impregnated.
Do these ever get english translations?Ressentiment has released a new game, called 行け!! 秘密結社デッドバニー団.
Like most of theirs it involves impregnantion/pregnancy. Also like most of theirs it involves loli so I won't be posting a link.
I haven't played it yet, but from the description you play as the new head of an evil organisation. You capture heroines and use them to make money to fund your organisation.
Edit:You must be registered to see the links
This thread is not for tech help.I need help with drop factory. it keeps saying "rgss202j.dll can't be found" i tried downloading it since i tried to see if i had it and nothing is working
my bad, posted it right before i got off for the night, wasn't really thinking. I apologizeThis thread is not for tech help.
Maybe it's helps somehowI wrote a bit of code for fun, I didn't test it.
The code will work for any game to integrate a pregnancy system into it.
Or you can use it as a reference for developing your own pregnancy system. (C) NeedSomeSleep
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class Main : MonoBehaviour
{
/**
* If this parameter is enabled, then the sperm that has just entered the uterus has a higher chance of fertilization
* than the sperm that was in the uterus.
*/
public static readonly bool WHEN_EJACULATE_WE_TRY_IMPREGNATE = true;
}
public class Engine
{
/**
* you need to replace it otherwise the engine will be overloaded.
*/
public static readonly float UPDATE_INTERVAL = 1f;
public static readonly System.Random RANDOM = new System.Random();
}
public class Ovary
{
private double eggPerTime = 0.001;
private double ovums = 200;
public void Update()
{
ovums += eggPerTime;
}
public List<Egg> Ovulate()
{
if (ovums < 1)
return new List<Egg>();
int count = Engine.RANDOM.Next(2);
if (count > ovums)
count = 1;
ovums -= count;
List<Egg> eggs = new List<Egg>();
for (int i = 0; i < count; i++)
{
eggs.Add(new Egg());
}
return eggs;
}
public List<Egg> ForceOvulate()
{
return ForceOvulate(2);
}
public List<Egg> ForceOvulate(int maxCount)
{
int count = Engine.RANDOM.Next(maxCount);
List<Egg> eggs = new List<Egg>();
for (int i = 0; i < count; i++)
{
eggs.Add(new Egg());
}
return eggs;
}
}
public class Womb : MonoBehaviour
{
private readonly double maxCapacity = 18.0D;
private double usedCapacity = 0.0D;
private readonly List<Ovary> ovaries = new List<Ovary> { new Ovary(), new Ovary() };
private readonly List<Sperm> availableSperm = new List<Sperm>();
private readonly List<Egg> availableEggs = new List<Egg>();
private readonly List<Egg> fertilizedEggs = new List<Egg>();
private readonly List<Fetus> fetuses = new List<Fetus>();
/**
* The engine must have an update, this method needs to be linked to it, but each engine has different updates
* that occur with different tick-rates, so you need to find the right one, and also adjust UPDATE_INTERVAL
*/
void Update()
{
UpdateOvaries();
UpdateFetuses();
UpdateSperm(availableSperm);
UpdateFertilizedEggsIntoFetuses();
}
public void Ovulate()
{
foreach (var ovary in ovaries)
{
ovary.Ovulate();
}
}
public void ForceOvulate()
{
foreach (var ovary in ovaries)
{
ovary.ForceOvulate(Engine.RANDOM.Next(10));
}
}
private void UpdateOvaries()
{
foreach (var ovary in ovaries)
{
ovary.Update();
var newEggs = ovary.Ovulate();
availableEggs.AddRange(newEggs);
}
}
public void Ejaculate(List<Sperm> cum)
{
if (Main.WHEN_EJACULATE_WE_TRY_IMPREGNATE)
AddSpermAndTryImpregnate(cum);
else
AddSperm(cum);
}
private void AddSperm(List<Sperm> cum)
{
availableSperm.AddRange(cum);
}
private void AddSpermAndTryImpregnate(List<Sperm> cum)
{
// After this we receive in 'cum' not used sperm;
UpdateSperm(cum);
// Then we add not used sperm to other available sperm
AddSperm(cum);
}
public int TryCleanWomb()
{
int size = availableSperm.Count;
int countSpermClean = Engine.RANDOM.Next(size);
for (int i = 0; i < countSpermClean; i++)
{
int cleanIndex = Engine.RANDOM.Next(availableSperm.Count);
if (availableSperm.Count - 1 < cleanIndex)
continue;
int chance = Engine.RANDOM.Next(100);
if (chance > availableSperm[cleanIndex].GetChanceToClean())
availableSperm.RemoveAt(cleanIndex);
}
return countSpermClean;
}
public Fetus BirthOne()
{
for (int i = 0; i < fetuses.Count; i++)
{
Fetus fetus = fetuses[i];
if (fetus.IsReadyToBirth())
{
usedCapacity -= fetus.GetSize();
fetuses.RemoveAt(i);
return fetus;
}
}
return null;
}
public HashSet<Fetus> BirthEverything()
{
HashSet<Fetus> birthed = new HashSet<Fetus>();
for (int i = fetuses.Count - 1; i >= 0; i--)
{
Fetus fetus = fetuses[i];
if (fetus.IsReadyToBirth())
{
usedCapacity -= fetus.GetSize();
fetuses.RemoveAt(i);
birthed.Add(fetus);
}
}
return birthed;
}
private void UpdateFetuses()
{
// In every update we recalculate actual used capacity
double tempUsedCapacity = 0;
// Fetuses always grow or we stuck into race condition
foreach (Fetus fetus in fetuses)
{
fetus.UpdateUntilBirth(Engine.UPDATE_INTERVAL);
tempUsedCapacity += fetus.GetSize();
}
// We do this to prevent animation bugs
usedCapacity = tempUsedCapacity;
}
private void UpdateSperm(List<Sperm> sperm)
{
for (int i = sperm.Count - 1; i >= 0; i--)
{
Sperm currentSperm = sperm[i];
currentSperm.UpdateLifeTime(Engine.UPDATE_INTERVAL);
if (currentSperm.IsDead())
{
sperm.RemoveAt(i);
continue;
}
bool isFertilized = TryFertilizeOneAvailableEgg(currentSperm);
if (isFertilized)
sperm.RemoveAt(i);
}
}
private void UpdateFertilizedEggsIntoFetuses()
{
if (usedCapacity >= maxCapacity)
return;
for (int i = fertilizedEggs.Count - 1; i >= 0; i--)
{
Egg fertilizedEgg = fertilizedEggs[i];
if (!IsEggHasEnoughCapacityToGrow(fertilizedEgg))
{
fertilizedEgg.Pause();
continue;
}
FetusSize fetusSize = fertilizedEgg.GetFertilizedBy().GetFetusSize();
Monster producer = fertilizedEgg.GetFertilizedBy().GetProducer();
Fetus fetus = new Fetus(fetusSize, fetusSize.CalcUntilBirth(), producer);
fertilizedEggs.RemoveAt(i);
fetuses.Add(fetus);
fetus.UpdateUntilBirth(Engine.UPDATE_INTERVAL);
}
}
public bool IsEggHasEnoughCapacityToGrow(Egg egg)
{
if (!egg.IsFertilized())
return false;
double maxFetusCapacity = egg.GetFertilizedBy().GetFetusSize().GetMaxCapacity();
return usedCapacity + maxFetusCapacity < maxCapacity;
}
private bool TryFertilizeOneAvailableEgg(Sperm currentSperm)
{
for (int i = availableEggs.Count - 1; i >= 0; i--)
{
Egg currentEgg = availableEggs[i];
bool isFertilized = currentEgg.TryFertilize(currentSperm);
if (!isFertilized)
continue;
availableEggs.RemoveAt(i);
fertilizedEggs.Add(currentEgg);
return true;
}
return false;
}
public double GetMaxCapacity()
{
return maxCapacity;
}
public double GetUsedCapacity()
{
return usedCapacity;
}
public List<Sperm> GetAvailableSperm()
{
return availableSperm.AsReadOnly().ToList();
}
public List<Egg> GetAvailableEggs()
{
return availableEggs.AsReadOnly().ToList();
}
public List<Egg> GetFertilizedEggs()
{
return fertilizedEggs.AsReadOnly().ToList();
}
public List<Fetus> GetFetuses()
{
return fetuses.AsReadOnly().ToList();
}
}
public class Egg : Lifetime
{
private int defense = 100;
private double fertilizeChance;
private Sperm fertilizedBy;
private long pauseTime = 0L;
private long lifetime = 100_000;
public bool TryFertilize(Sperm sperm)
{
if (IsFertilized())
return false;
if (UnityEngine.Random.value > fertilizeChance)
{
fertilizedBy = sperm;
defense = 0;
return true;
}
defense -= sperm.GetAttackPower();
if (defense <= 0)
{
fertilizedBy = sperm;
return true;
}
return false;
}
public bool IsFertilized()
{
return fertilizedBy != null;
}
public int GetDefense()
{
return defense;
}
public double GetFertilizeChance()
{
return fertilizeChance;
}
public Sperm GetFertilizedBy()
{
return fertilizedBy;
}
public long GetPauseTime()
{
return pauseTime;
}
public long Pause()
{
return pauseTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
}
public long GetLifetime()
{
return lifetime;
}
public void SetLifetime(long lifetime)
{
this.lifetime = lifetime;
}
}
public class Fetus
{
private readonly FetusSize fetusSize;
private double untilBirth;
private double size;
private readonly Monster producer;
public Fetus(FetusSize fetusSize, double untilBirth, Monster producer)
{
this.fetusSize = fetusSize;
this.untilBirth = untilBirth;
this.size = 0;
this.producer = producer;
}
public FetusSize GetFetusSize()
{
return fetusSize;
}
public double GetUntilBirth()
{
return untilBirth;
}
public double GetSize()
{
return size;
}
public Monster GetProducer()
{
return producer;
}
public void UpdateUntilBirth(float minusTime)
{
untilBirth = Math.Max(0, untilBirth - minusTime);
size += fetusSize.GetDefaultGrowRate();
}
public bool IsReadyToBirth()
{
return untilBirth <= 0;
}
}
/**
* Types of creature sizes and by default growth rates
*/
public enum FetusSize
{
PARASITE(0.01, 0.001),
VERY_SMALL(0.1, 0.001),
SMALL(1, 0.01),
NORMAL(3, 0.01),
BIG(5, 0.01),
GIANT(7, 0.01),
VERY_GIANT(9, 0.01);
private readonly double maxCapacity;
private readonly double defaultGrowRate;
FetusSize(double maxCapacity, double defaultGrowRate)
{
this.maxCapacity = maxCapacity;
this.defaultGrowRate = defaultGrowRate;
}
public double CalcUntilBirth(double growRate)
{
return maxCapacity / growRate;
}
public double CalcUntilBirth()
{
return CalcUntilBirth(defaultGrowRate);
}
public double GetMaxCapacity()
{
return maxCapacity;
}
public double GetDefaultGrowRate()
{
return defaultGrowRate;
}
}
public class Sperm : Lifetime
{
private int attackPower = 1;
private FetusSize fetusSize;
private long lifetime = 100;
private int chanceToClean = 50;
private Monster producer;
public int GetAttackPower()
{
return attackPower;
}
public FetusSize GetFetusSize()
{
return fetusSize;
}
public long GetLifetime()
{
return lifetime;
}
public void SetLifetime(long lifetime)
{
this.lifetime = lifetime;
}
public Monster GetProducer()
{
return producer;
}
public void UpdateLifeTime(long minusTime)
{
lifetime = Math.Max(0, lifetime - minusTime);
}
public bool IsDead()
{
return lifetime == 0;
}
public bool IsAlive()
{
return lifetime > 0;
}
public int GetChanceToClean()
{
return chanceToClean;
}
}
public class Monster
{
// Monster properties
public Sperm GetSpermType()
{
return new Sperm();
}
}
public interface Lifetime
{
long GetLifetime();
void SetLifetime(long lifetime);
default bool IsDead()
{
return GetLifetime() == 0;
}
default bool IsAlive()
{
return GetLifetime() > 0;
}
default void UpdateLifeTime(long minusTime)
{
if (GetLifetime() - minusTime < 0)
{
SetLifetime(0);
return;
}
SetLifetime(GetLifetime() - minusTime);
}
}
class Main {
static WHEN_EJACULATE_WE_TRY_IMPREGNATE = true;
}
class Engine {
static UPDATE_INTERVAL = 1;
static RANDOM = Math.random;
}
class Ovary {
constructor() {
this.eggPerTime = 0.001;
this.ovums = 200;
}
update() {
this.ovums += this.eggPerTime;
}
ovulate() {
if (this.ovums < 1) return [];
let count = Math.floor(Engine.RANDOM() * 2);
if (count > this.ovums) count = 1;
this.ovums -= count;
const eggs = [];
for (let i = 0; i < count; i++) {
eggs.push(new Egg());
}
return eggs;
}
forceOvulate(maxCount = 2) {
let count = Math.floor(Engine.RANDOM() * maxCount);
const eggs = [];
for (let i = 0; i < count; i++) {
eggs.push(new Egg());
}
return eggs;
}
}
class Womb {
constructor() {
this.maxCapacity = 18.0;
this.usedCapacity = 0.0;
this.ovaries = [new Ovary(), new Ovary()];
this.availableSperm = [];
this.availableEggs = [];
this.fertilizedEggs = [];
this.fetuses = [];
}
update() {
this.updateOvaries();
this.updateFetuses();
this.updateSperm(this.availableSperm);
this.updateFertilizedEggsIntoFetuses();
}
ovulate() {
this.ovaries.forEach(ovary => ovary.ovulate());
}
forceOvulate() {
this.ovaries.forEach(ovary => ovary.forceOvulate(Math.floor(Engine.RANDOM() * 10)));
}
updateOvaries() {
this.ovaries.forEach(ovary => {
ovary.update();
const newEggs = ovary.ovulate();
this.availableEggs.push(...newEggs);
});
}
ejaculate(cum) {
if (Main.WHEN_EJACULATE_WE_TRY_IMPREGNATE) {
this.addSpermAndTryImpregnate(cum);
} else {
this.addSperm(cum);
}
}
addSperm(cum) {
this.availableSperm.push(...cum);
}
addSpermAndTryImpregnate(cum) {
this.updateSperm(cum);
this.addSperm(cum);
}
tryCleanWomb() {
const size = this.availableSperm.length;
const countSpermClean = Math.floor(Engine.RANDOM() * size);
for (let i = 0; i < countSpermClean; i++) {
const cleanIndex = Math.floor(Engine.RANDOM() * this.availableSperm.length);
if (this.availableSperm.length - 1 < cleanIndex) continue;
const chance = Math.floor(Engine.RANDOM() * 100);
if (chance > this.availableSperm[cleanIndex].getChanceToClean()) {
this.availableSperm.splice(cleanIndex, 1);
}
}
return countSpermClean;
}
birthOne() {
for (let i = 0; i < this.fetuses.length; i++) {
const fetus = this.fetuses[i];
if (fetus.isReadyToBirth()) {
this.usedCapacity -= fetus.getSize();
this.fetuses.splice(i, 1);
return fetus;
}
}
return null;
}
birthEverything() {
const birthed = [];
for (let i = 0; i < this.fetuses.length; i++) {
const fetus = this.fetuses[i];
if (fetus.isReadyToBirth()) {
this.usedCapacity -= fetus.getSize();
birthed.push(this.fetuses.splice(i, 1)[0]);
i--;
}
}
return birthed;
}
updateFetuses() {
let tempUsedCapacity = 0;
this.fetuses.forEach(fetus => {
fetus.updateUntilBirth(Engine.UPDATE_INTERVAL);
tempUsedCapacity += fetus.getSize();
});
this.usedCapacity = tempUsedCapacity;
}
updateSperm(sperm) {
for (let i = sperm.length - 1; i >= 0; i--) {
const currentSperm = sperm[i];
currentSperm.updateLifeTime(Engine.UPDATE_INTERVAL);
if (currentSperm.isDead()) {
sperm.splice(i, 1);
continue;
}
const isFertilized = this.tryFertilizeOneAvailableEgg(currentSperm);
if (isFertilized) sperm.splice(i, 1);
}
}
updateFertilizedEggsIntoFetuses() {
if (this.usedCapacity >= this.maxCapacity) return;
for (let i = 0; i < this.fertilizedEggs.length; i++) {
const fertilizedEgg = this.fertilizedEggs[i];
if (!this.isEggHasEnoughCapacityToGrow(fertilizedEgg)) {
fertilizedEgg.pause();
continue;
}
const fetusSize = fertilizedEgg.getFertilizedBy().getFetusSize();
const producer = fertilizedEgg.getFertilizedBy().getProducer();
const fetus = new Fetus(fetusSize, fetusSize.calcUntilBirth(), producer);
this.fertilizedEggs.splice(i, 1);
this.fetuses.push(fetus);
fetus.updateUntilBirth(Engine.UPDATE_INTERVAL);
}
}
isEggHasEnoughCapacityToGrow(egg) {
if (!egg.isFertilized()) return false;
const maxFetusCapacity = egg.getFertilizedBy().getFetusSize().getMaxCapacity();
return this.usedCapacity + maxFetusCapacity < this.maxCapacity;
}
tryFertilizeOneAvailableEgg(currentSperm) {
for (let i = 0; i < this.availableEggs.length; i++) {
const currentEgg = this.availableEggs[i];
const isFertilized = currentEgg.tryFertilize(currentSperm);
if (!isFertilized) continue;
this.availableEggs.splice(i, 1);
this.fertilizedEggs.push(currentEgg);
return true;
}
return false;
}
getMaxCapacity() {
return this.maxCapacity;
}
getUsedCapacity() {
return this.usedCapacity;
}
getAvailableSperm() {
return [...this.availableSperm];
}
getAvailableEggs() {
return [...this.availableEggs];
}
getFertilizedEggs() {
return [...this.fertilizedEggs];
}
getFetuses() {
return [...this.fetuses];
}
}
class Egg {
constructor() {
this.defense = 100;
this.fertilizeChance = Math.random();
this.fertilizedBy = null;
this.pauseTime = 0;
this.lifetime = 100000;
}
tryFertilize(sperm) {
if (this.isFertilized()) return false;
if (Math.random() > this.fertilizeChance) {
this.fertilizedBy = sperm;
this.defense = 0;
return true;
}
this.defense -= sperm.getAttackPower();
if (this.defense <= 0) {
this.fertilizedBy = sperm;
return true;
}
return false;
}
isFertilized() {
return this.fertilizedBy !== null;
}
getDefense() {
return this.defense;
}
getFertilizeChance() {
return this.fertilizeChance;
}
getFertilizedBy() {
return this.fertilizedBy;
}
getPauseTime() {
return this.pauseTime;
}
pause() {
return this.pauseTime = Date.now();
}
getLifetime() {
return this.lifetime;
}
setLifetime(lifetime) {
this.lifetime = lifetime;
}
}
class Fetus {
constructor(fetusSize, untilBirth, producer) {
this.fetusSize = fetusSize;
this.untilBirth = untilBirth;
this.size = 0;
this.producer = producer;
}
getFetusSize() {
return this.fetusSize;
}
getUntilBirth() {
return this.untilBirth;
}
getSize() {
return this.size;
}
getProducer() {
return this.producer;
}
updateUntilBirth(minusTime) {
if (this.untilBirth - minusTime < 0) {
this.untilBirth = 0;
return;
}
this.size += this.fetusSize.getDefaultGrowRate();
this.untilBirth -= minusTime;
}
isReadyToBirth() {
return this.untilBirth <= 0;
}
}
const FetusSize = {
PARASITE: { maxCapacity: 0.01, defaultGrowRate: 0.001 },
VERY_SMALL: { maxCapacity: 0.1, defaultGrowRate: 0.001 },
SMALL: { maxCapacity: 1, defaultGrowRate: 0.01 },
NORMAL: { maxCapacity: 3, defaultGrowRate: 0.01 },
BIG: { maxCapacity: 5, defaultGrowRate: 0.01 },
GIANT: { maxCapacity: 7, defaultGrowRate: 0.01 },
VERY_GIANT: { maxCapacity: 9, defaultGrowRate: 0.01 },
};
for (const size in FetusSize) {
FetusSize[size].calcUntilBirth = function(growRate = this.defaultGrowRate) {
return this.maxCapacity / growRate;
};
}
class Sperm {
constructor() {
this.attackPower = 1;
this.fetusSize = null;
this.lifetime = 100;
this.chanceToClean = 50;
this.producer = null;
}
getAttackPower() {
return this.attackPower;
}
getFetusSize() {
return this.fetusSize;
}
getLifetime() {
return this.lifetime;
}
setLifetime(lifetime) {
this.lifetime = lifetime;
}
getProducer() {
return this.producer;
}
updateLifeTime(minusTime) {
if (this.lifetime - minusTime < 0) {
this.lifetime = 0;
return;
}
this.lifetime -= minusTime;
}
isDead() {
return this.lifetime === 0;
}
isAlive() {
return this.lifetime > 0;
}
getChanceToClean() {
return this.chanceToClean;
}
}
class Monster {
getSpermType() {
return new Sperm();
}
}
const womb = new Womb();
womb.update();
Wow! That looks cool! But in order for game to have real pregnancy content we need to add it to intarface, standing picture etc. How did you use it? Or maybe you have any ideas?Maybe it's helps somehow
(In original thread has some code for unreal)
Java:using System; using System.Collections.Generic; using System.Linq; using UnityEngine; public class Main : MonoBehaviour { /** * If this parameter is enabled, then the sperm that has just entered the uterus has a higher chance of fertilization * than the sperm that was in the uterus. */ public static readonly bool WHEN_EJACULATE_WE_TRY_IMPREGNATE = true; } public class Engine { /** * you need to replace it otherwise the engine will be overloaded. */ public static readonly float UPDATE_INTERVAL = 1f; public static readonly System.Random RANDOM = new System.Random(); } public class Ovary { private double eggPerTime = 0.001; private double ovums = 200; public void Update() { ovums += eggPerTime; } public List<Egg> Ovulate() { if (ovums < 1) return new List<Egg>(); int count = Engine.RANDOM.Next(2); if (count > ovums) count = 1; ovums -= count; List<Egg> eggs = new List<Egg>(); for (int i = 0; i < count; i++) { eggs.Add(new Egg()); } return eggs; } public List<Egg> ForceOvulate() { return ForceOvulate(2); } public List<Egg> ForceOvulate(int maxCount) { int count = Engine.RANDOM.Next(maxCount); List<Egg> eggs = new List<Egg>(); for (int i = 0; i < count; i++) { eggs.Add(new Egg()); } return eggs; } } public class Womb : MonoBehaviour { private readonly double maxCapacity = 18.0D; private double usedCapacity = 0.0D; private readonly List<Ovary> ovaries = new List<Ovary> { new Ovary(), new Ovary() }; private readonly List<Sperm> availableSperm = new List<Sperm>(); private readonly List<Egg> availableEggs = new List<Egg>(); private readonly List<Egg> fertilizedEggs = new List<Egg>(); private readonly List<Fetus> fetuses = new List<Fetus>(); /** * The engine must have an update, this method needs to be linked to it, but each engine has different updates * that occur with different tick-rates, so you need to find the right one, and also adjust UPDATE_INTERVAL */ void Update() { UpdateOvaries(); UpdateFetuses(); UpdateSperm(availableSperm); UpdateFertilizedEggsIntoFetuses(); } public void Ovulate() { foreach (var ovary in ovaries) { ovary.Ovulate(); } } public void ForceOvulate() { foreach (var ovary in ovaries) { ovary.ForceOvulate(Engine.RANDOM.Next(10)); } } private void UpdateOvaries() { foreach (var ovary in ovaries) { ovary.Update(); var newEggs = ovary.Ovulate(); availableEggs.AddRange(newEggs); } } public void Ejaculate(List<Sperm> cum) { if (Main.WHEN_EJACULATE_WE_TRY_IMPREGNATE) AddSpermAndTryImpregnate(cum); else AddSperm(cum); } private void AddSperm(List<Sperm> cum) { availableSperm.AddRange(cum); } private void AddSpermAndTryImpregnate(List<Sperm> cum) { // After this we receive in 'cum' not used sperm; UpdateSperm(cum); // Then we add not used sperm to other available sperm AddSperm(cum); } public int TryCleanWomb() { int size = availableSperm.Count; int countSpermClean = Engine.RANDOM.Next(size); for (int i = 0; i < countSpermClean; i++) { int cleanIndex = Engine.RANDOM.Next(availableSperm.Count); if (availableSperm.Count - 1 < cleanIndex) continue; int chance = Engine.RANDOM.Next(100); if (chance > availableSperm[cleanIndex].GetChanceToClean()) availableSperm.RemoveAt(cleanIndex); } return countSpermClean; } public Fetus BirthOne() { for (int i = 0; i < fetuses.Count; i++) { Fetus fetus = fetuses[i]; if (fetus.IsReadyToBirth()) { usedCapacity -= fetus.GetSize(); fetuses.RemoveAt(i); return fetus; } } return null; } public HashSet<Fetus> BirthEverything() { HashSet<Fetus> birthed = new HashSet<Fetus>(); for (int i = fetuses.Count - 1; i >= 0; i--) { Fetus fetus = fetuses[i]; if (fetus.IsReadyToBirth()) { usedCapacity -= fetus.GetSize(); fetuses.RemoveAt(i); birthed.Add(fetus); } } return birthed; } private void UpdateFetuses() { // In every update we recalculate actual used capacity double tempUsedCapacity = 0; // Fetuses always grow or we stuck into race condition foreach (Fetus fetus in fetuses) { fetus.UpdateUntilBirth(Engine.UPDATE_INTERVAL); tempUsedCapacity += fetus.GetSize(); } // We do this to prevent animation bugs usedCapacity = tempUsedCapacity; } private void UpdateSperm(List<Sperm> sperm) { for (int i = sperm.Count - 1; i >= 0; i--) { Sperm currentSperm = sperm[i]; currentSperm.UpdateLifeTime(Engine.UPDATE_INTERVAL); if (currentSperm.IsDead()) { sperm.RemoveAt(i); continue; } bool isFertilized = TryFertilizeOneAvailableEgg(currentSperm); if (isFertilized) sperm.RemoveAt(i); } } private void UpdateFertilizedEggsIntoFetuses() { if (usedCapacity >= maxCapacity) return; for (int i = fertilizedEggs.Count - 1; i >= 0; i--) { Egg fertilizedEgg = fertilizedEggs[i]; if (!IsEggHasEnoughCapacityToGrow(fertilizedEgg)) { fertilizedEgg.Pause(); continue; } FetusSize fetusSize = fertilizedEgg.GetFertilizedBy().GetFetusSize(); Monster producer = fertilizedEgg.GetFertilizedBy().GetProducer(); Fetus fetus = new Fetus(fetusSize, fetusSize.CalcUntilBirth(), producer); fertilizedEggs.RemoveAt(i); fetuses.Add(fetus); fetus.UpdateUntilBirth(Engine.UPDATE_INTERVAL); } } public bool IsEggHasEnoughCapacityToGrow(Egg egg) { if (!egg.IsFertilized()) return false; double maxFetusCapacity = egg.GetFertilizedBy().GetFetusSize().GetMaxCapacity(); return usedCapacity + maxFetusCapacity < maxCapacity; } private bool TryFertilizeOneAvailableEgg(Sperm currentSperm) { for (int i = availableEggs.Count - 1; i >= 0; i--) { Egg currentEgg = availableEggs[i]; bool isFertilized = currentEgg.TryFertilize(currentSperm); if (!isFertilized) continue; availableEggs.RemoveAt(i); fertilizedEggs.Add(currentEgg); return true; } return false; } public double GetMaxCapacity() { return maxCapacity; } public double GetUsedCapacity() { return usedCapacity; } public List<Sperm> GetAvailableSperm() { return availableSperm.AsReadOnly().ToList(); } public List<Egg> GetAvailableEggs() { return availableEggs.AsReadOnly().ToList(); } public List<Egg> GetFertilizedEggs() { return fertilizedEggs.AsReadOnly().ToList(); } public List<Fetus> GetFetuses() { return fetuses.AsReadOnly().ToList(); } } public class Egg : Lifetime { private int defense = 100; private double fertilizeChance; private Sperm fertilizedBy; private long pauseTime = 0L; private long lifetime = 100_000; public bool TryFertilize(Sperm sperm) { if (IsFertilized()) return false; if (UnityEngine.Random.value > fertilizeChance) { fertilizedBy = sperm; defense = 0; return true; } defense -= sperm.GetAttackPower(); if (defense <= 0) { fertilizedBy = sperm; return true; } return false; } public bool IsFertilized() { return fertilizedBy != null; } public int GetDefense() { return defense; } public double GetFertilizeChance() { return fertilizeChance; } public Sperm GetFertilizedBy() { return fertilizedBy; } public long GetPauseTime() { return pauseTime; } public long Pause() { return pauseTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); } public long GetLifetime() { return lifetime; } public void SetLifetime(long lifetime) { this.lifetime = lifetime; } } public class Fetus { private readonly FetusSize fetusSize; private double untilBirth; private double size; private readonly Monster producer; public Fetus(FetusSize fetusSize, double untilBirth, Monster producer) { this.fetusSize = fetusSize; this.untilBirth = untilBirth; this.size = 0; this.producer = producer; } public FetusSize GetFetusSize() { return fetusSize; } public double GetUntilBirth() { return untilBirth; } public double GetSize() { return size; } public Monster GetProducer() { return producer; } public void UpdateUntilBirth(float minusTime) { untilBirth = Math.Max(0, untilBirth - minusTime); size += fetusSize.GetDefaultGrowRate(); } public bool IsReadyToBirth() { return untilBirth <= 0; } } /** * Types of creature sizes and by default growth rates */ public enum FetusSize { PARASITE(0.01, 0.001), VERY_SMALL(0.1, 0.001), SMALL(1, 0.01), NORMAL(3, 0.01), BIG(5, 0.01), GIANT(7, 0.01), VERY_GIANT(9, 0.01); private readonly double maxCapacity; private readonly double defaultGrowRate; FetusSize(double maxCapacity, double defaultGrowRate) { this.maxCapacity = maxCapacity; this.defaultGrowRate = defaultGrowRate; } public double CalcUntilBirth(double growRate) { return maxCapacity / growRate; } public double CalcUntilBirth() { return CalcUntilBirth(defaultGrowRate); } public double GetMaxCapacity() { return maxCapacity; } public double GetDefaultGrowRate() { return defaultGrowRate; } } public class Sperm : Lifetime { private int attackPower = 1; private FetusSize fetusSize; private long lifetime = 100; private int chanceToClean = 50; private Monster producer; public int GetAttackPower() { return attackPower; } public FetusSize GetFetusSize() { return fetusSize; } public long GetLifetime() { return lifetime; } public void SetLifetime(long lifetime) { this.lifetime = lifetime; } public Monster GetProducer() { return producer; } public void UpdateLifeTime(long minusTime) { lifetime = Math.Max(0, lifetime - minusTime); } public bool IsDead() { return lifetime == 0; } public bool IsAlive() { return lifetime > 0; } public int GetChanceToClean() { return chanceToClean; } } public class Monster { // Monster properties public Sperm GetSpermType() { return new Sperm(); } } public interface Lifetime { long GetLifetime(); void SetLifetime(long lifetime); default bool IsDead() { return GetLifetime() == 0; } default bool IsAlive() { return GetLifetime() > 0; } default void UpdateLifeTime(long minusTime) { if (GetLifetime() - minusTime < 0) { SetLifetime(0); return; } SetLifetime(GetLifetime() - minusTime); } }
JavaScript:class Main { static WHEN_EJACULATE_WE_TRY_IMPREGNATE = true; } class Engine { static UPDATE_INTERVAL = 1; static RANDOM = Math.random; } class Ovary { constructor() { this.eggPerTime = 0.001; this.ovums = 200; } update() { this.ovums += this.eggPerTime; } ovulate() { if (this.ovums < 1) return []; let count = Math.floor(Engine.RANDOM() * 2); if (count > this.ovums) count = 1; this.ovums -= count; const eggs = []; for (let i = 0; i < count; i++) { eggs.push(new Egg()); } return eggs; } forceOvulate(maxCount = 2) { let count = Math.floor(Engine.RANDOM() * maxCount); const eggs = []; for (let i = 0; i < count; i++) { eggs.push(new Egg()); } return eggs; } } class Womb { constructor() { this.maxCapacity = 18.0; this.usedCapacity = 0.0; this.ovaries = [new Ovary(), new Ovary()]; this.availableSperm = []; this.availableEggs = []; this.fertilizedEggs = []; this.fetuses = []; } update() { this.updateOvaries(); this.updateFetuses(); this.updateSperm(this.availableSperm); this.updateFertilizedEggsIntoFetuses(); } ovulate() { this.ovaries.forEach(ovary => ovary.ovulate()); } forceOvulate() { this.ovaries.forEach(ovary => ovary.forceOvulate(Math.floor(Engine.RANDOM() * 10))); } updateOvaries() { this.ovaries.forEach(ovary => { ovary.update(); const newEggs = ovary.ovulate(); this.availableEggs.push(...newEggs); }); } ejaculate(cum) { if (Main.WHEN_EJACULATE_WE_TRY_IMPREGNATE) { this.addSpermAndTryImpregnate(cum); } else { this.addSperm(cum); } } addSperm(cum) { this.availableSperm.push(...cum); } addSpermAndTryImpregnate(cum) { this.updateSperm(cum); this.addSperm(cum); } tryCleanWomb() { const size = this.availableSperm.length; const countSpermClean = Math.floor(Engine.RANDOM() * size); for (let i = 0; i < countSpermClean; i++) { const cleanIndex = Math.floor(Engine.RANDOM() * this.availableSperm.length); if (this.availableSperm.length - 1 < cleanIndex) continue; const chance = Math.floor(Engine.RANDOM() * 100); if (chance > this.availableSperm[cleanIndex].getChanceToClean()) { this.availableSperm.splice(cleanIndex, 1); } } return countSpermClean; } birthOne() { for (let i = 0; i < this.fetuses.length; i++) { const fetus = this.fetuses[i]; if (fetus.isReadyToBirth()) { this.usedCapacity -= fetus.getSize(); this.fetuses.splice(i, 1); return fetus; } } return null; } birthEverything() { const birthed = []; for (let i = 0; i < this.fetuses.length; i++) { const fetus = this.fetuses[i]; if (fetus.isReadyToBirth()) { this.usedCapacity -= fetus.getSize(); birthed.push(this.fetuses.splice(i, 1)[0]); i--; } } return birthed; } updateFetuses() { let tempUsedCapacity = 0; this.fetuses.forEach(fetus => { fetus.updateUntilBirth(Engine.UPDATE_INTERVAL); tempUsedCapacity += fetus.getSize(); }); this.usedCapacity = tempUsedCapacity; } updateSperm(sperm) { for (let i = sperm.length - 1; i >= 0; i--) { const currentSperm = sperm[i]; currentSperm.updateLifeTime(Engine.UPDATE_INTERVAL); if (currentSperm.isDead()) { sperm.splice(i, 1); continue; } const isFertilized = this.tryFertilizeOneAvailableEgg(currentSperm); if (isFertilized) sperm.splice(i, 1); } } updateFertilizedEggsIntoFetuses() { if (this.usedCapacity >= this.maxCapacity) return; for (let i = 0; i < this.fertilizedEggs.length; i++) { const fertilizedEgg = this.fertilizedEggs[i]; if (!this.isEggHasEnoughCapacityToGrow(fertilizedEgg)) { fertilizedEgg.pause(); continue; } const fetusSize = fertilizedEgg.getFertilizedBy().getFetusSize(); const producer = fertilizedEgg.getFertilizedBy().getProducer(); const fetus = new Fetus(fetusSize, fetusSize.calcUntilBirth(), producer); this.fertilizedEggs.splice(i, 1); this.fetuses.push(fetus); fetus.updateUntilBirth(Engine.UPDATE_INTERVAL); } } isEggHasEnoughCapacityToGrow(egg) { if (!egg.isFertilized()) return false; const maxFetusCapacity = egg.getFertilizedBy().getFetusSize().getMaxCapacity(); return this.usedCapacity + maxFetusCapacity < this.maxCapacity; } tryFertilizeOneAvailableEgg(currentSperm) { for (let i = 0; i < this.availableEggs.length; i++) { const currentEgg = this.availableEggs[i]; const isFertilized = currentEgg.tryFertilize(currentSperm); if (!isFertilized) continue; this.availableEggs.splice(i, 1); this.fertilizedEggs.push(currentEgg); return true; } return false; } getMaxCapacity() { return this.maxCapacity; } getUsedCapacity() { return this.usedCapacity; } getAvailableSperm() { return [...this.availableSperm]; } getAvailableEggs() { return [...this.availableEggs]; } getFertilizedEggs() { return [...this.fertilizedEggs]; } getFetuses() { return [...this.fetuses]; } } class Egg { constructor() { this.defense = 100; this.fertilizeChance = Math.random(); this.fertilizedBy = null; this.pauseTime = 0; this.lifetime = 100000; } tryFertilize(sperm) { if (this.isFertilized()) return false; if (Math.random() > this.fertilizeChance) { this.fertilizedBy = sperm; this.defense = 0; return true; } this.defense -= sperm.getAttackPower(); if (this.defense <= 0) { this.fertilizedBy = sperm; return true; } return false; } isFertilized() { return this.fertilizedBy !== null; } getDefense() { return this.defense; } getFertilizeChance() { return this.fertilizeChance; } getFertilizedBy() { return this.fertilizedBy; } getPauseTime() { return this.pauseTime; } pause() { return this.pauseTime = Date.now(); } getLifetime() { return this.lifetime; } setLifetime(lifetime) { this.lifetime = lifetime; } } class Fetus { constructor(fetusSize, untilBirth, producer) { this.fetusSize = fetusSize; this.untilBirth = untilBirth; this.size = 0; this.producer = producer; } getFetusSize() { return this.fetusSize; } getUntilBirth() { return this.untilBirth; } getSize() { return this.size; } getProducer() { return this.producer; } updateUntilBirth(minusTime) { if (this.untilBirth - minusTime < 0) { this.untilBirth = 0; return; } this.size += this.fetusSize.getDefaultGrowRate(); this.untilBirth -= minusTime; } isReadyToBirth() { return this.untilBirth <= 0; } } const FetusSize = { PARASITE: { maxCapacity: 0.01, defaultGrowRate: 0.001 }, VERY_SMALL: { maxCapacity: 0.1, defaultGrowRate: 0.001 }, SMALL: { maxCapacity: 1, defaultGrowRate: 0.01 }, NORMAL: { maxCapacity: 3, defaultGrowRate: 0.01 }, BIG: { maxCapacity: 5, defaultGrowRate: 0.01 }, GIANT: { maxCapacity: 7, defaultGrowRate: 0.01 }, VERY_GIANT: { maxCapacity: 9, defaultGrowRate: 0.01 }, }; for (const size in FetusSize) { FetusSize[size].calcUntilBirth = function(growRate = this.defaultGrowRate) { return this.maxCapacity / growRate; }; } class Sperm { constructor() { this.attackPower = 1; this.fetusSize = null; this.lifetime = 100; this.chanceToClean = 50; this.producer = null; } getAttackPower() { return this.attackPower; } getFetusSize() { return this.fetusSize; } getLifetime() { return this.lifetime; } setLifetime(lifetime) { this.lifetime = lifetime; } getProducer() { return this.producer; } updateLifeTime(minusTime) { if (this.lifetime - minusTime < 0) { this.lifetime = 0; return; } this.lifetime -= minusTime; } isDead() { return this.lifetime === 0; } isAlive() { return this.lifetime > 0; } getChanceToClean() { return this.chanceToClean; } } class Monster { getSpermType() { return new Sperm(); } } const womb = new Womb(); womb.update();
It's actually not hard, if I had the graphic resources I could work something out.Wow! That looks cool! But in order for game to have real pregnancy content we need to add it to intarface, standing picture etc. How did you use it? Or maybe you have any ideas?