State of the Code

Re: State of the Code

Postby andrewbuck » 07 Apr 2010, 04:05

I just pushed a commit to git which adds support for "visual indicators" in the treasury. Now when creatures dig out gold and carry it to the treasury you will see a "gold bag" appear on treasury tiles which have between 1 and 3,000 gold in them, and a "gold chest" will appear on treasury tiles which have between 3,001 and 5,000 gold in them. The treasury also enforces the rule that only 5,000 gold can be stored per tile. Also, when you withdraw gold from a treasury (by creating a room for example) the gold bags and chests will dissapear accordingly. This means that the treasury code is basically fully functional; the only thing left to be done is to make the creature AI a bit smarter (currently they only try to deposit gold in the first treasury and ignore the rest, even if the first is full).

I also made sure to code this up in such a way that it would be easy to change the number of "gradations" we have in the visual display. Ideally I think we should have like 6 or 7 of them. This way when you start filling up a tile at first there is just a few loose coins, then a small pile, then a bag, then a partially filled chest, then a full chest, then an overflowing chest, etc. The gold indicator is a separate mesh from the treasury tile mesh so it will be easy to make an individual mesh for each of these without having to consider every possibility of treasury tile + gold fullness separately. If someone wants to get on the wiki (here) and start hashing out what meshes we should have, and how many gold coins constitute that level of fullness, that would be cool.

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

Re: State of the Code

Postby andrewbuck » 07 Apr 2010, 04:08

Replying to myself because this is the 666'th post in the OpenDungeons forum and I wanted to steal the glory associated with making it. ;) Thank you to all of you who have contributed to the project thus far (including the newcomers from War for the Overworld) it is great to see so much enthusiasm for the project and it really helps keep me motivated.

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

Re: State of the Code

Postby DarkFire4114 » 07 Apr 2010, 06:40

andrewbuck {l Wrote}:Replying to myself because this is the 666'th post in the OpenDungeons forum and I wanted to steal the glory associated with making it. ;) Thank you to all of you who have contributed to the project thus far (including the newcomers from War for the Overworld) it is great to see so much enthusiasm for the project and it really helps keep me motivated.

-Buck


Oh you sneaky little creature! Lol

Nice, to see the Treasury stuff worked on. If I may make a quick note, I think 6 different meshes, or "gradations" as you put it, is perfect.
1. 1-1000 (Pile)
2. 1001-2000 (Large Pile)
3. 2001-3000 (Gold Bag)
4. 3001-4000 (Full Chest)
5. 4001-4999 (Full Chest with some gold surrounding it)
6. 5000 (Overflowing Chest with gold surrounding it and a few gold bags)

That sounds perfect to me. :)


A little question about rooms, will it eventually be more like DK2 where reinforcing the walls you get some kind of bonus thing on the wall? (Like in the Workshop, it allows more room for manufacturers) or like DK1, where you get more out of the room itself by building large, square, and reinforcing walls (An example of this is the max gold per tile of a Treasury, or room inside a Workshop, using an "Efficiency Scale") or some kind of third thing you'll have to expain to me.
User avatar
DarkFire4114
 
Posts: 26
Joined: 05 Apr 2010, 03:29

Re: State of the Code

Postby andrewbuck » 07 Apr 2010, 14:14

I had forgotten about the reinforced wall bonus for rooms. We had discussed the dynamics of walls a bit in the "rules" subforum but the issue of rooms never came up. I think thats a good idea although it probably won't be implemented for quite a while since it's not really essential to the gameplay. My focus right now is on a basic implementation of all aspects of the game and then later I will go through and improve everything.

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

Re: State of the Code

Postby svenskmand » 07 Apr 2010, 16:42

I think that sounds like a good idea as we have also not discussed all aspects of the game-play yet. I will be starting some more threads about which room types, traps/doors and creatures we should have, as I think that is what we should focus on now on the content side. So that we can get to make the actual content.
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: State of the Code

Postby andrewbuck » 09 Apr 2010, 00:56

Another commit added tonight, this one finishes up the treasury code (other than the extra gradations on the visual display). Now when creatures try to deposit gold into a treasury they will check all of them and try to find the nearest one that has available storage space in it. I also fixed a potential infinite loop where there were no possible treasuries to put gold into that were reachable by the creature (not sure if this really would cause an infinite loop but it certainly looked like it could).

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

Re: State of the Code

Postby andrewbuck » 10 Apr 2010, 20:02

I just pushed another commit to sourceforge which makes the Quarters functional. Creatures now have a "home" tile in a quarters somewhere where they sleep. If a creature does not have a home they will try to find one by walking to a quarters that has an open space for them to sleep and claiming that tile. Currently there is no visual indication that a given quarters tile has been claimed by a creature (i.e. they don't put down a "bed") but I plan to add that this weekend. This means that I will need some more meshes again. :) If someone wants to start modeling up some beds for the individual creatures that would be cool. I plan to add a datamember to the CreatureClass section in the level file for what mesh to load for the creature's bed, this will allow us to tailor the sleeping quarters to the creatures like the original DK series did.

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

Re: State of the Code

Postby andrewbuck » 11 Apr 2010, 00:34

Got the visual display for the quarters working and pushed to sourceforge. For the "Bed.mesh" i just copied over the Light.mesh (i.e. the blue cube that shows where the lights are, so if you check out the code from git you will need to do the same.

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

Re: State of the Code

Postby TheAncientGoat » 11 Apr 2010, 07:12

I posted a low poly bed in the "room design" thread...
User avatar
TheAncientGoat
Community Moderator
 
Posts: 518
Joined: 27 Dec 2009, 19:06

Re: State of the Code

Postby Skorpio » 11 Apr 2010, 13:16

But if the bed has to fit in a 1*1 tile, wouldn't it look totally ridiculous? :)
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: State of the Code

Postby svenskmand » 11 Apr 2010, 14:34

I was wondering if we should go with the DK room design, where the player does not decorate the room, or if we should use the Evil Genius style where the player decorates the room?

I think the Evil Genius style withs very well with the factions :) So I am in for that what do you all say?
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: State of the Code

Postby andrewbuck » 11 Apr 2010, 15:31

TheAncientGoat {l Wrote}:I posted a low poly bed in the "room design" thread...


Sorry, there are so many posts happening all the time I forget who has posted what sometimes. The bed there looks exactly like what we need. If Skorpio would put that into the next media pack that should be good.

Skorpio {l Wrote}:But if the bed has to fit in a 1*1 tile, wouldn't it look totally ridiculous?


I was planning to make the beds, etc, take up more than one tile depending on the creature (so dragons take a 4x4 area, whilst dwarves only take up 1x2, etc). This really has to be done anyway as something like a knight laying down simply will not fit into a tile so the quarters would look pretty funny that way.

svenskmand {l Wrote}:I was wondering if we should go with the DK room design, where the player does not decorate the room, or if we should use the Evil Genius style where the player decorates the room?


I'm not sure what you mean by having the keepers decorate the quarters. I liked the concept that DK used where the creatures each have their own "beds" and I think we should keep this. We could, however, have something like add-ons that the keeper could buy for their minions (the dungeon equivalent of soda machines, tv's, playstations, etc) that make your creatures happier.

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

Re: State of the Code

Postby TheAncientGoat » 11 Apr 2010, 15:44

I think what svenskmand means is manual placing of beds instead of the creatures placing beds themselves. Either could work, imo, although they each have advantages and disadvantages. Manual placement would mean more work for the player, but greater control (for things like "the knight doesn't want to sleep next to a rogue" or whatever). I like the idea of "creature appeasing" items too (although, this goes into DF territory, one starts to think if giving the main creatures their own rooms could work, instead of only communal lairs). One could even ask, if you do manual placement, "what makes a room?"; items define them in one way, and thus one could go full-out DF room creation style, where room designation is handled by items and walls instead of tiles.

Automatic placement needs a lot less micromanagement though, and is thus also not a bad idea (also, it is a lot more true to the original DK gameplay)
User avatar
TheAncientGoat
Community Moderator
 
Posts: 518
Joined: 27 Dec 2009, 19:06

Re: State of the Code

Postby andrewbuck » 11 Apr 2010, 15:49

I was actually thinking that the creatures place their beds initially and then you can move them around on your own if you want. That way you don't have to micromanage everything but you can make the creatures happier if you spend a bit of time resolving the more major disputes.

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

Re: State of the Code

Postby Skorpio » 11 Apr 2010, 16:22

Just tested the bed in-game. Looks funny how it moves around and kills goblins. :D And it's also almost perfectly scaled already, about 2*1 tiles big.

Shall we include a bed monster that can replace a bed and then eat the creatures when they want to sleep? *hehehe*
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: State of the Code

Postby DarkFire4114 » 11 Apr 2010, 16:42

A Manuel and Automatic placement of the beds is good. With good AI, there's no problem with any type of "Lair Enemies". There just has to be something to identify a Lair Enemy and then we tell the creature to find a Lair spot away from any of its Lair Enemies. If possibly, it will go to another Lair, entirely (How DK1 creatures worked out their Lair Enemy problems)

For Manuel Placement, we could have it so wherever you drop the creature, they'll create their Lair. If they're dropped in a Lair where their Lair is set up, they'll go to sleep where their current Lair is. Then you either sell the tile of their Lair, or place him in a different Lair to erase his old one, then back to the first Lair to drop.
User avatar
DarkFire4114
 
Posts: 26
Joined: 05 Apr 2010, 03:29

Re: State of the Code

Postby TheAncientGoat » 11 Apr 2010, 16:49

Another question is, should we make the items cost resources? IE. should the beds etc. cost gold to place?
User avatar
TheAncientGoat
Community Moderator
 
Posts: 518
Joined: 27 Dec 2009, 19:06

Re: State of the Code

Postby DarkFire4114 » 11 Apr 2010, 17:09

TheAncientGoat {l Wrote}:Another question is, should we make the items cost resources? IE. should the beds etc. cost gold to place?


Well it is a question on how creatures carry them. If the bed is created then it should cost the keeper, if the bed is simply transported to the spot or something, then it should be free.
User avatar
DarkFire4114
 
Posts: 26
Joined: 05 Apr 2010, 03:29

Re: State of the Code

Postby Bodsda » 12 Apr 2010, 14:06

andrewbuck {l Wrote}:I was planning to make the beds, etc, take up more than one tile depending on the creature (so dragons take a 4x4 area, whilst dwarves only take up 1x2, etc). This really has to be done anyway as something like a knight laying down simply will not fit into a tile so the quarters would look pretty funny that way.


What will happen with creature levelling and beds? As you can see from some of the screenshots Andrew Buck and I have taken, it is possible for a dwarf to be taller than the dungeon walls, what would happen to his bed, would it scale as well, meaning that you would have tio have larger/more lairs as your creatures level up?

Bodsda
User avatar
Bodsda
OD Moderator
 
Posts: 195
Joined: 18 Feb 2010, 08:19

Re: State of the Code

Postby andrewbuck » 12 Apr 2010, 14:26

I was thinking about that, as the creature grows I think it makes sense for them to take more layer space (just like you have to pay them more they should also require more resources like food, sleeping space, maybe even entertainment). I do plan to limit the growth though so it is not quite so ridiculous as it is now, dwarves should not outgrow the level. I plan to add fields to the level file in the CreatureClass section which specify how quickly each creature grows and the maximum size they attain before they stop growing.

Also, regarding the beds, I think the creatures should create them for free when they join your dungeon (you already pay the creature and build quarters, why should you have to buy a bed too). Once they have chosen a spot you can pick up the bed by clicking on it and then put it down in another quarters with enough free space. Creatures will not move on their own if they are unhappy, the keeper will have to resolve the issue thus adding an aspect to the gameplay that was not present in the original DK series (creatures would complain but as far as I know there was nothing you could do about it).

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

Re: State of the Code

Postby svenskmand » 12 Apr 2010, 16:09

andrewbuck {l Wrote}:Also, regarding the beds, I think the creatures should create them for free when they join your dungeon (you already pay the creature and build quarters, why should you have to buy a bed too). Once they have chosen a spot you can pick up the bed by clicking on it and then put it down in another quarters with enough free space. Creatures will not move on their own if they are unhappy, the keeper will have to resolve the issue thus adding an aspect to the gameplay that was not present in the original DK series (creatures would complain but as far as I know there was nothing you could do about it).

-Buck

You could give them money to be happy and then drop the creature in another lair, and then they would make a new bed there, bed-problem resolved :)
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: State of the Code

Postby andrewbuck » 12 Apr 2010, 23:11

You don't necessarily want the act of dropping a creature in a layer to be the signal to move their bed there though, that is why I was going to make it so you pick up the bed rather than the creature when you want to move their sleeping place.

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

Re: State of the Code

Postby svenskmand » 13 Apr 2010, 00:05

It was just to correct that you wrongly stated that that aspect was not part of DK :P, as it was. How else could you ever have a Horned Reaper? When I have them I always start out building their own quarters. And when other creatures start invading them I throw them into another lair, and then they will build their bed and stay there.
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: State of the Code

Postby andrewbuck » 13 Apr 2010, 01:54

Oh, i see. I didn't know you could move the beds around as I tried to click on the bed itself rather than the creature. I think that is the more intuitive way to do it so thats the way I intended to implement it in OD.

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

Re: State of the Code

Postby DarkFire4114 » 13 Apr 2010, 02:04

Do you think there could be some kind of feature to show which creature owns the bed? Maybe it'll pull out its "profile" (Like that query mode does in the original DK)
User avatar
DarkFire4114
 
Posts: 26
Joined: 05 Apr 2010, 03:29

Who is online

Users browsing this forum: No registered users and 1 guest

cron