Jump to content
  • Advertisement
  • entries
  • comments
  • views

About this blog

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

Entries in this blog


Mockup room, for motivation

I've been intermittently busy with real life the past two months or so, but that's wrapped up now.
Slightly discouraged by the lack of progress on Of Stranger Flames.

Today I slapped together, in MS Paint, a mockup up something close to the art style I'm trying to go for with this game using existing art I have made in the past. There's some minor differences in the art styles (and object sizes) of the different pieces that need to become more consistent when I get around to making the game world, but this at least gives me some comfort seeing something visual.

I really really need to get the world editor finished.

Servant of the Lord

Servant of the Lord


Day 3 - Also not much to show

Collision detection has been put in place, and player movement, and the loading of room objects (the white square).

Man, I need to really hustle these last four days if I hope to present a completed game!

Servant of the Lord

Servant of the Lord


Day 2 - Still not much to show

I got most of the basic code done for showing objects, constraining the camera to an area, texturing the background, playing music, and some other things as well. The problem is that I haven't yet created any objects to show! So it's just a textured plane.

I'm really exhausted, been doing physical housework most of yesterday and today, and cramming several hours in each night. Tomorrow will be worst, but the days after that should be alot freer. Regardless, I think I can polish up a good entry between the cracks of time and give everyone else a good challenge!

The artist on my team has really been carrying most the workload while I've been busy on non-competition stuff. Alot of the story and dialog has been rough-drafted.

Servant of the Lord

Servant of the Lord


General concept

This entry is about this week's GDNet gamedev competition.

Working together with an artist friend, our basic game idea is about a village of Dilophosaurus who are planning to attack a nearby human village in response to human hunters attacking Dilophosaurus and other dinosaurs.

The game takes place in the Dilophosaurus village, as the various Dilophosuari argue and debate their course of actions.

Here's a hand-drawn sketch of the main character, drawn by the artist, in his 'face west' pose.

[size=2]Serious dinosaur is serious.

My friend drew it in pencil, then I scanned it and colored it in Paint Shop Pro XI.

Still alot of coding that needs to get done! I was busy with non-competition related stuff today (and now my hands are blistered like crazy!), but managed to put in a good six-ish hours.

Servant of the Lord

Servant of the Lord


Some plant artwork

Wow. Five journal entries in one month. I hope I'm making up for all the months where I skipped posting!

Well, here's a few more shrubbery things for my game:

The trunk ain't so hot here. I've already updated the trunks since I took this screenshot, and while improved, they still aren't that great.

I love these ones alot. Also, generated a few smaller versions of them, for more variation.

These were ridiculously easy to do, because I found some public domain plant leaves and just recolored, shrunk, and rotated them.

Some over-fancy mayor or lord will be pleased with his new doorway:

This would ideally be against a grey-ish or dark-colored wall. A dark red wall would work well also. The gold leaves are supposed to be as if they were stenciled on the wall as decor.

These doorway leaves were also public domain.

Servant of the Lord

Servant of the Lord


Code snippet for typesafe void* userdata

Just tossed this piece of code together - it wraps void* points with asserts() to ensure you are getting the same type that you originally set.
Normally I shy away from void* pointers as I feel like they are indicators of bad design, but sometimes you need to use them, and when you do, they might as well be type-safe.

This is kinda a lightweight alternative to boost::any, but not designed by a peer-reviewed team of professionals who also have seats on the C++ standards committee.

Requires C++11's typeid(), and RTTI enabled.#include #include #include //Quick macro to replace my real Assert() function, just for this file.#define Assert(condition, message) assert(condition && message) //Holds any type of user-given pointer that can be cast to void, and does run-time checks on the type of the data when retrieving it.//Ownership is *not* taken. It is the original owner's responsibillity to ensure the lifetime of the object when//someone tries to retrieve the pointer later. The Userdata class itself never de-references the pointer.class Userdata{public: Userdata() = default; template Userdata(UserType *data) { this->Set(data); } //Sets a user-spe template void Set(UserType *data) { //Save the pointer (cast to void*), and the type's RTTI information, so we can validate on retrieval. this->type_info = &typeid(UserType); this->userdata = data; } template UserType *Get() { //Validate that we've actually set *anything*. Assert(this->type_info, "We never set any data, so we can't retrieve any."); //Validate that we are getting the same type that we initially set. Assert((*this->type_info) == typeid(UserType), "The types don't match - we can't retrieve the userdata safely."); return static_cast(this->userdata); } void Reset() { this->type_info = nullptr; this->userdata = nullptr; } private: //A pointer to the global compiler-specific (but standardized) type_info for this type (the type that Userdata's void* points to). //C++11 guarantees that "The lifetime of the object referred to by [typeid()'s return value] extends to the end of the program." (N3337 5.2.8) const std::type_info *type_info = nullptr; //A pointer to the user-defined data. void *userdata = nullptr;}; //Manages a FILO stack of void pointers in a type-safe way.//This class does not take any ownership of the data pointed to.class UserdataStack{public: UserdataStack() = default; ~UserdataStack() = default; template void Push(UserType *userdata) { this->stack.push_back(Userdata(userdata)); } template UserType *Get() { Assert(!this->stack.empty(), "The stack is empty - we can't retrieve any userdata."); return this->stack.back().Get(); } void Pop() { if(!this->stack.empty()) { this->stack.pop_back(); } } //Pops the stack, and returns the pointer previously pointed to. template UserType *Take() { UserType *data = this->Get(); this->Pop(); return data; } void Clear() { this->stack.clear(); } private: std::vector stack;};
Compilable code on Ideone.com

Note: By design, the Userdata/UserdataStack classes don't take ownership of the data. I guess that's another difference than with boost::any - though you could always just pass boost::any some pointers.

Servant of the Lord

Servant of the Lord


Cabinets and shrubbery for Of Stranger Flames

Here's some art I made today and yesterday for my RPG game project.
([size=2]Note: This art is not public domain - I intend to use it for my own game projects - though I'd love to release some of it in the future)

Since Of Stranger Flames takes place in a heavily-forested land, I need alot of shrubbery to make the environment more detailed and 'natural'.
Previously I posted pictures of some trees I was working on. Yesterday and today I made some shrubbery:

[size=2]Note 1: This is not a screenshot from within the game, this is merely a test image layered in an art program.
[size=2]Note 2: I added way too many shrubs in the picture.
[size=2]Note 3: Every shrub there is a different shrub, they aren't copies of each other.
[size=2]Note 4: I added way too many notes under this not-a-screenshot image.

Since the game also takes place in urban environments - namely: small villages, prosperous towns, and prosperouslier cities - then I need the inside of the buildings to also look good.
These images are some cabinets I just finished:

Here's the concept art I sketched several months ago, which I based these cabinets on:

I drew it while re-re-watching Pride and Prejudice (the good one - the 2005 movie).

Servant of the Lord

Servant of the Lord


Tiny bit of art, some programming talk

Here's a few pieces of art I made for my game, in between programming.

Stone fence

I just finished this a few minutes ago - it took about an hour.


I guess about a week ago? Maybe two.


Didn't get anything done today - rather lazy. Still have a few hours left in the day, so I'm going to crack back into the code for a bit more work.

Yesterday and the day before I made great progress finally figuring out a good resource-management system for my game. This is after a week or two of false-starts, and several concepts drawn on paper over the past few months. The end result isn't anything special - but all my prior attempts were either too limiting in capability, or else too generalized to be useful. I've gotten it mostly working already, and yesterday I started connecting it up to the old area-drawing code that I haven't seen in several months. I'm happy with the area-drawing code - it's still stable and clean - but the tile-drawing and image-sharing code that I was replacing just was too clunky.

One bit of code I'm somewhat proud of is a new serializing system I wrote up to replace my old one. The new one is more reusable and a pleasure to use, though there is one annoying thing I'd like to fix later.

The new serializer is heavily template-based for great flexibility, observe:[code=:0]struct MyStruct{ std::tuple, float, std::vector > tupleOfPairsAndVectorsOfStrings; float otherStuff;};//Template specialization for serializing 'MyStruct'.templatesize_t Serialize(Serializer &serializer, MyStruct &tileDetails, size_t pos){ //Automaticly calls the overload for floats. pos = Serialize(serializer, tileDetails.otherStuff, pos); //Automaticly calls the overload for tuples, which in-turn calls the overload for each tuple's member, //which in this case calls the overload for std::pair which then calls the overload for std::string and int, //and also calls the overload for std::vector, which calls on each element the overload for std::string. pos = Serialize(serializer, tileDetails.tupleOfPairsAndVectorsOfStrings, pos); //Sound slow? Not when you remember template functions are resolved at compile-time. =P //It shouldn't be any slower than most other serializing methods. return pos;}class Foo{public: Foo(); //Calling Serialize() on class 'Foo' automaticly detects that Foo has a Foo::Serialize() function, and calls that instead. size_t Serialize(Serializer &serializer, size_t pos) { //Calls the Serialize() function for vectors... which automaticly detects the type of element in the vector, //and calls Serialize() for each element in that vector. return Serialize(serializer, this->arrayOfStructs, pos); } private: std::vector arrayOfStructs;};
While not intentional, I think it's also loads faster than my old class, which is a nice plus. I haven't profiled it yet to see.

Better still, I don't have to code almost-identical read and write serializing functions for classes - just one function, that reads OR writes, using the same code. Serialize() depending on the nature of the Serializer passed in, reads or writes using the same functions. And without a bunch branching statements - it redirects to the read or write function using a function pointer.

Using a function-pointer also allows me to redirect to Safe or Fast read functions at run time (or for individual pieces of code), depending on the requirements of the program. If I want to, I could later also add Encrypted read/write functions, or Compressed read/write functions, without changing any existing code, but by just adding the new functions to the Serializer class that handles the incoming bytes.

Servant of the Lord

Servant of the Lord


Editor screenshot

What's cool about Qt is that you can make really impressive looking interfaces fairly quickly.

Here's what the editor looks like today, compared with a week ago:

Still alot of work todo. I'm halfway considering licensing this editor out as a RPG making tool, or maybe just a tile editor, when I finish it. But that's low priority. The focus is on making the editor stable enough to use it for the Of Stranger Flames and several games afterward.

Editor work and forest work

For a few reasons, I needed to rework a good part of my game editor *again*. This is at least the third time.

Here's the work I did today and yesterday, but I think I'll be able to quickly re-integrate the components from the previous editor. Most of the underlying engine code is the same.

Last post I mentioned some of the trees I've been working on. Since the world of Of Stranger Flames is predominately covered in forests, the trees need to look even better, and there needs to be alot of foliage and underbrush and things like fallen logs on the forest floor.

Also, even more importantly, different portions of the forest need to have a distinctive look and feel so it doesn't all seem identical.
Here's something I slapped together a few days ago:

I've had this 'guideline' map for awhile now, just to help solidify the shape of the world. There will be a much better map ingame - this is only for developmental purposes.

However, I layered over some trees to give a feel for the four separate wooded areas and to look at some of the colorschemes I'll use for each area. The upper-left one will probably use more redwood-esque trunks, while the lower-right forest will probably have a mix of light-brown trunks and grey birch-like trunks.

Sometime in the future I'll need to create a few more tree types. Right now all I have is something vaguely looking like a pine tree. More variation would be better. We'll see how it turns out.

Servant of the Lord

Servant of the Lord


I'd like to be a tree

I know I haven't posted in a long while. Still working on Of Stranger Flames, but progress has been sporadic. Still optimistic though!
Here's some of the tree art I've been working on:

Alas, this is not a screenshot from within the game, but merely layering the tree components (shadow, trunk, leaves) over each other in a image editor. Because the trunks are separated from the leaves, I can mix and match any of the 19 trunk variations with any of the 10 tree tops in 13 different colors of tops. Hopefully that'll give enough variation for some good forests - most of the French colony in Of Stranger Flames takes place in heavily forested areas, so they need to look good and have enough variation. I'll hopefully animate them just a little in the wind, by slightly rotating the tree tops +-10 degrees.

Oh, I have one of those 'tweetering' accounts now, if'n you care to follow me. I average about 5 twits a week, so I'm not too spammy on your feed. Though I should really increase that to at least twice a day... Sometimes my feed gets filled with a single twitter user tweeting seven or eight times in a row. That's not something I want to mimic.

Servant of the Lord

Servant of the Lord


I haven't posted in awhile, so here's some art I've been working on

I've set up mercurial and use that for Of Stranger Flames. I should've learned some kind of source versioning system years ago, but the list of things I 'should learn' is rather large.

Mercurial was surprisingly easy to get up and running, so I'm glad. I've installed TortoiseHg but I end up doing everything by the command-line anyway, so next time I won't bother installing the GUI.

I've been making very slow progress, chipping away at things here and there. Yesterday, for a small programming break, I made some windows with curtains:

I tried to design the window so that it'd work with multiple different wall-types, though I'm not too pleased with the result. I don't particularly like the way the glass panes, the framework between the frames, or the window sill came out. Which is pretty much everything except the curtain rod.

I like the curtains much better though! And since the curtains block most the window, and I don't outright hate the window, I'm not too concerned with getting it perfect. The main thing that irks me about 2D windows, is what do you show through it? Grass? Streets? My usual 'sky blue' panes don't make much sense, since the player is looking down at the window at an angle.

I guess I could make the panes semi-transparent and place ground tiles beneath it, depending on what the window actually looks out at. This is something I'll tweak once I get the much-talked-about-but-not-finished map editor working and am able to walk around in-game.

Here's the window covered with curtains:

Not to compliment my own work or anything (), but I particularly like how the line shines through the curtain.

This first parted curtain is rather unnatural - the strait lines and how the curtain comes to a point (instead of a clump) at the bottom.
My later versions improved:

The only thing really lacking in these curtains (aside from the gold tiebacks on the blue curtains that I accidentally miscolored) is that the curtain doesn't bunch together in folds of frabric, but I'm not particularly worried about that.

This was about two hours work.

I wish I had something more substantial to show, programming-wise, but on-average 90% of my programming work is non-visible. Lately (past four or five months), 110% of my programming work has non-visible and seemingly insignificant. Oh well, progress is being made, even if slowly!

Servant of the Lord

Servant of the Lord


Easing along, one step at a time

I just finished adding some of the standard Ease equations to my code base for use in Of Stranger Flames.
In discussion about the equations, it was requested for me to share the code here. This is not a tutorial, I don't have enough familiarity with the subject (or with math in general) to explain how every equation works. I'm just posting what I added to my own code, so others can use it if they want to.

The equations are mostly from Robert Penner's eases, which are under the BSD license. His code seems to be the ones that are used by most software, such as the jQuery, Flash, and other libraries.

Most Ease equations have the function signature:void equation(currentTime, start, distance, totalTime);
I personally like having my eases in start at 0.0, end at 1.0, and have a 'duration' of 1.0, and then I scale the input and output as desired, instead of having the equation scale it. It just makes it easier for me to understand.

That said, all my functions have the format:void equation(position);
...with 'position' being from 0.0 to 1.0.

Because Eases come in various forms (You can ease IN, OUT, IN and OUT, or OUT and IN), I made sure all the ease equations were in EaseIn form, and I created a few functions to convert the input and output to the other forms as desired.

Here's the conversion code:
http://ideone.com/6rc0Zk ([size=2]Posted as links, because all my code kept getting unformatted when hitting 'publish')

EaseFunction is: "typedef std::function EaseFunction;", which nicely permits the use of things like lambdas and functors as well as the regular ease functions. If you don't have C++11, you can just typedef it as: "typedef float(*EaseFunction)(float);" or whatever the correct C-style function-pointer syntax is.

Some of the ease equations have a few extra parameters, like ElasticEase and BackEase, so I provided some C++11 templates to convert the functions to std::functions that meet the function signature shared by the other functions. It's just a wrapper around std::bind for convenience. (I'm big on convenience! )

You don't have to use C++11 to use the equations! Just the helper functions above.

I also use this function for scaling the output:

Actually, mine looks like this:
...but that depends on a 'FloatRange' helper class I made, whereas the previous one has no dependencies.

I actually made two ScaledEase overloads, one for my Point class, and one for my Color class. I haven't tested those out yet.

I also made a Easer class, that handles most of everything inside of it. This is more for when you want persistent ease data wrapped nicely, and this class would be a member-variable of another class.


That also uses FloatRange, but can be easily adjusted to just use 'float begin' and 'float end' instead.

The Ease Equations
And here are a few additional ones I keep inline

The next page has graphs generated to test/demonstrate the output.


Cubic Ease In

Cubic Ease InOut

Cubic Ease Out

Cubic Ease OutIn

Elastic Ease In

Elastic Ease InOut

Elastic Ease Out

Elastic Ease OutIn

Exponential Ease In

Exponential Ease InOut

Exponential Ease Out

Exponential Ease OutIn

Linear Ease In / InOut / Out / OutIn

Power Ease In

Power Ease InOut

Power Ease Out

Power Ease OutIn

Quadratic Ease In

Quadratic Ease InOut

Quadratic Ease Out

Quadratic Ease OutIn

Quartic Ease In

Quartic Ease InOut

Quartic Ease Out

Quartic Ease OutIn

Quintic Ease In

Quintic Ease InOut

Quintic Ease Out

Quintic Ease OutIn

Sine Ease In

Sine Ease InOut

Sine Ease Out

Sine Ease OutIn

SmoothStep In

SmoothStep InOut

SmoothStep Out

SmoothStep OutIn

WeightedAverage In

WeightedAverage InOut

WeightedAverage Out

WeightedAverage OutIn

BackEase In

BackEase InOut

BackEase Out

BackEase OutIn

BounceEase In

BounceEase InOut

BounceEase Out

BounceEase OutIn

CircleEase In

CircleEase InOut

CircleEase Out

CircleEase OutIn


BounceEase was annoying me alot. I was trying to figure out how it worked, but I'm not very good with math and algorithm-thinking.

The original code looked like this:

And trying to figure out all the magic numbers, I eventually broke it down to this:

I never figured out how the '7.5625f' value was calculated, but the others are resolved.

Unfortunately, changing the value of 'bounciness' or 'bounces' produces poor results (probably from the constant!), so I didn't bother including the code with the rest of the equations.

Links that were useful in understanding and converting the equations:
http://www.robertpenner.com/easing/ (The guy who made most of these now-common equations)

http://sol.gfxile.net/interpolation/index.html (also has good descriptions and explanations)

Some nice graphs:

Servant of the Lord

Servant of the Lord


Hammering away on code and art

I've been busy with code, and though I've been making little progress, progress is being made.

Yesterday and today I tossed together some art for my game to give me a break in-between compiles. This week's theme has been rough wooden structures.

([size=2]Note: This art, like all the art I reveal on here, is copyrighted by me for use in my own projects, so duhnt ya be steelen' it!)
([size=2]Note 2: I reposted this from my broken website, JaminGrey.com | StrangerFlames.com)


I'm not likely the texturing of the ropes too well, but other than that I'm quite pleased with the result.
There will probably be a gallows in two or three different towns... and depending on your judging decisions as a Guardian, you might get to hang a bandit or two.


These benches are for exteriors, like town squares or house gardens.

Cross for churches:

There are a couple churches scattered through the colony, but only one plays any real significance in the plot.
The churches in the game are all Catholic since France was heavily loyal to the Catholic Church during the time period of the game (the game takes place a few years after the reformation, though that doesn't feature in the game).

Wooden outdoor stairs:

Wooden floor:

Check out my nicely staggered bonds! That's how floors are supposed to be laid... or at least how I've always laid them, every single time (all one of them) that I did so.

Wooden fence:

I was too lazy to make the north-south fences for this fence set. =)

Wooden posts:

Just a couple wooden posts with no particular purpose.

I hope everyone is doing well, and that your projects are progressing better than mine is!

Servant of the Lord

Servant of the Lord


Relaxing on a pixel-art couch

While wrestling an annoying segfault (one of those, "This shouldn't be happening" bugs), and while chipping away (slowly) at a easy but tedious piece of code that I need to write, I ofcourse recline back and work on some art.

Apparently this weeks theme is couches. I guess my game takes place in a furniture store.




I also made this really cool faux archway with a mural inside it:

It came out really good! The 'mural' part is a Creative Commons photograph from Wikimedia. Which is the majority of that piece of art. So I can't really claim much credit for it.

I'm still trying to figure out the whole CC Share-Alike issue though - does that mean that specific tile is a 'Derivative work' or the entire game? I'll need to do more research to find out. Luckily I only use the CC stuff in two pieces of art, and neither are game- or plot-critical.

Servant of the Lord

Servant of the Lord


Minor progress update

I've been making alot of progress on minor points, checking things off my list(s). This is especially good, because I've been really disappointed with my progress of late, mostly due to being busy with non-game development stuff that had to get done, and while my time wasn't "taken up", it was fractured into pieces that made it hard to really get into programming.

On one hand, I've been saying to myself and to others, "The level editor is almost complete! Just a month or two longer!". Alas, but I've been saying that for over a year now. Maybe longer. However, I keep saying it because I really believe it - now more than ever! I keep on making progress and making progress, getting closer and getting closer - so I'm really truly close now. Just a month or two longer!

My sister, who's agreed to help with map editing, practically rolls her eyes whenever I tell her "the editor is almost done". It's kinda a running joke now.

By "done" I mean "75% usable, so we can start making maps". Not 'perfectly finished'. I'll have to continue to tweak and refine it as we use it, but also, some of the features I will eventually need I'm not planning to add until later.

Quick checklist of recent things added:
Renaming floors and layers work
Adding floors and layers work
Deleting floors and layers work
Moving/reordering floors and layers work

Also got several things working again (after the internal area structure change).

Here are some of the things I fixed again:
Tile grid
Cell borders
Tile placement

I've also touched up the Tile Explorer some, and got world scrolling working again.

Apart from area saving and loading, and a few other minor odds and ends, I'll be ready to start making some of the first few maps. (Though collision detection and all that jazz won't be working yet).

Here's something cool I added, in-between other stuff: Dragging and dropping of layers to re-order them.

Here's me just playing around. I increased the default map-editing size to 5x5 cells, instead of 3x3, and adding more levels of zoom.
Here I'm zoomed out so much you can't really see anything clearly because of the red gridlines. I'm adding an option to toggle the gridlines.

So I'm really excited. Soon, the editor will be ready. I hope.

Servant of the Lord

Servant of the Lord


Smidgen bit of art

Here's a few pieces of art I tossed together over the past dozen or so days while waiting for code to compile.

Colorful swirling floor

It tiles horizontally and vertically better than you'd guess.

Stone wall

Not my best work - I think it contrasts too much with my other art, but I'll wait until I can see it in-game before deciding whether to discard or modify it.

Stone patterned floor

Meh, might be too visually "busy" - especially the one on the right. We'll see.

French flags

The blue with gold is the french national flag of that time period (I hope!), according to Wikipedia.
The other variations are fictional that I thought might look cool. Since the colony is (unwilling) independent from France, but wants to be under French rule, they probably would use the French flag. The black version I might use for the colony's Guards, and I might use a green flag with a silver fleur-de-lis for the Rangers.


Two different banners that don't mean anything - just for hanging outside of buildings.

Cloth door covering

Here we start to get to some cool stuff. This cloth covering would hang on the outside of a building, over an open doorway. Uh, probably as a early form of a screen-door, to keep out bugs and some sunlight but let in some fresh air? I don't know, I just felt like drawing some cloth which is difficult for me. I'm pleased with how it came out (better than the flags, anyway!).

Rope hanging on wall

A nice rope to hang on the outside of some building, like a stable or someplace. Or inside, for a storage room, I guess.
Of specific coolness is the nice drop-shadow (hard to see here), which will make it stand out nicely on a stone wall.

Horse ring

A metal ring fastened to a stone wall to tie horses to. Also has a drop shadow for visual bonus points.

Wishin' ya' all a happy Feast of Fowls this week. Peace be on your family interactions!

Servant of the Lord

Servant of the Lord


Some new tile art, a new concept town sketch, and code architectural change

Hey guys! I got some work done the past week or two. Not as much as I was hoping to, but at least I got something done.
For starters, layers now can be created/deleted using the editor.

Code architecture change

I've made some non-visible changes to the code architecture. I was running into an interesting problem, where I had my code too flexible to be easily wielded.
Previously, I had my game areas laid out like this:
An Area contains Chunks in a grid of an infinite non-defined size.
Each Chunk contains Floors (no hard limit on the number of floors).
Each Floor contains Layers (no hard limit on the number of layers).
Each Layer is 20 x 20 tiles.

The benefit of this is that chunks that only need one floor, or just three layers, only have one floor or three layers or whatever, and the chunk right next to it can have 20 floors if needed.

The first major "problem" I encountered with this was when editing chunks in the editor. If I'm placing tiles on a floor named "Floor 1", on the layer "My background layer", and I am laying the tiles down without letting go of the mouse button, and I cross the chunk threshold to continue placing tiles in the next chunk - if that chunk doesn't have "Floor 1" (and instead has a floor called "My Floor" or "Bottom floor"), or doesn't have a "My background layer", what Floor and Layer am I placing the tiles on?
Do I not place the tiles down at all (heavily reducing the ease of map making)? Do I count which numerical layer "My background layer" is - it happens to be the first layer in the array, so switch to the first layer in the array on the next chunk? Do I create a new layer implicitly to match?

Fine, so I'll just sync up the layers. If I make a "My Floor" in one chunk, every chunk in the Area will have a "My Floor".
This leads directly to the second major "problem": Not all the chunks are loaded in memory at once. Only the nearby chunks are loaded, even when editing. So... if I add a new layer, do I add it only to the chunks in memory? What about all the unloaded ones? Do I add the new layers to the unloaded chunks on the harddrive? What if I then don't "save" the changes to the Area... do I then have to go delete the new layers that were added to the unloaded chunks on the harddrive?

There were three or four such problems - they all had solutions, but the solutions just felt like band-aids, so I am now rewriting the architectural code layout of areas. Since all the important code is already written, this code change actually won't take long at all.

Here's the new layout: (knocked up in MS Paint to help me visualize it while thinking)

The primary benefit is that Layers and Floors are automatically "synced" between chunks (or rather, they no longer have to be synced at all, since chunks now "exist" within layers and floors instead of vise-versa). I renamed Chunks to "Map Cells" to help myself not associate the old mental imagery with the new layout. As a figurative concept, Cells are much easier to work with. A "Layer" is broken into TileBlocks, one TileBlock for each figurative 'Cell'.
However, if a TileBlock is empty (or only filled with a single tile) it will be heavily optimized away, so ideally this new layout won't waste any more memory than the old layout, but will be much easier to work with (less band-aids needed to make it usable).

New concept town sketch

I drew this two days ago. It's the port city which I previously called "Viarmhiem" (but every town name is going to be changed - I decided to not use a made up language, and every in-game town will be derived from French, Latin, or Italian circa the 1500s to better fit the plot of the game).

I don't know how much work I'll actually put into the city/town, it doesn't really play a major part in the game's plot. Well, actually, to tell you the truth, it doesn't play any part in the game's plot (at least not in anything I've written yet). It's important culturally and historically to the area the game takes place in, but that's about it... so is it worth it to invest time making the city feel alive?
On one hand, I feel "Why bother wasting time and effort on it? Focus on the parts that matter, and ship the game, move past "Go" and collect $200, before you go bankrupt". On the other hand, there is the importance of polish and extra detail that players will appreciate and hopefully help make the game an underground hit in the 2D turn-based RPG niche. On the third hand, IF I ever get around to working on the two other games that take place in the same game world, it won't be wasted effort, and it'd be extra nice to see how the town develops and grows as time passes between the three games.

New tile art

I also spent some time this week putting some new art together.


As mentioned before, I can actually apply coloration to the tiles within the editor - even so, usually I knock up multiple colorations while making the piece, just to hopefully later give me inspiration when I come across them in the editor.

Wood-paneled walls with built-in shelves

I'm very very happy with how these came out. Particularly the shadowing for the stairways, but overall I think it came out well. The walls are three tiles high (12ft) - most of my game will have walls 2 tiles high (8ft), so it's unusual, but makes sense in a wealthier house (like a Governor's or Lord's house). Such nice panelling also wouldn't be common, except in a wealthier dwelling. I think it'd also go well for a tavern, so I'll probably re-use it in several places in the game.

Here's a few more previews from the same set:

The mural (in the first image) I made two hours or so ago, but all three portraits ([size=2]barring the picture frames) in the last image are public-domain work (thanks Wikimedia Commons!). Hopefully the people playing the game don't recognize any of the portraits (the guy is the Duke of Tuscany, for example), because some art historian could totally call me out on the timeline of the portraits.

[indent=1]"Sir! These portraits are all from the 1700s... And painted by a Dutchman! I was led to believe that your plot takes place in the mid-1500s, concerning the French!"

I looked at the 1500s art, and didn't like it much, so I took some artistic liberties and time-travelled forward two centuries. Do you think anyone will notice?


*phew* That was a long post... more like how I used to write 'em.

I hope all your projects or educational pursuits are coming along well!
Don't forget to tune in next week to find out that I didn't actually post anything and probably won't for another month.

Servant of the Lord

Servant of the Lord


Layers interacting with the editor

I've been having loads of difficulty getting the "game" part of the code interacting with the "editor" part of the code, but I've finally hit on a decent solution. Such interface-to-system messaging is a problem I usually have with my not-thought-through architectures, but I'm getting better at it... though I still should probably sit down with a few higher-level architectural software engineering books - it'd do me good.

I got layers and floors properly interacting with the editor again today:

I still need to add things like "rename/delete/copy layer", and moving around the order of the layers, but as usual, the logic is all there, just my editor->system code is lacking.

A month or two ago, I re-added zooming in and out to the editor:

And a few weeks ago I re-added tile placement patterns (for placing more than one tile at a time):

(This Of Stranger Flames post was reposted to Journeys in Grey)
[size=2](Both sites are kinda buggy right now - they currently only work well in Chrome)

Servant of the Lord

Servant of the Lord


Announcing 'Of Stranger Flames'

Phew, I was 'gone' for almost two months (active on the forums and working on AdventureFar's website but no journal posts).

For the past 45 days, I've been chugging hard to get the AdventureFar website (and my personal website) up and running. I made my own WordPress theme, forcing me to learn PHP and HTML and CSS pretty heavily.

But I encountered a problem while working on the AdventureFar website... For the past 2 years of development, I've referred to the project under the work-in-progress name of "AdventureFar". But I can't use a work-in-progress name for the website's domain name... I need the real name, and it's about time I settle on it.

So with that said, I'm very pleased to announce "Of Stranger Flames" as the official title of the game. I've lost track of what I've told y'all over the past year, especially as the project has grown and changed, but in case I haven't already mentioned it, Of Stranger Flames is actually the first of three games in the series. Each game is completely stand-alone, with its own plot, but follow the same character in the same world, just several years later as new events are unfolding. Details on the other two games are not yet flushed out.

The entire series is tentatively called the 'Guardian Blade' series.

Of Stranger Flames is a "classically-inspired, turn-based (with action elements), 2D rpg with modern graphics, in a para-historical French setting, in the latter half of the sixteenth century".

Tons of details I may or may not have previously shared are available on the website, as well as two songs from the soundtrack (and reposting of images you've already seen).

Of Stranger Flames website
My development website + dev journal
My new twitter account

They work on Chrome, but get butchered in most versions of Internet Explorer, despite being almost completely validated as standardized HTML and CSS. I'll definitely try to get that fixed in several months before I do any large media pushes. I also have several pages that are listed as "coming soon" (read: within the next 6 months. "soon" is subjective ), but most of the content is already up.

I'll still post here on GD.net, but my dev journal on my new website will be more of the "public face" (read: less technical details, more pictures) of my game development. All the juicy technical stuff I'll post here on GD.net, and only mirror there on occasion.

What's next? Well, I still need to get the game editor working. However, I'm delighted to be able to get back into C++ code, starting tomorrow. Depriving yourself of programming for 45 days (to work on the website) really sucks.

Let me know what you think about the website and the game details!

Servant of the Lord

Servant of the Lord


Cross platform filepath conventions and folder organization - Suggestions?

I have alot of folders and files that I use for programming, and sometimes it's a pain when I manually have to go through them in Windows Explorer. To make it easier, I use a couple tricks:

1) I set icons to folders I use frequently, usually icons that can be at a glance distinguished from each other, so I don't even need to read the folder names if I'm familiar with where I'm heading.

2) I also wrap folders or files that I access more frequently with some symbol that Windows automatically sorts to the top of the folder. I usually wrap them in either '(' ')' or else '[' and ']'.

It's that second item that is causing me problems - My code is meant to be cross-platform, so I use GNU tools alot. Unfortunately, GNU tools, being designed for Unix-like systems, sporadically mess up when dealing with such symbols.

So, I'm looking for another symbol system that is compatible with Linux, Mac OSX, and Windows folder-naming conventions. Is there a "minimum requirements to be cross-platform" filenaming guide to view? How do you keep your own programming files organized for cross-platform use?

Another thing that bothers me is I'm a sucker for aesthetically-pleasing names, which is why I used brackets (symmetrically at beginning and end of the name) instead of just slapping an underscore or exclamation mark at the front of everything.

[size=2](I probably sound like a super neat freak - Actually it's the opposite, I'm pretty messy, so I try to find ways to organize and control my mess)

One thing I dislike is underscores instead of spaces. Ugh. However, since spaces aren't tolerated by some programming tools, I normally use one-word folder names or camel-case instead. They just look neater to me that way, and if they look neater, I feel happier coding, so it's kinda a psychology trick I guess.

My file directories are a mess, in bad need of organization, so I guess the real solution is to just clean up the files and folders and make sure there are no more than a dozen subfolders in each folder - even so, I'd like your thoughts on the matter. How do you keep everything rapidly accessible? (And yes, I do have a shortcut to my current project at the root directory)

More importantly, what do I need to do to make sure my filepaths are compatible with GNU tools?
I was thinking of using a new scheme of putting a numeral before each folder, followed by a period. The numeral will be sorted before the letters are, thus making any numeral-based folder rise to the top.

"Programming" would thus become "1. Programming". Does that run afoul of some Linux standards?

As an example of my current problem, this path keeps messing up some build tools:

Any thoughts?

Servant of the Lord

Servant of the Lord


Steam Greenlight? ...and a few other things

Valve just announced a new way for developers to get onto Steam. They're calling it Steam Greenlight.

Basically, developers early in development start posting stuff about their game, and if the community likes it enough, they upvote the game, and if the game gets enough community support, it brings increased awareness of the game to Valve who are more likely to release the game on Steam once it is finished.

Steam Greenlight will go live August 30th, which is 50-ish days away. I'm seriously thinking about putting AdventureFar on Steam Greenlight.
Hopefully, I'll actually-truly-for-real have the editor functioning enough by then to have good screenshots of my game to submit, as well as video of me walking around a town. We'll see if I can get it done in time.

On another note, I use MinGW, and I'm also loving alot of the new C++11 features. MinGW released a new version last month, bringing it up to GCC 4.7.

I also use QtCreator as my IDE of choice, and furthermore, I use the Qt API for native GUI widgets for the editor. Unfortunately, some of the Qt signal-and-slot macroes choke up C++11 with GCC 4.7, and makes the whole code refuse to compile.

If anyone else is running into the same problem, the solution can be found here.
Basically, you fix the broken Qt macro, which interferes with C++11 user-defined literals.
#define QLOCATION "\0" __FILE__ ":" QTOSTRING(__LINE__)

You can fix the define in QObjectDef.h (without recompiling Qt).
([size=2]Note: This fix has already been patched into Qt 4.8.1, but I'm still on Qt 4.7)

([size=2]Error messages included for increased Google-abillity for others encountering the same issue:)
inconsistent user-defined literal suffixes '__FILE__' and 'QTOSTRING' in string literal
error: unable to find string literal operator 'operator"" __FILE__'

I'm working to get the interface up and running for adding/deleting and manipulating floors and layers of area chunks. Here's a screenshot:

Almost done. The logic has been there, behind the scenes, since before I even had a dev journal. It's getting everything connected to interfaces that take all my time.

Other notes: Last night and the night before last, I knocked out the rough draft for the final section of the final Act of the game, including the ending scene. I still need to touch it up, and fill in the fine details and step-by-step events, but at least now I know how the game ends:

[spoiler]It fades to black and then the credits play.

[rollup='Anti-spoiler']Actually, I'm going to just crash to the desktop in the middle of the last boss' death animation, and 'accidentally' delete the save file, so nobody ever gets to see the ending scenes. [/rollup][/spoiler]

Here's the current status of the plot (rough guesses):

Act 1 - 100% rough drafted, 25% fine details (the beginning third, and some later sections)
Act 2 - 90% rough drafted, 10% fine details
Act 3 - 30% super rough drafted, 10% fine details on a piece of scrap paper somewhere
Act 4 - 70% super rough drafted, 5% fine details (the ending)

I came up with some new side quest ideas for the final act as well, and some enemy ideas.

Maybe I'll knock some more out later tonight. I really need to marshal all of it together and at least get all the Acts 100% drafted.

Some art

Well, so much for planning ahead! I just unexpectedly spent 20-ish days out of state, without access to the internet. I only got back four days ago.
Naturally, that torpedoed my intentions of getting the level editor working on time (though to be fair, I was already late even before I had to leave).

Getting the editor working is still my near-term goal, however (Followed by using the editor to create the city 'Hahdief', and being able to walk around inside it).

Anyway, to ease back into development (after a very necessary 2-day rest from the exhausting trip), I've made a little bit of art in-between compiles and during programming breaks while resuming work on the editor. Here's the art I made:


Heavy stone fence:

(still needs a little work... I'm just noticing multiple flaws in it)

Tapestry / Mural / large-painting / whatever-it-is:

I deliberately made it rather simple in the perspective and layout of the scene (specifically on the simple 3-layers of the trees), because some older medieval paintings and tapestries were like that, before art advanced enough for people to properly understand things like perspectives and proper use of lighting. Or whatever - I'm as much of an art historian than I am an artist (hint: I'm neither).

I drew the people with pencil, and scanned them, then digitally colored them and added them to the digitally-drawn trees and etc...

The tapestry (or whatever it is - it looks more like a giant painting then a tapestry, but I guess it could pass for a mural)... The tapestry is meant to be in two pieces, probably flanking a large doorway in either the king's castle or a Lord's manor in one of the larger cities.

Garden pottery vases:

I made these vases today in the past two hours. Cheap developer that I am, I (quite clearly) made four vases and just recolored them a dozen times. Development on a budget.

Anyway, it feels good to be back in action working on code and art. Hope all y'all's projects are coming along well!

Creating and deleting area chunks

Making heavy progress, but still a ways out from actually meeting my milestone of walking around the game world.

Here's the scene where you can edit the areas at a 'chunk' level instead of at a 'tile' level. (Recap: Areas are made up of Chunks which are made up of 20 by 20 tile layers)

Creation and deletion of chunks fully work, as does deleting rows and columns (I'm deleting a row in the screenshot above).
Copy+Pasting doesn't work yet, but the logic is already there. Inserting rows don't yet work either, but they should be a relatively simple addition since deleting rows do the opposite and are already working (it has to move all the chunks around - which really just renames their folder).

Each square will eventually show a mini-map of the chunk, instead of a solid color (remember that each one of those beige squares represent 20 by 20 tiles - though in this case, they're all empty). The red border on one chunk indicates that it's the 'origin' chunk - chunk (0,0) in the area. Anything within an 'area' is seamlessly loaded when moving around. Only teleporting between 'areas' causes loading, and even that takes less than a second (fade-out, fade-in, keep playing). The logic for moving between areas hasn't been added yet.

The panel with the colored buttons (which has actually changed a little since that screenshot with new buttons, see next screenshot) will eventually be moved into one of those side-tabs around the edges of the screen. Those tabs will be context-sensitive - whichever page you're on (Tile Editing, Gui Editing, Rect Editing, or Chunk Editing (this page)), it'll only show the tabs that are beneficial to that page.

Here's a full screenshot including the IDE:

The last three or four days have been very productive. To compensate for this unfounded and unscheduled productivity, I have to take the next three days off to assist family members with some grunt work at their house.

Yes, grunt work! Apparently they didn't get the memo that I've spec-ed in programming, not weightlifting. Jokes partially aside, I've actually put a few points into construction and electrical work over the years, and can hold my own when it comes to Electrimagical Powered Tools like "+5 Crowbars of Prying" and stuff.

Hopefully I'll be able to continue making progress when I return.

I've started playing 'Superbrothers: Swords and Sworcery', so far I'm not impressed. I bet the iPad version is probably funner, but so far the (PC version) game just moves along too slowly for me.
Hopefully I get my Spyparty invite soon - I registered over a year ago .

Servant of the Lord

Servant of the Lord


Treasure Adventure Game

Hey all, I'm making (slow) progress on AdventureFar. Won't be able to get the game editor (and thus the first town) done by the 15th as hoped.
I am making progress, but my programming time has been constrained slightly for the past week (but that will return to normal in a few more days).

Anyway, I'm just dropping in to point out this great freeware indie game I found called 'Treasure Adventure Game '. Despite it's very simplistic title, this Open World + Side scrolling + Zelda-esqe feeling game is very very good. The gameplay is fun, and despite all appearances of a cookie-cutter plot, it had several good plot twists and a rather consistent tied-together world.
I highly recommend this game.

Also, while plugging things, I might as well re-plug my friend's daughter's webcomic, Patchwork Magic. Whereas I live in a much-more urban area (Kansas City is really large), they live about three hours out on a farm (that I've probably visited a dozen times since I moved to the midwest). They're originally city-folk also, so it's funny how excited they get about farm-related stuff.

I highly-biasedly recommend this webcomic, seeing that I put the site together for her (*cough* wordpress *cough* [size=2]I ain't a web developer).
Now if I could only get people to pay me to plug their stuff...

I'll post a small entry about the editor status in AdventureFar in 10 days or so, with an (new/revised) estimation of how long the editor will take to complete.
  • 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!