konstructs / server

A voxel based game server.
http://www.konstructs.org
MIT License
49 stars 12 forks source link

Use block damage for primary action #127

Closed petterarvidsson closed 8 years ago

petterarvidsson commented 8 years ago
nsg commented 8 years ago

Looks good

petterarvidsson commented 8 years ago

@nsg I am adding a damage multiplier to block type to make things easier here. E.g. I guess it will be common that we want add a tool that deals extra damage to specific types of blocks. So I am adding the functionality that a block can have a damage multiplier for block types and block classes.

nsg commented 8 years ago

@petterarvidsson yup, that do sounds like a good idea. I like specialized tools.

petterarvidsson commented 8 years ago

https://github.com/konstructs/server-api/pull/8 <- that what it'll look like in the API

petterarvidsson commented 8 years ago

@nsg I am thinking of introducing two very basic tools into the core server: http://humanorigins.si.edu/evidence/behavior/stone-tools/early-stone-age-tools

The "Hammerstone" (for mining other stone) and the "Handaxe" for wood cutting. I think they will both look pretty decent as plants :-)

nsg commented 8 years ago

@petterarvidsson nice with stone age tools :+1:

petterarvidsson commented 8 years ago

I took this a bit further. Now one can define default values for block classes that will be "inherited" by block types. This makes it a lot easier to give uniform durability for different classes of blocks. I am also using the damage multipliers (which also can be defined in a class) when damaging blocks. I also added a "hammerstone" tool, which is the most basic tool that can speed up mining of stone and wood (which are the more heavy things to mine).

petterarvidsson commented 8 years ago

Related plugin PRs: https://github.com/konstructs/server-plugin-forest/pull/15 https://github.com/konstructs/server-plugin-grass/pull/6 https://github.com/konstructs/server-plugin-flowers/pull/10

petterarvidsson commented 8 years ago

@nsg This is done now, but I'll take a look at it tomorrow night again before merging. I can run the server and destroy different blocks with different speed (also depending on the tool used) and the tool deteriorate with use (watch out so you don't destroy your tool sack!). When the client renders the damage I think this will look pretty awesome and add a lot of fun to the game.

nsg commented 8 years ago

@petterarvidsson nice, looking forward to test this.

nsg commented 8 years ago

... and yes, release 7 will be a good one!

petterarvidsson commented 8 years ago

last commit needs: https://github.com/konstructs/server-api/pull/9

petterarvidsson commented 8 years ago

@nsg This is done now. In general I think that we are ready for release 7 now!