REmapper Update 2

Another update adding CTF modes with flags and bases and some wip around flavouring

Repo hexylena/remapper
Post as of
Tags gamedev,mapgen


Interesting feature added was the ability to run CTFs on the maps. After the success of N-way mirroring it was clear that CTF features should be added. This was implemented as “bases” that changed their team affiliation based upon their orientation. Due to the fact that mirroring rotates things 4 ways, we’re somewhat ensured of having one of each base. In (future) maps we’ll have to worry about ensuring that all directions are covered and with reasonable spatial displacement.

A cut-away view of the space station flag room. Decided to provide some cover down the hallways while the flag is being stolen. The space version is quite large and provides a nice small area for CQB.

'Spacestation' flag room
'Spacestation' flag room

The castle version is much smaller. Not very exciting. Again using walls for protection down (possibly) long straight hallways.

'Castle' flag room
'Castle' flag room

In both cases the flag is placed via some rather ugly code. Should refactor this at some point.

# Calculate the appropriate offset for where the flag
# should be placed. Here it is placed in the center of
# the current position and slightly above.
offset = self.pos + TILE_CENTER + ABOVE_FINE

# Change team color based on orientation
if self.orientation == NORTH:
    flag = TeamFlag(xyz=offset, team=1)
elif self.orientation == SOUTH:
    flag = TeamFlag(xyz=offset, team=2)
elif self.orientation == EAST:
    flag = TeamFlag(xyz=offset, team=3)
elif self.orientation == WEST:
    flag = TeamFlag(xyz=offset, team=4)

The voxel files encode the “team” affiliation and will be replaced with the appropriate color.

# A small hook that, given a color from a voxel
# in the input file, returns the appropriate texture.
def colour_to_texture(self, r, g, b):
    # If it is bright red, then we do something special
    # and override the r/g/b values.
    if (r, g, b) == (1, 0, 0):
        if self.orientation == NORTH:
            r = 0
            g = 0
            b = 1
        # ...
    return TEXMAN.get_colour(r, g, b)

Not perfect but functional.

World Flavors

Trying to implement some sort of “themeing” on the maps. Unfortunately everything is awful. Some variables are stored in the map itself (yay!) however these seem to be completely ignored. The rest of the variables are stored for every map in server-level variables. This makes everything awful since we can’t have differences per-map. TODO: explore use of .cfg file to append variables. This works when it is just me, but may not be functional in multi-user environments.

Some work-in-progress flavors that can be mixed and matched depending on the map theme

Flavor Description
crushed_blacks Shadows are black instead of dark grey/blue.
maliwan Maliwan-like weapons. Shotguns which cause bleed damage, snipers with electrical damage, that sort of insanity.
space_station A space like environment. Unlimited impulse, impulse can be used mid-air, and gravity is set to 0.


After watching some Assassins Creed: Origins it was clear that the city shown was highly regular, on a rectangular grid (more or less) and with rectangular buildings (mostly.)

Wallpaper of AC:O, source unknown
Wallpaper of AC:O, source unknown

This should surely be easy to re-create… but there is a complication, all units should be “grounded”, something currently not done in any maps. So the algorithm has be re-implemented from scratch.

Made some basic assets ahead of time since I was feeling a bit creative.

Small sphinx statue
A small sphinx statue
A large-ish 'human' statue
A large-ish 'human' statue
A gate asset
A gate asset
A bridge segment, meant to be combined with other bridge segments
A bridge segment, meant to be combined with other bridge segments