+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 27

Thread: Random thoughts: walls and more

  1. #1
    Join Date
    Mar 2005
    Location
    Dublin, Ireland
    Posts
    244

    Default Random thoughts: walls and more

    Ok.. so we're going to have walls that can be placed by players anywhere they want. That means we need a model for each type of wall. I was thinking on the latest of my recent bus journeys (bout 3 hours of staring at the seat in front of you) that hey.. maybe this is my job. So I started thinking how exactly we'd get it to work.
    Now the nicest way to have this would be to have the wall slowly build over the time period necessary to construct it. One way I thought of doing this was having the model animated. Say from frame 1 - 100 the wall will be built. This will provide a nice steady build. No waiting an hour and suddenly another quarter of the wall appears. I was also thinking that these here walls are gonna degrade over time as well. So why not have frame 100-200 show the degradation of the wall until it eventually disappears. Frame 200 will just be a few rocks left in the vague form of a wall in any case so it suddenly disappearing won't be too big a deal.

    As long as there's no problem with that method then I can get to work on a wall we can use to test the engine when it gets to that stage. It must also be "tileable" so for example if the base model is 1 metre in length and you want to build a wall 5 metres in length it can repeat 5 times without looking bad.
    When you want to paint a wall you'll have to plaster it first. This flattens the face selected and gives it a plaster bump map with a grey colour. (no colour texture). From there you can pick out any colour you want and just put it in as the base colour. The texture in the wall will be given by the bump map so it won't appear as a bland texture.

    Any problems so far with implementing any of this?

    I think it would be a good idea to have a starting town mostly run down (buildings around 50% degraded). There would be 15-20 houses in it that can be claimed by the first to arrive. This will give the first players on the server a nice boost and will pursuade them to stick around if nothing else. However to actually benefit from these houses they would have to renovate them. Seeing as they would be very basic houses (stone and wood) the work could be done by the player themselves after gathering the necessary resources.

    This brings up another question about how a town is actually formed. I would like to see a system whereby a town hall must be constructed. Once this is constructed by one or more people (expense to build must be tested so we are not flooded by 1 man towns) the leader of the town gets the option to name it and set the town centre (within a certain radius of the town hall).
    This town centre will have two roads going through it. These will primarily be just a guiding hand as to where to build the first houses. After that roads can be placed by the town leaders.
    This leads on to something that has been brought up before. Town specific constructions such as roads or public amenities or improving the town hall (I would like to see that as a step to upping the status of the town itself provided the population is high enough). A tax on all people that reside within the town could be sent to the town halls coffers from which it can be spent on whatever the town leaders deem necessary. The tax level can be set by the leaders (low to attract newcomers, high to improve the town more quickly).

    Ok. So for example we have our starting town. The first 20 (or so) people on the server take up residence there. A 2 day election is called for a town leader. This gives them time to get to know eachother and for nominees to campaign among them. During the last day votes can be cast by going to the town hall and selecting from any of the nominees.
    Once the leader is chosen he can elect people to the council. By this stage we'd hope to have a town of around 50 people so perhaps 4 or 5 council spots will be open. The exact size of the council should depend on the towns population.
    Tax is gathered from the residents. Even if they have no monetary gains from selling products I would recommend that experience gained by them should be taxed at the rate and converted into gold for use by the town. So by 2 or 3 days in the town should have enough money to start repairing the town centre and town hall as well as the roads in the town. The house repairs should be left to the individual residents.

    Now, two weeks down the line our little town is really starting to grow. Maybe 200 residents have placed their houses within its bounds. Technology is booming and the first shops are opening for business. Time this village grew up. After passing a certain population size the leader is given the option of expanding the town hall and thereby increasing the status of the town and increasing the territory that it controls.


    Ok. Started rambling a bit there but that's how I think usually.

    One more thing for now.

    What are the chances that we will have some sort of blooming effect in the game engine? There are several different options ranging from the relatively easy to include post frame edit to the full scale High Dynamic Range Rendering seen in HL2s Lost Coast and the UT 3 engine.
    Now I'm assuming the latter is not really feasible for this engine so how about the post frame option?
    All this requires is that any pixel in the frame with a brightness higher then 95% (or thereabouts) is blurred out over the surrounding pixels. I've used this when rendering in 3DS and it works suprisingly well. As long as it doesnt drop the framerates too much I would definitely recommend using this.
    I just think that we need it in the game to keep up with what will be the standard of graphics in the coming year or two.
    " There's nothing like a bit of destiny to get the ball rolling " - Terry Pratchett - The Wyrd Sisters

  2. #2
    Join Date
    Mar 2005
    Location
    USA
    Posts
    132

    Default Early politics

    Quote Originally Posted by Shane Christopher
    Ok. So for example we have our starting town. The first 20 (or so) people on the server take up residence there. A 2 day election is called for a town leader. This gives them time to get to know eachother and for nominees to campaign among them. During the last day votes can be cast by going to the town hall and selecting from any of the nominees.
    Once the leader is chosen he can elect people to the council. By this stage we'd hope to have a town of around 50 people so perhaps 4 or 5 council spots will be open. The exact size of the council should depend on the towns population.
    1) Anyone elese here subscribed to the MUD-Dev mailing list? (https://kanga.nu/lists/listinfo/mud-dev) There's been discussion on similar systems recently, but I don't know if the archives are working right now.

    2) Are you hard-coding a politics system (description appears to be some variant of democracy) or just throwing ideas out for now?

  3. #3
    Join Date
    Mar 2005
    Location
    Dublin, Ireland
    Posts
    244

    Default

    Right now I'm just throwing out my own ideas for the system. These are by no means definitely what will be in the game.

    And no I'm not subscribed to that. I'll check it out though.
    " There's nothing like a bit of destiny to get the ball rolling " - Terry Pratchett - The Wyrd Sisters

  4. #4
    Join Date
    Mar 2005
    Location
    California
    Posts
    2,099

    Default

    As for the wall implementation, that's essentially what I had in mind. Nice idea with the decay too. Though perhaps in the interest of saving space, we should drop the number of decay points by about half? I don't think you'd need quite as many frames to show a convincing decay as you would a convincing build. I could be wrong though.

    So you'd handle the animiation through bone positions? If that's the case, we'd only need to have an x,y,z point for each bone joint per frame, so space wise it would seem to be okay, I think. Shane, you'd probably know better than I would. Anyway, the engine will for sure be handling bones already, so no problem there.

    How would that work with the texture though? Wouldn't the bitmap squash oddly when the bones deformed the wall? Or can we also specify U,V coords for each vertex on the wall model for every frame as well? I guess that may work. Sorry, just thinking out loud here

    For the political system, you are essentially describing something very similar to what I was thinking too. Of course, keep in mind, we'll also have to work in professions to the system, as some of them will deal with politics. And there's a couple of game systems I have in mind that have an effect on this. But I don't see any major problems with what you've laid out. We may want to think about having more than one specific system depending on who the controlling player is (controlling as in regards to the territory), and what profession(s) they have and what specific choices they make. For example, one controlling player may choose to set a territory up as a monarchy, another as a theocracy, another democratic, and so on. These would be based both upon their choices and the skills they have in politics (which would perhaps put a limit on the choices, I dunno).

    Just some thoughts. How does a particular player get control of a territory? How would they lose control to another player? Not real clear on these, to be honest.

    Ron
    "They laughed when I said I was going to be a comedian ... They're not laughing now." - Bob Monkhouse

  5. #5
    Join Date
    Mar 2005
    Location
    Dublin, Ireland
    Posts
    244

    Default

    Well I was thinking of having simple keyframe animations for it with each section being a seperate model. I don't know if that will work in the engine. Maybe not.

    I'll post an example video if I can soon.
    " There's nothing like a bit of destiny to get the ball rolling " - Terry Pratchett - The Wyrd Sisters

  6. #6
    Join Date
    Mar 2005
    Location
    Dublin, Ireland
    Posts
    244

    Default

    Ok have a look at this and tell me what you think.

    http://www.cw-meltingpoint.com/image...all_Build2.avi

    Quote Originally Posted by Ron Hiler
    How does a particular player get control of a territory? How would they lose control to another player? Not real clear on these, to be honest.
    The size of the territory controlled by the town could depend on several things such as the towns size, the cumulative strength of its warriors (??), certain town buildings and possibly technologys known to that town. The Leader of a town would control that territory.
    Players that build houses outside of a township would control a small amount of territory depending on the size of their house and type of skills they have. For example a farmer could purchase a larger area for farming.

    Taking control of someone elses territory could be as simple as buying it from them to taking it by force though I feel that taking territory from single players by force should require much more then simply killing them. A lot of thought will have to go into making sure that small players have a chance of keeping their territory against those other lone wolves that are much bigger then them.

    Players that build their houses as part of a town will have the territory on which their house and surrounding grounds are situated on but the town leaders will actually control that territory and can if needed destroy their house to make way for town buildings ( a bad idea seeing as that player probably won't be too happy about it but sometimes necessary ).
    " There's nothing like a bit of destiny to get the ball rolling " - Terry Pratchett - The Wyrd Sisters

  7. #7
    Join Date
    Mar 2005
    Location
    California
    Posts
    2,099

    Default

    Very cool, I like the sample! Pretty awesome.

    Keyframing is certainly a possiblity. That would increase the size of the model quite a bit though, since what we're talking about is a seperate model for each key. How many keyframes were you thinking to handle a 200 frame build + a 100 frame decay?

    Of course, your sample was only about 20 frames or so (I didn't count em, just guessing). Maybe we're overdoing with 200 frames? Because I don't know that it would really take *much* more than what you put together. I realize that's just a very basic wall, but even with crenelations and windows and doorways and stuff, how many more frames would a stone wall really need?

    As for taking away someone's home, I'm most likely going to nix that idea. I don't see any way to do that without have a very angry player, and that's not the point of this game, heh. The leaders will just have to build around the existing structures. Private homes and Player shops will always remain the sole property of the player until they stop paying the taxes on them. Public structures are a different story, I could see them shift control as territory is won and lost.

    By the way, I meant to ask, but I forgot. What do you mean by "blooming"? It's not a term I'm familiar with.
    "They laughed when I said I was going to be a comedian ... They're not laughing now." - Bob Monkhouse

  8. #8
    Join Date
    Mar 2005
    Location
    Dublin, Ireland
    Posts
    244

    Default

    Well that was a total of 56 frames from start to finish. I planned for 50 but I forgot to take the wooden supports off. I will shorten that to 50. After that I guess around 30 for the degradation. I'll make a degrading example and then a window and door example after that. I used around 100 polys for each block. Curved edges and different shapes for each that you can't see in that video. That could be too much. It comes to around 2700 just for that wall. I'll change them to just simple blocks. Got a bit over ambitious there
    Using seperate blocks will mean that if a wall gets destroyed or damaged we can judge what blocks should be thrown off the wall then give those physical properties (assuming we will have some version of a physics engine). After a minute or so they can dissappear. We don't want too many physical objects lying around. It would be nice to hit a wall with a catapult or something and see blocks flying off it realistically.

    An overview of Half Life 2's HDR technology can be seen here:
    http://www.bit-tech.net/gaming/2005/...verview/1.html
    It goes through blooming on the second page.
    Basically it just means that any surface that is lit greater then white will have that extra light blur over onto the surrounding pixels.

    For example you have a light coloured surface such as sandstone. The brightness once all is rendered would be around 200 (in a scale from 0-255). However a light is then shone on the surface which would brighten it by 100. Normally it would get to a 255 brightness (pure white) and that would be it. With blooming enabled though the extra 45 brightness is transferred to the surrounding pixels, brightening them accordingly.

    " There's nothing like a bit of destiny to get the ball rolling " - Terry Pratchett - The Wyrd Sisters

  9. #9
    Join Date
    Mar 2005
    Location
    Dublin, Ireland
    Posts
    244

    Default

    Ok I've redone it with simple blocks. The size of the .max file is 593kb with keyframes and all. That's 41kb zipped so it's not gonna be a problem with downloading anyway.

    The video looks practically the same right now. I'll change it when I have the degrading done. That's going to require some more complex brick models. I'm hoping I will only need three bricks in total. One for the left, middle and right. I'll see what that looks like anyway.

    btw that video is running at 4fps which is why it seems like there are only 20 frames or so.
    " There's nothing like a bit of destiny to get the ball rolling " - Terry Pratchett - The Wyrd Sisters

  10. #10
    Join Date
    Mar 2005
    Location
    California
    Posts
    2,099

    Default

    Ah, I see. Cool effect. I like it.

    I haven't really thought about it much, but this is clearly a per-pixel effect, and the only way to pull off per-pixel effects without killing your frame rate is through the use of shaders.

    It seems feasable we could write a pixel shader to simulate this effect. After all, it's pretty much just an "if test", as in

    if (PixelLight > 255)
    Neighborlights += PixelLight-255

    or something to that effect. Naturally I suppose you'd have to run all three color channels.

    Not every card supports pixel shaders, but my feeling is that if there is no pixel shader support, we just skip it and the user gets a non-bloomed effect (since we can't simulate this effect in software; this is really a hardware only kind of deal).

    So your demo was 14 keyframes, but 54 frames running at 4 fps. That makes sense. In the engine we won't (of course) have quite the same setup. That same wall would have 14 frames, but you wouldn't have to run it at any particular speed (you'd just tell the enige the model is on frame 8 for instance, and it'd handle the drawing, we'll let the server keep track of when to switch frames).

    How many tris are we talking about for that demo (after you simplified the blocks)? [I presume the max number of tris would be when the wall is built and the supports are still up]. We aren't going to kill our framerate by flooding the screen with wall tris are we?
    "They laughed when I said I was going to be a comedian ... They're not laughing now." - Bob Monkhouse

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts