Friday, July 25, 2014

Designing NES Trivia

As I have said before, and have heard other people say as well, trivia is a trivial game to create. It consists of a set number of rounds. Each round has a question presented to the player with the player choosing the answer from one of a set number of answers. Once the player selects his or her choice, they are told if they are correct and an explanation of the correct answer is given.

This can be represented by a fairly simple data structure:
0..1 Pointer to label for the question string
2..3 Pointer to question string
4..5 Pointer to first (0) answer
6..7 Pointer to second (1) answer
8..9 Pointer to third (2) answer
10..11 Pointer to fourth (3) answer
12..13 Pointer to explanation
14..15 Correct answer number

The correct answer number only needs a single byte but uses a pair of bytes for the simple reason that this makes the structure 16 bytes. Powers of 2 are always nice to have as that allows you to take advantage of the bit-shifting operations instead of using more costly multiplication. When you consider that the 6502 does not have multiplication instructions, meaning that software multiplication needs to be done, this is a very important consideration. The actual implementation of a question looks like this:

.dw q1_label, q1_question
.dw q1_answer0, q1_answer1, q1_answer2, q1_answer3
.dw q1_explanation, 2
; additional question info structures follow this...
; then we have the actual string data
q1_label: .db "One",0
q1_question: .db "The original Japanese version "
.db "of the NES was called?",0
q1_answer0: .db "Nintendo Entertainment System",0
q1_answer1: .db "Adam",0
q1_answer2: .db "Nintendo Family Computer",0
q1_answer3: .db "Nintendo Advanced Video System",0
q1_explanation: .db "The Nintendo Family Computer "
.db "became better known by the short"
.db "name: Famicom.",0

You will notice that strings are specially formatted to take advantage of the fact that the lines are 32 characters long. Extra space characters are added to fill out lines when necessary. While it would certainly be possible to write code to do the formatting for us, for this first version it is not necessary. The decision to write formatting code will depend on how much storage space is wasted by extra characters for formatting. When we get to the point where code to format text will take significantly less memory than will be saved by embedding formatting into the strings then it will be worth writing the code.

The game itself consists of three separate screens. The title screen and results screen are simple text displays with nothing special about them. The main game screen is fairly simple as well but has three separate phases of operation. The first phase displays the question and answers. The second phase has the user moving a pointer between the four different answers and determining which answer the user has selected. The final phase is determining the results of the user selection and displaying them as well as the explanation. Development starts with getting the game screen to work. Once it is working the game can be completed by adding the title and results screens. That is what we will be focusing on after next month's postmortem.

Friday, July 18, 2014

RPG Maker VX Ace Review

Sorry for not posting last week. Here is my review of RPG Maker VX Ace. It is a fairly long review which is broken into good, bad and ugly sections.

The Good

I actually consider this to be a really good program that I would gladly use to develop games in if it were not for the items in the ugly section. Before I get to the ugly points, lets first look at where the program excels.

Map Editor

When you consider that RPGs consist of multiple maps it is important that you have a decent map editor. Thankfully the map editor is very nice. It is tile based with each map having a tile-set that the map is made of. Tile-sets are made up of one or more image files. It is possible to share images between tile-sets which can reduce the number of necessary image files.

My favorite feature of the map editor is smart tiles. These tiles work by looking at the surrounding tiles and choosing the appropriate tile. For example, let's say you were adding a 4x4 tile rug to a room. The corners and edges would become the appropriate border pattern while the centre four tiles are the mid-carpet image.

The map supports multiple layers. Essentially you have your floor/wall layer which various decoration tiles can be placed over top of. This allows you to have things such as walls that have pictures on them or tables and chairs in the middle of the room. Tiles have three states of enterability. They can be solid, appear over the player or appear under the player. Each tile can also have an event placed on it. Events can have their own sprite and have scripts attached to them. I will cover events in more detail in the scripting section.


The database holds all the actors, classes, skills, weapons, armours, enemies, troops, states, tile sets, common events, system, and terms that the game uses. Editing these is what makes your game unique. There is a default starting database that is set up for your typical fantasy game. If you are not developing a fantasy game or want to create an original game then you will pretty much want to get rid of most of the stuff in the database and start from scratch.

Database pages generally give you a list of all the items in that category. The number of items in a category is set to a certain number of entries, but those can be changed to however many items you need. Each item then has a simple to fill out form making creating and editing items very simple.


The power of any game engine is largely dependent on how good the scripting system is. There are two parts to this factor. The actual language(s) the engine supports and how much the API for the game lets the player control the engine.

Language-wise RPG Maker VX Ace uses the Ruby language. This is a very flexible and powerful language but not something easy for a first-time programmer to grasp. To allow non-programmers the ability to create scripts, the program also offers a menu-based scripting language. This is a fairly easy to use language where you assemble commands based on typical RPG actions and fill out dialog boxes with the details of what you want to do. There is enough actions that you can accomplish most game tasks.

For those going with Ruby, which I never did for First, you have access to an API that gives you access to pretty much everything you would want to do with the engine and even gives you access to the windows API giving you a lot of power if you absolutely need it.

The Bad

While this is a great tool, there are some rough edges.

Database dependencies

While the database is nice to use, there is one really annoying thing about it. Many categories of items depend on items in other categories. If you are creating an encounter in the troops tab, you need to make sure the monsters have already been created. The monsters need to have skills and items set, and so on. What I would have liked to have seen is the option to create a new required skill or item on the fly so that when creating something you are not jumping back and forth between tabs.


I covered the packaging issue in my postmortem of my first RPG Maker game. The tool for creating a distributable package does not analyze your game for the assets that are actually used but instead includes all the files in the resource manager. This means you need to manually remove any items your game does not need otherwise it will be included in the distribution. If you are doing a total conversion, this may not be that bad as you can start by removing everything and only adding back what items you need but this is still a lot of work that could have easily been automated.


The documentation that comes with the package is kind of sparse. It covers the basics of the tool and has an API reference for Ruby programmers. It has no tutorials on how to use the game nor any explanation of how the stats in the default database work. To find answers to these questions requires searching forums or delving into the ruby code and spending hours looking through the database to piece how things work. There are some really good RPG Maker VX Ace tutorials on the internet, which you really should go through before using the tool for the first time, but nothing with the package.

The Ugly

None of the bad items above are enough to deter most people from using the tool. I would too, but there are three issues that prevent me from doing so.


The game resolution is really ancient. Anybody who has played a RPG Maker game probably has noticed the small window that the game is played in. While it is possible to get past this limitation by liberal use of Ruby scripting and Windows API calls, this would be a huge amount of work. I am hoping that if there is another version of RPG Maker released that it will at a minimum address this issue. Possibly by supporting different resolutions of tile-images though even the simple solution of scaling tiles would be sufficient for many people. If RPG Maker VX Ace had proper support for HD resolutions then I would probably be developing a commercial game in it right now despite the other two ugly items.

Windows only

Having used cross-platform languages for over a decade, I really don’t understand why developers still release tools that only create stuff that will run on Windows. Windows is such a large base that this is not an outright killer, but when combined with the resolution limitations makes it so for me. Minimally I would like to have the ability to export games to OSX and Linux. Ideally support for tables as well. Even if you had to pay extra for the ability to port to different platforms, this would be a great feature to have.

DLC Licensing

One thought that I had was to simply use RPG Maker as a prototyping tool and then find a way of exporting everything to another engine that overcame the resolution and platform limitations of the tool. Making this much more complicated is the fact that all the built-in graphics as well as most of the DLC theme packs are licensed only for use if the game is published as an RPG Maker game. As most of the DLC packs that have this limitation don’t explicitly mention this until after you have bought/downloaded them, this is exceedingly annoying. While this deters people from jumping ship to a different tool, it also prevents people from using the tool. This is unfortunate as it would be a great prototyping tool even without proper export commands.


While I would not rule out using RPG Maker VX Pro as a prototyping tool, I would make sure I did so by making sure all the music and artwork used was my own (or licensed for use outside of RPG Maker). It is a really good tool but the resolution and lack of cross-platform capabilities makes it unsuitable for my needs. I am really hoping that a new version that addresses at least one of the above issues is released soon as I would quickly grab that tool.

Friday, July 4, 2014

"First" postmortem

It is time for my Postmortem of the game that was recently released on Blazing Games. This game is called First as it is my first attempt at creating a game using RPG Maker VX Ace.

What Went Right

It is usually, if not always, wise to have a plan B. When the RPG Maker game competition was announced I knew I was going to attempt to create a game for it. A game that had a chance of winning would require a large time commitment so my plan if I was unable to finish was to forgo the contest and release my first RPG Maker game for July’s game. My first RPG Maker game was created months ago so it was ineligible for the contest. As the Blazing Games release for this month is my first RPG Maker project it is clear I never had enough time to finish the planned game. This was not a result of the game being over-ambitious but was a result of not having anywhere near the amount of spare time as expected. One thing you should always remember when scheduling projects is that unforeseen events (and for that matter, problems) will happen. In this case, the real game was roughed out but needed a lot of polishing before it could be considered a contender. With only a week before the competition deadline a decision on whether to reduce the amount of polish or go with my first RPG Maker project was in order. Had I known my Canada Day plans were going to be rained out, the choice would have been different.

The First game consisted of the player's home, the island map, and the Kobold cave. I quickly came up with a story, added the town and the related buildings, and modified the cave to fit the story. It is still a very simple game but still an entertaining fifteen minutes.

Mixed Blessings

RPG Maker VX Ace is actually a fairly nice tool. There is too much to discuss here so will discuss the tool next week. Using an existing engine saves you a lot of work at the cost of flexibility. While the scripting engine is very flexible and powerful, it is still a huge  amount of work to create a game that is vastly different from the base game that the engine was designed for. This has the unfortunate result that many RPG Maker games feel the same. This problem is true of other game engines, such as Unity and Unreal, as well. If you want your game to stand out, a lot of effort is required even if you are using an existing engine.

What Went Wrong

The biggest issue with the game is the size of the zip file. The reason for this huge file is simply that RPG Maker includes all the files in the resource manager even if they are not being used. This means that in order to get a smaller distribution file you need to manually remove the files that aren't needed. As I had expected RPG Maker to do this for me, no time was allocated for this task. Making this task trickier is the fact that I have very little idea as to which files are needed. Once you have worked with RPG Maker for a while this will probably be less of an issue. Of course, it is also possible that there is a way to get RPG Maker to do this work for you but I simply didn’t figure out how to.

Next week I will go over my thoughts on the RPG Maker VX Ace tool.