Saturday 29 June 2013

Creating content

It's easy to create content for Asciilands. How easy? The maps are simply text files. The tiles are arranged in one and the scenery pieces (trees, wall cracks, pole under bridge) are placed in the other. Look at this:


The screenshot above is rendered from the following text file (actual visible land highlighted in red):


It's elongated vertically because the characters are not as square as the tiles. yes, this makes it rather hard to develop. If anyone knows of a good, square, monospaced font, please let me know in the comments.
Here is a closer look exclusively at the area of interest:


As you can see, 'g' is grass, 'c' is cliffs, 's' is sand, 'w' is water, 't' is the top of the wall and 'f' is the front of the wall. A capital letter gives a darkened version of the tile to help with the communication of depth and (maybe) shadows under certain circumstances (like under the bridge).

Of course, once the text files have been created, they are merely a key that must be given meaning programatically; have the letters paired to pre-made tile designs and such but once you've created a key to link the objects and tiles to the letters used in the files, modifying the maps and moving things around becomes much simpler than actually making the maps in code.

I'm currently working on a way to make the scenery maps more efficient to use so I won't show an example of one of those until it's finished. The problem being that since the map generator simply ignores characters which appear in the text file and NOT the key, you can use the tile map as the basis for the scenery map and just add the scenery items over the top (to more easily see where they will end up) but if you then alter the tile layer, you can't just paste the changes into the scenery map.

The best thing about this approach to map making is that the community can easily create maps. A pair of huge text files can be submitted with a list of what letters should correspond with what tile types from which tileset etc and they can very easily be added to the game. Currently interactive objects need to be created in code and located in code but as I work more on the parsing tools, the details of these items could become as easy to create and place in a map text file.

Another thing is that an idea Uli and I were discussing was the idea of having something called something like "the cartographer device" which would allow you to simply download the map's text file. Breaking the fourth wall like that appeals to me as a concept since game wikis often tend to feature data accessed by opening games' inner files.

Dunno, all just ideas.

In other news, the following engine improvements mentioned in the last post have been further improved upon, animated sprite have now been added (so a fire sprite now makes sense) and I've been working on making the engine a little more conducive to the last bits of functionality extension before creating content will really begin!

One last screen-shot showing a recent mechanic addition:


Lucky the Light Wand was created the same day as the map overlay system! This is exciting for this reason: it is a collectible object that interacts with the environment; one more step into true game-ness.

PS. If anyone wants to have a crack at putting letters in a txt file, I'll put tiles to them and show your map in the next post. Just an offer.

Sunday 23 June 2013

Proper update soon

I'll be doing a proper post again soon, this is just a quick one so I can share something that was rather exciting to me.
Recent advances in the engine have been:
  • Collectible items and player inventory / wallet
  • Moving objects (basis for enemies and NPCs)
    • Different movement behaviors (because absolute random movement is awful)
    • Option to interact among themselves (objects picking up collectible objects or pushing pushable objects)
  • Control handling optimisation
I spent pretty much the entire weekend rebuilding the way input is interpreted which is surprising more complex than I had imagined; how do you handle a situation like [up arrow down] -> [right arrow down] -> [up arrow up] -> [left arrow down] -> [left arrow up]? The player should now be moving right and all other instructions should have either ceased or been ignored but this is not so simple especially when JS interprets a held key to be repeating constantly. It's a typhoon of key input and the filtration is hell if preventing controller latency is your goal.
It's in a good place now and I feel like it only required minor improvement but this isn't so interesting to you guys since you can't play with it yet to feel the effects of the change.

What I was going to share was this: it's a screenshot I took this morning on the train after I accidentally introduced a [now fixed] bug into the teleporter code.
The only reason this was so exciting to me is because it so resembles the "storm-of-unwanted-tiles-from-the-sprite-cache" style bugs from the NES era:
See what I mean? No? Oh well, I liked it.

Sunday 16 June 2013

What is Asciilands?

What is Asciilands?

Asciilands will be, in essence, an open-world RPG with fairly accessible tools for creating content like maps, items, NPCs and story devices. This will mean we can roll out more and more fresh content or accept community created content and add it right into the game (perhaps with a little tweaking).

All graphics will be created using Unicode characters Lucida Console. Tiles will be three characters wide and two characters high meaning that at font size 13, the tiles will be 26 by 28 pixels. This is, we believe, acceptably close to a square-based grid. All that will be used to convey things graphically are characters, font background and font foreground colours.

The interface itself will consist of a number of windows or "panels" which will have various pieces of information about where you are, what you're doing etc.
Just as an example, if a player finds a sign in the map and reads it, the "Text" panel will be where the sign is read to.

This is hard to explain; screenshot required!


This screenshot is from the latest test build of the game. The player is in the center of the map and has just bumped into the sign which then displayed the text in the "Text" panel. This is how many of the game mechanics will work; you navigate with the map and "know everything else" by getting information from the panels which will come and go when they have something valuable to tell you or whatever.

Just ignore the debug panel; that's just used to help me get valuable information from the terrifying depths of code.

The ascii style graphics are also visible in the screenshot; what is not, however, is the subtle animation applied to most of the tiles.

Grass, sand and water tiles all oscillate in a randomised way while the bricks stay static. This really makes the game world feel more alive. It helps the turn-based nature of the movement feel less player driven and more like the player is participating. As you're standing still, the grass blows and the sea's waves move around.

There are two types of tiles: Static tiles (like the bricks) which are all the same and don't change, and amorphous tiles (like the grass and sea) which randomly generate themselves using a set of characters (i.e., W, w, V and v for the grass).

Scenery objects like the trees and walls from the bricks are made in a different way and help add a bit of character to the landscape.

The most recent additions at this point are objects in the map which can be interacted with. At this time, those interactions are teleporters (for doorways or portals), pushable objects (like those bricks, they can be moved around and have the same clipping rules as the player), collectible objects (behave as one might assume) and text objects (like the sign) which how the player some text when they interact with it.
The creation of new objects and new ways to interact with objects will be a primary focus going forward as this will be the cornerstone of all the game's mechanics!

One of the most major design challenges experienced by Uli and myself whilst trying to create maps is the quandary of how to create a sense of three dimensional land in a flat, square grid with only only ascii characters to represent what we need.

Obviously a screenshot of this problem is required:
Pictures is the section of the map (dubbed "the bluffs") where I felt out the solution to this problem. It's difficult to make clear but pictured is two raised areas of grass connected by a bridge. South of the player is a snaking wall.
The hardest part is communicating to the player that those brown surfaces are vertical and you can't simply walk over to them. That wooden pole is perpendicular to the sand and is connected to the underside of that wooden platform. The solution, as it stands, lies in using two different shades of the vertical surface. Each time the vertical surface changes "depth", the shade changes two. This communicates that it's the same surface (as it is the same colour and the same texture) but it's on a different level (as it is a different shade). It also creates vertical lines down the divide to help to separate the different depths of the same surface.

A simple play-test done on a few people consisted of instructing them to walk across the bridge. I knew I was getting closer to the solution when they stopped immediately trying to walk over the brown surfaces as if they were mud.

This pattern of changing shade and some creative use of the map-making tools will hopefully allow us to create maps which can be visually understood. Players should become better at understanding the landscapes as the various visual cues are reinforced.

The following is a screenshot of inside that cave where you can see more of the shade-swapping in action:

Do you feel like the depth cues are working? Are they clearer after they are explained? Share your thoughts in the comments below.

I think that's enough for now, the core engine is close to being stable enough to really churn out some content. Next on the agenda is an inventory system then hopefully NPCs!

Friday 7 June 2013

Welcome!

Welcome to the Asciilands dev blog!

Asciilands is an ongoing project that I initiated in order to fulfill a number of goals.  Asciilands will be a browser based ascii RPG with (hopefully) some MMO elements.
The goals of  Asciilands development are as follows:

Goal 1: Teach my friends some code

When I was in highschool, my friend Julian taught me the basics of writing programs frot the TI-83+ graphics calculator. Immediately, a seemingly unapproachable world, the world of programming, had become a whole lot more approachable and I wrote basic little applications and games for the rest of my time a highschool and a little bit beyond. I wanted more but didn't know how to advance my extremely basic skill-set. When my brother saw me trying to teach myself C++ from online tutorials, he suggested maybe I should study programming. I had enrolled and was working on my first projects the next week and I haven't looked back.

Julian, who taught me on the TI-83+, is now working on some of the NPC interaction components for Asciilands and intends to continue working on more advanced additions as his skill-set and the Asciilands project continue to develop.

Banj is also along for the ride. He'd expressed an interest in learning some code so he'll be learning by making additions also.

One of the design goals that I am making every effort to adhere to is to ensure Asciilands continues to be open to additional content. This means that as Banj and Julian progress in their understanding and grasp of PHP, JavaScript, AJAX, HTML and CSS, they can add all kinds of features and systems of varying complexity and have them easily integrated.


Goal 2: Give back to the freeware community

I've always loved high quality freeware games. The fact that they are free, gifts to the community, makes them so much more special. I'm a huge fan of the works of Derek Yu, Kenta Cho, Pixel, Cactus Squid and many other freeware developers producing high quality work and not expecting a cent for their efforts.

Over the years, I have derived a huge amount of joy from these games but I also feel like I have incurred a debt. A debt that I've always been very keen to repay with something that others may enjoy. The beautiful pool of freeware must be added to in order to keep it alive and nothing poisons charlatan "freeware" more wholly than pay-to-win, micro-transactions, gold accounts or  members only areas.

For this reason I make this pledge:
I never intend to make any money from Asciilands. The most you'll ever see is potentially the ability to donate without reward just to cover the cost of hosting the site or other expenses. I think hoping to break even is fair enough but there will be no buying items, in-game currency or any other advantage for anyone willing to pay money. I want that to be clear.


Goal 3: Make an awesome game

Who doesn't want to make an awesome game? With video games being such a big part of my life growing up and such a strong entertainment and story-telling medium, I, like many others, have many ideas that I want to put into a game both in terms of narrative and mechanics.

Thankyou for your interest in the  Asciilands project. I intend to keep this blog updated with progress reports, development milestones and other general ideas etc. I'll be posting some more meaty content soon so keep an eye on the  Asciilands dev blog!