Archive for July, 2008|Monthly archive page

ShackRPG: NPCs and Dialog Boxes

Progress on the engine is coming along great especially now that I can work on things where you can SEE a difference. Over the last little bit, I was working on string manipulation and creation of the dialog box that we all know and love in RPGs. The result is a fully dynamic window dialog box that will adjust to the size you specify. When any sort of conversation window is initiated, several paramiters are passed to the window for creation including;

bool blockUpdates – Will this window pause the game while open.
string text – What is going to be displayed in this window
vector2 npcOrigin – The center of the NPC talking
int maximumCharactersPerLine – How many characters before a new line is formed
int linesToDisplay – How many lines will fit in a dialog box before “Okay” has to be pressed for new lines

would you kindly bookmark this page

would you kindly bookmark this page

As you can see from the screenshot above, if you pass through the NPCs origin the conversation SHOULD be off the screen. Auto adjustment for keeping the dialog on screen was fun to implement and it looks great too! Video of it in action:

Things are starting to come together. Just a few more key details before I can start putting together an actual demo. Oh, and I know all the NPCs look alike… I’m not a computer artist so I’m using the same spritesheet for all of the NPCs ;)

I’ll have more updates as I complete various aspects of the engine / game. As always, if you have any questions or would like to get in contact with me, feel free to shoot off an email at


ShackRPG: Engine Progress

These last few weeks, I’ve taken the opportunity to re-write my RPG Engine, and base it closer to the RPG Template engine released by Microsoft for the XNA platform. I did this for a few reasons, one of the primary reasons being I have not seen any RPGs to come out of that RPG Starter kit hosted on the XNA space. With a basic demo, and a little creativity, I wanted to show people what can be done with the tools given by Microsoft.

Current Map, Developed by EvilNando’s editor;

Fast forward a few weeks and I’ve pretty much got the tile engine done, and put together a few quick maps with a great map editor made by my buddy, and fellow XNA RPG Creator, EvilNando (Website located at ) Changes to the Microsoft engine are plenty, but some of the notable ones include:

Modified content importers – I have not used the Microsoft importers, choosing to instead use just .xml files. Because of this, all methods of importing content from the content pipeline have been done using the System.XML namespace

Audio Engine – I really liked what Microsoft did with their audio engine, so I just tweaked it to include a “Playlist” system. Basically this is just a stack, and new music can be pushed onto or popped off of the stack at any given time. If there is no music in the stack (playlist) the general background music will play.

Collision System – I really, REALLY didn’t like the way Microsoft handled collision detection with tiles, mostly because it wasn’t compatible with my system at all ;) So instead I stripped out what they wrote, and modified my old version to handle collision in the new tile engine.

Screen Management – I used a modified version of my old screen management, and discarded Microsofts completly. It works for what I want it to do, and I made it a little more modified to handle Update Blocking and Draw Blocking on gamescreens. For example, You’ll notice in the video, the “Gameplay Screen” is the last one on the stack, but the first screen is the “Main Menu.” Obviously you wouldn’t want the Main Menu screen updating or drawing if it is being covered. Because of this, the main game screen blocks updates and draw calls to all lower screens.

Animation – Since my old animation method worked quite well, I just modified that to work with the new system. Nothing really new.

Video of the new engine in action:

There will be more updates soon, especially when I finish the next few stages of the engine (which includes NPCs, Quests, and Combat, which I will be taking an entirely new direction.. you’ll love it)

Questions, Comments, Opinions, feel free to drop me an email at

ShackRPG: Basic Enemy AI

And when I say basic… i mean VERY basic! I was planning on doing a complete enemy AI with patrols, running away when health got low, etc… but then I realized this is only my first project and AI can get VERY complex, VERY quickly. I instead started working on a few mindsets for my NPCs, including:

Guarding – Enemy is guarding a specific location and if hostile, will aggro player. Will chase you until NPC becomes non-aggresive.

Standing – Enemy stands in a specific location, and will not aggro unless attacked.

Patrolling – Enemy will patrol between two or more points, and aggro the player if hostile.

Aggressive – Enemy will activly persue player and attack when in range.

I was looking into a lot of different things for making this work, including some pathfinding (like that used in some RTS games, search google for A* if interested) but a lot of that is a little more advanced than I would like to get into right now. While not the most interesting AI, this works for the very basic demo I’m putting together.

Up next? Finish the AI, and start on quests! Video of me playing around with enemy aggro is below. Enjoy!