Jump to content

How would you go about resource gathering?


epsilonion
 Share

Recommended Posts

Resource Gathering

I am thinking about resource gathering in the sense of cutting down trees, hitting rocks for minerals etc.

 

I don't know if this would be the right way of going about this but here is what I am thinking.

 

My Idea

This is my idea to try and get it working.

Place a tree on a terrain with polymesh physics, link a script that gives the tree a health value and if health <=0 then hide the tree and show a log model.

 

In the log model link a pickup script so that the log is placed into the inventory.

 

When my inventory is full then you go back to the storage building and transfer the resources to a storage box.

 

So I dont run out of trees I was thinking about something like a timer on the tree that once the tree health <=0 then in say 40 mins the tree model is shown again (working on a 20 mins day cycle and 20 mins night cycle)

 

Problem

With me been new to this (and so many others on here) I would love to know where to start with my LUA scripting, I did purchase the standard version some time ago but I wanted to try to get my head around doing this in lua before I venture into the C++ side of things..

 

-------------------------------------------------------------------------------------------------------------

 

Base building

I just thought I would share my idea for simple base building as well.

 

Basically place the buildings on the map and hide them in the base area, once the crafting menu has been entered then I can search to see if enough resources have been collected and if so then the the base building can be created, this means taking away the resources from the inventory and showing the building.

 

The fixed locations of the buildings may take away some element of enjoyment but its a learning curve

 

 

 

Thank you in advance

Link to comment
Share on other sites

Your ideas sound fine, I think you can can just use a pick(not tool) to check whether you are in range to hit the tree. Actual physics collision is not necessary.

 

Doing it in LUA is the way to go and move onto C++ when you have gained more experience.

 

Start with fixed locations for your buildings and then maybe play with placing buildings anywhere in a specified area.

 

Unless you have made your own I d recommend FLOWGUI by Aggror.

 

Look forward to seeing progress in this.

Elite Cobra Squad

Link to comment
Share on other sites

Yep general ideas sound good. I think re-growing trees might be a bit unrealistic as they would take years to grow. Maybe ensure that each tree can give plenty of wood so you don't need to chop down so many. So maybe in 10 chops a pickup log is dropped but the tree is still standing and you can repeat this 10 times or so before the tree disappears. Better for the environment too! :)

Check out my games: One More Day / Halloween Pumpkin Run

Link to comment
Share on other sites

Your ideas sound fine, I think you can can just use a pick(not tool) to check whether you are in range to hit the tree. Actual physics collision is not necessary.

 

Doing it in LUA is the way to go and move onto C++ when you have gained more experience.

 

Start with fixed locations for your buildings and then maybe play with placing buildings anywhere in a specified area.

 

Unless you have made your own I d recommend FLOWGUI by Aggror.

 

Look forward to seeing progress in this.

 

you've hit that perfectly , I am finishing my mechanic's in lua, and slowly porting mine to C++ at the same time, I also Highly Recommend FLOWGUI by Aggror

OS: Windows 7

Processor: AMD A6-3420M APU integrated Radeon HD Graphics 1.50 GHz

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...