Sunday, July 13, 2008

Villagers

I've actually been working on the game a lot lately, and talking to Ex-B about it.

Right now I'm working on sorting out the database infrastructure for the towns and villages and buildings so they'll work in a totally awesome and organic way ('cause I got fed up with the static way the towns I got are operating when I finished the weapons and armor stuff and I started messing with the merchants).

I wanna make it like this:

At some level, your Wizard gets granted the right to build his own Wizard Tower out in the wilderness somewhere.

And then a village will grow around the base of your Wizard Tower, sorta like a lawn ornament, at first.

But since you can upgrade your Tower into a Fort, and your Fort into a Fortress, and your Fortress into a Castle, and since the Hamlet at its feet also has all sorts of upgrades (like irrigation and pig farms and silver mines and whatever), which will make it attract and keep more villagers, which will eventually make your Hamlet Lawn Ornament upgrade from a Hamlet to a Village to a Town to a City, capable of holding more buildings at each stage along the way (which may be used for special upgrades, like an Inn and a Bank, or may be used for houses for your other characters, or characters of your buddies (although I'm not exactly sure if that's all that great, unless you need a high level wizard in a town to have a Great Library or something, which is used as a prerequisite for something else, or something like that).

And the villagers will go out every day and make whatever they make, and some of 'em will travel to nearby towns and trade the stuff their village makes for the stuff their village needs, and that gives me hooks for escort quests and stuff like that, where you, being the Big Hero Guy, need to keep the frontier safe for your little pets.

And it also sets the economic stage for players that wanna do the Rogue Trader caravan runs and help villages out while making moolah and fighting monsters along the way.

And maybe you'll be able to invest in things like road-building, between your village and the nearest Big City, and upgrade that to a railway systyem or add road wardens or something to it, or set aside money from your treasury to pay player adventurers to do stuff like that for you, and every time a thing like that is accomplished, it lowers the chance that there'll be a bad encounter in the future (sorta like completing the "patrol quest" for your fort would make the area safer for a while).

And I definitely wanna make it so that you can schedule things, for when you know you ain't gonna be playing for a while, so you can tell your villagers to only dare a trip to town when you are around to escort them, or set a list of upgrades you want 'em to do, in a certain order, by pulling money of the treasury.

This is all easy and fun programming stuff, its just a lot of easy stuff to hold in your head all at once, and I need to think it all out so that I make sure I don't forget any of the fields I need in the tables heh.

Y'know, just from the crap I been talking about so far, I know I need to keep track of the treasury, the tax rate, the population, the health and productivity and morale of the population, the things it needs, the things it wants (once its got all the things it needs heh), the stuff it makes, the stuff it needs to make the stuff it makes, the stuff its "merchant" is moving back and forth between the Big City and the Village, the stuff in the village storehouse, the upgrades it has, both for your Tower, as a building, and the Village, as a Town, the state of the upgrades (as far as how completed they are), the slots for adding more buildings to your Village (which are separate from upgrades, although they might be occupied by certain village upgrades, 'cause some of those are buildings), and a bunch of attribute slots I can use to store things like the "danger level" crap that gets set from doing patrol and escort quests for the village.

And some other stuff I'm probably forgetting or haven't even thought of yet.

Like making the first upgrades be made out of wood, and require wood, instead of just money from the treasury, which would be handy for a lumber town that produces wood and just kinda cool all around for trader types.

Or, if you are lazy, you can just pay for everything, but I can still calculate the price dynamically dependent on the wood supply, by forcing your villagers to actually get the wood (and tools and whatever else it takes to complete the upgrade) from somewhere.

This is all fundamental stuff to my game, 'cause I want my "starter city" to work like all the other cities, for the most part (although it'll probably have a few more failsafes and cheats in it than normal, I'd like to keep that kinda junk to a minimum).

Wednesday, July 9, 2008

I'm Too Sexy For My Shirt






Man I am laughing my ass off ahaha.

I did this same paperdoll kinda thing a long time ago, I don't remember what I was programming, mebbe I done it more than once, but whatever, there's gotta be some of you out there that done something like this, where you gotta figure out how you want it to layer and make sure your boots look right with all your different kinds of pants and shit, its a total pain in the ass and I got a lot of touch-up work to do, but some of it actually came out kinda cool on the first pass, even though I was just sorta blundering through it as quick as I could.

I got forty different weapons and like eighty-something different pieces of clothing or so, so far, and I know I forgot some stuff I'm gonna want eventually, y'know, like Turbans, and I didn't even bother with Ringmail and all the different kinds of armor that you can't splash down some paint and whip up in a couple seconds, y'know, like, chainmail is easy 'cause you can bucket fill with a pattern and get away with it but junk like ringmail and studded leather is practically pointillism man you gotta put some time into it for it to come out looking right heh.

Damn my bowler hat is a little fuxxored up ahaha.

Mmm, I think I'm gonna get rid of my shoulder slot.

Its one of those "if its there, then you gotta use it" thingies, and the stuff in the shoulders slot generally covers up practically everything else, y'know, its where I got stuff like trenchcoats and pressure suits and biker jackets and cloaks and crap.

But if I combine it with "body," then you'll be able to pick out how you wanna look a little more, and it won't matter to the shoulder slot thingies, they all cover up whatever you got in the body slot anyways.

Only bad thing is that I won't have anywhere for capes to go, y'know, that's like, oh boohoo, no capes ahaha.

Dude, capes are like a curse AHAHA.

Yah, I'll have to combine platemail with surcoats and "suitcoats" and "dress shirt with no suitcoat" and "dress shirt with vest" and junk like that will all be separate thingies, too, but that's no big deal, I kinda had to do a little of that already anyways, might as well go all the way with it.

The important thing is that I got the ancient roman shit and Lovecraftian bowler hat dudes and all that other junk in the end, insteada everybody being stuck wearing trenchcoats and hazmat suits and stuff heh.

Tuesday, July 8, 2008

Drill Bits

Welp I've got all my weapon templates in the game complete with crappy little pictures for the paper doll, and I'm working on the armor bits now, just finished the cheesy graphics for the helmets and hats, which is about half the armor items, since there's a lot more kinds of hats and helmets than there is any other kinda clothing, I mean, there's like, bowler hats and bandannas and space helmets and hockey masks but there's really only a couple kinds of jackets and gloves, y'know, its kinda weird that humans are so hat-centric when you step back and take a look at the whole thing heh.

After I finish the paper doll graphics for the armor it only takes a sec to add all the templates in and then I dump them back out of the database so I can hardcode them into my re-installer ('cause there's no sense in a fresh install without all the templates in there).

And then after that, I gotta make a couple backpacks, I'm not real inspired to think of different kinds of "sacks" *rolls his one good eye* but once I got a couple bags in there I'm pretty much ready to go for playing the game with a working paper doll and shit, I mean, I still gotta add some "appearances" for items, where you add the URLs to pictures from the internet and crap and make a description for 'em, y'know, just like a regular player (so that's easy and it takes two seconds), and then I gotta fix up the merchant in town some to carry some of my brand new randomly generated items, and then I gotta wire up my "view details" thingie on the inventory pages, once I finish that, and then I get to finally work the kinks out of combat and make it look pretty, but I'm cruising right along.

I mean, after the combat thing, I'm actually down to doing "fine-tuning" and "filler" stuff, things like adding the front-ends so players can own their own buildings and making the maps work inside buildings and towns, that's more like cut-n-paste than anything else 'cause I already got all those things working in the game somewheres, I just didn't replicate it out to every place that needs it.

And then there's the fun stuff like adding gambling and quests and fooling around with vehicles and adding more specials and crap.

Monday, July 7, 2008

Fun Fun Fun



Man, programming the interface for this thing is pure torture heh.

It autoadjusts to fit whatever kind of item you are making, not because that was an especially smart way to do it, but because it was easier to make it the way I really need it to be, where I can see everything that's going on (like this template making and paper doll testing thingie, which players will probably never see) and then just delete it down into pretty little separate and easy-to-use things for regular people afterwards.

A lot of the fields are empty 'cause this is the real structure of the items in the database and either templates don't use those fields (yet), or they're for the item "front-ends" and "appearances" that players can add to the game, or they're fields used for actual instances of items, like "mods," which is where the magic bonuses and crap go, and attributes that aren't used by item "templates" or "appearances" which hold the "level" and "experience points" of items that belong to people in the items table (y'know, the stuff that your character is carrying around is in there too, along with the "front-ends" and the "templates" that every item is based on).

On the bright side, since there's extra fields that I ain't using for templates, I don't gotta donk around with redoing the database if I wanna use some of 'em for adding more item attributes to templates (like ammo and junk) as I test things and get bored with how simple I made stuff to start with.

Not that I'm there yet, right now I've just started adding all the templates and I'm making sure the paper doll is layered right (the graphics are gonna be crap but that's easy to go back and fix up later when I feel like doing it).

Oh, the different types of item entries (templates, appearances, and actual items), and the different sorts of items (weapons, armor, accessories, trade goods, and containers, atm) all use the same fields differently, so like, one handed weapon "templates" use their two URL fields in the items data structure for storing the images of the right and left hand weapon on the paper doll (which players aren't expected to come up with), and the weapon "appearances" and "actual items" use those fields to store the URLs to the player-added image (which you see when you check out an item's details) and the icon for that item (which defaults to a shrunken-down version of the player-added item image right now, we'll see how long I can get away with that heh).

Sunday, July 6, 2008

Making Time

Here's a good one.

I'm working on the Item Compendium slash Monster Manual dealie, and I've got to add the basics of the Time Period and Settings Filter, y'know, the thing that let's you specify when a certain kind of pistol was invented (so the server will know not to distribute that thing as loot before a certain date) and whether or not the thing (whether its a monster or an item) you are adding is from a magical or mythological world or a non-magical and historical world (that's the only thing I'm using the "Settings" Filter for at the moment, although it'll probably be used for other things eventually, like the Parental Guidance and "I don't wanna see anything that doesn't have a four-star rating" system and stuff).

So anyways, the Settings filter is kinda adaptable as I go along, 'cause its more of a "list of checkbox things" than a drop down box type dealie, but the Time Period one isn't that way, its gotta be good from the get-go and stay good the entire time, I can't decide to change it around later without monkeying everything up.

At first I was thinking of just making it something simple with ten choices or so, something like:

"Dinosaur Age"
"Prehistoric"
"Modern"
"Futuristic"

... and whatever.

But while that's nice for folks who suck at history, y'know, when they go to add shit to the game, it sucks ass for everything else, like College Professors who wanna do historical shit and stuff heh.

So then I was thinking I should make it a drop-down, and do things century-by-century.

That actually looks pretty good, at first, y'know, like...

Futuristic
Modern
1900s
1800s
1700s

...blah blah blah.

But then you get into like, how far should I go back?

Y'know, like, should I be doing 6100BC, 6200BC, 6300BC?

Ancient Egypt only goes back to maybe 40000BC or so.

And the "prehistory" line is 50000BC.

Maybe I should go back century by century until I hit that 50000BC thingie.

Or go back to 5000BC and then start going by milleniums or something.

I dunno, I'm not a history expert but from what I remember of junk, history starts "drying up after that 10000BC line, y'know, you start saying stuff like "he was a guy from 9000BC" when you start going back that far heh.

And the different sorts of weapons and armor dry up around there too, I mean, I could go by the old Bronze Age and Stone Age crap, I guess.

And since this isn't just used for items, like, it isn't just used for inventions, it isn't just used for stuff like bronze swords and flintlock pistols and different types of armor, its also used for monsters, with the specifically good examples of Dinosaurs and Giant Prehistoric Sea Creatures and crap, where the information for when they lived could be pretty cool and useful for the game engine (and its only a trip to the wikipedia away), 'cause I could use that to populate the planet with monsters that fit into all those different Jurassic Ages and shit, which would be kinda kickass (although the "loot" would suck, y'know, cause they ain't gonna "drop" chainsaws, guess I better make "dino burger meat" worth something ahaha).

And then besides the "going backwards" crap, I could tighten the resolution of the "modern" era, so that there'd be a 1960s, and 1950s and shit.

And then there's the totally fictional future stuff, but that's kinda easy, I mean, I guess I could divide that up some, just for the fun of seeing where folks placed their stuff in the future exactly, y'know how its fun to make up those future history things and all that heh.

Well, whatever, I'm gonna keep programming other stuff around this and just do it kinda cheesy at first but if anybody's got a good idea for a list of Time Periods or some kinda kibitz about 'em lemme know.

One of my favorite books of all times is Asimov's Chronology of the World, I might just cheat and use whatever the hell he went with, 'cause he's hella-smart.

Mmm, mebbe I should just let folks do exact dates for things, I was trying to avoid stuff like that, not just 'cause then I'd have to test and make sure you entered something that makes sense, but because the human measurment and display of Time isn't really all that universal around the globe, its one of those formatting things that gets messed up in different countries and stuff, and my code has to be able to wield this stuff mathematically to do certain things.

And the ISO 8601 "internationally accepted standard" of yyyy-mm-dd is not good enough for me, man, y'know, we need us a little more than yyyy heh.

Even if we were willing to put up with the whole Anno Domini dealie (which the standard can't even do anyways even though that's the cultural bias its based on ahaha).

Well, I guess its better than converting everything we find into that Year of the Monkey shit AHAHA.

Goddam humans, ain't we supposed to be able to think ahead a little or something I mean c'mon seriously wtf here we go again with that Y2K shit all over again AHAHAHA.

Anyways, if I do allow specific dates, then you got the beginning of that cool "Time Traveler goes back to the day before something was invented or something important happened" kinda shit.

I guess I might as well try to figure out how to do that.

That sorta gets me into thinking about how some things quit appearing after a certain date, and how I don't really have anything set up for that, although you do always got stuff like World War II guys that ain't heard that the War is Over and the Loch Ness Monster and whatever, so mebbe that ain't such a big deal.

It actually kinda works out in an organic way, 'cause of the way things are put into the game randomly, as we get closer to modern times, we know more junk, so there's bound to be more modern stuff than older crap, which will make the older crap not show up so much.

Plus I could weight that "age" thing in a negative way, to make old stuff more rare in modern times.

So that's not so bad.

Although I should probably hook up something server side so that ancient romans don't end up fighting a lot of dinosaurs heh.

Which puts me right back into that "needing a bunch of time categories" thingie anyways ahaha.

Not Dead Yet

After finishing my move, there was the 4th of July party stuff, and then a day devoted to the accompanying hangover where all the angels in heaven and devils in hell beat on my head like a drum while I lay in bed and watched shit on PBS like an old woman with broken legs.

My boundless spirit of adventure is running on empty and I can't remember the ends to any of the stories but aside from that I'm still alive and most of my bruises have already healed heh.

I think I just need another cup of coffee and I'll be all good ahaha.