Week 5

The first month of work is ended and I have implemented the game demo.

 

The game demo is just advertisement intro, which consists of several game scenes.

To get this demo working I have implemented these opcodes:

  • GOTO – changes game scene
  • ZBUFFER – sets z coordinate
  • STOP – shows or hides cursor depending on first argument
  • BGSFX – sets fx id to background
  • ON – shows object
  • OFF – hides object
  • SET, PLAY – starts sprite playing.

Unfortunately, some opcodes aren’t implemented which leads to some problems in demo. These include END opcode and IMAGE opcode. IMAGE opcode actually isn’t needed. It is used because game script file always starts with heroes objects, which aren’t used.

Also, there is a problem with 8 bit BMP, because game uses a bit modified format, which leads to problem when scene changes to BMP, which isn’t actually loaded.

Next week I will polish the demo and start to implement dialogs, which are essentially needed for game. Most of scripts can’t be executed without it.

Week 4

This week I have ended implemeting settings menu, which wasn’t so hard to do, and started implemeting the game itself. For now it can start new game through startup menu and then play intro video which starts because of AVI opcode.

The next week, I plan to implement some opcodes, so the game can be continued after the intro video.

Week 3

At the third week I have implemented saveload menu and a bit of settings menu:

On the next week I will end working on settings menu and start implementing the first game scene.

Week 2

At the second week I have implemented playing intro videos and startup menu:

 

To got startup menu working I have implemented:

  • drawing subsystem
  • sound subsystem
  • cursor
  • parsing msk files

From msk files flic decoder gets sprite bounds.

I plan to implement save load menu at next week.

Week 1

he objective for first week was to implement reading script.dat file, which consists of serialized objects and scenes, including handlers and operations.

 

During the implementation I encountered a problem with ScummVm’s INIFile class.

The ini files in Red Comrades games are encoded using Windows CP-1251.

The problem is with this method

Because isAlnum function doesn’t support Windows CP-1251 codepage, it always returns false. As temporary workaround I have removed this function.

Another problem is that debugger can’t show those strings in readable way. To solve this problem I have decided to do transliteration.

During this week I have also implemented some opcodes.

For the next week I plan to implement playing intro videos. They are in avi format. I will do this very fast and will start to implement startup menu.

To get menu working I need to implement seven opcodes:

  • SET
  • HIDE
  • ZBUFFER
  • TOTALINIT
  • PASSIVE
  • MUSIC
  • IMAGE