Saturday, 23 May 2015

Development Blog #0021 - Global Leaderboards

Global Leaderboards

If you haven't already, download WOOL - a Rust simulator for iOS
You will now be ranked globally when you play Wool : Experimental Island.  I re-designed the leaderboard system in the newest update.  This decision came because I was coding a registration system for players to play online with, and because Apple's Game Center was not well suited for the job.  The new system will not require you to register with an email or password, rather it uses your device's unique ID to track your score.  This seemless and considerate implementation will allow you to enjoy unbroken play.  No login screens, no passwords, no emails, just play.

Oh, and it circumvents The Great Firewall too.

The update should be on the App Store by the end of next week.


Moving on

I'm stopping work on this project indefinitely.  I'm starting a software development company, and I'm afraid all of my free time will be devoted to getting off the ground.  I'm doing it for the money, I have to support myself and my girlfriend here in China when I resume school full time in September.  It's possible I'll be able to pick up where I left off when I'm in a better position, but for now, I must cease my game development efforts.  It's been a fun and interesting 6 months working on this project (in its many forms)  and I hope you all have enjoyed reading about, watching, and playing WOOL : Experimental Island.
 

Friday, 1 May 2015

Development Blog #0020 - Multiplayer Backend

If you haven't already,download WOOL - a Rust simulator for iOS

Multiplayer Server
Everyone will connect to a single, persistent, multiplayer server.  Wool is turn based, players will have up to a second to take their turn with everyone else.  It's a bit of an experiment, so we'll see if it's any fun to play when it's up.

Progress
This week I learned how to code a Java based back end server.  This will let me write game servers for any kind of multiplayer game.  I really should have figured out how to do this years ago, it's not very much different from writing iOS and Android applications.  I'm writing a server similar to Rust's servers -- a persistent world that everyone will connect to, and that's going to be a bit complicated for one guy.  I'm mainly concerned with latency and performance of the server.   I should have something functional in a week if all goes well.


The Leaderboard Update Is still in review @ Apple.
I think I'm going to re-code Wool in Javascript & HTML 5.  That way, these updates will not take a week to come out when I've finished them.  Also, it would allow the game to be played in your browser and on any modern smartphone.

Friday, 24 April 2015

Development Blog #0019 - It's lonely at the top

If you haven't already, download WOOL - a Rust simulator for iOS

It's Lonely At The Top

The Leaderboard Update is Awaiting Review at Apple.
It's delays like this that make me certain I'll code the Android version.  It should be out in about a week.  
This update comes with a few big changes.  

-Show your dominance online and fight for rank on the leaderboard.  Sign into Game Center, and your scores are automatically posted as you play.  The highest score will be the player who gathers the most stuff (resources, bases, loot) in the shortest amount of time.  

Efficiency Ranking: 5.16 is decent.


-Resume your game with the auto-save feature.  Each time you quit or go to the home screen, the app will save your game (just don't kill the app right away).  This will allow you to pick up your winning strategy anytime and anywhere.  Or, if you're feeling like a fresh start, quit, and start a new game!



-Fixed a major bug that allowed you to attack other newmans in their own base.  Now you have to destroy their base to attack them. 
-Allowed mass deposit of resources (tap and hold).

Looking Ahead
M-M-M-MULTIPLAYER!That's right! I'm going to start designs and codes for a multiplayer server.  You, your friends and all your enemies can run around on a Wool server and hunt each other down.  I'll even include push notifications to alert you to when your base is being attacked.  It's possible that I'll increase the scale of the viewport, so that you can walk around inside of a base, and actually see individual resources.  Online, each player would have about a second to choose his move (move, attack, craft...) or the move is lost.  That way, the game will progress smoothly, and remain synchronized.  This could end up being a lot of work, so I'll start small and upgrade from where we are now.  

Why
The end goal is to have a fun game that plays very similarly to Rust.  For those of you who have been following these last months, I'm still trying to prove a better raiding system for Rust.  To do that, I need better data, data that is not generated by my very biased A.I. players.

Friday, 17 April 2015

Development Blog #0018 - Leaderboards Part 3

If you haven't already, download WOOL - a Rust simulator for iOS


Slow progress this week, I've been too busy.

But I did upgrade the resource trade system.  You can now hold your finger down on an item to transfer all of it.


The item will fill up with that red colour, then the entire amount gets traded.  Pretty straight forward.

Again, the leaderboards update will include an auto-save feature -- so you can pick up where you left off.

Friday, 10 April 2015

Development Blog #0017 - Leaderboards Part 2

If you haven't already, download WOOL - a Rust simulator for iOS



This week

I’ve been polishing up the Leaderboards update.  It’s going to have two different measures of dominance: Wealth and Efficiency.  Wealth is the sum total of everything you own, broken down into their resource costs.  Wood is worth 1 point, stone is worth 3, and metal is worth 10.  Efficiency is total wealth divided by time spent earning it.  The players with the highest efficiency are the best players — they can gather the most valuable resources in the smallest amount of time.  
I expect the update to be submitted to Apple within a week, and will be available to play a week after that.  Expect to be playing this before the end of April!  Until then, I’m always in need of additional beta testers.  If you’re interested in helping test Wool, send your UDID to thompson.codes@gmail.com.  


Saturday, 4 April 2015

Development Blog #0016 - Leaderboards and the quest for Big Data

Leaderboards
Soon, you'll be able to compete for the top spot on Wool's leaderboards.  The most awesome player will hoard the most resources, own the best stuff, and have the most bases, in the shortest amount of time.  I call this score "Efficiency".  You can join in the competition using your GameCenter login -- your scores are posted automatically.

Save Games
You can now save your progress.  When you leave the app, it automatically saves your game -- so you can continue dominating later.

UI Updates
I updated the inventory / storage screen so that it's easier to transfer resources between you and your bases.

Bugs Fixes
Things like being killed in your own base, base upgrade bugs, and cost issues are resolved.

Big Data Collection
I want to collect data on how you play the simulator.  Theres a popup asking if I can do that when you start the app.  Please let it upload -- I'm trying to collect the data so I can build a mathematical argument for raiding changes in Rust.

Looking Ahead
Having a big mass of data from the players of Wool will let me make mathematical claims about raiding.  In short, I'd like to see some way to pour raw resources into raiding tools at each tier of play, without the need for scare blueprints.  In Rust, raiding tools would look like drills, or catapults, or rams, or explosives.  These are big, expensive items that will grant you the ability to ruin someone's day.

Allow me to explain myself
This update was all about getting more people playing regularly.  I added leaderboards to make it more social, and more competitive.  I added save games so you could feel invested in the time you put in.  And I made the interface more pleasant to use.  This stuff makes the game more fun so that players will keep coming back.  I want more players and frequent players so I can collect the aforementioned data.
In the spirit of getting more data, I'll likely begin the Android version if the iOS version has enough value.


More about me
I started making WOOL back in November 2014, when raiding in Rust was non-existent due to some crazy wall health regeneration.  I'm so passionate about games like Rust that I'm willing to continue to put countless hours into making them more fun for me to play.
But things have changed.

I moved to China at the start of March, 2015 to pursue my lovely girlfriend Ving.  She was an exchange student from China studying at my Canadian university.  We fell in love, so when she had to leave, I went with her.


The only problem with this plan
Is that the closest Rust server is in Hong Kong.  That's 300ms away!  It's unbearable to play Rust with that amount of latency.  Now, in order to get my Rust fix -- I work on or play Wool.  


I hope you'll read my blogs as this story unfolds.
Subscribe by email.  There's an entry box at the top of the page.
Please upvote on Reddit to help spread my project!




Friday, 20 March 2015

Development Blog #0015 - Making It Playable 2

The Playable update is ready.
Download here


Kill People


Gather Resources

Build Bases & Craft Weapons, Raid.


In this update, it's possible to craft 3 types of weapons, tools, and armor, and 3 types of bases.  You will run around with about 30 other AI players, fighting for survival.  Build your base, raid your competitors, and take over the island.  Please send me your feedback, I'll use it to make the game a better simulation of Rust.  If you'd like to be a pre-release tester, please email your iOS device's UDID to thompson.codes@gmail.com.

Why make this?
In order to better model Rust players decisions, I need to collect data on how real players would play the simulator.  With better AI, I'll be able to create a more realistic model of Rust. This version of Wool does not collect your data, but it will be an option in the future.


Friday, 13 March 2015

Development Blog #0013 - Making It Playable

I've been working on making Wool playable.


-You'll be in full control of one newman.
-The update will fix any and all crashes some users are experiencing, (the map used too much memory).
-You will no longer be able to view the entire simulation omnipotently -- but I might bring this back.
-I need pre-release testers, if you're interested, send me your UDID through the "send feedback" button in Experimental Island, or to thompson.codes@gmail.com.


Wednesday, 25 February 2015

Development Blog #0013 - Download Experimental Island

DOWNLOAD iOS App

It's out!  Get it while it's hot!
I'll be using this app to push out updates about the development of Wool, and my other experiments.  Since I plan on doing more Rust related experiments, I've called the app Experimental Island.  Please download it, watch the simulation, and tell me what you think!

What's next?
I'll update Experimental Island and make it playable -- you'll be able to run around as Garry!


Friday, 20 February 2015

Development Blog #0012 - iOS Application Waiting For Review

Ready For Download

This week I coded and packaged WOOL into an iOS application that anyone can download.

But it's awaiting review from Apple, stay tuned for its public release (hopefully) early next week.
It will be available on iOS 8 for the iPhone and iPad. Download Here

This week I'll make it playable.
So you'll be able to run around as one of the guys in this simulation.  It will be pretty cool.  I want people to send me the replays of their games so that I can analyze the data and figure out the best values for resources and crafts.




Friday, 13 February 2015

Development Blog #0011 - Measuring up to Rust


The developers of Rust agreed, and raiding is now possible at all base tiers.


On Monday this week, the state of raiding changed.  It's now possible to mine your way into player's bases, no matter what tier base you have.  I love it.  This is what I've been pining for.  This system is getting closer to how Wool works.  Specifically, in Wool, players can build tools inside their base, then spend them on an opponent's base of equal or lesser tier.  In Rust, tools are used in exactly the same way.  But, Wool is still significantly different than Rust.  The two main differences between Wool and Rust are tools and the blueprints system.

Blueprints
Blueprints are fun.  It's thrilling to find blueprints hidden randomly in barrels.  It's fun to scour the landscape looking for them.  It's even more fun to compete with someone for a barrel you both are barreling for.  But, there are some things that aren't great about blueprints;  it can be very difficult to find a particular blueprint you are looking for -- so difficult that unlucky players may never find what they're looking for.  An especially unlucky player could spend unreasonable amounts of time searching, and make zero progress.  It's for this reason that Wool gives you some of the blueprints you need at each tier.  At tier 1, {the wood base}, you can build wood stuff {like a wood hammer, a wood spear, maybe some bark armor}.  Similarly for tier 2 and 3.  Not only are you be able to progress consistently, but Wool's system has better style -- you won't see players with a wood shack crafting guns like you will in Rust.


Tools
In Rust, it costs 100 wood and 50 metal to build a hatchet, then about a minute to hack down someone's tier 2 {wood board} base.  Building that base cost the owner somewhere in the neighbourhood of 3000 wood (cupboard and all).  Metal is fairly easy to come by, about as hard as collecting 500 wood, so the cost of a hatchet to break someones base is roughly 600 wood {when you finally have a furnace}.  Thus, it costs about 20% of a new base cost to break into someone's base.  In Wool, it costs 50% of someones base in resources to break into it.  I'm not sure if this is better or not, but I feel like it's too cheap to raid tiers 1 and 2, and too easy to build tiers 1 and 2.

Tier 3 {stone walls} is more interesting.  I haven't had time to do a full investigation into the details / most efficient way to raid tier 3, but I would roughly equate tier 3 in Rust to tier 1 in Wool.


This week's work on Wool was dedicated to AI conciousness.
Newmans are now aware of other newmans, they will chase and flee appropriately.  It's pretty cool to watch, and it looks like newmans survive a lot longer now.  Unfortunately, you might notice a couple bugs in the AI code due to these upgrades.  I'll do my best to see to them before next week is through.
Enjoy the time lapse video, and a short real time video! 

 Consciousness In Action
 

Time Lapse



Download Wool for iOS

Not yet, but next week.  Since I'm not sure what values are the best for raiding, I'm going to let everyone play the simulator and tell me what they think about the difficulty of raiding.  I'm going to put together a version of Wool that lets you be one of the players over this weekend {if I'm not too busy killing you in Rust, I play on Facepunch - Seattle under the name "Dude"}.  It should be on the App Store by Friday next week if all goes well.  If you'd like to get an email about it when it goes live, send me an email at thompson.codes@gmail.com with the subject "Wool", I'd love to hear from you. 




PS: Life is hectic, I'm moving, and I didn't have time to work on Wool last week, and even missed my weekly post.  Sorry, I'll make it up to you.

Friday, 30 January 2015

Development Blog #0010 - Server Population

If you don't know Wool, click here.

This week I made newmans log on and off the server.

Newmans will now go back to their base and log off after they have played for between 2.5 and 3.5 hours.  If you watch this week's video, you'll see newmans disappear after they have logged off.  Newmans will come back online at the same time each day and play.  To keep the model accurate, I updated the AI and the combat system so that newmans will attack sleeping enemies without hesitation, and are guaranteed to win combat.  Cool, now I've got a baseline model of Rust!


Wool Devblog 10 - 5 Days @ 20x speed


Server Population
I got in touch with Bugs, the guy that runs Rustafied. Using some estimates he gave me about the server base, I've programmed Wool to model the average server.  The Wool server sees a peak of about 60 players at 12:00, and a low of about 20 at 0:00.   I also looked into Steams stats for Rust, and to no surprise, found a bell curve player distribution.  So I programmed this trend into Wool's server.

Online Steam Users


Raiding is not common, but is possible.
If you watch for Garry's base in this week's video, you'll see that it survives about a day and a half before being raided.  A couple people managed to build a tier 2 base before their ~3 hours were up, and all of those bases survived the first 24 hours.  However, some people with tier 1 bases did get raided, and they'll wake up dead and poor.  I'm going to change things so that over 50% of people get a tier 2 base for three hours of work, because that's what I set out to do.  I'll probably tweak the base cost to get the desired result.

Bugs
There are bugs affecting the AI.  I've programmed AI logs to see where they are making the wrong decisions, and it's going to take time to sort though that.  However, most of the time, they're quite capable.  I'll make this a priority next week.

Conciousness
Newmans are not aware of other newmans unless they run into them.  I'll update the AI to make intelligent fight / flee decisions.  I'm thinking that, since most people KOS, I'll make newmans KOS if they have equal or better weapons and armor than their target, and flee otherwise.  Newmans will flee for a random duration before deciding to turn and fight, and conversely, their pursuer will only chase for so long too.  This should be done next week.

Data Mining
After the AI is in good shape, I'll draft up which graphs I want to show, program the data collection for it, bring the collected data into Matlab, manipulate it, and finally display it.  These graphs will provide evidence that this progression system is fun to play, and well balanced.



Friday, 23 January 2015

Development Blog #0009 - More Brain Power

This week I improved the AI.

I spent this week making last week's code run better.  Newman's make more intelligent decisions now.  They'll go back to their base when they've got a fraction of what they need, and store it in case they get killed.  When they raid, they'll bring some resources to repair the base they are raiding so they can make it their own.  Those were the big changes this week.  Server maps have been made available for imaging, so I thought I would generate one, and turn it into a Wool map. 

The server map (Thanks PlayRustHQ)


The Wool Resource File

I'm not currently supporting snow / mountains so I just turned them into forest.
 


The video this week is a time-lapse of Wool - by popular demand.

Barrels / Rad Town Analysis
The last couple weeks of Rust have been a barrel looting game.  Here's my take on how that changed Rust; the inclusion of barrels widened the gap between the end game and the start game.  The difference between having a spear and a stone spear is huge, but even bigger for spear to AK47.  Personally, I think its great that weapon tiers are further spread, but I'm not too happy about needing to do a lot of barrel hunting.  I would be happier if we could spend resources on research kits for the weapons we find in barrels and on our enemies.   Furthermore, I think we should be able to directly craft (expensive) blueprints -- that way you could guarantee (slow) progress toward whatever you want rather than rely on luck.

Wool and Blueprints
In Wool, bases act as blueprints. If you've got enough resources to build a T2 base, then you get the blueprints for T2 weapons with the base.  There's no need for blueprints in Wool because the weapon tiers are already largely separated (You can't build a T3 gun with a T1 base -- unlike in Rust).  It's going to make my conclusion weaker if I don't model this just like Rust -- but frankly, I don't have time to keep up with the updates and finish the project.  Again, the point of all this is to show a raiding system that strikes a balance between losing your base and stealing others -- which will still apply to the current build of Rust.

All said,

Hopefully, next week I'll finish the log on / off system -- but don't count on it.  The A.I. has some bugs from all the work I did on it this week.  Hope you all enjoy reading about my project, don't forget to comment / like the reddit post!



Friday, 16 January 2015

Development Blog #0008 - Base Inventory Management and Loadouts

This week I completed Base Inventory and Loadouts for Wool's WLNewmanBrainBasic AI.


So what's base inventory management?
Newmans now consider the weapons, armor, tools, wood, stone, metal, and food that they have inside their bases as well as on their person.  They use this information to see if they can afford whatever they want to craft, like more weapons, armor, or upgrade a base.

Okay and what's a Loadout?
If you've ever played Call of Duty, or Team Fortress 2, you'll recognize a loadout -- it's the stuff you carry into combat.  I coded the Wool loadout system.  This means that a newman will only carry enough stuff to survive for a while, and store the rest back in his base.  It's a really important feature because newmans' can now equip their stored weapons and armor when they respawn (previously, they carried everything they owned).   A newman has a different loadout depending on what he's up to.  If he's gathering, he'll carry enough weapons and armor to kill 10 people, and enough tools to mine 100 resources.  He'll return to base when he's gathered about 1/8th of the resources he needs for the next base upgrade.  If he's raiding, he'll carry enough weapons, armor, and of course, tools to breach the walls.  Newmans will leave their raw resources at home during the raid.  The real beauty of this system is that newmans both store excess resources in their base, and equip only what they need.



I spent a lot of time debugging this week because every part of AI code had to be reconfigured for the loadout system.  It was a bit tedious, but I'm confident the worst is over.  I had been hoping to even start on the logg on / off system, but it must be delayed until next week.  When that's in, the model is complete (save for some AI tweaks), and I can begin doing an analysis. That means printing out lots of data, and processing it in a language that's better suited for this sort of work (Matlab).  I'll make some pretty graphs and stats, then tweak the game, and then this project will be finished!

Woot! I got featured on playrust.com!









Friday, 9 January 2015

Development Blog #0007 - Raiding Part 2

 This week I finished the raiding system.

As of this week, the AI can:
-Discover their base was raided / not theirs anymore
-Upgrade and repair multiple bases
-Built additional bases

I said I'd code the inventory storing system last week, but I didn't get around to it.  Instead I spent the time filming a few videos.  Apparently I'm going to appear in the next community update, so keep a lookout.

Next up, I'll make newmans store resources in their bases so that they aren't set back to square 1 on death.  After that, I'll implement the logg / in off system.  That will probably take up all of next week.  So, by the end of next week, I should have a reasonable representation of a Rust server :D

In this video, I summarize what this project is.


In this video I spend 17 minutes talking about Wool.


And if you're super interested in watching the simulation, 
here's 50 minutes of Wool. (48 simulated hours)


Friday, 2 January 2015

Development Blog #0006 - Raiding Part 1

This week I coded the raiding system.

This week's development blog is going to be a lot more technical, as there's nothing new to film or image.

The raiding system is the game engine code that manages base attacks.  A newman declares that he would like to attack a base, then the game engine handles damage, attacks, and inventory.  This also includes looting a base and claiming ownership.

How it works:
When a newman attacks a base, anyone inside the base has the option to attack from the base -- with a 20% bonus chance to winning combat.  In Rust, the 20% bonus comes from things like shooting / spearing from windows, controlling the doors in the base, and using the base layout to the defender's advantage.  Of course, it's entirely optional to defend your base while you are inside. 
However, once your walls are breached, you have no choice but to defend yourself.  That said, the 20% attack bonus remains while you defend.  After a base has no health left, it can be looted.  Who ever loots a base becomes the new owner.  A damaged base can then be repaired.  The repairs significantly less than building a new base.  A defender can repair a base as it is being attacked, until out of resources, or the enemy has a relatively high tier weapon and does damage faster than repairs.  A base can only be upgraded once it has been fully repaired.  It costs about 50% of a new base in resources to raid someone else's base.

Coding this system was fairly straight forward and did not require must time to write and debug.  I moved on to upgrading the AI to actually do the raids, and that proved to be much more time consuming.

WLNewmanBrainBasic - Raiding AI
The goal is to upgrade the current basic AI to raid enemy bases sometimes. This called for a ton of necessary upgrades.  To raid a base, newman's have to first figure out when to raid.  For this AI, I figured it was reasonable attempt a raid once enough resources had been gathered for a raid, and a target base was in sight.  If there's no base nearby, the newman will continue to upgrade his base.  Second, once a newman has a target, he needs to craft enough tools to breach the walls.  After enough tools are crafted, the newman must head toward the target.  Upon reaching the target, the newman destroys the walls, and then loots the base. 

This much is coded -- but it's too buggy, so I won't show a video this week.

But even more needs to be done in order to make raiding work.  Raiding is pretty pointless if there's never anything inside the base, so I need newmans to consider how much stuff to store in their bases, and code a system for newmans to use their base inventory as well as what is carried in cost calculations and resource gathering. 
Furthermore, I need to code a small system that allows newmans to react to discovering that they have lost a base -- it doesn't work out if they keep thinking their raided base is still their own.

I figure at least this much should be complete by next week.  After raiding, I'll build AI support for multiple bases, then AI for hunting other newmans -- including strategies for fleeing.  After that, I'll build game engine support for newmans to logg on and off, and build the AI for that.  

Then the graphs come out.  I'll be able to say things about how Rust should change with some authority -- backed up by graphs and videos of the simulation.  That will be splendid.

Chances are, the AI is going to need significant refinement before I can claim it represents the average competitive player.  But that's cool with me -- I love working on AI.


Friday, 26 December 2014

Development Blog #0005 - Exploration and WLNewmanBrainBasic

I spent this week upgrading the AI in Wool, this Rust simulator.


Recap

Last week we saw a video of newmans building bases, and ignoring each other.  They would move randomly until they happened across a resource, and subsequently gather it.  After gathering enough wood for a base, they would spend about 60s of simulated time building their wood shack, then set out again for more resources.  When enough had been gathered for wood weapons, wood armor (aka burlap), and wood tools, they would head straight back to their base, and craft it.  This was repeated until they had built T2, and a bugg kicked in and prevented them from moving on to T3 (metal base & accessories).

This Week

It was a rushed job to get base building included in last week's blog post.  Clearly, the AI needed some tender love and care.  Newmans now craft bases and accessories up to and including T3 (metal).  They now attack each other if it is worth the risk.  They respawn at their own base if they die, or respawn on the beach if they are homeless.

Improvements
After debugging last week's code, I started on improvements.  I created an exploration system.  So, instead of newmans randomly moving and bumping into resources, newmans look around in a 100m radius, and move toward their desired resource.  Pretty simple improvement, but newmans were immediately devouring the forests as soon as the game started -- which is great.  A lot of combat happens in the precious first hour, and it is cool to watch.
But then I did better.  Instead of moving randomly until a desired resource is spotted, a newman will systematically explore a region of the map.  The region is either the area immediately around them, or the area around their base.  This improvement caused newmans to actively search the map in pursuit of their desires.  It's a huge milestone because it marks the end of random movement.  That is, every decision became deliberate.  The newmans got scary powerful.

Issues
There was a minor issue with this though, as often one would see many newmans headed to the same invisible location, without any a priori reason.  It didn't look authentic.  So, I added noise to each of the locations, scattering the exploration points.  The scary newmans became individuals.


Scary WLNewmanBrainBasic

The Future


The goal of this project is to determine whether or not My Ideal Progression System is really all that great -- and if it isn't, come up with a better one.  I mapped out the future of this project this week.  It's going to take at least another month to produce some good looking, accurate, and understandable graphs out of this simulator.  I can't wait for that.  With enough support and feedback from the community, I'm set to see this through to the indefinite end -- so please leave me a comment :)

As for the next steps, it's pretty obvious there are too many bases scattered around, and no one is taking advantage of it.  It actually reminds me of how experimental plays right now, considering it takes 3 + people to (maybe) breach a tier 1 base.  It sucks.  So, I'm going to code the raiding system.

Raiding System
The plan is to give defending newmans a 20% bonus chance to win a fight.  They will have the option to sally out (open the doors and dare the invader inside) or to wait it out until the attacker breaches the walls.  Once the walls are breached, the defender will retain his advantage given his bunkered position and knowledge of his home.  However, the defender absolutely must fight once the walls are breached.  Upon successfully raiding a home, the raider will claim ownership, and must repair the base in order prevent other newmans from re-claiming it.  It will cost a hefty fee in tools to breach a base.  I've decided it should work this way, or mass raiding would take place.  It should be a bit risky raiding a base -- one should expect a profit (maybe) less than half the time -- with zero information about the base.  However, if a newman watches a base, and estimates the amount of resources inside based on the frequency of their enemie's visits, profitable raids will be attained.

Of course, after raids are in place, the AI will be next.  I'll include multiple base building as well as resource storing in the AI update.  Should be super cool to see newmans raiding each other.  It will cause a greater spread in the base distribution too, as no one wants to be close to a high level base :)
Later, I'll add an online / offline system to simulate player's limited ability to play Rust.  After that, I'll finally move away from WLNewmanBrainBasic, and move into something like WLNewmanBrainDecent.  It will be an overhaul of the AI system -- trying to come as close to a human rust player as I can. Soon as that is complete, I should be able to log some data, and process it in Matlab.

Food For Thought
I'm still on the fence about animals and food gathering.  On one side, it's super easy to gather animals to eat, far easier than it is to even build the first tier wood shack.  On the otherside, would this really be an accurate Rust simulator without food and starvation?  I guess that depends on whether or not starvation would be a significant factor in the survival of a newman.  When I look at my own plays of Rust, I absolutely never die of starvation.  It's just one more errand to run while I'm out gathering wood and stone.  However, it does usually force me toward a forest.  As I said, I'm on the fence.

Is food and starvation important? (for this simulator)

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!




Saturday, 13 December 2014

Development Blog #0003 - Optimization

After scaling the simulation up to Rust's standard 4000mx4000m map, and adding 100 newmans, things slowed down a lot.  I re-did the visualization system.

Watch 100 newmans eat away at a full size map.  The map is 200 tiles across, where each tile is 20m.




Blue - newmans
Brown - trees
Gray - stone
Orange - metal
Yellow - animal


Great, they can eat the map now.  I'm going to invest a bit of time into making this look a bit prettier, so I can see when one square has both wood, stone, and a newman on it. 

After that, I'll implement the combat system.  Like the rest of the simulation, I'll do my best to estimate the value of weapons and armor, then calculate a newman's chance of winning a fight.  It's going to be pretty cool to see newmans eat eachother too.

After combat, I'll create the respawn system for newmans.  I'm choosing to go with the current build's spawning system, placing the newmans on the beach.  Wait, I don't have a beach yet!

After spawning is implemented, I'll make the map spawn look a lot like the current build.  It should be recognizable.  I'll also add background tiles to make it look like a proper model of Rust.


I'd love to make things look just like this:


But it's probably going to look more like this:



I'm not sure which direction I'll take from there.  I could do crafting, leading into base building, or I could do some simple AI - where the newmans would pick targets, and pursue a path to them.

When crafting and base building is in place, I should be dedicating all of my time to the AI.  That's going to be the hard part.  Luckily, I'm a computer science undergraduate with a high interest in AI, so we'll see if I can come up with a newman brain that models the average player accurately.