Jump to content
  • Advertisement
  • entries
    114
  • comments
    273
  • views
    600657

About this blog

Exploring of a world of code, coding a world of exploration...

Entries in this blog

 

Strongly-typed typedefs in C++ in MinGW and GCC (C++11, GCC v4.6)

C++ typedefs are weak - they are only a simple alias of the original type, and are implicitly converted to and from the original type.

Here's a basic example:
struct Point
{
int x, y;
};

typedef Point MyPoint;
typedef Point MyOtherPoint;

int main(int argc, char *argv[])
{
Point point;
MyPoint myPoint;
MyOtherPoint myOtherPoint;

point = myPoint; //Implict conversion from typedef and original.
myPoint = point; //Implicit conversion from original to typedef.
myOtherPoint = myPoint; //Implicit conversion between two different typedefs.

return 0;
}

Unfortunately, C++11 doesn't add strong typedefs either, but using some of the new features in C++11 I created a template/macro that adds strong typedefs to the language.

Here's how it's used:
//typedef Point MyPoint;
//typedef Point MyOtherPoint;

strong_typedef( Point, MyPoint);
strong_typedef( Point, MyOtherPoint);

int main(int argc, char *argv[])
{
Point point;
MyPoint myPoint;
MyOtherPoint myOtherPoint;

point = myPoint; //Implict conversion from typedef and original.
myPoint = point; //error: static assertion failed: "MyPoint can not implicitly be assigned from Point-derived classes or strong Point typedefs"
myOtherPoint = myPoint; //error: static assertion failed: "MyPoint can not implicitly be assigned from Point-derived classes or strong Point typedefs"

return 0;
}

The 'strong_typedef' template/macro allows you to use the same constructors as the original, and even inherits most operators, but blocks implicit conversion when accidentally mixing types in an operation (myPoint += myOtherPoint; //compile error! Mixing types).

The macro also adds two new functions the the new types, to allow explicit conversion: "ToBaseClass()" and "FromBaseClass()".

There may be a few problems with this macro still, and if so, I'd love to hear it. Especially since template-metaprogramming type stuff is new to me, I may be making mistakes somewhere - if more experienced users would peer-review and enhance the code, we all benefit.

Here's the complete class, with example usage: (Requires GCC 4.6 or greater, and you must enable C++11 features)
#include
#include
#include

#include

//Uncomment this line if you want two seperate strong typedefs to allow non-strong comparison ("strongTypeA > strongTypeB", and etc...).
//This only applies to comparisons - assignment, manipulation, and construction is still strong.
//#define STRONG_TYPEDEF_ALLOW_WEAK_COMPARISONS

//---------------------------------------------------------------------------------
//These macroes are used by 'strong_typedef'.

#define strtype_enable_if_has_function(parentTemplateArgument, function, returnValue) \
typename std::enable_if::value , returnValue>::type

#define strtype_assert_can_call(parentType, newTypeName, templateArg, errorMessage) \
static_assert((std::is_base_of::type >::type >::value == false) \
|| std::is_same::type >::type >::value, errorMessage)

#define strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, function) \
template \
strtype_enable_if_has_function(Parent, function, newTypeName) \
function(const Arg &other) const \
{ \
strtype_assert_can_call(parentType, newTypeName, Arg, \
"" #newTypeName " is not implicitly convertible with " #parentType "-derived classes or strong " #parentType " typedefs"); \
return From ## toFromFunctionParentName(this->Parent::function(other)); \
} \
/*newTypeName function(const parentType &other) = delete */ /* Delete the direct conversion */

#define strtype_inherit_compound_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, function) \
template \
strtype_enable_if_has_function(Parent, function, const newTypeName &) \
function(const Arg &other) \
{ \
strtype_assert_can_call(parentType, newTypeName, Arg, \
"" #newTypeName " is not implicitly convertible with " #parentType "-derived classes or strong " #parentType " typedefs"); \
this->Parent::function(other); \
return *this; \
} \
/*const newTypeName &function(const parentType &other) = delete*/ /* Delete the direct conversion */

#ifdef STRONG_TYPEDEF_ALLOW_WEAK_COMPARISONS
#define strtype_inherit_comparison_operator(parentType, toFromFunctionParentName, newTypeName, function) \
template \
strtype_enable_if_has_function(Parent, function, bool) \
function(const Arg &other) const \
{ \
return this->Parent::function(other); \
} \
/*const newTypeName &function(const parentType &other) = delete*/ /* Delete the direct conversion */
#else
#define strtype_inherit_comparison_operator(parentType, toFromFunctionParentName, newTypeName, function) \
template \
strtype_enable_if_has_function(Parent, function, bool) \
function(const Arg &other) const \
{ \
strtype_assert_can_call(parentType, newTypeName, Arg, \
"" #newTypeName " is not implicitly comparable to " #parentType "-derived classes or strong " #parentType " typedefs." \
" (To implicitly allow weak type comparison, define STRONG_TYPEDEF_ALLOW_WEAK_COMPARISONS)"); \
\
return this->Parent::function(other); \
} \
/*const newTypeName &function(const parentType &other) = delete*/ /* Delete the direct conversion */
#endif

#define strtype_inherit_suffix_operator(parentType, toFromFunctionParentName, newTypeName, function) \
template \
strtype_enable_if_has_function(Parent, function, newTypeName) \
function(int dummy) const \
{ \
return From ## toFromFunctionParentName(this->Parent::function(dummy)); \
} \
/*const newTypeName &function(const parentType &other) = delete*/ /* Delete the direct conversion */

#define strtype_inherit_prefix_operator(parentType, toFromFunctionParentName, newTypeName, function) \
template \
strtype_enable_if_has_function(Parent, function, newTypeName &) \
function() const \
{ \
this->Parent::function(); \
return *this; \
} \
/*const newTypeName &function(const parentType &other) = delete*/ /* Delete the direct conversion */

/*
Example usage:

strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator+,
"" #newTypeName " cannot be assigned from " #parentType "-derived classes or strong " #parentType " typedefs")
*/
//---------------------------------------------------------------------------------

//Defines a new type that behaves exactly as 'parentType', with the added benefit that
//you can't implicitly convert between types, which helps reduce errors.
#define strong_typedef(parentType, newTypeName) \
class newTypeName : public parentType \
{ \
public: \
/* No-arg constructor */ \
newTypeName() {} \
\
/* Copy-constructor */ \
newTypeName(const newTypeName &other) \
{ \
this->operator=(other); \
} \
\
/* Single-argument constructor passes arguments to parent's constructor, but */ \
/* generates a compile-time error if you try to use the parent's copy-constructor. */ \
template \
newTypeName(Arg &&arg) : parentType(std::forward(arg)) \
{ \
static_assert((std::is_base_of::type >::type >::value == false) \
|| std::is_same::type >::type >::value, \
"" #newTypeName " cannot be constructed from " #parentType "-derived classes or strong " #parentType " typedefs"); \
} \
\
/* Multi-argument constructor, passes parameters to parent's constructor. */ \
template \
newTypeName(Args &&... args) : parentType(std::forward(args)...) { } \
\
/* Explicitly convert me from parent */ \
static newTypeName From ## parentType(const parentType &other) \
{ \
newTypeName newType; \
newType.parentType::operator=(other); \
return newType; \
} \
\
/* Explicitly convert me to parent */ \
const parentType &To ## parentType() const \
{ \
return *this; \
} \
\
/* Assignment operator */ \
template \
strtype_enable_if_has_function(Parent, operator=, newTypeName &) \
operator=(const Arg &other) const \
{ \
strtype_assert_can_call(parentType, newTypeName, Arg, \
"" #newTypeName " can not implicitly be assigned from " #parentType "-derived classes or strong " #parentType " typedefs"); \
\
return this->Parent::operator=(other); \
} \
\
/* Negation operator (Logical NOT) */ \
template \
strtype_enable_if_has_function(Parent, operator!, bool) \
operator!() const \
{ \
return this->Parent::operator!(); \
} \
\
/* Other operators */ \
strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator+); \
strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator-); \
strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator/); \
strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator*); \
strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator%); \
\
strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator strtype_inherit_standalone_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator>>); \
\
strtype_inherit_compound_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator+=); \
strtype_inherit_compound_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator-=); \
strtype_inherit_compound_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator/=); \
strtype_inherit_compound_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator*=); \
strtype_inherit_compound_arithmatic_operator(parentType, toFromFunctionParentName, newTypeName, operator%=); \
\
strtype_inherit_comparison_operator(parentType, toFromFunctionParentName, newTypeName, operator==); \
strtype_inherit_comparison_operator(parentType, toFromFunctionParentName, newTypeName, operator!=); \
strtype_inherit_comparison_operator(parentType, toFromFunctionParentName, newTypeName, operator>); \
strtype_inherit_comparison_operator(parentType, toFromFunctionParentName, newTypeName, operator strtype_inherit_comparison_operator(parentType, toFromFunctionParentName, newTypeName, operator>=); \
strtype_inherit_comparison_operator(parentType, toFromFunctionParentName, newTypeName, operator \
strtype_inherit_suffix_operator(parentType, toFromFunctionParentName, newTypeName, operator++); \
strtype_inherit_suffix_operator(parentType, toFromFunctionParentName, newTypeName, operator--); \
\
strtype_inherit_prefix_operator(parentType, toFromFunctionParentName, newTypeName, operator++); \
strtype_inherit_prefix_operator(parentType, toFromFunctionParentName, newTypeName, operator--); \
}

struct Size
{
Size(int width = 0, int height = 0) : width(width), height(height) { }
Size(const Size &size) { *this = size; }
~Size() { }

int width;
int height;

bool operator==(const Size &other) const
{
return (this->width == other.width && this->height == other.height);
}

bool operator!=(const Size &other) const
{
return !(*this == other);
}

Size &operator=(const Size &other) //Assignment operator
{
if(this == &other) return *this; //Self-assignment protection.

this->width = other.width;
this->height = other.height;

return *this;
}

Size operator+(const Size &other) const
{
return Size(this->width + other.width,
this->height + other.height);
}

Size &operator+=(const Size &other)
{
this->width += other.width;
this->height += other.height;

return *this;
}

Size operator-(const Size &other) const
{
return Size(this->width - other.width,
this->height - other.height);
}

Size &operator-=(const Size &other)
{
this->width -= other.width;
this->height -= other.height;

return *this;
}
};

strong_typedef(Size, MySize, Size);
strong_typedef(Size, MyOtherSize, Size);

int main(int argc, char *argv[])
{
Size originalSize;

MySize mySizeA;
MySize mySizeB;

MyOtherSize myOtherSize;

mySizeA += mySizeB;
mySizeA = (mySizeA + mySizeB);

mySizeA -= mySizeB;
mySizeA = (mySizeA - mySizeB);

//Only compiles if the original type has those operators implemented:
{
//mySizeA /= mySizeB;
//mySizeA = (mySizeA / mySizeB);

//mySizeA *= mySizeB;
//mySizeA = (mySizeA * mySizeB);
}

bool isEqualTo = (mySizeA == mySizeB);
bool isNotEqualTo = (mySizeA != mySizeB);

//Only compiles if the original type has those operators implemented:
{
//(mySizeA >= mySizeB);
//(mySizeA //(mySizeA > mySizeB);
//(mySizeA }

//Fails to compile when accidentally mixing types:
//static assertion failed: "MySize cannot be constructed from Size-derived classes or strong Size typedefs"
{
//mySizeA = myOtherSize;

//mySizeA += myOtherSize;
//mySizeA -= myOtherSize;
//mySizeA *= myOtherSize;
//mySizeA /= myOtherSize;

//mySizeA = (mySizeA + myOtherSize);
//mySizeA = (mySizeA - myOtherSize);
//mySizeA = (mySizeA * myOtherSize);
//mySizeA = (mySizeA / myOtherSize);

//mySizeA = originalSize;
}

//Only compiles if 'STRONG_TYPEDEF_ALLOW_WEAK_COMPARISONS' is defined.
//static assertion failed: "MySize is not implicitly comparable to Size-derived classes or strong Size typedefs"
{
//bool isEqualTo = (mySizeA == myOtherSize);
//bool isNotEqualTo = (mySizeA != myOtherSize);
}

return 0;
}

[size=2]Note: This macro only works with structs and classes, not with basic types like floats and ints (I haven't actually tried it, but I'd guess it wouldn't compile - you can use BOOST_STRONG_TYPEDEF for basic types instead. Boost's strong typedef doesn't work for classes and structs, which is why I made my version).

I don't suggest using strong_typedefs to randomly replace regular typedefs everywhere you use them, but I do think it's wise to use strong_typedefs for types that are likely to cause hard-to-find bugs. Unit conversions, in my case; I have Point classes that sometime are measured in pixels, and other times are measured in tiles. Sometimes they are in pixels from the origin of the world, and sometimes only from the origin of the currently loaded maps. Accidental implicit conversions are likely to occur in such situations, but making the different unit measures their own strongly typed typedefs provides compile-time error messages when a mistake occurs, instead of run-time logical bugs that are harder to locate.

Review and enhancement of the code by more advanced programmers is definitely welcome and requested! In particular, am I using perfect forwarding correctly in the constructors and operators? And also, I'm having difficulties getting the array subscript 'operator[]' and function-call 'operator()' operators to work properly in a generic way ([size=2]since the return value types of those operators aren't know, using it with std::enable_if is causing me difficulties).
 

Minor update... to say I've made no progress =(...

Just stopping in to say I haven't made much progress since my last post.

Excuses:
[ . ] Minor household repairs
[ . ] Relatives visiting
[ . ] Borderlands coop (16.1 hours) (playing with one family member)
[ . ] Made a website for a friend's daughter's webcomic ("Patchwork Magic"). It's actually pretty funny, and she updates daily.
[ . ] Portal 2 coop (13.3 hours) (playing with another family member)
[?] All of the above

What time I've invested in programming has been spent thusly:
A) No new features have been added to the editor yet.
B) I actually successfully got strongly typed typedefs working in C++!
C) I've gone through my code, and switched over to the new typedef system for unit conversions where I've previously been bitten by bugs.

I'll make a post in a few days with the strongly typed typedefs code for others to use. I just want to test it in AdventureFar for a few more days before I proclaim victory.
 

And I shall walk the streets of Hahdief...

Past week:

I fixed the problems with coloration and blending, and made more progress on the editor.

Here's a screenshot of me just playing around. Until I get multiple layers re-implemented (works in the code, but not hooked to the editor yet), everything looks like junk (Blending isn't useful until you have multiple layers of tiles).


([size=2]Not final appearance of the game! Once blending is in, then everything will be much less square and much more detailed, with blending dirt on to the walls, the pavement blending with the grass, shadowing, and etc...)

The first few days of this week I spent messing around with web hosting and introducing myself to Wordpress, to get a website up for a family member. This was practice for when I get my own websites up and running.



My goal for the next 5 weeks:

Since development has dragged on for such a long time (year and a half part time, and now almost half a year full-time), I've come up with a timeline and a set of goals to spur on development, marking all the milestones I hope to hit between here and release (which is still quite a ways off).

Anyway, a week ago I gave myself the goal: By June 15th, I will walk the streets of Hahdief. Hahdief, as I've mentioned in a prior post, isn't a really important city plot-wise, but you visit it multiple times during the game (usually travelling past it to get somewhere else, or visiting it for minor plot points).




[color=#8b4513]"Hahdief[font=times new roman], the northern ruling city, is one of the first places you visit. The city itself has no real plot significance, though you return to that general area several times during the course of the game for minor plot reasons.[/font]"[/color]

('Hah' = North(ern), 'dief' = Ruler)

The goal is to get the map editor completed and finalized within 6 weeks (now 5 weeks), and to build and actually be able to walk around within that city (with collision and sound effects and music, but no NPCs or combat yet, and no going inside buildings).

It will be very sweet indeed to finally walk around inside my world, and not just a test map. I chose Hahdief as to first area to make because it's a fairly square city, shouldn't be too complex to make, and I probably have 90% or more of the art it'll need already made. Plus, being one of the first towns you encounter, it would've been in the first 4 or 5 I'd have to make anyway, but also is a fully non-nature city, and I haven't much plants and trees made yet.

I have a list of new features required by the game that I have to implement into the maps themselves, which changes the map format, so I need to get those added ASAP.



Character concept:


This is the main character (drawn by one of the artists), how he'll appear in combat. I intend to get all the character concept art properly colored by a skilled artist; initially I was thinking I was going to have to hire some over the 'net, which I may still have to do, but it was suggested to me to just have a friend do so with watercolor... initially hesitant, I recently saw some of the friend's art, and was pretty floored by the quality.
I haven't asked yet - I wont need it done for another few months, and I'm learning not to ask too far ahead of time (*cough* my map makers have been waiting almost two years *cough* ) - but when I do ask, and if the artist accepts, then knowing the artist's weakness, I can just pay in Dr Pepper.

Just imagine the player facing one of these:


([size=2]I posted this rat as the very first journal post I ever made. A year and a half ago)

If you're interested in more character concept art and haven't already seen them, I posted some a month ago.



If all goes well, in five weeks I'll have real screenshots to post.

Now I'm off to shower, then I'll pop open a Dr Pepper ([size=2]edit: Nevermind, I'm all out ) and crack into those editor features I need to code.
 

More editor work, interface sketches, and plot

I haven't gotten too much done since I last posted, just chippin' away at the editor piece by piece. I want to have the editor entirely finished by June 15 (6 weeks from now). It's been too long, so I've given myself a set of goals, each 6-weeks apart, to press forward in development.



Editor work:

I've gotten the placement of tiles working again.



There seem to be a few problems with coloration and blending (the problems aren't visible in the screenshot above), and I'm not sure when/where they were introduced - it used to work a year and a half ago! - but I'll track those down later.

Here's me just playing around. Final quality of the game will far surpass this, rest assured. (This is without blending, coloration, masks, shading, and multiple layers, and I just grabbed a floor tile for the walls so it all looks like junk... but even junk is nice to see after so long with a broken editor )



Today I added the ability to 'pin' searches in the Tile Explorer, so you can come back to them later.



I also added a list of "Recent tiles" and "Recent masks" a few days ago (by clicking the 'Show recent' button).



Interface sketches:

A few weeks ago I did some sketches on the layout of the interface. Here they are:












I figure the large buttons at the side of the screen would make the game easy to port to iPad and Android (and Win8) tablets, sometime after the initial Windows release.

The release plan is: Windows -> Mac -> Linux -> iPad (not iPhone) -> Android tablets
Who knows? Maybe Xbox Live or something. But it all depends on the initial success of the game on Windows. I don't have a Mac, so with the initial proceeds from Windows I'll buy a Mac and port the game.



Plot work:
Act 1, Section 2, Event 7 is the first of three Guardian council meetings that occur during the course of the game.
It takes place shortly after a serious battle between the player (alongside a scattering of guards and rangers, and two other guardians) and the main enemies of the game. As the battle is occurring, the town the player and guardians are trying to defend burns down around them and alot of civilians get murdered before their eyes as they fight, finally driving off the enemy, but with not much left remaining of what they were protecting. (The battle takes place in A1,S2,E5, just two events (maybe 20-30 minutes) before the meeting, so it's still fresh in the player's mind)

This section of plot is still very much a work-in-progress, and is partially unfinished towards the end. You'll notice lots of placeholder names ('MentorGuardian', and 'xxxxxx', for example) and missing area names ("[Military Guard Outpost City before the Citadel]") that I still need to fill in.

There's no real spoilers in this (very minor ones only), as it takes place in the first act of the game.
Apologies for posting it as a screenshot! The forum software isn't keeping the formatting, even when I use the "Paste from Microsoft Word" option, and even when I convert to .rtf format and copy+paste from there. Too lazy to manually re-highlight the dialog, stitching some screenshots together was the quickest method.

[rollup="Act 1, Section 2, Event 7 - A meeting of guardians"]
[/rollup]




I said I'd post some character concept art and descriptions of the character today, but I'll hold off until next week so the journal entry doesn't get too large (read: So I can hold cool content in reserve for weeks when I don't make much progress or don't have screenshots to show ).
 

AdventureFar status - Editor and plot work, excel spreadsheets

Hey, it has been two weeks since my last update - unexpected distractions reared their head.

Primarily, I've spent the past two weeks getting a little work done on the plot, and spent alot of time (primarily just in the past three or four days) on the editor. Pieces of code are starting to fit back into place - I haven't touched the editor in maybe a year and a half, but it's coming back together piece by piece.
It seems to be coming into shape as a real solid tool - which is good, as I've mentioned before I hope to use this same editor/engine for my next three projects (AdventureFar and probably two after it). It's also good, because my supporting map maker needs to be able to use it without hassle when it's time to build maps.

Latested editor screenshot:


Before other things were distracting me, I spent some time organizing my plot into separate Excel and Word documents.

I've been self-learning some Excel and a little VBA, and made a neat spreadsheet to measure and keep track of how far along the game is coming. It also has space to calculate how long each section takes to play through (though there's nothing yet available to play through) by calculating the average playtime per area for each play-session.

Anyway, I have a 'Master index' Excel document with links and completion amounts to the plot documents. Here's what it looks like:

Master index - Screenshot 1


If you click the clock icon, it expands giving locations for putting in playtimes of the game testers (whenever I get to that point), and calculates the average playtime for each section:

Master index - Screenshot 2


It also continues downward, for sidequests:

Master index - Screenshot 3


Honestly, these Excel spreadsheets didn't take long to make. A day's work maybe (with some adjustments here and there as I get ideas), and that from someone relatively inexperienced with Excel. Excel is much more powerful than I've imagined, and you can get things knocked together very rapidly.

Anyway, I've been working on the plot some since my co-author had to take an extended leave of absence. My desired play-time is about 6 hours of main plot and 2 hours of sidequests per Act, and about two hours of player exploration per act.

(6 + 2 + 2 = 10 hours per act, 4 acts = ~40 hours if new to the game, ~25 hours if running through)

Act 1, Section 2 - Event Index document


A snippet of 'Act 1, Section 1, Event 3, Scene 2'


I was previously wanting to release the game by the end of September, but if I can't reach that goal (which seems likely), I'd rather hold onto it until after the Christmas rush of triple-A game releases, maybe releasing it in early February. This will give me more time to polish the game anyway. When I get closer to release, I'm going to need to hire a good pixel artist for the NPC avatars, as the concept art is more for combat enemies (which are in a different art style). I'm waiting before finding a pixel artist, however. It's not a high priority at this point in time.

I can handle all the tile art on my own, I think, but AdventureFar will have alot of burned down villages in it, as part of the flow of the plot. This will cause me some art troubles, as my current tiles I made don't have any piles of ashes or smoke smears or burned buildings in it - but I'll cross that bridge when I come to it.

Another issue that was a problem is trees. The nation the game takes place in is heavily forested - and my trees just weren't really looking that great. But I figured out a neat trick in Paint Shop Pro using effects that greatly assist in helping me make great looking trees.

Pine trees - WIP:



They still need alot of work (these were just proof-of-concepts basically), but I think they'll turn out pretty good in-game. Until I can actually see them in-game next to and working with the other art, I don't want to invest too much work on them that might need to be discarded.

I'll post some more character concepts from one of the artists next week, if I remember. I've also spent some time sketching some in-game interface designs, which I'll also post some examples of.


Before I go, I've fixed a bug or two, and added a few things to my name-indexing tool for writers: Nomen Rationarium.
At a family member's request! First ever support request I've received. Well, it's the first ever tool I've made that other people actually find useful.

Servant of the Lord

Servant of the Lord

 

Minor update

I don't have much to show, so this is just an update of what's going on with me (Trying to stay on my 'at least every 10 days' journal schedule).

I've had a tough couple of days coding... It's just been one of those times were you run into a wall and get discouraged. Partly because of difficulties in keeping the code within their well-defined boundries and keeping them from becoming inter-dependant on one another when I don't have a clear plan for how things will be written.
Class and function-level code design is easy, but overall arcitecture level is harder for me. I guess that's the important difference between a software arcitect and a code monkey. =D

To help myself get out of that head-pounding 'now what do I do?' feeling, I switched focus to hammer on the editor some (since it hasn't been functional for about 14 months or so when I threw out the old code). I've kinda lost focus and got caught up in alot of, "what if I add this...", "what if I add that...", and these are things that the user won't even see.

I also intend to work more on the plot to get it down on paper. I think for the next week or so, my priority will be first to the plot, second to code.

I also want to create an action-plan to re-establish some milestone goals for moving the project closer to completion. On what hand, I feel like, "What do I actually have completed? Hmm, nothing. The game isn't playable. You can't even walk around an empty world! It's not even a game yet! How much time have I wasted on it so far?", but on the other hand, I have alot of code written, and I feel confident that it will support the game on top of it... but without the progress you can see and feel, it doesn't seem like real progress, no matter how many lines of code you've written (and tossed out and rewritten).

So, I had a moment of, "Oh, what am I doing?", but I pressed through it after 30 minutes or so and am motivated again.

I also got the gridlines showing again (20 minutes work), just so I can see some visual change:


Servant of the Lord

Servant of the Lord

 

Character concept art, eccentricities, plot, and infrastructure work

I've been doing work to add alot of data-driven functionality to AdventureFar's engine.
I thought of a clean and efficient way to allow each page of a menu to be configurable by files... and to move around and create and edit the menu elements from within the game itself while it is running. Nothing that hasn't been done before by other programs in the past, but I realized how I can leverage some of what I already wrote in ways I hadn't thought of with a bit of extra work (prior to this, I was just going to hard-code the menus, with only minor maneuverability from config files).

Right now I'm still working on it, and there's still alot to be done, but here's some screenshots of the first piece working:

Drag and drop: (completely functional)




Positioning by percentages from the left or right of the window: (~80% done)



Editing object properties and changes being reflected in the object: (60-70% done - 4 days more work, maybe)



Eventually all the menu buttons (and hopefully the in-game GUI) will be work the same way, but I haven't re-implemented those, because I'm still fine-tuning the base class and property editing windows.



I wrote down on paper a couple side-quests that came to me while, uh, err.... walking around in circles in the kitchen for three or four hours, waving my hands around in jerky movements.
Sometimes, when guests are over at the house, or visitors are staying with us for a few days, they catch me at it and get really confused. After I've been walking around for twenty or thirty minutes they suddenly notice it and look up in surprise, asking what I'm doing. One asked if it's autism or something.

Pacing really helps me think, and pacing in circles is nice because it doesn't require conscious thought to move if I don't have to maneuver around obstacles, giving me full mental power (all 5 kilowatts of it) to think, daydream, and explore creative ideas at the fullest.
Going for walks outside is nice too, but I have to focus more on what's around me. Plus, I can walk for an hour and a half before I get tired, because it's 'exercise'. I can walk non-stop in the kitchen for 5 or more hours without feeling any physical difference.

But you don't read my blog to find out about my eccentricities - that's just an added bonus. Onto concept art!





This is the Right-hand man of the young king. He's very loyal to 'his majesty', and an excellent swordsman. You, as a member of the non-government controlled but government-allied organization known as 'guardians' run into him alot during the game. He helps you on a number of missions, as you help bring law and order to otherwise chaotic situations that arise.

He was in the government military (the 'Guards' branch, explained below) with you the player, and eventually rose to prominence as a favorite of the king. You meanwhile, left the military, having been recruited by the Guardians. Since you know each other from your younger days in training, you are on friendly terms with each other and are very open with each other with concerns about the events occurring during the game.

This favorite of the king is, aside from the king, the most powerful person in the nation, since he speaks with the authority of the king. Even the Head Ranger and Head Guard take orders from him, though the Guardians which you belong to, don't take orders from the government.

None of my characters have names yet... names are very important to me, so it always takes alot of time for me to figure them out. (Hence the entire game still being nameless and simply called 'AdventureFar' as a placeholder). So this character, in the multiple locations he comes up at in the plot, is just referred to KRHM (King's right-hand man).



There are two main branches of the military in the government. The 'Rangers' and the 'Guards'*. The Guards are the primary military force, securing and upholding the law in cities and towns. Since the nation is land-locked from other nations due to the terrain, they don't really have an army. 'Guards' can be thought of more as policemen.
If 'Guards' are policemen, then the 'Rangers' are the highway patrol. Rangers patrol the main highways and keep them clear of monsters, as well as carry government messages back and forth, and escort merchant caravans or groups of travelers from town to town. They also have small presences in towns and cities as outposts to rest in at the beginning and ends of their patrols.

* Not to be confused with the guard[color=#A52A2A]ians[/color] which you are apart of.





While the nation goes into deeper and deeper confusion and chaos, and as monster attacks increase and even the Rangers are getting pushed off the highways unless in large numbers, the criminal elements of the nation are thinking up ways to take advantage of the situations to line their pockets with the bloodied gold of the dead and dying. (As a guardian, you'll have plenty of opportunities in the game to choose what punishments to hand out to such criminals (or suspected criminals) who have been captured by yourself or the government)

There are many highway robbers, thieves, and bandits of all sorts - but while organized in the casual way of crime, it's not a cohesive organization. The bandit leader in the picture above is the head of a small group of about twenty ruffians, who have the audacity to hijack a merchant vessel that just arrived at the only major port town of the nation, and attempt to sail it away. Unfortunately for them, the original captain of the ship damages it in such a way that they don't get far from shore and have to dock at a small fishing village only a dozen miles south. Trapped and cornered, the bandits have the crew under the knife, and a hostage situation rapidly develops.

Guess who gets to go 'resolve' it? And guess what you're favorite instrument of negotiation is?
In all seriousness, your choices determine the outcome (at least partially) of the situation, and directly effect how many hostages and bandits survive or are killed, as well as the punishment for the bandits.
But you're not alone in this situation, having not only the King's Right Hand Man with you, but also the force of the government, with a handful of Guards and Rangers who came from the nearest fortified city and arrived there before you,

Seeing that the bandits are unarmored and have an assorted collection of knives and swords hoping for a quick getaway and having no intention or desire to go one on with with soldiers, while you and the guards are fully equipped in armor and trained for combat, and the rangers have bows and arrows and leather vests, this shouldn't be too much trouble.



I've started writing Act 2 of the probably four acts. My brother who was co-writing it had to back out (whether permanently or temporarily, I don't know yet), but I've come up with (while pacing in circles ) some great scenes for the game that really carry some weight to them, so I'm excited to jump back into it.

As mentioned in a prior post back in January, Act 1 is entirely completed at a macro level, but not at a micro line-for-line level. At a macro level, I expect Act 1 to take 6 hours of gameplay. At the very largest most general level, the entire game is figured out, but that's just a paragraph's framework, not detailed at all, so on it's own it's worthless.

I'm kinda torn about Act 2, because Act 2 begins with a bang and I wanted it to end with a bang which marks a major turning point in the game... but Act 2 looks like it'll burst with the amount of content I'm wanting (in my head, not on paper) to cram in it, so the major turning point must be pushed back into the first half of Act 3... which apparently is what I was planning anyway (?!), looking over my past notes. My subconscious is two months ahead of me.

But I'm talking in vagaries, and knowing how annoying that is I'll shut up about the plot and get back to posting pretty pictures next week until I have something more solid to share.

Servant of the Lord

Servant of the Lord

 

Hand-drawn conceptual town maps

Here's the basic world that the game takes place in:



It's a single nation, land-locked on two sides (north-west and north-east) by mountain ranges, and the ocean to the southwest, and swamps to the south-east. The game takes place solely in that one nation.

It's not a very sea-faring nation, though it does have some limited trade by merchant vessels through it's one major port city ("Viarmhiem") near the capitol.
It has a few fishing villages but with only small vessels not going far from shore.

The structure of the nation is the capitol, Kradenhiem, and three major cities, or 'Lord cities', that control the surrounding towns, and villages on behalf of the king.

The capitol is ruled by the king, which rules...
The cities that are ruled by lords, which rule...
The towns and villages that are ruled by mayors (small villages don't even have a mayor).

The three lord-cities are named after the compass-points.
"Hahdief" - aka "Northering ruler"
"Sahdief" - aka "Southern ruler"
"Lumdief" - aka "Eastern ruler"

The main thicker road that encircles the nation is a well-paved stone road named, "The King's Highway", most other roads are dirt, unless leading to a larger town or city.



This is the map of the capital city "Kradenhiem", which means "The source/center of honour" (The name was changed to that after becoming the capitol of the nation).



Note: The city does not actually curve left-ward, that's just my mad drawing skizzels.



The game starts off in the farthest North-eastern part of the nation, in a secluded village named ' Vi ' that just got burned to the ground and everyone in it killed, you (a non-governmental 'guardian') and government soldiers are there to find out what happened and report back to your superiors (you to your fellow guardian peers, the soldiers to the king).

This is a map of Vi pre-destruction:



Pardon my annotations. Though the map is drawn of the pre-destroyed village, the numbers and the corresponding text refer to locations of the first game scene, as the player is walking through the already-destroyed village, looking at the ruins and talking with the government officials already on-scene.



Hafdief, the northern ruling city, is one of the first places you visit. The city itself has no real plot significance, though you return to that general area several times during the course of the game for minor plot reasons.



I hope you enjoyed this look at some areas that don't yet exist map-wise in my game that's not yet released (or even properly named!).
Next week I'll post a character concept image or two from one of the artists.

Servant of the Lord

Servant of the Lord

 

Some work on the editor interface

I spent today and yesterday getting this on-screen:



It's the basic interface for the in-game editor. It's not doing anything yet (The "Recent saves" and such are dummy text), but the widgets are all in place. The icons are from Nuvola icon set.

The tabs on the edges of the screen function will switch between different side panels accessible in-game for testers and map makers.
I'll use the tabs to re-implement the old editor but now built-in to the game itself. The tabs will also have things like per-map "Notes", and todo lists, for map-makers (Me and and at least one other, but hopefully two) to keep track of. Also the game console would be on a tab, and tester feedback and bug reporting, and the script-editor, etc...

Since I intend to use this same editor and game framework for at least one or two other projects after AdventureFar, I feel it's worth the investment of time to make it easy to use, especially if non-programmers are using it to work on the game. Plus, even if it's just me working on it, if I'm stuck staring at the thing for 9 months or so making maps, I want it to be pleasing to use and not something I dread using.

It took a full day to get the Qt-widgets tabs to properly render over the SFML-drawn game window (QtCentre thread) since each graphics API wants to do things their own way. They look good when laid over the game window, so I'm glad it works.

Servant of the Lord

Servant of the Lord

 

Main menu, (the corner of the) map visible, game state diagram

I can see my world again! For quite awhile (many months) while doing alot of architectural changes to my code, I could no longer see the maps being displayed onscreen because I had disabled that part of the engine. Since I wasn't specifically working on the visual side of things, I hadn't bothered to get it back working.

Anyway, yesterday I re-enabled that section of the code, and this appeared:



This is a picture of a test map from some many months previous, and the clear-color in the background.
Sure it's not as beautiful as some other work I've uploaded, but having not seen it in a long time, it's comforting to know the map rendering still works.
I'm currently re-factoring part of the movement, collision, and player data code to make things less interdependent, so I can't scroll the screen atm, since that code is being worked on. Even so, just seeing that little corner of a test map is nice.

Oh, I've done some work on a main-menu of the game:



I'm thinking of adding dynamic sparkles to the static ocean image, to make it look [s]prettier[/s] more manly.

I've also done some work on adding GameStates to the game, since the GameState system was already implemented.
I was getting a few stack order issues messed up in my head while working, so I sketched out the states on a piece of paper:



[size=2]Not all GameStates shown have been added yet. There are also going to be more GameStates than just those shown, but I was only interested in two specific branches (MainMenu and PlayingGame) when I drew that.
[size=2]None of the states shown are actually completed yet, I'll continue working on them and tweaking them throughout development I'm sure.

Pardon the uneven lines and poor pensmanship! It looks like a child drew it with a crayon, and it's leaning over like the Pisa leaning tower.
In a family full of incredibly amazing artists, whatever gene enhances your fine hand-motor skills must've skipped me.

Actually, some members of my family are helping out with art for the game as shown previously (over a year ago!):
[sharedmedia=gallery:images:122]

You'll see more of my 'art' next week when I post some concept blueprints of potential in-game towns. You'll also have plenty opportunity to compare it to my siblings' skills when I post some excellent character concept art the weeks following that.

Servant of the Lord

Servant of the Lord

 

Creating custom class templates for QtCreator

The QtCreator IDE provides a set of template projects and template classes, but occasionally the need to create your own arises.




QtCreator stores its templates in this directory:
..\QtSDK\QtCreator\share\qtcreator\templates\wizards\

(In that directory is a bunch of pre-existing templates, which you can look at to learn how they work. At least one of them, 'listmodel', is purely for exampling how it's done. This is how I figured it out, a few hours age - however, there is a great lack of documentation about this online, hence this journal entry)

The first step is creating a new folder for your own template under the 'wizards' directory; the name of the folder doesn't matter.

In that folder you'll want to put your template's source and header files.
QtCreator scans the 'wizards' directory looking for XML files named 'wizard.xml'. The file must be called exactly that.

A wizard.xml file looks like this:
[xml]
AdventureFar.png
Creates an inheritted GameState class for AdventureFar.
GameState
Adventure Far





GameState parameters



Class name:


[/xml]

Let's walk through it:

[xml][/xml]
kind is the type of template you are creating. It is either a 'class' template or a 'project' template.

A 'project' template creates a whole new project, with templated default files and settings.
A 'class' template creates a set of templated files for the existing project.

[xml]AdventureFar.png[/xml]
This is an (optional) 32x32 pixel icon in the same directory as your custom wizard.xml file.
It appears alongside your template's name in the QtCreator GUI.

[xml]Creates an inheritted GameState class for AdventureFar.[/xml]
This is the description of your template, in the QtCreator GUI.

[xml]Game state[/xml]
The name of the template, in the GUI.

[xml]Adventure Far[/xml]
This is the category which your template appears under, in the QtCreator GUI. (In the image above, you can see all of these)

[xml]


[/xml]
These are the files that will be added to the project by your template.
source is the template file in your template's directory.
target is the new name of the file, as it appears in your project (Ignore the funky "[color=#800000]%ClassName%.%CppSourceSuffix%[/color]", it'll be explained a bit lower). This is optional. If the 'target' name isn't in the XML file, it'll keep the same name as the source file.
openeditor - I'm not 100% sure, but I believe this opens the newly created file in the editor when the template is used.


Now, QtCreator allows your template wizards to have fairly extensive GUIs, including multiple pages and widgets and customizations. I'm only familiar with a very small subset of it.

[xml]GameState parameters[/xml]
This is the title of the GUI wizard page we are on. The wizard.xml file we're using only has a single custom page.

[xml]
...
[/xml]
fields holds a list of fields; the template I created only has a need for a single field, but your templates can easily have a half dozen or more depending on what you are wanting to do.

(Within the 'fields' tag:)
[xml]

Class name:
[/xml]
Our field's name is specified by name. The one field I needed, was the name of the class I'm having the template create for me, so my field is named 'ClassName'.

is the Qt widget that accepts user input, which will set the value of our field
The widget is specified by class (in this case, QLineEdit), and we use a RegEx validator to make sure our classname is valid. We also give the QLineEdit the default text specified by defaulttext.

is just the text that appears in the GUI to inform the user what the purpose of the field is.

[xml][/xml]
And that's the end of the wizard.xml file.

Now, returning upwards a bit, we had the line:

[xml][/xml]

We now see that %ClassName% will actually be replaced by the value of our field, named 'ClassName'.
%CppSourceSuffix% is a built-in field specified elsewhere in QtCreator, that lets users determine if they want to use .cpp or .cxx or whatever else they fancy.

What's important to note is that %ClassName% wont just get replaced in our wizard.xml file; it'll also get replaced in any of the files the template is generating.

Our source.cpp has code that looks like this:
%ClassName%::%ClassName%()
{


}

%ClassName%::~%ClassName%()
{


}
...creating a constructor and destructor for a class named '%ClassName%'. (Asside from our special replacement variables, our source.cpp file is just a regular C++ file.
Our header.h file also uses our field variables to create inclusion guards, like this:
#ifndef %ClassName:u%_H
#define %ClassName:u%_H

Except here, because we love uppercase inclusion guards, we use %ClassName[color=#ff0000]:u[/color]% where the '[color=#FF0000]:u[/color]' specifies to use the uppercase version. Likewise, we could use '[color=#FF0000]:l[/color]' to specify lowercase.

I'm using my template to generate empty GameState classes for my project. My game has alot of GameStates, all looking roughly the same being inherited from the same abstract class with virtual functions that need to be defined in the subclasses.

Here's how my source and header templates look.

My templated header file:
#ifndef GAME_STATE_%ClassName:u%_H
#define GAME_STATE_%ClassName:u%_H

#include "Engine/Structure/GameState.h"

#include "Common/System/System.h"

namespace Game {
namespace State {

/////////////////////////////////////////////////////////////////////////////////////

class %ClassName% : public Engine::GameState
{
public:
%ClassName%();
~%ClassName%();

void Activated();
void Deactivated();

void React(PlayerCommand &command);
void Update(float deltaTime);
void Think();
void Draw(sf::RenderTarget &renderTarget);

std::string GetName() { return "%ClassName%"; }
};

}} //End of namespaces.


#endif // GAME_STATE_%ClassName:u%_H

My templated source file:
#include "%ClassName%.%CppHeaderSuffix%"

#include "Common/Logger/Log.h"
#include "Common/Types/ConfigFile.h"

#include "Engine/Structure/GameStructure.h"

namespace Game {
namespace State {

/////////////////////////////////////////////////////////////////////////////////////

%ClassName%::%ClassName%()
{

}

%ClassName%::~%ClassName%()
{

}

void %ClassName%::Activated()
{

}

void %ClassName%::Deactivated()
{

}

void %ClassName%::React(PlayerCommand &command)
{

}

void %ClassName%::Update(float deltaTime)
{

}

void %ClassName%::Think()
{

}

void %ClassName%::Draw(sf::RenderTarget &renderTarget)
{

}

void %ClassName%::DrawOver(sf::RenderTarget &renderTarget)
{

}

/////////////////////////////////////////////////////////////////////////////////////

}} //End of namespaces.

Hopefully you'll find this useful if you use QtCreator. I found a great lack of documentation on this otherwise simple feature which is common in most IDEs.

Servant of the Lord

Servant of the Lord

 

Todo here I am current goal now

Just wrapped up some bugs in the input system, everything is working fine now.
I popped open the [font=courier new,courier,monospace]DefaultBindings.gcf[/font] file, where the player's controls are described, and adding some commands allowing me to do things like pause, slow down, or speed up the game, as well as commands to change what kind of RunMode the game is in (Developer, Tester, Player, or Demo).

With the input system mostly complete, I can now clear some of these files off my desktop:

[font=courier new,courier,monospace](Daily goals).txt[/font]
[font=courier new,courier,monospace][I AM HERE].txt[/font]
[font=courier new,courier,monospace]Current todo.txt[/font]
[font=courier new,courier,monospace]Todo_now.txt[/font]
[font=courier new,courier,monospace][Current].txt[/font]
[font=courier new,courier,monospace]TODAY.txt[/font]

[font=courier new,courier,monospace][/font]

Servant of the Lord

Servant of the Lord

 

Care for a drink, hero? - More art previews from AdventureFar

With GameStates refactored and the input system working, things are going good on the code front on my 2D RPG game 'AdventureFar'.

I have a habit of, when stuck on code or between compile times, opening MS Paint and just start making tiles.
My compile times are just long enough that I too-frequently switch to something else before it completes (15-20 second builds, when not doing 'Rebuild All'). Once I have that other window open, whether it's GD.net or MS Paint, chances are it won't be minimized for another 15 minutes.

I waste alot of good time that way, but I occasionally get some good art done as well.
The past week the art theme seems to accidentally be weathered wood and taverns.

Bar counter:


(Note: Since my map-editor isn't working, I just move these tiles around in MS Paint to create the above shot)

Furniture Chests:


These are chests - but not like treasure chests. These are the type of chests you'd find in someone's house filled with cloths.
Kinda like military "footlockers" but not made of metal. I actually designed this on paper (but with alot of variations) as a project I'd sometime like to make in real-life in a year or so, if I have some free time (I designed on paper a matching sidetable and bookcase to go with it). I kinda have a desire to make furniture in real life, as a potential hobby-ish project. I have the pre-requisite skills, but never have applied them toward that goal.

Tavern signs:


The tavern names have no real plot-tied meaning. "His Majesty's Finest" just referring to the king in-game (The king is a huge plot element, but the tavern probably wont be).

You'll notice that once I made a decent wood image, I was perfectly content to re-use it for multiple tiles (All the previous images use the same wood image).

This has two benefits: 1) It provides matching styles of art between the artwork that uses that specific wood image in common.
And 2) I don't have to work as hard.

Marble tiled flooring:


Sometimes I see a nice pattern I like in a movie or a store (or at someone's house), and I try to snap a picture on my cellphone or memorize it in my head, then use that general pattern in my own tile designs. The above flooring was from a movie I watched recently (though I'm sure it's a pretty common design), but heavily changed. I only keep the general idea of the design, and oftentimes even the design itself is heavily altered by the time it reaches a finished piece of art.

Carpetting:


Recent, but from farther back than the last two weeks. Perhaps you've already seen them.

Tiled stone floors:



The ones on the left I don't know when I made - I might've already shown them to you. They look like they were made recently, but not too recently - probably within the past three months. I am frequently finding artwork that I forgot about, discovered somewhere in my small but growing collection. All the art (except a few pieces of furniture) I have made since I started working on this project, but I started working on it (on and off, unsure where it was heading) since June of 2010. The art library is fairly well organized in a Windows Explorer folder structure, and searchable by keywords from within the map-maker, but since I haven't been making maps (since the map editor is broken), I'm not familiar with the contents of the library.

I definitely have more floorings than I do walls. They are much easier to make. I also seem to have a knack for stone, so I have more stone tiles than anything else.

Some quick numbers: (bearing in mind that there may be alot of tiles that are just minor variation of each other)
[color=#008080]../AdventureFar/Data/Graphics/Tiles/ [/color]- 1,178 Files, 233 Folders (including WIP artwork and scrap folders)
[color=#008080]../AdventureFar/Data/Graphics/Tiles/Walls/ [/color]- 163 Files, 25 Folders
[color=#008080]../AdventureFar/Data/Graphics/Tiles/Floors/ [/color]- 404 Files, 59 Folders
[color=#008080]../AdventureFar/Data/Graphics/Tiles/Floors/Stone/ [/color]- 236 Files, 30 Folders

Apparently I have more stone floors than I do every type of wall (stone or not) put together.

I'm really excited about AdventureFar right now. I've said this more than a few times already (and you might be sick of it), but after not being excited about it for so long, it's a welcome feeling to re-experience.

Servant of the Lord

Servant of the Lord

 

AdventureFar - Input system

[color=#ff0000]>>[/color]
[color=#ff0000]>[/color]

I'm currently working on AdventureFar's input system. I want to support custom key-bindings for players, foreign keyboards, and gamepads or other input devices. Sometime in the future, after AdventureFar's release, I might even want to do a port for iPads or Android or Win 7 tablets. But that last one is just speculation of how things go.

The engine of AdventureFar, and it's method of handling input, is coming along well.

The engine itself is unnamed, since I don't consider it a separate project, even though it is isolated in code by the way I organize my source files - I think I've mentioned this before. If I do refer to it, I call it "The AdventureFar engine", as in, "The engine AdventureFar uses", but not as a proper name. I'll probably give it a real name once AdventureFar is complete and I use the same engine for a second project.
This (using the same engine for a second game) is not pie-in-the-sky thinking either - Since the engine is being passively developed as a side-effect of working on an actual game, it is very capable of being used easily for a second or third game of the same genre (2D turn-based RPG), even if the games themselves are quite different from each other. I strongly encourage this method of game 'engine' production, as I'm seeing real results from it (as opposed to building an engine to make a game, where I see no results from my prior attempts). But wisdom is justified by her children, so we'll see whether it all works out in the end, after I actually ship the game.

But I'm sidetracked. Back in focus: Input system.

The input system, while not being the best in the world, I feel happy with. It's actually not even part of the 'Engine' body of code, but is self-contained in the 'Common' code body (see afore mentioned link). If it ends up working well, I think it would be worthwhile to spin it off as it's own self-contained library released as open-source (after some heavy re-architecturing, methinks. The code is clean, but the classes code be designed better)... but only if it can last through the fire of an actual shipped game, otherwise it might turn out to be a hindrance more than a help.

Currently, how it works is I have a series of classes who, through inheritance, describe the different types of input. Using multi-inheritance, they also provide a common interface to the input types that are similar - I grouped the input type into three or four groups. The primary one is the "Button" style interface, of which mouse-buttons, gamepad buttons, and keyboard keys all fall into. Each class has a uint32_t mask, making each gamepad button, keyboard key, mouse button, gamepad joystick axis, mouse scrollwheel (up or down) uniquely identified. I use the masks for comparison.

That's all independent of whatever API provides the input. I have an API specific translator to convert to my own input. Normally, I'd just stick with the input of whatever API I'm using, but I feel like this is a necessary step I have to take, though I'm wary of NIH syndrome and am slightly uneasy about the multiple-inheritance - it feels a bit like inheritance abuse, so I'm wary of taking it too far, and have thought of some non-inheritance methods I may switch to.

The cool thing, that I am happy with, are CommandTriggers and MovementPlaneMaps. All that abstract input stuff is simply to make the input API-independent, and to provide a common interface to common input 'styles' (like buttons).

A 'CommandTrigger' is a class that, using the uint32_t mask, triggers a string command (I'd like to eventually switch to string hashes, but it might not be needed, so I'll leave it as strings for now). It's the string command (A 'Command' struct that contains the string and one other piece of data; hence 'CommandTrigger' - it 'triggers' the release of a 'Command') - It's the string command that is actually processed by the game itself. It's passed to the game states, which can use it, discard it (so other states can't process it), or just ignore it.

But the big deal with this is... Player key bindings are as simple as: = . In fact, that's exactly how I intend to save it to config files for storing the custom key-bindings.

A 'MovementPlaneMap' is the other side of this. A MovementPlane is a two-dimensional 'plane' of relative movement, from -1.0 to 1.0 on both horizontal and vertical. A MovementPlane can be used for multiple purposes... My intent, and we'll see if it works out or not, is to use MovementPlanes for both moving the player in-game, and for panning the camera when in debug mode. However, due to it's generalized nature, I can easily picture it be applicable to 3D games as well, controlling the 'look up/down', and 'rotate left/right'. That's a good coding sign, I feel, when you come up with a solution that is immediately applicable to your code, but that also seems applicable to future scerarios, regardless of whether you intended it to work for those future occasions.

Now a 'MovementPlaneMap', on the other hand, is what binds input to a MovementPlane. Using the abstracted input, I can bind gamepad axes just as easily to a MovementPlaneMap as I can bind the arrow keys, or any other key.

To (hopefully!) handle international keyboards, I have what I call a 'Keyboard Descriptor File'. It's a simple plain-text file that maps API-specific keycodes to generalized keycodes. At the same time, it also maps the visible text name of the key in your local language. Adding new languages is just a matter of adding a new file. Adding a new foreign keyboard should hopefully be that easy as well, just changing the API keycodes (if the API itself supports international keyboards).

Here's an example of a keyboard descriptor file for SFML 1.6 (the API I'm using currently), in the english language, for Qwerty keyboards. (It's currently my only keyboard descriptor file... but the simplicity of the solution is what I'm banking on for getting other keyboards functioning later on).

A = 97
B = 98
C = 99
D = 100
E = 101
F = 102
G = 103
H = 104
I = 105
J = 106
K = 107
L = 108
M = 109
N = 110
O = 111
P = 112
Q = 113
R = 114
S = 115
T = 116
U = 117
V = 118
W = 119
X = 120
Y = 121
Z = 122

0 = 48

1 = 49
2 = 50
3 = 51
4 = 52
5 = 53
6 = 54
7 = 55
8 = 56
9 = 57

Escape = 256,
LControl = 257
LShift = 258
LAlt = 259
LSystem = 260
RControl = 261
RShift = 262
RAlt = 263
RSystem = 264
//And more...


There's only one minor flaw with this solution, and that's that if the player switches his keyboard his previous key bindings are invalid. But if he's switching his keyboard, that's something I'd expect to happen anyway.

I'm please with the solutions, though I'd love to re-implement the solutions with better code architecture. The code itself (my coding style) is clean, but again, the class architecture could use some work. It's not up to the quality of the rest of the code base. On the other hand, it is completely isolated from the rest of the code base also, so I can refactor it in isolation.

Whether or not it'll actually work for international keyboards is unknown to me. I don't have an international keyboard available to test on, nor is it a real priority right now... the primary goal was to get (American) input handling in place. Again, wisdom is justified by her children, so this might blow up in my face... but I wont be any worse off if it does, 3 or 4 days work, isolated code, if I have to scrap it, fine! At least I can move on to more important objectives (I had to get something implemented here before I could move on). And besides, even if I never support international keyboards, I know for a fact that this will support language translations (for Latin-derived languages), and that's something I definitely want for my game.

Okay, boring post over! I just needed a place to de-brief.

Input system: [color=#008000]Functional[/color]
Time cost: [color=#008000]3-4 days[/color]
Structural integrity: [color=#ff0000]Barely passable[/color] (for half of it)
Code cleanliness: [color=#008000]Normal quality[/color]

On another note, my GameState system, which was 'Passable' in structural integrity, I scrapped and rewrote to my satisfaction. So the overall structural integrity of the entire code base is pleasing to me, with the poor spots (such as the above one) being rare. There are a few 'scaffolding'* code areas, but that's to be expected at this state.

*[size=2]Temporary code required to move forward, that will by it's very nature have to be removed before the game ships. Kinda 'placeholder' code, that, if the game is to function at all, must be replaced.

Since I rewrote the GameState system (a week ago? two weeks?), I've outlined the game states needed by the game, and even implemented (copy and pasting skeleton classes) the skeletons of those GameStates into the 'Game' section of the codebase. My goal is to fill out the first several states in the next week, and to re-implement walking around the game world in the two weeks following.

Basically, the next two months:
- Main menu state
- Walking around world ([size=2]again! I had this functional a full year ago, but alot has shifted since then)
- Fully functional game editor ([size=2]Again. =( Previously it was a stand-alone tool. Now it'll be integrated with the game itself. I also have a few more map features I need to implement to meet the graphical goals of the game)

But I'm not bothered by having to re-tread already walked ground. That's the price of learning. Plus, things are stabler, more flexible, and easier to work with this time around. Development is occurring faster, and walking the same ground the second time always occurs in less time than the first initial exploration.

Servant of the Lord

Servant of the Lord

 

NomenRationarium - A tool for organizing character and area names

NomenRationarium is a tool I've made for my own usages, and the usage of my siblings. Despite us all working on different projects in different mediums (One writing a book, another writing a manga, and myself a video game), we found we had a common need: A way to organize potential character or area names.

NomenRationarium, meaning "Name list" in butchered latin, provides a common place for you to store all your name ideas.

My siblings and I use the same tool, and sync our master list of names via DropBox. For each of our individual projects, we have a NomenRationarium file with the names we are using in that project (whether from the master list, or by creating unique project-only names).

NomenRationarium allows you to individually tag each name with mutliple tags, and search for names by filtering tags and usage.



[size=2](This is a picture of a clean usage. When I run the program on my computer, the main list contains almost 300 names already - shared via DropBox)

The tool is definitely functional; however, if I recoded it from scratch I'd do it alot differently. Maybe someday in the future! But at the moment, I'm too busy with my AdventureFar game project (which is making good progress, thank you for asking!) to let myself be distracted any longer by working this tool.

Download NomenRationarium

Or, if plot-related tools don't interest you:
Download Cheesecake

Servant of the Lord

Servant of the Lord

 

ViewTiled - A small tool for artists

When I work on pixel art, I use MS Paint and Paint Shop Pro 11. It works fine for me making simple game graphics, though I'm sure professionals would prefer something else.

When making pixel art (primarily tiles), I need to view the image tiled side by side to see if it's seamless or not. If I'm currently working in MS Paint and don't have Paint Shop Pro 11 open, I need to:
[font=courier new,courier,monospace]Open Paint Shop Pro -> wait for it to load -> Paste the image in -> (And in the menu:) "Effects -> Image Effects -> Seamless tiling..." -> Check 'Show preview' -> In the preview window, check 'Show original'[/font]

Not cool. So I made a tool that I made that lets you right-click on a image file in Windows Explorer, and select "View image tiled", and wallah!



Note: This does not change any file ascosiations; your files will open using the same preffered default program they always do. All it does is add a single simple 'View image tiled' context menu command, and only on the file extensions you select (Supports: PNG, Gif, Jpg, BMP, and Tiff). You don't even have to enable the context menu integration at all, if you don't want to. You can just open the tool and drag-and-drop or copy-and-paste your images in for viewing.



You can download it for free from GD.net's marketplace (Windows only). If you find it useful, donate $5 and buy me a pizza*.

*[size=2]Warning: Money will not actually be spent on pizza. Chances are that it'll go to further my raw cookie-dough or Dr Pepper addictions, or perhaps blown on a indie game.

Servant of the Lord

Servant of the Lord

 

Blood pumping, heart racing, I can almost smell the pixels in the air

A few days ago, I finally finally started working on the AdventureFar code again, instead of monkeying around with tools. For the record: I completed one large tool (to assist in plot development) and one minor tool (to assist in tile art) both that I'll release next week for free, and two or three really minor tools that are in-house only, and I was sidetracked on a code library and two related tools (one medium and one small) that I forced myself to axe, despite coming out well, because I couldn't go any longer without working on AdventureFar.

It feels really good to be back. The AdventureFar code base is really clean and well organized, and is a real pleasure to work with, unlike the tools I rushed together that in the end I have to fight against to get working.

I've mentioned on the forums in past that while working on AdventureFar I separate the code into three separate categories as I go:
Common (General code, not game-specific. A little API-specific stuff in subfolders (Like 'Common/SFML', and 'Common/Qt'), but mostly standard library based.
Engine (Game genre specific. Generic 2D tile-based RPG code. Displaying maps, handling gamestates, collision, scripting, saving and loading, general application flow (the main loop), etc...)
Game (Game specific. Game states will go in here. Right now there is only one, but others will be added. Any other game specific stuff will go in here... but ideally most game-specific stuff will be loaded by Engine from external resources such as scripts and config files)

Right now Game is almost empty, Common is medium-sized, and Engine is medium-sized. Shortly before I took an unexpected extended break from AdventureFar to work on tools, I had decided to make the external map editor be an internal map editor, so now I'm in the process of doing that - it's coming along well. I also left the code all those months ago in an uncompilable state - always a bad idea - and hadn't been able to fix it. Well, I got it fixed two das ago, so I'm happy.
Before I left it, when merging the Editor with the game, I created a fourth category: Editor. However, yesterday I decided to merge Editor with the Engine category since they were too tightly-coupled. Engine code needs to know about Editor to launch the Editor, and because Engine controls the main window which Editor is embedded into, and Editor needs to be based on Engine to have read/write access to the world data and tile caches which Engine manages. Also, since Editor is only a dozen files or so, it doesn't overly bloat Engine for it to be added.

It feels really good (I can't stress it enough), to work on a clean codebase. Especially a clean codebase that I made myself! A first for me.

Also, since I haven't worked on the game for about 5 or 6 months, or however long it's been, some of the libraries I was using have been updated. So the first thing I did was migrate over to the newest versions of all the libraries I was using. A relatively harmless transition, because as minor-version updates, they mostly stayed source-compatible.

Once I get the editor fully implemented, I want to try compiling my code using the new C++11 standard, and migrate to that. I believe the new standard greatly helps maintain clean codebases, what with things like the range-for statement, strongly typed enums, and most importantly (to me) in-class member initialization.

Libraries used in AdventureFar:
- SFML 1.6
- Qt 4.8 ([size=2]Moved from 4.7)
- Lua 5.2 ([size=2]Moved from 5.1)
- Boost 1.48.0 ([size=2]Moved from 1.45 or something)

AdventureFar was original using SFML, Lua, and Boost, but the Editor uses Qt. When I decided to integrate the editor into the game itself, it meant I had to include those that library as an additional dependency. I could use Qt to replace SFML... and was actually starting to do that, but I decided SFML would actually help with development speed, so I kept both APIs and made them work together. I currently have a Qt main window, with Qt editor panels that can be toggled on and off around the sides, with an embedded SFML graphical window managed by Qt in the center. Weird, but functional.

I got an interesting and unexpected business offer yesterday, and if I accept it, it may slow down development - but it'd only be part time on the side, so it wont stop development, only slow it - and hopefully not by much.

Currently I'm working on cleaning and refactoring the codebase further, as well as getting the non-working editor fully integrated. I also have identified a few new features I need to add to map files before I lock the format inplace and go crazy making the world.

I have my older brother reviewing some new plot material, and reworking it.
My friend, a composer, recently contacted me requesting I send him a new list of songs needed for the game, because "I'm almost finished with the first list you sent me"... A year and a half ago I sent him a list of 20 or 30 'possible song ideas' that 'You can make as few or as many as you like, just do whatever interests you' (since he offered his services for free as a way to hone his skills).

I'm surprised, and thankful, that he's stuck with me for almost a year and half now, while I continually mis-estimate my progress milestones on the game time and time again. I'm even more surprised that he's "almost done with the list" - the list of song suggestions such as "White forest", "Dark dungeon", "Old swamp", "Battle Song #3" (seriously), and equally spontaneous and non-descriptive songs. I forgot I even sent him a list, it was so long ago. That guy has patience!

His works are really good too, those of them that I've heard already, and he gets better and better with each song. I can't wait to see what new works he has come up with. If he's reading this (which he isn't): Thank you! You have more patience for me than I have for myself.

Here's some new art I made:


[sharedmedia=gallery:albums:374]



I am really excited for AdventureFar, and my blood is pumping again. Accidentally trapping myself into taking several months off to work on tools has really increased my longing to work on the game itself.

Servant of the Lord

Servant of the Lord

 

Working on the plot

I've been working on the plot of AdventureFar some more. One of my brothers and I are kinda passing the plot back and forth; I wrote the first general draft, he redacted some, rewrote some, and expanded some, and now I'm redacting, rewriting, and expanding some more, and we'll passing it back and forth several more times before things are finalized.



The above text is possibly the intro-text of the game.



Right now, I've broken the plot into Acts, Sections, Events, and Scenes. These show the flow of the linear plot of the game, though there will be sidequests and secrets as well listed elsewhere.

Each Act is broken into two Sections. Each Section is composed of six or so Events, which are detailed by Scenes.
An 'Event' can be described like, "The player goes to the village ________, to deal with xyz" A 'Scene' is something like, "When the player first enters the village, the guard approaches him and says....". An 'Event' is like the chapter title of a book, whereas a 'Scene' is the chapter contents itself.

My loose titles for the acts and sections are:

Act 1 - 'Village ashes'
Investigation
A King's Follies

Act 2 - 'King's Highway'
King's Highway
A Loyal Rebellion

Act 3 - 'A Kingdom burning'
[size=2]
A Warrior Risen

Act 4 - 'Executioner'
Council of War
The Hunters Released




Right now I've finished writing the general Events for both Sections of Act 1, and have detailed Scenes for the first Event of Act 1. I also have the general flow of the game's plot in my head, but haven't yet got it down on paper and fleshed out.

I'm still deciding whether I'm going to break up the game into two separate games, or one single game. If each Act ends up being over 8 hours of gameplay (excluding sidequests and exploration), I'll probably package Act 1 & 2 together, and Act 3 & 4 together. As it currently is, I estimate 4 1/2 hours (main plot only) for Act 1, so for now it's a single game.
When I actually am far enough along development to play through Act 1, then I'll have real measurements, and not just guesswork. As of now, not a single area in the game world exists, since I still haven't resumed coding the game itself (still sidetracked on some tools - though I'm almost done).



One thing I'm doing in this game is, while the guardians, of which the player is a member, defend the people and uphold justice and righteousness in the land, they don't also have the option of doing so in the most morally ideal way. Infact, some of the choices that the guardians and the player make during the flow of the game for the sake of protecting the people from the threats that have arisen will hopefully take the player by surprise.

Another thing I'm planning is having one of the major power pushers of the nation go 'crazy' and kill alot of people... but then I have the guardians argue amonst themselves in favor of the power player, and not making the stereotypical "Oh, he's crazy, let's kill him.", rather, "Oh, it makes sense he'd do that, it's unfortunate what's happening against him, he's to be pitied, I'd probably do the same thing in his place, but we have to defend the people, so let's kill him anyway".

The game will be heavily story-based, though probably at the expense of some replayability ([size=2]though I often re-read books multiple times even though I know their plot, if they are good enough books).

Servant of the Lord

Servant of the Lord

 

World atmosphere in games, measuring and categorizing

Three journal posts in three days, after 30 days of silence. I must be on a roll! Except, uh, none of them are about progress on my RPG project.

My brother recently observed over the phone that, "...you seem to be a collector of games, rather than a player".
That's a fairly accurate statement. I don't really have the time to play hours and hours of games, but I greatly enjoy acquiring high quality indie games (and some specific innovative mainstream games) when they go on sale cheap enough. (I'm a casual collector, rather than a focused one).
My tastes in games have definitely shifted over the past few years and now my main focus when playing games, is the artistry and beauty of the world in the game. This same focus will be my focus when designing my own games.

It's the atmosphere of the world that I'm looking for, and that is a sum of multiple things.
The order of importance, for me, when creating atmosphere in a game scene or area goes something like this: (diminishing importance)
[color=#008000]Music/Sound > Coloration(color pallets)/Art-style > Freedom of movement/Freedom to explore > Architecture style > Fairness of enemies/Non-irritation > Characters involved > Graphical quality > Level layout[/color]

I'm probably missing a few other things that should go in there, like background history of the world/area.

Here's some games I enjoy for the world you are immersed in:
([size=2]Loosely and lazily rated in terms of atmosphere and world, not rated in overall game quality or enjoyment - Also, obviously it's my personal opinion and people's opinions vary)

- Quest 64 (N64)
- Lost City of Malathedra (PC)
- Machinarium (PC)
- Myst and Riven (PC)
- Shadowgrounds (PC)
- VVVVV (PC)
- Minecraft (PC)
- Mario 64 (N64)
- Metroid Prime 1 (Wii)
- Halflife 1 (PC)
- Elderscrolls 3: Morrowind (Xbox or PC)
- King's Field (Playstation 1)

[size=2](By the way, I'm greatly looking forward to The Witness [size=2]- I strongly believe it'll rate at least four stars, possibly 5, when it comes to atmosphere and world[size=2])

Yes, that's right. In terms of atmosphere, VVVVVV is equal to Myst in my book. Anything 3 stars or more, I'd replay (and most have already replayed multiple times) solely for the atmosphere and world.

One thing I observe in these games is that the graphical quality of the game comes second to the world design itself. Great atmosphere and great worlds can be created even with poor graphics (See: King's Field, VVVVVV, Halflife 1).
Another observation is that world design and atmosphere is not bound to a specific genre (VVVVVV = 2D sidescroller, Halflife 1 = FPS, King's Field = 3D action RPG).
A third observation, and one that somewhat surprises me is that while '[color=#008000]Freedom of movement/Freedom to explore[/color]' is important to immersion and atmosphere, it doesn't depend on it (King's Field = freedom to explore in multiple directions - one big dungeon with chokepoint obstacles, VVVVVV = freedom to explore until you enter a fairly linear dungeon - dungeons can be overcome in any order, Halflife 1 = Infamously linear game moving from room to room, battle to battle, with only the freedom to move around in the last room or two you are currently in).

So going back to my spur-of-the-moment attempt to measure the effect of game attributes on world atmosphere:
[color=#008000]Music/Sound > Coloration(color pallets)/Art-style > Freedom of movement/Freedom to explore > Architecture style > Fairness of enemies/Non-irritation > Characters involved > Graphical quality > Level layout[/color]

...It does seem to me that while some things contribute greatly to world atmosphere, no one thing on it's own is required. That is, that lack of any one of those attributes can be made up for by strengthening the others, despite some attributes (Like music and art style) carrying much greater weight than others. This is especially good for us as indie developers, because we can (and have been) enhancing some parts of our atmosphere equation (like Music and Art style) to compensate for that infamous and controversial area where we can't compete with the big studios: Graphical quality.

Thoughts?

Servant of the Lord

Servant of the Lord

 

Physical-lizing a digital collection

As part of my cleaning up and organizing files, as mentioned in my previous post, I decided it'd be a good idea to backup the almost 30GB of DRM-free indie games I've purchased over the past few years.

I happened to have on-hand 20 blank DVDs with cases which I picked up on the cheap a few years back but never used ([size=2]because, grr, I discovered my disc drive couldn't write DVDs after the purchase).

So I popped open Microsoft Word, creates a Slim-DVD case slipcover template, and got busy sorting, organizing and backing everything up to disc.

Here's the result:


Crummy real-world photo.

The backs of some of the cases are even more awesome, showing screenshot of the games.

Servant of the Lord

Servant of the Lord

 

Spring cleaning in the snow

I've been busy working on a number of small cool tools, more info on that in a future post.

I've also been busy doing some "spring cleaning" (in the middle of winter) of my computer.
My dev machine (Also known as 'my computer', seeing as it's the only one I have) is starting to show it's age (bought in the fall of 2007), but I plan for it to last me another year before upgrading. Partly to eek as much value from it as practical, partly because it's served me well and still has the potential to do what I need it to for AdventureFar's continued development (it's a 2D tile based game - It doesn't exactly require high minimum specs), and partly because I expect Windows 8 to be released in fall of 2012, and if I'm going to upgrade, I might as well do so sometime after the new OS ships to kill two birds with one stone (three, actually: I plan to migrate to 64bit at the same time).

So my intent to cleanup and tuneup my current computer consists of several steps:

1) Organize and sort all my files currently on the computer.
([size=2]Yep, organizing 70GB of files sounds like fun - luckily I already did most of it. It's 70 GB now but was probably 90GB when I started)
2) Install another GB of RAM ([size=2]bringing me up to... 3GB! I definitely feel like 2007), install a second 350GB harddrive ([size=2]already arrived from Newegg).
([size=2]I also regreased my Videocard's fan, because it seems the lubricant on the fan sleeve bearing keeps evaporating. I first greased it 6-8 months ago, so once or twice a year isn't bad now that I know how to. I really ought to clean out the dust every so often anyway)
3) Reinstall, reformat, and re-partition the machine.
([size=2]It was a Vista machine originally, so I'll have to first install Vista (OEM 2007), then use a Windows 7 (Amazon pre-order in 2009) update disc)

I'm very confident that this tuneup will make the machine run smoothly - even just installing the 1GB of RAM (which I tossed in earlier this week) brought a noticeable improvement.

Before I actually do the reinstallation, I'm going to use the opportunity to install a bunch of largish applications I want to test drive; if I don't like them, I simply wont re-install them after I reformat, thus not worrying about their installation/uninstallation leaving artifacts on the machine.

Servant of the Lord

Servant of the Lord

 

At a distance

I'm just stepping in for a moment, to highlight the very fun game called 'At a distance' by [font=sans-serif]Terry Cavanagh, the same guy who made VVVVVV ([/font][font=sans-serif]you should go play that one too, if you haven't already[/font][font=sans-serif]).[/font]

[font=sans-serif]At a distance is a blindingly ugly 'retro graphics' game. It's a 3D cooperative game which requires two people playing together helping each other figure out what to do and where to go in the game world. I wont mention what you do in the game, as it kinda ruins it - it's the figuring out what to do that is the entire gameplay of the game. The first 5 minutes were really confusing, but things steadily fell into place as [/font][font=sans-serif]my coop partner and I [/font][font=sans-serif]gained greather understanding of how the game worked.[/font]

The game is completely free, though it[font=sans-serif] requires two separate computers that are best if physically side-by-side so you can see each other's screens. However, the game is very simple graphically, and a cheap netbook could probably run it just fine.[/font]

[font=sans-serif]Download it from Terry's site here: [/font] [font=sans-serif] [At a distance][/font]

[font=sans-serif]We beat the game in about 45 minutes, but it was very enjoyable and just the right size (any longer and my eyes would've killed me).[/font]

Servant of the Lord

Servant of the Lord

 

Lots of artwork

As mentioned previously, I've been working on some small side-tools apart from AdventureFar for a few months. More on that some other day. However, whenever I can't bring myself to work on code, I just open up MS Paint and Paint Shop Pro, and start working on game graphics.

For fun, I just compiled and tossed up a few more tile art packs on GD.Net's Marketplace. Here's some pictures: (click to see Marketplace entry)










And here are my older packs (which I dropped the prices on):







[size="4"]Here's the complete list of my marketplace packs.


If the prices are no good for you, I'm happy to negotiate. Actually, I'm nerdily eager to barter some kind of middle-earth style trade of artwork, if you're is any good (not that mine is perfect either!).

Here's some art that hasn't been released in packs, because either it's game-specific, or there aren't enough related pieces to put in a pack yet. Don't ask me what super-secret plot-related purposes the game-specific pieces have, because I don't know...
As mentioned above, I just make art when not wanting to program, or even while coding during small breaks.


The outline lighting of the stone... whatever-it-is is wrong, but until I use it ingame, I wont bother fixing it. It's far easier to adjust things when you can see them right before your eyes in their surrounding environment.


Stairways:

The stairways still need to be darkened somewhat... they are too bright for the rest of the game. Alot of my tiles probably need to be adjusted for brightness and style when I actually begin to create the world. Right now with the world editor in a broken state, I can't tell how well they'll fit together in terms of theme. It doesn't help either, that the previous game I made artwork for was an ORPG an online friend programmed, which was a 2D zombie game with very dark-colored graphics. That throws alot of my artwork out-of-whack by my either making tiles absurdly dark or absurdly bright.


Rugs:




Weathered stone walkway and grass:




Stone mancover entrance to who-knows-what:




Perhaps-too-shiny tables:



Map painted on street of a island that doesn't actually exist. Once the real world is created, many months from now, I'll re-make this to match the real shape of the island.



These are planned to be embedded in some plaza of some town somewhere in AdventureFar:




Right now as posting these, I am looking through my art collection and seeing probably 40 or 50 tile patterns labeled "WIP". I also have alot of tiles almost entirely finished, but lacking that final 10%. Some of my best work is stoneworks, and I seem to have a thing for ancient rocks.
I also see dozens of completed tiles I completely forgot about, catching myself going "Ooh, look at these! Wait, *I* made these, didn't I?", which is a very nice feeling. Unfortunately, alot of my work is hard to appreciate until you see how they will be used ingame. It's kinda hard to acknowledge the beauty of a carved baseboard and trimwork... when the trimwork is only 8 pixels high.
Alot of my work can also only be seen in conjunction with other pieces that go with it, and I don't want to spend an hour making a mock-screenshot to show them off... because I tend to be pretty obsessive about such things, and would end up spending five hours making sure the pixels line up right, and then rushing off to tweak tiles, or even create new works, to 'complete' the scene.

Oh, how I long to get back to work on AdventureFar... but I wont let myself, until I finish the small side project I'm on that has kept ballooning in time costs. I really want a proof-of-concept walking-around tech demo for AdventureFar... Probably in January I'll let you gentlemen explore a small non-interactive town so I can show off the artwork properly.

If any of you are making a game, and notice a piece of artwork that you'd like to use, shoot me a PM and let me know - even if it's in one of the paid art packs, I don't really mind you using it for free (even in commercial works) as long as you ask permission first - I don't even require (read: don't want) credit being given, but I do like being asked.

Servant of the Lord

Servant of the Lord

 

Full-time developwhatnow?

I'm back, with some news about AdventureFar's status. The status of AdventureFar is: I haven't... actually made any... progress on it's status...

Now before my nonexistent fans eagerly awaiting this game break into a riot and start trashing Rome, let me explain!

First, real life was getting in the way alot. I was having hardly any time to program on the game, being very busy.
Second, what time I did have available, I spent on a minor side-project making a tool I needed, which got feature bloat. The good news is, I'm about done with the tool, and I like it alot, and I'll make it available for free in two weeks or so (more about it in a later post).
Third, I just spent 12 days without internet ([size="1"]I'm in talks right now to sell the film rights to that harrowing experience), and the week before that I spent unpacking, and the week before that I spent packing (I moved to a different state).

Now, before Rome goes fully up in flames, I have a solution! *whips out a fiddle*.
Since real life keeps getting in the way, I've decided to cancel my subscription to real life. As of this moment (or, actually, as of 15 or so days ago, but what with unpacking, and getting settled in a new location, more like 3 days ago) I am now a full-time independent game developer! Granted, I'm an unsuccessful full-time game developer, since my first product is still about 8 months out from release, but I digress.

So, I have no new progress to show, but I've made a few spots of art here and there, and I've made the aforementioned cool tool I'll release soon. I hope to do monthly or bi-weekly journal updates once I get fully settled in.

As for now, I'll just leave this random compilation of images. ([size="1"]pardon the jagged lines, they were all scaled differently, and aren't relative to each other)


Servant of the Lord

Servant of the Lord

 

Six months of progress? Reality check.

I've been working on AdventureFar for six months now (since the 26th of December, 2010).
I've been working on the Map Editor for even longer; almost one year (Since about July 10th, 2010).
I've had a general goal and concept in mind for about eight months.
I've been journalling about it for about five months (since January 13th, 2011).

Some of it has been wasted time, not having a goal. Some of it has been one of those 'learning experiences' that are all the rage nowadays, because I've had to rewrite parts of the code many times (poor code architecture planning). Some of it has been genuine progress; which I'm happy about.

When I started journalling five months ago, my second post laid out my desired development schedule. I figure it'd be fun to go back, and see how my current progress lines up with my desired progress.

Here was my desired progress:



Here is my current progress: (anything crossed off has not been completed)


So, uh.... so far so good?

I'm way behind my expected schedule! I'm five months past due on completing 'milestone 1'. Everything is going much slower than I thought, due to poor planning, lack of motivation, and real-life eating my time. More and more it's looking like I wont be able to ship my game in 2011. More and more my desired shipping date is getting pushed back.

And you know what? I'm perfectly fine with that. I know that I'm making progress on the game, I can see it in the code, feel it in my blood, and taste it when I boot up the game (or, um, tech demo. It's not quite a game yet).
I'm late, but loving it, because I know the project is moving forward. I'm not going to beat myself up or feel depressed because I miscalculated how much time it'd cost me.

When I posted my progress guide five months ago, I said this:

[quote]But I have no managers or publishers enforcing a hard release date, so[color="#1C2837"][size="2"] if I must go longer to make a well polished game, then longer I shall go. I'll just have to re-adjust the schedule every few months to accommodate incorrect estimations of time costs, but hey, that's to be expected. That's also one of the benefits of a schedule, I can see I'm actually making progress, and I can see how much needs to be done, so I know that I am in fact getting closer to the goal. Even if the goal keeps moving back each time I re-estimate my schedule, I know that I'll always have moved two steps forward for every one step the goal gets moved back.[/color]

[color="#1C2837"][size="2"]It's more of a progress guide - a document set to guide and measure my progress - rather than a development schedule. A schedule is something you must keep, or you 'failed' and have to re-schedule. A progress guide is something that guides you to make progress, and as long as you are making progress, you didn't fail, even if you miss the milestones (that's the definition I just made up, anyway).[/color][/quote]

Those words describe perfectly what I'm feeling right now, and where I'm at. I took way longer than I thought (I guessed I would be about two months behind schedule, instead of 5 months), but I know that the delays I've encountered are partly from inexperience in coding, and partly from inexperience with time estimation.

I'm making good progress, and I'm happy about that. Once I complete Milestone 1, I'll recalculate my progress guide. Maybe this time I'll be slightly more accurate.
It's important to create guides and plans to keep yourself focused and to ensure you have a clear idea of where you are going. And it's important to go back and review those guides to make sure you're not going off-track; you just have to use the guides as a motivational tool and not a demotivational tool, and not be afraid to adjust and readjust it when your original estimations are farther off then you believed possible.

So, just to keep you up to date with my current progress:

[size="3"]Where am I?
I've gotten a growing but stable and mostly-clean code base that I'm very pleased with. I have the infrastructure in place to have a scalable 2D world of any size I want. I have lightning fast world loading, to allow for seamless scrolling of the world. I have the core pieces of a excellent scripting system for future plot, quest, and player progression. I have an extensive configuration system. I have a very well designed system for mod and expansion support. I have a excellent game state system.Most of what I mentioned isn't anything gameplay-wise. It's the structure that will support the game.
I've worked plenty on pouring the concrete and putting in place the [font="Book Antiqua"][size="3"]I[/font]-beams that the game will eventually be built on top of.
I'm not adding things just for the sake of adding things, but knowing what I'm going to build, I'm adding the structure that's needed for the game features to be built upon. Despite what it may look like, I'm not coding aimlessly.

[size="3"]What am I doing now?
[size="3"]
The past three to four days, I've been working on the editor. Since I needed to rewrite the editor anyway, and since the editor is a mess and the game itself isn't, and since they need to share a good portion of code, I decided to integrate the two. I love integrated editors, and my goal is to have the game running, and at a single key press, have a native GUI appear around the game itself, allowing the areas to be edited. This way I can walk through my game world, see something I don't like, click a button and bring up the editor without having to change windows, tweak the area I'm in seeing the change in real time, and then hide the editor again.

I'm basing my new editor off of the same design of the old editor, but with a few tweaks since some things are no longer needed, and some new things are now required.

[size="3"]What is my goal?
[size="3"]
My goal, for those who don't know, is to release a commercial 2D indie RPG with definite classical inspiration and taste, but re-visioned in a new and modern (but indie) way. I intend to release the game, and then one or a two expansions, on Windows, Macintosh, and Linux.

I want to be able to support myself through indie game development. My goal is to get my game on Steam (as a huge Valve fan and as a Steam proponent) and on other digital distribution channels.

My game is currently called 'AdventureFar', as a work-in-progress name. It will be a turn-based RPG, with multiple skill trees, party members, and a large-ish world. My focus is on world exploration - discovering a world, enjoying it's ambiance. I'll also invest alot into the combat system, and make sure the game is balanced in difficulty to offer real challenge to those who enjoy challenge.

I hope someday in a year or so, I'll have completed the game and will be able to offer you and others a new world to adventure in, new enemies to strive against, and the fresh air from the shores of distant lands to breath-in deeply and enjoy.

[color="#1C2837"][font="Arial"][size="1"]~ Servant of the Lord, logging off ~[/font][/color]

Servant of the Lord

Servant of the Lord

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!