Discuss Scratch

Locomule
Scratcher
1000+ posts

The Medieval Village Simulator Project

My idea is that giving players quick access to something they can relate to and achievable access for something new to them encourages them to play the game. Which could be garbage? I dunno, I'm always thinking like I'm writing a game for Steam release, maybe someday I will? I started working on your new list system, then as I was going to bed last night thought of an easier method so I'm gonna go write that now. It will be automated too, so rather than editing entries by hand you'll be able to use hot keys to add or remove entries. We haven't discussed a text engine yet but they are easy peasy, I've done many. If we use one for the game then we can also add a display feature so you can edit your list data without even having to open it. Stuff like a list editing system makes it much easier to code the game and you can pull the system out before release if you want to or need to lower block count in a big, bloated project. Once you get enough blocks inside a project the editor itself will begin to lag.
Locomule
Scratcher
1000+ posts

The Medieval Village Simulator Project

Super impressive creatures list!!

Ok, the new list system is added to my version. It is very simple at the moment so we can make improvements, here is how it works..

I made a new list called Lore Data. It will consist of Categories and Entries. So something like Monsters might be a category while Orc and Hobgoblin would be entries within the category Monsters. To add either just press the L key (works even when the project isn't running) and the dialogue will appear. You have the option to either add a new category, a new entry, or find an existing category in the list. The Find feature will be useful once the list gets really long and you need to find and edit something by hand.

Right now the list system..
- makes sure you are not creating duplicate categories
- does NOT ensure you aren't creating identical entries
- lacks a method for editing or removing categories and entries
- adds a list entry after each category name that records how many entries that category has. So if you created a new category named Cats right after “Cats” in the Lore Data list there would be another list entry with “0” in it. When you add an entry to Cats that number would increase to 1. We aren't using this yet but in the future it will be very useful.

Like I said, all this is tweakable including list names, etc. Whatever works best for you! I recommend trying out the system a bit to ensure it is working for you before committing to adding a ton of data to it. Although you can import data directly into a list from a text file which is really the way to go if you already have big lists to enter which it seems like you do. I would do that to start the list and then use our system to maintain it during game production.

Let me know what works, what doesn't, what you'd like to see added, etc
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

That sounds really cool, I'll have to check it out. I have been working on finishing up some of the biome generation for the z-level based version I had originally made. Even though we are almost certainly using your version for the final version (if there is such a thing as a final version), I wanted to at least make all the biomes accessible in case someone else wants to use that version.
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Everything is broken!

Don't worry, though, I'm gradually getting it fixed.
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Okay, I have finished making all the biomes generate and adding foliage for the taiga. Now all I need to do is fix some really annoying generation bugs that I can't find any cause for.
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Hey @Locomule! I just made another version! https://scratch.mit.edu/projects/606118370

Sorry I haven't said much lately, but I've been busy. Maybe now I'll finally get around to porting all my lists into your automatic sorter.
Locomule
Scratcher
1000+ posts

The Medieval Village Simulator Project

I made a backup copy of Lore Data with the date I created it in its name. That way if anything gets messed up while working on the lore handling system we can restore and old copy very quickly. It looks like I need to play with it a bit so I can figure out what to add and tweak unless you have any suggestions in the meantime.

Nice clock! We might want to consider running game time faster than real life so we can simulate entire days during one game session? Also do we want a clock display on screen, maybe something simple like a circle and an hour hand?

Otherwise I am going to get started again by tweaking world generation so it is all generated at the beginning rather than in chunks as you play.
Also, you have so many blocks in the stage that it is lagging out the editor so I'm going to figure out how to optimize that without altering your system. It might take me a bit to wrap my head around it all
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Saving a backup is definitely a good idea! And yes, I was planning on having in-game time run faster than real-time, I just was keeping it in real-time for now so I could make sure it was accurate and until we have decided what speed it should actually run at. Also, I had a thought the other day that it should probably run in ticks rather than fixed seconds; that way the player can speed up time, slow down time, or pause the game entirely. I would definitely appreciate it if you could optimize some of the code; spaghetti code has always been my weakness.
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Since you are going to start optimizing the code, I went ahead and published another version (https://scratch.mit.edu/projects/678226206) so you can include the changes and tweaks I had made in it. Also, for generating the whole world at once, here are some things to consider:
  • Rivers (makes sure they run logically)
  • Mountain ranges
  • Mountain passes, valleys, and ravines
  • Tectonic plates
  • Beaches along oceans and maybe other water sources
  • Snow in the north
  • Very northern forests should be replaced with taigas and grassy plains with tundra
Locomule
Scratcher
1000+ posts

The Medieval Village Simulator Project

Lol, I worked on the earlier version before seeing this But no worries, I'll start over tomorrow on the newer. Thanks for the list of things to consider!! I found clock code both in the Stage sprite as well as in the sprite I left for you, I'm assuming you only mean to have one copy of this? Or maybe you changed that in v.5, I haven't checked yet. Gonna grab a remix now and will be on it tomorrow.

edit: Scratch says the new version is not shared yet? (“scratch server scratch'ng its head” error at linked page)

Last edited by Locomule (April 21, 2022 03:58:26)

Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Huh. It definitely says its shared on my end. Maybe I copied the link wrong? Try clicking on it from my dashboard.

About the clock, I only wanted to have one copy of that code in the “For Fogger123” section, but every time I try to delete it from the backdrop it tells me I have to remove all instances of that custom block first. But I have searched the whole backdrop code from top to bottom and cannot find any more uses of it to delete.

Edit: Also, don't feel like you have to implement every one of the terrain suggestions. I recognize that some of them might be difficult without z coordinates.

Last edited by Fogger123 (April 21, 2022 12:03:21)

Locomule
Scratcher
1000+ posts

The Medieval Village Simulator Project

must be a bad link, got it from your page

Last edited by Locomule (April 21, 2022 13:25:05)

Locomule
Scratcher
1000+ posts

The Medieval Village Simulator Project

Whew, the first round of optimization is over! And it was a success!! It was kinda sketchy, I had to break out the pen and paper I started optimization by dragging scripts around a bit so I could figure out what was what, even just that took a while. Then I decided to start with random Person creation code. I got a lot of it reduced and can go back and do more. But I also changed the order in which traits were added which meant I had to write out your original order next to my new order so I could figure out how to update the Describe Person code. It got kind of hilarious, for a while all women, even the most attractive had beards and this started feeling a LOT like what I read about the development of Dwarf Fortress. But after many hours work the optimized code is performing normally again. I also moved the Person generation code into a My Block set to run fast so the game starts up quickly again.

I'm probably gonna take a break until tomorrow. Here are a couple of thoughts I wrote down..
I love the way you've structured your trait system! A lot of funny and cool stuff in there. I'd consider making rare traits somewhat less rare mathematically or odds are few players will ever see them.
I left a comment at the top of the Person 1 generation code that lists the new order in which traits are added for you when you do more work on the system.

So not much to see over the hood yet but under the hood I got a lot done.. https://scratch.mit.edu/projects/678687743/

Last edited by Locomule (April 21, 2022 22:42:14)

Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Thank you so much! I'm busy right now, but I'll take a look as soon as I get a chance. I set the rare traits to the percentages that a quick Google search said they occur in real life populations, but I guess I could make them more common. Funnily enough, about 40% of the women in the game have hirsutism, which means they can grow beards if they go without shaving. Of course, the code isn't in for that yet.
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Okay, it seems pretty good so far. The one problem I spotted at first glance is that when in skill mode or inventory mode, it displays the person's age in place of their last name.
Locomule
Scratcher
1000+ posts

The Medieval Village Simulator Project

yeah that part wasn't done yet but it should all be done (for now, I can still optimize more later)
try it out, let me know what is still broken or needs to be tweaked
once we are done with your code I'm gonna start tweaking mine
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Well, that part is fixed, but now I notice that it uses the villager's age in place of last name in the chronicle and the villager list. Also, it uses incorrect pronouns in the inventory screen. "She wears a shoddy felt chopine on his left foot."
Locomule
Scratcher
1000+ posts

The Medieval Village Simulator Project

my wife just got over a 48 hour virus and my son and I just caught it, up all night long throwing up. So I'm gonna be down for another day or two. Sorry!
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Sorry to hear about that!
Fogger123
Scratcher
67 posts

The Medieval Village Simulator Project

Whenever you get back, I worked out some of the bugs that I had noticed: https://scratch.mit.edu/projects/681165394/

Powered by DjangoBB