• Register

The game you are trying to view has ceased development and consequently been archived. If you are a member of this game, can demonstrate that it is being actively developed and will be able to keep this profile up to date with the latest news, images, videos and downloads, please contact us with all details and we will consider its re-activation.

Earth and the core worlds are suffering. Overpopulation and lack of resources are leading to unrest and desperation. That's where you come in. You've been recruited to colonize a planet more than 4 light years away. It's your job to save the human race from its own greed and consumption. The game is experienced from a top-down view allowing for the deliberate and creative crafting of every item, vehicle, and structure in use. Using a scriptable and dynamic artificial intelligence the AI Overlord will change up every aspect of the game. Nothing stays the same forever, making Worlds an addictively, dynamic experience with limitless replayability.

Forum Thread
  Posts  
Mining System (Games : Violent Sol Worlds : Forum : Larry : Mining System) Locked
Thread Options
magicrat_larry
magicrat_larry Lead Developer
Sep 5 2016 Anchor

So I spent some time working on the mining system that Phil had in his little head. It consists of Nodes of resources distributed around the world. Each node would have an amount and a type of resource and when you place a miner by it that node would slowly deplete as it is mined over time.

I started by coding up the back-end. At first I thought it I would make a class all its own called the miningNode. Turns out because we wanted the visual to change on the surface of the planet as you mined the resource it really would not work as a behind the scenes object in the world. I needed to tie the node into the entity that was drawing to swap it out when the values changed behind the scenes as you mined. So I landed on making the node an entity in the world that rendered one of three different images depending on thresholds for the largest, medium, and smallest amounts. Worked great.

Large Iron Deposit

You can see some iron on the surface that signifies that you can mine it in the area.

Metals

The bottom right three are the ore in your inventory after mining, Gold, Copper, and Iron

Metals On Ground

You can drop the stacks of the mine to the world if you find you have too much.

Depletion of Ore

as you mine the ore in a node the image on the surface depletes as it gets less and less ore in the node. Eventually the node is gone and there is no longer anything to mine.


We now have 6 mine-able resources now. We have Red, Green, and Purple crystals. We also have Copper, Gold, and Iron ores. We match this stuff against the drops from the animals we put in last week and we are starting to really feel like we can do some gathering. This is all preparation for our next big thing to attack. Equipment customization and purchasing.

viedt-el
viedt-el Developer
Sep 6 2016 Anchor

Came together great.

--

Viedt (Phil)

Developer for Afterthought Games

@Viedt_EL on Twitter

Violent Sol on Facebook and Twitter

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.