HTML NPC and Breeding system

ulaz

New Member
Dec 22, 2022
12
3
Hey everyone so I’ve started a game based on a story I wrote out. I have the entire script of what’s happening in the story written and so far a skeleton of a game. However something I’m having trouble comprehending is A) an NPC system that spawns NPC‘s based on events or just being there, B) a system to breed those NPC‘S with either yourself or another NPC. I am using 2D Art and images for the characters. So far I’ve been using HTML, Javascript, & CSS for everything. Are those enough? My goal is to have a system that tracks body types, genitals, attractiveness, muscles mass, height and the like. If anyone has any suggestions on a how to or places to look or a better forum to ask this question I’d really appreciate it a lot. Thank you guys in advance.
 

AlexFenec

Newbie
Nov 20, 2022
69
72
Javascript sure can track all that, it's just a bunch of data. You would only need something else if you spawn so many NPC that you need a database, or if you need to do advanced data manipulation on it. Assuming your game is meant to be played by a human, you shouldn't need tons of NPCs or fancy operations, Javascript should be good.

But do keep in mind that your game will be played by a human. If you track Attractiveness, you need to show the player what changes with high or low attractiveness, how to check or guess the Attractiveness of an NPC, and give options to change or work around an undesireable Attractiveness.
The stuff you listed looks like it would alter the description of the characters, which is easy to show and doesn't lead to complex game systems, they are easy to understand. Still, the more things you track, the more you need to make code that use these things.

Code-wise, Javascript should easily fit your need. I don't know how much coding experience you have but here's a few tips:
- Start by making a Json object that tracks everything you want to track, don't make a Class right away. In my experience it helps keep the structure of your data clear, and I needed to convert my class to Json anyways to save the game.
- Make a system to create new copies of the object. I like to have a function that creates a blank object with default values everywhere, then manually change the values as needed. It's not the most efficient but it ensures I don't end up with an invalid object.
- Give every non-fungible object an ID. If you can magically steal the cock of another character and that cock can carry STD, then the cock needs an ID.
- Save references to objects by their ID, not by the object itself. This makes it much easier to save and load data without duplicating family trees.