Dragon Creek Weekly Update #3
I managed to get the feeding animation working this week, as well as food preferences by breed and personality. For example, Lung enjoy coffee, but dislike cheese. A serious dragon will like foods like salad, but dislike childish foods like candy.
The way this works is when I feed an item, the dragon checks the name of the food, and then takes that food and enters it into a massive switch statement. Are you feeding me "Ham"? Then go to case "Ham". Nested inside that switch statement are two smaller switch statements that check personality and breed. That way I don't have to write what EVERY personality and breed thinks of EVERY food. I have 10 breeds planned, 10 personalities, and 21 foods (medicine is considered food). If I coded every behavior, I would be coding 420 preferences. Not ideal. Instead with the nested switches I can just code the preferences and ignore the neutral behaviors. Generally a breed has 1 hated food and 1 loved food, and a personality has 2 or 3 liked foods and 2 or 3 disliked foods. This reduces coding preferences to at max 80 which is much nicer.
I found a bug where when reading a dragon's seed(all of its birth data) the seed would cut off the personality. This was because I miscalculated the seed length to 85, when it should be 86. Easy fix. Just changed the seed reader to cut-off at 86 characters and now I don't have an army of "Weird" dragons (personality of 0 indexes to "Weird").
Admittedly I'm not a huge fan off the wyvern and lun feeding animations. The wyv feels too static, and the lung feels too short. I took some animation shortcuts with the feeding animations to reduce the time spent drawing the sub-components and I think it shows. Perhaps when I have time I will redesign the animations, but for now I need to rush into making a stat checking menu, a personality cheecking menu, and sleeping.
Dragon Creek
A dragon raising sim where every dragon is procedurally generated
Status | In development |
Author | Rekkeld |
Genre | Simulation, Role Playing |
Tags | Character Customization, Dragons, minigames, Pixel Art, Procedural Generation, Singleplayer, training |
More posts
- Dragon Creek is in Early Access!Jan 31, 2021
- Patch Notes v24Jan 24, 2021
- Dragon Creek Demo V18Jan 17, 2021
- Dragon Creek Demo Week One ReviewJan 10, 2021
- Dragon Creek Patch Notes 1/6/2021Jan 06, 2021
- Dragon Creek Demo Patch Notes 1/5/2021Jan 05, 2021
- Dragon Creek: A New Year!Jan 03, 2021
- Dragon Creek Demo Patch Notes 12/31/20Jan 01, 2021
- Dragon Creek: Sounds and MusicDec 27, 2020
- Dragon Creek Update 12/19/20 (Demo Soon!)Dec 20, 2020
Leave a comment
Log in with itch.io to leave a comment.