Samstag, 19. Dezember 2015

CamoTactics: Editor, Map Previewer, Skill System

 This is a more technical article discussing the recent features I implemented in the last three months.

I'm happy to be back, developing this game. So let's talk about some of the recent things I have been working on: editor implementation, database changes, improvements to the skill system, and other technical things, which I explain in more detail.

Editor Implementation: Create your own data!

I've been working on an editor implementation, that currently works as a proof of concept. Some objects are a pain to edit manually and having a visual and idiot-proof interface to do that is nice to have.

It's capable of fully automatically creating a display component using properties information defining how a class should be displayed (like a Weapon in the picture to the left). For example, hit points are being displayed as spinner component with a range limit from zero to infinity: that means you cannot enter values below zero. For defining projectile IDs (that specify the caliber of a weapon), an ID editor helps choosing one valid projectile by getting all projectiles currently existing in the database.

The method of fully automatically generating a display component like this can also be used to display objects in the GUI, due to its modular nature and compability between frameworks. Spares me to create info screens manually!

Database Improvements: I don't care what framework you're on!

All data is now saved in binary or JSON files. The database managing sprite sheets is now compatible across different frameworks (libgdx as used by the game, java swing as used by the editor). The game will know what type of images are needed and loads the correct image classes. What files (that means, image, binaries or JSON files) should be loaded is freely configurable, too, which will be a paradise for modders.

I am also working on controller bindings so I can implement gamepad support and changable controls.

Skill System: All your perks are belong to me!

The skill system got a redo as well, going from a purely mathematical/formula approach to a more "perk-based" or percentual approach. A test setup of this you can see below. The output consist of total experience, the current experience in this level, followed by a list of skills or properties.

The plan is to make it possible to train skills by using them and degrade them if you don't. The effectivity of all skills improve as you level up.

Let's take the first property as example:

"Hitpoints [100]: 142 - 21%" 

It's basically interpreted as:

Attribute [BaseValue]: CurrentValue - Skill%

Hit points are affected by a skill called "Hard as a Rock", which is 21%. So if you are Lieutnant rank with 21% of this skill (which isn't much at all), you will have ~142 hit points available. The BaseValue is multiplied with Skill% and then calculated together with the rank of your character. If you level it up enough by taking damage and killing enemies in melee, your hit points can increase up to 500 and more.

Map Previewer: Hello world!

A while ago I created small, tile-based engine in Java Swing out of boredom. Turns out it can be used to preview and plan out CampTactics maps!


It is very handy for two reasons:

  1. It uses the same tile scale, so it can be directly compared with a CamoTactics map, and
  2. Prototype maps are fast and easily created using a simple image editor (like MS Paint). That has its advantages, since creating prototype maps with the map editor Tiled gets tedious and time consuming after a while.
Like this, I just set up a so called color key that maps one color to a texure. Who would have thought this little engine would be so useful! :)

Next week, I'm going to work on the visual stuff a bit more and (if I have something to show) make a lot of screenshots!

Keine Kommentare:

Kommentar veröffentlichen