thought experiment: farming game

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

thought experiment: farming game

Post by SwordPlay »

I had this idea (and a few others) to enter in the multicart compilation, but I realised my plotscripting knowledge is not good enough to do so!

Anyway, this particular game is a farming sim, in the vein of Harvest Moon, but obviously in an 8-bit style.

As a thought experiment, and so I can learn a bit more about plotscripting, I've ventured some ideas on how to pull it off. Perhaps you can give me feedback and suggestions, and it could be a sort of case study?


::FARMING::
The most immediate feature is planting/growing crops.

:How to implement it:
I poked around and figured that using zones is the best option, since it is tile based, and plotscripting allows reading/writing zones and tiles easily.
The other option would be something like an NPC, or perhaps a combination of tile, zone and NPC. You guys probably have better experience to judge such a thing.

:Using Zones:
I noticed that Zones have Extra Data and are nameable! So cool!
I thought I'd make the Extra Data correspond to the following:
Extra Data 1
-How many days until this plant can be harvested
Extra Data 2
-How much water this plant has or needs
-You need a bucket, watering can or well to manage the water level
Extra Data 3
-How much the yield will be. This allows for "fertiliser" and harvesting (a reduced amount) prematurely

Then you would have to display some graphic. I hit on the idea of displaying a box with a number representing the number of days till harvest, and a water/droplet icon to indicate the crop needs watering. That could probably be shown over the crop with slices, for example.
The crop itself could be done via spawning an npc on the plot.

Then one must create some system for the passage of time.
It would either be timer-based, or a system where taking actions depletes either HP or MP or both.
A simpler option would be to have the player sleep to progress the game by one day, or something like that.
It seems simple enough to manage and check each individual plot.
After all there will only be 4-20 potential plots to check, so they can be checked individually, by number or name, etc.

So, using something like this, one could feasibly do some kind of farming game (you can do almost any kind of game in CUSTOM! It truly is amazing and extremely versatile! You can read/write zones, tiles, spawn npcs and more!)


::CUSTOMISATION::
Then another messy part (programming-wise) which is customisable environment.
There would be one kind of environment for the interior of the player's dwelling, and one for the farm land.
It would probably have to be a feature constrained to the map.

The way I planned this was to have an inventory item such as lumber or quarry stone, which can be placed on the map by reading the players position, and spawning the correct graphic. Perhaps it could be a pushable npc?
I'm not sold on this mechanic, as the block would likely have to be placed in front of the player, and more importantly: it serves no game function, save an aesthetic one.
This might be suited if you were willing to write an enemy that sought out the crops and destroyed them (more on that in a bit) but I am not, and it seems not quite right.

It would potentially allow the player to do some kind of mischief if not implemented correctly, such as trapping or blocking themselves off, or an inefficient arrangement.
It would be necessary to restrict the places that a player can place such objects, and/or have some mechanic for removing them too.

This "mechanic" could also be used to place furniture in an Animal Crossing style, and would serve some game purpose. It's fun and cool! It would also be easier to do on a small map, such as the player's dwelling, with possibly pre-set positions for the furniture, and the player unlocks them as they go. This would be much simpler, for example, not needing to read the players position.

As well as placing blocks or fences outside, one could also assign "guards" such as a watchman or guard dog to protect the crop/farm.
I also like the idea of having a canine companion who follows you.
The player would choose a skin, and the companion could be a cat etc. and the player sprite could be male or female (I like giving players choices!)


::THREATS::
Then we get on to protecting crops, vermin, invaders etc.
This is somewhat of a necessity to make the game interesting, creates elements of risk, planning, preparation akin to an rpg, and random chance, which should keep things varied and interesting.
You may be familiar with Dwarf Fortress. There, vermin show up by spawning.
Vermin might be rats, cats, insects of various kinds, birds and more.
Assigning a guard dog, or having a cat to protect your crop would entail less vermins, or disables the spawning of such. Possibly a scarecrow would work as a simple solution.
If there is an animal keeping guard, it would patrol the crop area, but it should not block the player if combined with placeable features.

Invaders is a much more tricky subject, because you need to tell them to get to the crop, and then the crop has to be destroyed.
However, we must ask the motivation of the invader. I came up with the idea that it could be a wolf or something, spawned occasionally, and the player can chase it off.
It gets more complicated if you include the fencing/block ideas with which one could wall off the farm. However, how would the invader path to the crops? Seems a bit difficult, and the vermin idea is more fitting and simpler to implement.

One could not only have a guard-dog, watchman, etc. but do some kind of terraforming, such as digging ditches, placing turrets or sentries, or something like that.
Too complicated for a simple farming sim tbh. It might be worth implementing in a toned down way, such as pre-set locations and instances, rather than being fully placeable anywhere.

Then my gameplay ideas start running a little thin, and narrative ideas are multivarious.
The player should choose their gender and engage in romance.
They should trade and barter.
They should have expandable or upgradable features, either for exploring the world or managing their homestead.
They should be able to process crops into Jam, Food, Medicine, Perfume, Textiles etc. in a similar vein to Dwarf Fortress.
Nettles can be turned into thread and fabric IRL, why not in a game?
Then a player can engage in commerce, gift-giving and upgrades.

Things are simplified with the existence of a fantasy setting. Just make some slime up and it'll stick cus it's written that way.
You could make a fictional plant(s) to serve whatever purpose you like.


::PLAYER ACTION::
Players would need to secure a water source such as a river, and later upgrade to a well.
They would start off with a bucket and upgrade to a watering can.
To place a well, a player would need bucket, rope and a block (like Dwarf Fortress. Do you see a pattern :p?)
A player would need to manage their supply of seeds, by trading, scavenging, looking in dangerous places such as a dungeon, collecting seeds from harvested plants, and feeding animals with the seeds.
There should be rare seeds that are hard to obtain.
I had some more ideas to do with exploration.
The player should be able to explore dungeons, which are only fully navigable/traversable via upgrades and items and such.
This would break the monotony of a farming game, akin to Rune Factory (a harvest moon spin off where you fight monsters in dungeons as well as managing a farm)
The player might fight enemies, get loot, and unlock new areas to farm.



::SELF-CRITIQUE::
Well, it's not really anything new.
Dwarf Fortress does it much better, as does Harvest Moon and Rune Factory.
This is not really new ground, unless done in a novel and inventive way
Such as growing something other than edible crops, maybe something wacky like plasma technology, or alien super soldiers, which you then collect.
There's also no reason it has to be a farming game. It could be the basis of a more complicated and larger game, using this framework to give management options depth.

I see this kind of game working well with exploration and commerce.
That would necessitate the inclusion of towns, friendly npcs etc.
It could also work the battle engines features such as being like a typical rpg, or having such elements or features.


::MISC::
If there is farming, it doesn't have to be purely crop based.
One could have beehives, for instance, and collect honey and wax to be used in industrial applications (just like.... Dwarf Fortress :p okay I basically ripped it off! lol)
The only limit is your imagination.
There should be some friendly presence, like a cat, dog, cow or horse on the farm to make it feel fully fleshed out. This is more of a necessity than most other features!
No one wants to play a boring game!


::CLOSING::
So, that's my thought experiment. I have another one which I will post as well.
I hope this was inspirational for you, and if you'd like to use it, you may, however this is hardly an original idea (but what is, these days?) and there are already games in this niche (there's a game in my niche!) so it'd be nice to see something fresh and novel.
If you have any suggestions, it'd be cool to hear them, as they will surely go in the ol' brain and turn up again somewhere down the line, perhaps when I am a bit more experienced enough to implement such complicated plans.
Most of all, I'd like to know what your thoughts are on coding such a thing.
I don't really want to write 3000 lines of code, or create something as complicated as Bell of Chaos (which was a great game btw, just, a bit out of my league, coding wise :p) I just want to think of some simple ideas which will stretch tags and extra data to create lots of variation and depth in a simple way.
Using varying graphics for crops, invaders, etc. provides textural richness to the game.
Simply varying a few statistics should be enough to give each piece of the game a distinct feel, in a basic game.
Keeping coding to a minimum, one can use the features already built into custom to great effect, especially read/write tiles, zones, spawn npcs, slices, etc.

Anyways, I realise this was long-winded and now you're probably trying to figure out if such a concept is feasible, let me set you at ease by saying; it's just an idea!
Don't rush to create this game idea, because there are countless and infinite ways to implement it in various settings and for various reasons!
I just want to hypothesise on the possiblities.
I personally am quite partial and fond of growing something other than crops.
It'd be cool to grow a party member, for example!
Or to grow a crop which can be placed as a block or fence!
Perhaps it could be abstracted and used for a resource management sim style game, where you rule a kingdom/empire and the "crops" are soldiers, technologies, raw materials or more! That could be a cool idea because you could script the threats and write them quite simply! No complicated pathing, for example. Just textboxes and images to represent the enemies. (perhaps)[/u]
Last edited by SwordPlay on Mon Mar 20, 2017 6:14 am, edited 2 times in total.
"Imagination. Life is your creation."
User avatar
kylekrack
Liquid Metal Slime
Posts: 1242
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

Ok, it is my bedtime, but you spent so much time developing this idea and I love Harvest Moon so I think you deserve a response. I'll try to be thorough, but I'm going into finals week so I don't have a huge amount of downtime.

This sounds like a feasible game, no doubt. If you decided to make it, I'd love to help you along with the plotscripting elements or anything else in the future, assuming I have the time. On your comment about originality, first off, I don't think that's a huge issue. Whatever you create is going to be different from all other games, even if it's just in small ways. The important part making something, and I'm sure during the process you'll put your own uniqueness into it. That goes for any game. However, adding wacky technology sounds pretty interesting. A farming sim where you're an astronaut sustaining on a new planet sounds like a definitely worthwhile spin on the genre.

I also really like the idea of using crops as raw materials to process and manufacture into other products. It adds a lot of customization for what the player wants to do with their farm, rather than just growing and selling crops and animal products like in Harvest Moon. You also mentioned finding a water source. This suggests a more free roam, open world concept where the "home base" isn't set from the beginning. Your ideas of customization by using inventory items could work really well here. The different facilities, like the house, could be inventory items that the player deploys wherever they want, assuming there's room. If it was a futuristic setting, they could be like self-building facilities that spring up into fully sized buildings.

Zone Usage:
I do see a problem with your proposed method of using zones. Zone extra data isn't tile specific, so it would be difficult to store variable data like days left or water level here. I would recommend using NPCs to store this stuff, because you can refer to each individual instance of an NPC. You could still use zones, but they'd likely be more useful for something like ground-type, which could determine the fertility of a tile, what could be grown there, etc.

Basically, I think a good way to go about doing it would be to have a script that plants a crop by creating an NPC at a determined spot, then setting its extra data fields to the appropriate values for a freshly planted crop of that type. You can have a utility script store information for what NPC corresponds with what crop type. If you need help with that, I or someone else could surely help out.


I loved the read. Thanks for taking the time to elaborate so much on an idea. I have to say, I'm a big fan on farming sims, so this really caught my eye. Again, I think it'd be feasible if you set a small enough goal for the game.
My pronouns are they/them
Ps. I love my wife
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

Thanks kindly for the suggestions!

Now that you mention it, using zones wouldn't be a great idea, unless you were going to use 1 zone per tile, but there's a limit of 9999, so it could be possible, albeit tedious!
I still like using the idea of zones, purely because I can see it in the tilemap editor, and that somehow makes me feel like I have control over it lol :p

However, I like some of your ideas and you probably know better.
Different soil types is an interesting one...
I was looking at Fnrf Yngm Schnish's 8 bit tile set and saw mushrooms growing in a cave... Underground farming, or even possibly underwater farming might be different!
Why not fish farming while we're at it?
Different soil types might be a good way to break up the game and indicate to the player what is expected in each area. I think this would go well as part of the language/vocabulary of the game, and some subtle visual distinction between soil types would reiterate to the player what is expected, so that players aren't left wondering what to do.

Foraging and survival is cool beans.
But the more I'm thinking about it, the more it sounds like another game "Lost in Blue". Actually, that probably has some cool mechanics that could be appropriated too!
This game could be a "Lost in Blue" in SPAAAACE or with MAAAGIC! And that might contribute to the uniqueness quite a bit.
...


It might be a nice idea to get some randomisation involved, so the player has to experiment with seeds and growing.
Randomisation is also something I'm SUPER keen on! I love roguelikes and am influenced heavily by procedural generation (Dwarf Fortress, for example!)

I think making a small, manageable game, with a few key features, and randomised environments/objects is a way to make a much more long-lasting experience in the long run!
That would also save some of the work of designing the world: one would only have to design blocks, sections, areas, rooms, or set rules for it's generation.

Now that I'm thinking about it a little more, I would love to have some kind of randomised crops and items....
But to make it interesting, it should backfire on the player in some circumstances, such as man-eating plants, venomous, thorned, or otherwise having drawbacks necessitating player intervention. It would be good if there is something to be gleaned from a negative event though, so they would still offer crop, just at a higher cost, or with an element of risk.
There could also be other positive side effects from a crop, such as temporary invulnerability, glowing in the dark, flying, underwater breathing, floating, etc.

I think if I compiled a list of cool effects, then creating a game like this would be both feasible and interesting, and I might do it just to sharpen up the ol' creativing skills.

I'm leaning towards a more sci-fi setting to plot-splain everything. Sci-fi magic did it!
Either that or a fantasy setting. Magical crops!
Magic Farmer! Magic plant dude! No, sounds like a marijuana reference :p
Alien Farmer? Might be cool. I like drawing aliens as well lol.
Perhaps eating a crop can morph the body of the farmer? Very old-skool

I often look at the limits of CUSTOM and try to think how to fill it out.
For instance, 32726 (?) slice collections is a lot of wriggle room!
So is 9999 zones!
The only problem is making each one count.

I hope to come up with some stuff, tonight and tomorrow.
I think in the end, less is more, especially for an 8-bit game.
Having some basic and simplified gameplay is probably a better direction!
Depth might or should come from the randomisation, and uncertainty.
Who needs wolves invading the farmstead when you can have exploding tomatoes?
"Imagination. Life is your creation."
User avatar
kylekrack
Liquid Metal Slime
Posts: 1242
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

A good way to implement randomization without being cruel would be to include a seed identification system. When the player finds a seed, they don't know what it does, but once they plant it and observe, it fills an encyclopedia entry for that seed type, and each time they find that seed in the wild, they are able to identify it automatically. Like a Pokedex! This way you still have the element of trial and error, but the player gains agency as they experiment.

Procedural generation takes time. Probably more time than designing a world by hand, honestly, but it's doable. The trade-off is that your generation algorithms have to be really good or the game won't be nearly as fun as a carefully crafted environment. I know of at least one OHR game that uses procedural generation for the map, but I've never successfully done it myself, so I don't know exactly how difficult it'd be. Another solution might be to create several maps by hand and throw the player into a random one upon starting a new game. Procedural generation sounds good, but probably shouldn't be a priority.

I like the concept of underwater farming. In a sci-fi setting that could add some really interesting lifeforms. Fish farming sounds cool, too. It could be as simple as placing a cage or net on a tile and waiting for fish to get caught in it. That way, it's mechanically similar to farming crops, so it doesn't require a ton more scripting, but is still aesthetically different and yields completely different resources. Zone usage could also spread to underwater or fishing zones to maintain consistency in the engine.
My pronouns are they/them
Ps. I love my wife
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

So far, I am leaning towards a linear-ish adventure, where there are certain obstacles that must be traversed in order to complete the game.

I don't want it to be a farming sim, but I could definitely take it there.
I want it to have an old-skool retro feel, sort of zany, wacky, nonsensical, whimsical, using the rule of cool, rule of funny, etc. rather than logic
Player should get weird powers throughout the game and have fun seeing all sorts of weird slime

These are some of my ideas for the game.
-a ruined crop is not useless. It could become scrap, or undergo some transformation to make it useful in a different way.
-one idea is to make all expired seeds "poison seeds"

-whether a crop is damaged, ruined, or is salvageable depends on the type of crop it is. Some crops are delicate, and some hardy. Some recover easily, and some only recover under specific circumstances.

-a player can wallow in different kinds of sludge to get certain effects, like healing. Maybe it has an effect on plants, or is used to transform them? different sludge types = different colours

-yes the player will probably feed seeds to wildlife with hilarious effects. This is the only way to explore the game fully

-should the player harvest animals? eggs? butchery? milking? riding?

-some environs are hostile. snaring plants, things dropping on your head, monsters and creatures, extreme hot, cold, moist, dry and altering the inventory and player accordingly all serve to frustrate the player. Not all effects are negative!

-there should be lots of hidden areas :)
-there should be loot, treasure etc. for exploring

-not sure if this is a sci-fi game, magical etc. I am leaning towards an alien adventure

-what is the players motivation? survival? fun? feeding their family? rescuing a loved one? is it a journey, or every day life?

-swamp, jungle, forest, treetops, underwater, etc.

-aesthetic sensibilities are a big deal. things change palette and sprite, either as reskins, or as an effect of the environment, eating or being affected by a crop etc.. The player should be able to play with the game elements.

-so far, crops can be eaten by the player, and by npcs (might have to 'drop' the crop, and have npcs path towards it) and certain crops have different usages, such as being throwable, only usable in certain conditions or by certain creatures. It's not like you can feed every kind of crop to every kind of npc, with a unique effect, right? Only if there were a few crop/npc types, perhaps. I am considering limiting the amount of both to less than 10.

-having the right crops is the only way to progress, explore, experience and enjoy the game fully. They open doors and passages in various ways, subdue and control npcs, grant various and multitudinous powers, can be traded (maybe, I haven't planned any sentient creatures apart from the player), and probably more.

-crops can explode, burn, poison and generally cause damage. It could possibly be worked in as a action gameplay mechanic

-crops can affect the environment, destroy obstacles, make extreme climes tolerable etc,. They can create pathways. I'm not sure how, yet. Need to come up with some ideas, or pare some features.

-crops affect npcs. Somehow. At the moment I am leaning towards 1 npc = 1 crop which is made for it, for simplicities sake

-crops affect the player. One should be able to alter the abilities and appearance of the player via equipment, eating crops etc. but should be limited in some way (inventory slots, max stack size, digestion gauge, dehydration, pre-requisites or some other stuff)

-probably will end up with a few (5ish) crop types, each with multiple, situational effects. Possibly will do away with random generation if it is too much, but probably will want to randomise where things spawn, at least, a little bit.

-areas and maps probably done by hand. monster/enemy spawns, loot, seeds, etc. should be a little random, or have variance

-can go for a more complicated thing, like 20+ seeds, each with multiple effects usable from anywhere and unique effects on each npcs etc. etc. etc. quite a lot of effort though

-need to think about the end goal, and the steps to get there, and what would be fun to do, play, etc.

Code: Select all

GROWING SYSTEM

Instantaneous - Just add water!
-checks the soil for water level (stored in zone extra data)
-every time it grows 1 stage, it uses 1 water
(optional)-if water drops to 0 and the plant needs to grow, it will die instead
(optional)-the final yield depends on the fertility of the soil (stored in extra data) and a growing crop probably reduces the fertility
(optional)-prevent player from over-watering, consequences on crop or soil

Timer based
-same as above, but it checks and uses the water every so often instead of instantly
-could have a countdown or timer displayed via slice floating above the crop

Display
-Icons for water, such as "needs watering" or "overwatered"
-Icon when the crop is fully grown indicating harvest ready
-Spawn an NPC/slice representing the crop on the zone?
-Growing crop sprite, Ripe crop sprite, ruined crop sprite,
-Different sprite for high yield. Maybe with slices.

CROP AND SOIL
Omniseed (grows anywhere, into anything via soil type)
Blamseed (has an effect when thrown, for example)
 -damages (blunt)
 -damages (exploding)
Nutriseed (has an effect when you eat it)
 -heals hp
 -heals mp
 -heals status effect
 -counteracts an effect
Dangerseed (has adverse effects)
 -damages hp
 -damages mp
 -inflicts status (confusion, blind, sickness)
Thermoseed
 -gets hot
 -gets cold
 -absorbs temperature difference
 -shoot lasers
 -heat vision
Stinkseed (attracts various creatures or has an effect on living things)
 -deter attackers, repel monsters
 -attract attackers
 -spawn attackers at an increased rate
 -slow attacker
 -speed up attacker




EFFECTS
-Crop effects
won't grow (crop/soil) -prevents or halts growth
altered yield (crop/soil) -more or less yield, ruined yield
thirsty (crop/soil) -needs more water

-Entity effects
poisoned
slowed
speeded up

-Player effects
 -negative
can't eat (mouth)
delayed effect (digestion)
dehydrating
confusion (alter graphics on screen)
blindness (obscure parts of the screen)
garble language (make things unintelligible)
forget definitions (crop) temporarily or permanently
slowed
 -positive
speeded up
breathe underwater
quick digestion
can beat up, tame, or deal with monsters
resist elements such as heat, cold, moisture or dry
abilities to traverse terrains

Tools/Equipment/Abilities (sense things)
 -display a mini map (useful for an underground, dark or obscured area)
 -display water level
 -display crop type, level, needs
 -display soil type, state
 -display enemy type, state
 -display hidden stat
 -display hidden item/object
 -display hidden area/entrance
 -Pick up boulders/throw them/push them


SOIL TYPES
common = brown (basic plants)
hot = red (creates explosive or warming plants)
poison = purple (creates poison/antidote plants)
healing = green (creates hp/mp/status healing plants)
sweet = blue (creates plants with status effects)
excellent = gold (creates rare plants)


CROP STATUS
-water level (how much water it needs)
-ripeness (if it can be harvested)
-gone off (left unharvested)
-predated (pest) (a pest is damaging the crop)
-damaged (the crop is damaged)
-dying (for whatever reason, on the brink of death)

Last edited by SwordPlay on Wed Mar 22, 2017 10:19 pm, edited 1 time in total.
"Imagination. Life is your creation."
Post Reply