Discussion in 'Game Design, Development And Publishing' started by Ciez17, May 29, 2018.
So you just want to see how to make different pieces of food affect stats differently?
I suppose so? Maybe find a way to stack affects? Like some games have multiple buffs at once, though there's a cool down period between ingestions. And also, just having food boost health, I still find it hard to find specific tutorials for that. Again, thank you so much for all your help.
Does the food/bonus run out after a while or does it stay until a new piece of food is eaten. Are the bonuses permanent?
I didn't see my last post, sorry for double post!
It's cool! To answer your question, I suppose the bonuses do run out after a set amount of time. Having a crazy health bonus the whole level because you ate an apple at the start seems kind of ridiculous.
Bump for anyone else who knows how to tackle food.
i started a very similar project a few years back... unfortunately it didnt get off the ground very far.... all of my notes and scattered bits of code are all gone now tho.. all i have left of it is a couple scrfeenshots from steam workshop ;/
another thought to maybe expand on with your feeding process... the stats of your critters grow not only according to fighting monsters and leveling up on the battlefield.. but also what you feed them will have an effect on their stats in a small way over time?
your basic stats are set at creation/then the child stats are based from the parent/ your critter stats increase when they levelup
how about when you feed then they get a temp boost and a small boost to X stat based on the food type ...arbitrary numbers and foods here... you feed a cow type creature hay she gets a plus5 health immediate bonus and a plus 0.2 to health permanent ... if you feed her icecream, she gets a plus 10 to dex temp and 1.5 permament.... you can even decrease a stat with foods they dont like... "feeding a cow a steak" this way you can "customize your pet based on how well you feed them
or im just adding to the nightmare of lists within lists within lists ;o)
That sounds near exactly what I want, I just need help getting it coded. Baby steps, baby steps...
I have a 'buffs/debuffs' mechanic in my game. I simply have each instance (or one, if in your case it's a single creature that you can buff) hold a list, and when I apply a buff I store an array in the list with a few different pieces of information (in my case, this is the buff type, which I handle with enums i.e. e_buffs.BURN, the time left on the buff, the HP effect the buff has (negative for doing damage, positive for adding damage, in my case, HP is the only 'stat' that a buff can effect) and the applier's ID). Then I simply iterate through each list every turn (or second if you want it based on time) and subtract 1 from the time left on the buff, deleting the list position if it's at or below 0 and applying the damage/heal. In your case, just think through what potentially could happen in a buff: Is every buff simply effecting health, or are there multiple stats that could be effected by a buff? Do you want buffs to stack or simply add length to an existing buff if they are the same? Etc. Basically, just answer the question of what do I need to keep track of for each buff and store that info in each list slot and you will have a nice way to manipulate your buffs.
Clez17, this reminds me of a game I created when I was a young whippersnapper. It was called Small Scape Epic. I never finished it, but it was a fun and challenging project.
Ancient GMC Topic: http://gmc.yoyogames.com/index.php?showtopic=414077&hl=+small++scale++epic
Download Link: https://host-a.net/f/55324-small-scale-epicexe
I'm surprised that this link works... Who'da thunk host-a.net would survive this long?
I'm posting this because you may be able to draw inspiration from it, and because I'm feeling nostalgic. I can't believe this was ten years ago. Time flies.
Good luck with your project.
Rob: Great work with your videos. Where were you in 2009?
Thanks for the help!
Whoops, realized that I didn't answer your question. I'm gonna try starting off with gaining health first. Like eating an apple gains back 5 points of health. Then maybe a sprint buff, that sounds easy enough.
Hey I'm attempting to incorporate a very basic room transition, and it works. However, the "breeding room" elements follow back into the other. Basically, it looks like this:
Update? Hows everything going?