Game Rules and Dynamics

Re: Game Rules and Dynamics

Postby andrewbuck » 13 Mar 2010, 04:46

Regarding the perlin noise mentioned above, if we make a function which takes a position and some randomly generated "seed" [something of the form f(x, y, z, a) = (x', y', z') ] we could then generate a single seed number right at load time and then just apply this to any "level related" stuff we load (tiles, rooms?, etc).

="svenskmand"]
charlie {l Wrote}:I never really liked the whole tile claiming aspect of it.

This might be an opportunity to do something original rather than just copy. Something like the borders in Civ/freeciv which limit where you can build to and pick up your creatures.


I actually think that one of the more interesting parts of DK1 and 2 was when you and the enemy had adjacent claimed types, then you imps would compete and fight to get the most land. And as the land also controlled the amount of mana you had, then land was a valuable asset.


I was thinking we could add what are basically "veins" which run through your claimed land to gather up the mana. We could then make it so you get more mana per turn for having a good layout of veins. You could score this by calculating the ratio of the outermost perimeter of the region that your veins cover divided by the area of the same region. This gives you a very high score for web-like dungeons with lots of tunnels and rooms and a very low score for a big square dungeon. This encourages the players to build more interesting looking dungeons.

As for implementation, we could have a room which you build like any other. The difference would be, you can only build the vein tiles on tiles touching another vein tile on exactly one side (a new one can then be added touching a second side so you can make lines but not cover an area). Then when you calculate the score you calculate the ratio above assuming that the region covered is any tile within N tiles that are covered by veins and is claimed. During the upkeep round of the game turn you start at the DT and "walk" the vein tiles. Veins that you cannot reach (because the enemy has destroyed one of them) will be made inactive (or possibly destroyed entirely).

The way the rules I have laid out (the scoring and the restrictions on building veins) if you had a single DT with lots of arms running out radially (like a starfish) you would get a very high score since the perimeter is huge, but the covered area is quite small. The tradeoff is if the enemy cuts off one of the arms near your DT you lose a lot of score (slower mana regeneration). To combat this you could connect the end of two arms. This means that the enemy needs to make two cuts in two faraway places to completely sever a section of the tiles. However, by doing this you increase the area in the whole pie wedge and you decrease the outer perimeter; this lowers your score to begin with, however it makes it more stable (i.e. the enemy has to hack their way through the dungeon to kill it, rather than just knocking off arms). I will try to sketch up a picture in inkscape to illustrate the idea.

EDIT: This would also couple nicely with the thing I just added about how the claimed tiles "creep" outwards. You could only allow them to creep 3 or 4 tiles from the veins you build so the dungeon doesn't creep out forever.

-Buck

Vein scoring.svg
An example of how the scoring is calculated for several different dungeon designs.
(48.93 KiB) Downloaded 459 times
Attachments
Vein scoring.png
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Game Rules and Dynamics

Postby svenskmand » 13 Mar 2010, 13:00

I think the veins ideas is very interessting, but I am not sure if it will not take too much of the players attention in the game? I will definitely be interesting to try it out.

I think that the vein idea would be better if we say that you build a vein at a tile and the when you do that you are allowed to select one or two other close vein tiles as its connectors. Then this will have less strict requirements to how you dig you dungeon (the farther they are allowed to be separated the less restrictive this will be on the dungeon layout). I will post a example in 2 min hold on.

Andrew: what do you think of the idea of being able to restore dug-out dirt/tiles to normal?
Attachments
GraphLike.svg
This is more flexible with regard on how restrictive the dungeon layout will have to be.
(19.13 KiB) Downloaded 429 times
Last edited by svenskmand on 13 Mar 2010, 13:13, edited 1 time in total.
Jamendo.com - The best music store on the net, uses CC licenses.
User avatar
svenskmand
OD Moderator
 
Posts: 1850
Joined: 09 Dec 2009, 00:07
Location: Denmark

Re: Game Rules and Dynamics

Postby andrewbuck » 13 Mar 2010, 13:10

svenskmand {l Wrote}:Andrew: what do you think of the idea of being able to restore dug-out dirt/tiles to normal?


I was thinking that if you dig out too big of an area, the game starts a cave in which randomly fills in a lot of them. As for whether or not you should be able to fill them in otherwise, I'm not sure. We could allow it with a spell, or maybe just allow it any time you want to (just do it like digging but with the right mouse button maybe).

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Game Rules and Dynamics

Postby svenskmand » 13 Mar 2010, 13:16

I think that we should allow it any time you want to, but that the price of it will make it non-feasible to restore a big dug out area. But for fixing up ones defenses it will not be to pricey.

Can you explain how you calculate the mana generation of you "veins" scheme? I did not quite catch it.

The digging out of too large areas is also very interesting :). But i think that it would be even more interesting if you let the chance of a gave-in be proportional with the room size, and then there is a coin flip, to determine if the room should gave-in, every time you dig to expand the room.
Jamendo.com - The best music store on the net, uses CC licenses.
User avatar
svenskmand
OD Moderator
 
Posts: 1850
Joined: 09 Dec 2009, 00:07
Location: Denmark

Re: Game Rules and Dynamics

Postby andrewbuck » 13 Mar 2010, 13:40

svenskmand {l Wrote}:I think that we should allow it any time you want to, but that the price of it will make it non-feasible to restore a big dug out area. But for fixing up ones defenses it will not be to pricey.


This is fine, do you think the price should be gold, mana, something else?

svenskmand {l Wrote}:Can you explain how you calculate the mana generation of you "veins" scheme? I did not quite catch it.


You start by calculating the area of the tiles covered by the veins (this is just how many tiles contribute to the mana the vein gathers up). Once you have this you divide it by the perimeter of the region. The ratio of these two numbers is the "score" for the system. The score is then used to scale how much mana you get per turn.

svenskmand {l Wrote}:The digging out of too large areas is also very interesting :). But i think that it would be even more interesting if you let the chance of a gave-in be proportional with the room size, and then there is a coin flip, to determine if the room should gave-in, every time you dig to expand the room.


That's basically what I would do, except the coin flip has a bigger chance of causing a cave-in in an open area, and once it starts it wont stop until enough tile collapses to "re-satbilize" the ground (i.e. when the remaining open spaces are smaller than some threshold).

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Game Rules and Dynamics

Postby svenskmand » 14 Mar 2010, 14:15

andrewbuck {l Wrote}:
svenskmand {l Wrote}:I think that we should allow it any time you want to, but that the price of it will make it non-feasible to restore a big dug out area. But for fixing up ones defenses it will not be to pricey.


This is fine, do you think the price should be gold, mana, something else?

I think that it should be gold, as it is related to building rooms, which should not cost mana.
andrewbuck {l Wrote}:
svenskmand {l Wrote}:Can you explain how you calculate the mana generation of you "veins" scheme? I did not quite catch it.


You start by calculating the area of the tiles covered by the veins (this is just how many tiles contribute to the mana the vein gathers up). Once you have this you divide it by the perimeter of the region. The ratio of these two numbers is the "score" for the system. The score is then used to scale how much mana you get per turn.

Ok.
andrewbuck {l Wrote}:
svenskmand {l Wrote}:The digging out of too large areas is also very interesting :). But i think that it would be even more interesting if you let the chance of a gave-in be proportional with the room size, and then there is a coin flip, to determine if the room should gave-in, every time you dig to expand the room.


That's basically what I would do, except the coin flip has a bigger chance of causing a cave-in in an open area, and once it starts it wont stop until enough tile collapses to "re-satbilize" the ground (i.e. when the remaining open spaces are smaller than some threshold).

-Buck

Ok, I think that if there in a open area is pillars in the middle, then they should stabilize the room, even though they are big. That is you can build big rooms, but then you have to put pillars spread through it ti make it stable.
Jamendo.com - The best music store on the net, uses CC licenses.
User avatar
svenskmand
OD Moderator
 
Posts: 1850
Joined: 09 Dec 2009, 00:07
Location: Denmark

Re: Game Rules and Dynamics

Postby andrewbuck » 14 Mar 2010, 17:30

svenskmand {l Wrote}:Ok, I think that if there in a open area is pillars in the middle, then they should stabilize the room, even though they are big. That is you can build big rooms, but then you have to put pillars spread through it ti make it stable.


Thats exactly what I was thinking, see the cave in page for details on the calculation.
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Who is online

Users browsing this forum: No registered users and 0 guests