Friday 19 December 2014

Development Blog #0004 - Huge Weekly Update

After a week of developing Wool, here's what it looks like:

What am I looking at?
This is an overhead view of a scale model of Rust.  

What do these symbols represent?
Each square represent 20 meters of in game distance.  
The white circles are players (newmans).  
If a white circle has a +, this indicates they have weapons of the coloured tier:
{Brown(wood) is 1, Gray(stone) is 2, and Orange(metal) is 3}.
A black square is a base, it will have a square filling if it is upgraded.
Dark green squares are trees.
Gray squares are stones.
Orange squares are metal.
Light Green squares are animals.

Here's a 5 minute video of the simulation over about 24 simulated hours



So how did you get here?
Well, after Saturday I went to work on making things look prettier.  So I upgraded how newmans look and are represented at the different tiers.  

Then I made combat work.  Combat happens when two newmans occupy the same 20m square, and declare they will attack.  The winner is determined at random.  A newman with better weapons and armor has a much better chance of winning any battle.  I let newmans with worse weapons have some chance of winning to account for times that players sneak up on each other, and land a few good blows.  I won't bore you with the details, I'll make a post about tuning the systems at a later date, and give you all the gory details.

Combat simulation test video



Cool, combat works.  Next came the respawn system.  After 10 seconds of being dead, a newman chooses a random spawn location from a specified list.

After the respawn system was implemented, the next clear direction to take was to recreate the spawn beach as seen in the current build of Rust.  I needed some way to mark a large number of locations as spawnable, and make that area look roughly like a beach.  I decided to come up with a map parsing system.
I really went all out with the map parsing system.  I can now take any map plan image and render a completed, textured, detailed, playable Wool map.  

Sample map plan

The parsing system then takes that map, analyses the colors, spawns resources, creates biome textures, and... 
V-wa-la

It'd be cool to make it look like this
But I've only so much time.

I'm so happy exams are over, I can just pour time into Wool, with the exception of my full time job as a mobile developer.
After getting the map parser in place, and looking nice, I focused my efforts on the crafting system.  Again, I won't bore you with the details, but just know that newmans can craft food, weapons, armor, and tools up to and including tier 3 (Orange metal).
With crafting working, I got the base system up and running, just in time for this post.  For a ton of wood, or stone, or metal, a newman will base himself.
The AI
In order to get newmans to build bases,  I had to give them some meager intelligence.  Thus WLNewmanBrainBasic was born.  It follows a strict goal priority list:
@[goal_attack_prey, goal_craft_all, goal_base, goal_gather_resources]
First, it will attempt to attack anyone on its square if the prey is significantly weaker that it.  Then it will attempt to craft tools, weapons and armor.  However, in order to craft any weapons, a newman must be inside his base.  Thus, failing to craft, the newman will goal_base, and do all required things needed to build a base.  Once the base is completed, crafting happens, then upgrading the base, until the highest tier weapons and armor are had.  Then it will just wander.

Cool, what's next?
I'll be updating this blog every friday, in union with the devblog update.
Next up, I figure the AI could use some love.  I'll make them hunt the resources they need instead of just randomly bumping into the resources, and then gathering.  This should allow me to tweak the amount of resources required for everything, so that the timeline for newmans falls more in line with my ideal rust progression system.
After that, I'll implement the raiding system.  That will be fun.

Please follow by email (box at the top of the page) if you're interested in seeing me complete this!
I read all the comments on both Reddit and Blogger, so don't be shy!




No comments:

Post a Comment