Win32Transition

From Seven Kingdoms

Jump to: navigation, search

Contents

DirectDraw

Replaced with SDL Video
See the game video page

Notes: We want to be able to have support for windowed modes, wide-screen monitors, and video acceleration for modern video cards. The original assembly code should be replaced.

Windowed support is available now. Assembly code is mostly ready. The rest is TODO.

DirectSound

Replaced with OpenAL
See the game audio page

SDL_Audio could also be supported just in case OpenAL is not available on some platforms.

Notes: The game does have a small degree of positional audio. Need mixing capabilities too.

DirectPlay

Replace with custom sockets code
See the game multiplayer page
See one proposal of a new network protocol

Notes: IMMPLAY, by I-Magic, is buggy and unavailable. DPlay in 2.13.xx seems to be okay, but since it is deprecated by Microsoft, it has to removed no matter what. To maintain this long term, a really good look is needed. A redesign could make some amazing things possible. This will not just be socket coding, but much more. Most of the time spent will be designing how the game communicates at a high level rather which network lib we go with.

The game in single player mode will display popups and pause the game. In single player mode, you can give orders to your units when paused. These features need to be handled correctly as before in the new multiplayer code.

DPlay dependencies

mp_obj (class MultiPlayerDP)
remote uses mp_obj (class Remote)
ec_remote uses mp_obj (class ErrorControl)
IMMPLAY.h uses mp_obj (unused for us)

Orphans

MPTYPE.h aliases mp_obj for DPlay or I'Magic lib
crc_store (class CrcStore)
crc8 function (used across many objects--see OMP_CRC.cpp)
RemoteMsg class
RemoteQueue class
VgaLock?

DirectInput

Replaced with SDL Input
See the game input page

A rewrite will need to be done.

File I/O

Replace with SDL I/O, standard C/C++ I/O, or boost?

Notes: The game needs to be able to understand path structures of Unix and modern Windows. The current code won't cut it.

Currently the game is ported to linux and more systems. It is still pretty bad.

Active Movie

DISABLED!

Replace with custom/independent implementation.

Notes: This is a rather low priority change. There is only one video, and it can't be distributed with the GPLed game. Only people that purchase the Enlight sanctioned version will see it. The video is AVI, so a very basic SDL implementation will work. We should not depend on any external player systems as these are usually platform specific, and it would be good not to depend on any additional libraries.

Additional areas to cleanup

Mem Class

We are not going to rewrite this. Improve upon this, clean it up as necessary.

Logging Class

We don't know how the original game developers used this. It does compile. We are discussing adding a new system.

Win32 Primitives

The typical win32 primitives (DWORD, LONG, UINT, WORD...) should be changed to their portable types--or at least have a compatibility header during transition.

Compile flags

"DEBUG*", "BETA", old LOG stuff

This is very low on the list, but when we write new debugging facilities, we may just clean most of this out. Right now the3dfxdude is looking for interesting hacks.

"DEMO"

Scrap it.

"!AMPLUS"

AMPLUS should be made default, and the rest scrapped.