Will Blog

Month

December 2010

39 posts

A battle plays out

I’ve been tweaking the army and commands and I have to admit, it is starting to work nicely.

Here is a little battle I just played out…

I went to town and hired an army of 43 adventurers and guards. We went down the first sinkhole that I could find. Lo and behold… we stumbled into a nest of giant rats! 300 to be exact. Upon first entering this rat hole we were separated and surrounded.

image

After about 30 seconds into this battle I could tell it would end poorly!

I gave the command to follow me (f1 to select group 1 then number 1) and we retreated. There had to be a tight space where we could put our backs to the wall and bottle neck the onslaught of rats!

I see it. A hole in their defenses and we made a break for it. Rats biting at our heels as we run. Morale is dropping fast and I am losing men.

image

We ran past that stalactite formation to the east and push through a lightly defended nest area past an underground lake. Rats can’t swim so I knew this would be a prime position. I give the Attack/Guard location command (number 2) … they form up and begin to look for the nearest rat to attack.

This is where we make our stand!

image

Borris took it on himself (red guy north of the lake) to rush out and create a diversion so the other stragglers could make it. His sacrifice won’t be forgotten (well at least until I roll another world). 

We will have this battle.

I look over the men and I see we are taking more casualties. The rats we left behind are now wandering back this way and morale is getting dangerously low.

image

I call for the men to tighten up the line! ( number 3) …. This helps. The men bolster each other and form up closer together. We are still getting dangerously damaged and I don’t think we are going to make it.

image

Well the battle raged on and we won our way back to the exit. 10 lost troops and a path of dead rats. What a battle that was.

Back to bashing bugs. I think you may like this Saturday release.

Dec 30, 2010
Upcoming Saturday release → legacyofawarlord.com

Posting weekly release/bug fix/update list on LOAW forum as I make changes.

Here is the first one. This is updated as I make changes. When it is finalized I’ll make a post here of the set changes with the new release link.

For those of you who might want to follow along.

http://legacyofawarlord.com/frum/index.php?topic=21.msg23#msg23

Dec 29, 2010
#release
Features you want next

I have a poll going on at the forum, feel free to stop by an cast your vote on the next game feature to implement.

http://legacyofawarlord.com/frum/index.php?topic=20.0

I am curious to know what you would like put into the game next.

Dec 28, 2010
#poll
Going pretty well

I’m not the most efficient at creating a community site since this is my first time.

I think I have managed ok. Set up a web page yet I probably should have left it offline until I had the template ready. One person mentioned I should have just posted a direct link on my blog.

I’ve created a forum and set everything up in google analytics. Now that is a cool program to use. One thing I found out, as soon as you release something it creates a large amount of traffic. I’m up to 1,000 hits on my blog and site.

I have gotten some great feedback so far from people. Thank you!

I’ll be getting back to coding and fixing bugs today then move into making the save feature work. At this stage I will try to make a weekly release on Saturdays of the few features I add. As time progresses and the game is more stable, I’ll slow down the release cycle.

Dec 27, 2010
#community #status #website
Created a forum → legacyofawarlord.com

I figured I’d provide a central location to allow people to store mod files like XML and JPGs. I have other plans to eventually create an XML schema to check the files against to simplify troubleshooting for modders.

Also, you are welcome to request features and I am offering to allow you to sponsor features.

Thanks for visiting.

Will

Dec 26, 2010
Created the official website → legacyofawarlord.com

I spent the day creating the new website for the game.

Not sure if all the DNS entries have spread out to the net for my new server. Had someone comment earlier that they couldn’t view the site.

Have a wonderful Christmas and a happy holidays..

Dec 24, 2010
#official website #indie game #alpha #release
Legacy of a Warlord site & alpha release → legacyofawarlord.com

Not much to look at, but there it is. The first alpha version.

What a milestone and a lot of hard work that was. Hopefully it is all downhill from here.

http://www.legacyofawarlord.com/

i’m off to sleep now.

Dec 24, 2010
Couple quick notes on combat

Polishing up melee combat for the player now… found a big bug! I have a isStatsDirty bit that was not being set. This was causing defense and other damage reduction stats not being updated when a player equipped something… Couldn’t tell it was broke until I made the stats menu.

Also, I think this is a good combat algorithm.

damage = random int  between (weapon minimum damage - target defense) and weapon max damage + weapon power level - target damage reduction)

Then if damage is less then 0 it is set to 0.

This way a good lucky hit can still be scored, yet the random number generator has a larger possibility of 0 damage results due to the negative number defense influence.

I.E.

Target with Defense 20 (dragon) and 15 damage resistance against blunt trauma being attacked by a + 5 power club that minimum damage is 2 and maximum is 20.

damage = random  between (2 - 20)  and 20 + 5 - 15
dmg = -18 to 10 damage.

Time to break out a sword or run away at this point.

There would still be hope though. A critical hit reduces damage reduction to 0 and hits the mob with MORALE damage. Do enough morale damage and it will turn tail and run.

Dec 24, 2010
one more day

Argh, what a wasted day this was for coding (well, yesterday the 22nd).

Christmas shopping and doing all the necessary tasks related to having a successful release. (Finalizing copyright registration stuff, Domain name purchasing, testing on computers other than mine).

Wow, I’m excited and anxious all in one and here I sit trying to make absolutely sure item selling works and find all the nagging bugs to send out a somewhat polished alpha.

Dec 23, 2010
#alpha #indie #game #release
The marriage of a Template and Void pointer.

For anyone who doesn’t appreciate C++ or coding… please move on for this post. I’m about to get really codey.

So here I sit, I have a flashy new gui manager and I have menus with gui list entries. I want to be able to access any type of object in my game via a selector that sits in the GUI. Be it a NPC, an item or even another menu. I was reading about this cool thing called a void pointer and an even cooler thing called a template. I thought, wouldn’t it be cool to marry them. So I did it and produced the ultimate menu selector thingy. I think my head just about exploded with all the possibilities.

6 lines of code can access any type of pointer object I need to select and work with and be called/passed along from the input manager.

// in the HPP file.

template <typename TV>
TV * GUImenu::get_RowEntryVPTR(void){
    if (currentRow < GUIEntries.size() ){
        return (TV*)GUIEntries[currentRow].VPTR;
    }else return NULL;
};

Lets say I want to have my GUI select an item to feed into the Item manager. Now I call this by using this line of code.

guiMenu * gm = MenuManager->getMenuByID(MENU_ITEM); // grab the item menu

Need to hire an NPC? After selecting the NPC menu. … same as above but with MENU_ENLIST or MENU_MANAGEARMY.

NPC * npc = gm->get_RowEntryVPTR<NPC>();

if (npc) {PlayerHandle->hireNPC(npc)}else{throw (“Something wonky happened!”};

Oh, here is a fun one I just implemented. Thus why I posted this while it was fresh on my mind.

// Tells the market to sell the player 1 of an item.
Market::Instance->BuyItem( ptrPlayer,gm->get_RowEntryVPTR<Item>() );

Well. Happy coding and merry Christmas. This is my present to you. If you don’t like it I’ll try to exchange it for something better in the future. :)

Dec 22, 2010
#c++ #code #template #void
Dec 21, 2010
#bug #screenshot
What do you think?

If you were to play this game…

Would you rather have.
1.The bars in the lower right or have text display?
2. If text display, what type…
 A. Percentage. (0% .. 100%)
 B. Actual numbers. (num/max number)

Dec 20, 2010
#your opinion
Not as much done as I wanted (sprint 4 pdf) → cid-5908785ef80fabbe.office.live.com

I’m having mixed feelings about where I stand now on the project. I have had some great successes this month and yet I wasn’t able to reach the bar I set for myself. I need to stop putting features in and now polish the ones that are set and squish any bugs I can. Also get a day of testing with my brother to make sure this runs on vista and windows 7 (32 and 64 bit).

Saving didn’t make it in. This was a disappointment. When I started categorizing all the pointers and deep copy logic it would take to serialize that data out to disk, I knew it would take a day of planning and a couple of days to code and debug.

I am now focusing on the most important features to make it somewhat enjoyable for my first release.

Dec 20, 2010
#sprint #alpha #chart
Dec 19, 2010
My graphical concern

The thought occurred to me. The graphical tile set I am using right now to test with and generate these pictures was put together by a guy who’s moniker is Ironhand on the dwarf fortress forums. Excellent work he has done, yet this puts me in a poor position.

If by chance he does not like the work I have created, I might be requested to stop distribution and collect all the files I distributed (They would contain his works). This is a very bad place to be in as once something is on the internet, it is impossible to retract it.

That being said, I will take up my GIMP paintbrush and generate the 15 or 20 tiles needed to create the alpha product and use a generic free license font. I’m not that bad with graphics I cooked up the menus. While I am at it, I think I’ll move down to 16x16 size tiles instead of 18x18. I really need to make things just a bit smaller to support people running 1024x768 resolution.

Then if the game works well, someone may mod in a better graphical version that they can maintain (as opposed to me.) I should be programming and fixing bugs anyways.

Maybe I’m paranoid, but I figure an ounce of prevention is worth a pound of cake.

Dec 19, 2010
#planning #alpha
Little story

I appeared in this little alpha world, only with the clothes on my back…

To the southwest I see a glittering pile of gold and some weapons. NICE… I pick them up and head into town. This poor town is being sieged by rats and they are mauling the citizens.

I call out that I have a large amount of money and want to hire people for my army. Immediately the guards run up to me and stop protecting the town’s citizens and ask to join my cause. I’m nice so I only hire 1 guard and a bunch of random adventurer’s (all wearing strange ID tags, but who am I to discuss fashion).

image

We promptly leave as i bet there is far better loot in the dungeon than in this town. I get the urge to travel south then back north with the army, parade style.

image

We enter the nothern stairway , btw who would build stairs in the middle of the ground? Crazy… The air surrounding us is filled with a purple mist that lingers and strange purple glow covers the walls. I know this must be one of those sinkholes that the townspeople talked about.

image

In the distance are cat calls and rat squeeks… haunting and echoing across the cavern. We push forward north to investigate and then we are rushed by the evil cats and a battle ensues. (normal roguelike logging conventions won’t work here. I think i’ll aggregate the damage display i.e. army does 20 damage and takes 8)…

image

Then disaster strikes! One of my army dies… (subsequently setting off a breakpoint I forgot about in my debugger, oops. haha).

image

The battle dies down due to bugs in a few portions of code. All the cats pass out exhausted (0 stamina) and my army runs off looking for food in the cave because they are starving (I should up the maxhunger value some in the XML).

The final score: Cats:1   My army: 2   bugs:20

Have some debugging/tweaking to do and will start on the lighting and character generation screens.

Dec 18, 2010
#story #screenshot
Army management, in

I finally got the army working with a decent management system. It is all planned out, most of the infrastructure is in. Just need to fill it in and debug. Most of the AI actions were compatible with the new “ArmyCommander” class.

f1-f9 will select the group. (50 max troops per group is the goal)

1-9 will select the command.

These commands are currently immediate and overwrite the AI. Eventually I plan to implement morale and leadership checks to determine how long it takes to get the command; Also determine if the NPCs override or forget your command. These checks will be based on leadership skill, total army moral or the leader’s morale.

So far the group commands are

  1. Follow me - The group will follow your player unless attacked and must defend themselves (also required to have NPCs zone with you). In alpha, works good.
  2. Attack targeted enemy - (not fully implemented). Not in Alpha.
  3. Spread out and engage - Everyone in the group rolls up a random spot on the map and goes on a rampage towards their spot. Kind of a do-whatever-you-want command. Will be in Alpha.
  4. Tighten up the line -(mostly coded) NPCs will look around and find an ally and gets closer. Gives a small morale boost. Also reigns in the wanderers. Will be in alpha.
  5. Guard/Fortify - go to point and stand there. Attack anything bad that gets close. Not in Alpha.
  6. Collect loot - (not done) . This will be the loot command. Group will pick up any loot in eyesight range. The loot will be based on a loot string the player specifies. Then they will return the item to the collective storage location (currently player inventory). maybe in alpha.
  7. Rest and recover - (not done) Right now, everything just passes out where they stand and start regening stanima,moral and life. Eventually this will only work if the NPC feels safe. Will be in alpha.
  8. Time to eat - NPC begins to look around for food. Will be in alpha. (Will need to drop rations on the ground that you buy in town. For now.)
  9. Equip yourself - (not started) NPC will equip themself with specified weapon/armor or whatever they can find. Not in alpha
Dec 18, 2010
#planning #army management
if(!this) run away fast...

I just implemented something that I wish I knew about months ago. It’s simple and I am sure will make my continued foray into c++ programming easier.

At the top of my class member functions I add 1 line.

if ( ! this ) return; // (or return 0 or … NULL, or … FALSE)

so when I do something crazy like,

vectorNPClist->Character( *iterator++ )->checkifdead();

It doesn’t crash if something else added a null pointer to the list. I had this happen once. Cost me 3 hours. Ugh.

Ultimately, I want to push forward on features as quickly as possible, then debug at the end of the week. Instead of debugging constantly. I found it is 2 different mindsets. Early in the week I feel creative and later I want to do that heavy detective work digging through memory and fixing bugs.

“If(!this)” should simplify my movement into threading (I think).

.

Dec 17, 2010
#C++ #debugging #tip
Dec 17, 20101 note
#code #screenshot #c++ #town #NPC
Dec 16, 2010
#screenshot #GUI #alpha
Next page →
2011 2012
  • January
  • February 2
  • March 5
  • April
  • May
  • June 1
  • July
  • August
  • September
  • October
  • November
  • December
2010 2011 2012
  • January 24
  • February 4
  • March 14
  • April 2
  • May
  • June
  • July
  • August
  • September 3
  • October 6
  • November 4
  • December
2010 2011
  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August
  • September
  • October
  • November 8
  • December 39