xRpgMaker Development Log, Day 1

Game development specific discussions.
Post Reply
xywhsoft
Posts: 74
Joined: Aug 28, 2009 6:28
Contact:

xRpgMaker Development Log, Day 1

Post by xywhsoft »

This series of posts is used to document my process of developing a full game, and my thoughts during the development process, and is used to provide a reference for those who develop games.
It's the equivalent of a live stream of sorts, and it's always a great way to absorb some of the lessons learned from watching something come together from nothing.





Day 1

I examined RPG Maker XP in detail, and although I had previous experience with most RPG Maker versions, since I was going to be replicating one, I needed to know more about it.
There are times when replication is more difficult than forward development, but one advantage of replicating RPG Maker XP is the ability to use the material he provides, in a fixed format, and his system is so well developed that being able to access it is more important than developing an RPG game creation tool from scratch, which is why I did it.

RPG Maker consists of the following main components.
1. maps
2. events
3. database
4. scripts

I could have started with scripting, especially on a scenario-by-scenario basis, which would have seemed like I was moving fast, but when I got to the map scenario, the game was almost all crammed in at once, and I would have had a full schedule ahead of me, and having to develop the whole system while developing each component would have created a shaky foundation, so that was the first idea I ruled out.
Events must also be ruled out, because it has to be built on the basis of already having a complete game.
With the database, I would not feel any progress up front, so I ruled him out at first as well.
Maps were a good choice, I had experience with map editors, and more than one, or even more than one type of map editor, and it translated quickly into project progress.

So as a matter of course, I started coding and defining the data structure, referring to RPG Maker XP while doing so. The games developed by the RPG Maker series can't be considered very good, so the data structure I won't exactly replicate, but will be modified according to my ideas.

Now I have a problem.

To implement a normal map editor, I would normally package thousands, or even hundreds of thousands of Tiles, assign them an ID, and then make properties corresponding to the Tile, but RPG Maker's Tiles exist in the form of TileSet and AutoTile, and I have to create a new data structure to describe them.

And such a structure is not good for storing ...... If I make a variable data structure, then I have to write extra code to merge these data and address them correctly when loading, which will make development more difficult and more unstable, and I want to say NO to this way!

But the size of TileSet is not fixed, I can't put a limit on him because of that, data alignment is not a problem for scripting languages, because many of them are built on a data table, but for compiled languages, the problem is serious ......

I opened the database of RPG Maker XP and studied the TileSet interface for about an hour, during which I proposed many options and rejected them one by one.

Perhaps the idea was caught in a dead end, I never noticed that Tile is loaded from one file to another, then I can completely split the functionality of the TiltSet interface, where the TileSet pass information and other data, saved in the same location as the TileSet image, loaded by adding a new file suffix to read this information, and the TiltSet itself data structure, it only remains: name, TileSet file, AutoTile file path (7 in total), background image, fog image, battle background.

Now I can produce an aligned data structure.

Of course, this forced me, to start the development from the database, because I needed to create the complete database of TileSet first, before I could develop the map editor.

Well, I ran into a new trouble, and it was a question of technology selection.

What do I want to use to develop the database manager?

The options are: FreeBasic + xGui, FreeBasic + xui, C++ + DirectUI, C#

FreeBasic has to be the preferred option as he is my main language, but I must admit that FreeBasic is too weak in developing interfaces.

C++ and C# I am equally good at, especially C# has strong application development skills and is perfect for developing this kind of data management tool, but C# is not perfect either, his interoperability with the data formats written in FreeBasic means that many classes, many codes I have to write twice, because the two do not communicate at all at the ABI level.

C++ and FreeBasic are indeed ABI-compatible, and I can compile a DLL for C++ without worrying that one of my expressions C++ or FreeBasic doesn't support, both are almost identical, but having said that my xui counts as a kind of simplified DirectUI engine, and since I've already set up a project xui, and even renamed my previously written xui to xGui for that purpose, it's important to make xui stand up to the challenge when it counts.

The options turned out to be a competition between xui, which is the game UI system built into XGE, and xGui, which came from my packaging of the Win32SDK many years ago.

I finally chose xui. Win32SDK also takes extra time to develop custom controls, and I wanted to keep that time for upgrading xui, so I chose the most difficult route, and the riskiest, so I hope I chose the right one.

Right now XUI only has buttons, I observed RPG Maker's database editor interface, besides the buttons I have to develop new controls like StaticText, StaticImage, TextBox, ListBox, ComboBox, CheckListBox, Chart, ListView, etc. It will be a big project, but the good news is that when these controls are developed, XGE will benefit from them too, some of them will be built into XGE, and others will be published as source code.

The bad news is that my schedule will be extended.

So then it's time to start writing code. First I have to plan the project structure, which will allow me to stay in control of the code as the project gets bigger and bigger in the future.

Maybe in the future, but in the beginning I'll have to think more about what's available than what's good or bad, so I'll be splitting up a lot of features, implementing them separately using programming tools I'm good at, and eventually putting them together.

Currently there are three tentative projects.
Game Executor (responsible for running the final finished game)
Database editor (responsible for editing the game database)
Map Editor (responsible for editing map files)

All three are developed using FreeBasic, and some of their functions may be interoperable, so in the source code directory, I created the APP directory to store interoperable code, and the APP_DBEdit and APP_MapEdit directories to store code specific to these tools.

My work needs to start with the database editor, I will make the general interface first, the database editor of RPG Maker XP is composed of multiple tabs, in my case, it will become multiple scenes, one scene corresponds to one tab, and I will remove the two tabs of animation and public events, these functions will be handled using other editors.

First we create a GUI layout that all scenes will use to control the switching of tabs and scenes, this part of the coding only took a few minutes, the general effect of the first screenshot.

Image

After that I will face all kinds of difficulties, because xui only has button class controls, I have to reinvent the wheel and implement all kinds of controls all over again, it's late at night and I don't have much time, so I can only do the Static series controls today.

I won't go into details about this process, it doesn't belong to the category of technical work, it can only be considered manual work, writing simple logic and drawing code repeatedly.

When I finished the Frame and Label elements, finally the layout of the block interface could be supported, I used a button plus InputBox instead of an input box, it will work very well.

Image

Image

Comparison with RPG Maker XP after final implementation.



The source code has been uploaded to: https://github.com/CN-xLeaves/xRpgMaker
Imortis
Moderator
Posts: 1923
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: xRpgMaker Development Log, Day 1

Post by Imortis »

I remember your library from the first release, and was quite interested in it. I am excited to see this project move forward. Thanks for your work.
Post Reply