Ultimate Space Commando (USC) is an old-school turn-based strategy game that focuses on actual field tactics as a small group of elite commandos become engaged in a deadly conflict with a yet unknown, but rather ravenous species of aliens. Make relevant strategic choices, develop tactics and equip your soldiers as you see fit, try to survive and give the aliens hell in the single-player Campaign. Build and customize 4-man squads to play various 'Single Missions', Scenarios and 'Defend the Base!' actions alone or in a hot-seat or TCP/IP multiplayer session with up to four players, either man vs. aliens, man vs. man or even mixed, with various objectives, official scoring system, and much more. A full-fledged and truly Random Map Generator makes every mission you play unique and challenging.
One of the key features of Ultimate Space Commando is the ability to play on fully random-generated maps in all game modes. Come, take a peek inside the making and "secret life" of the USC Random Map Generator!
Posted by AlizaWenders on Sep 12th, 2013
The purpose of the RMG
Ultimate Space Commando is a turn-based, top-down view tactical game. Maps are two-dimensional without elevational data, and are made up from square grids, with a standard (smallest) size map being 32x32 grids large. This is a somewhat optimal size for missions, which are generally designed to last 30-90 minutes based on difficulty and complexity. For the game to remain fresh and entertaining mission after mission--especially in Single Mission mode, where you can "farm" for points, crafting materials and prototypes endlessly and hone your skills to finally be able to storm the super-hard end-game difficulties--, we've had to come up with a solution that gives you freedom in means of "where to play" (repeating the same hand-built maps would be boring after a while), while still controlling difficulty and the ability to "officially" score your combat skills.
Also, the Campaign in USC is planned to be a non-linear one. The story will be generally set, of course, but the outcome of the whole Campaign and the set of missions you can choose from to progress in the story would very heavily depend on your strategic (inter-mission) choices and mission outcomes. For this to really work, we'd need a lot of maps. So it became much more efficient to create a ruleset-based Random Map Generator instead of building all needed maps by hand, grid by grid.
The USC RMG creates the maps in two distinct steps, actually. First the so-called "layout descriptor" is created. It is a compilation of mainly numeric parameters describing the general composition, content, restrictions, special elements, etc. of >a< map (out of almost infinite) created from this layout. It can control the position of the insertion zones and mission critical areas, set "there must be..." and "there mustn't be" rules, the number of various map elements, override general difficulty settings, and so on. Layout descriptors can be defined manually (editing a basically text file--for the plot Campaign missions or Scenarios we're doing this), BUT when the RMG is REALLY at work, even layout descriptors are randomly generated, constrained by mission objectives, difficulty settings, and user options. Using the same layout descriptor with a different random seed thus will result in a different, yet generally (functionally) the same map. This enables us to create a well-balanced Campaign while every playthrough is still different! Editing layout descriptors is also less time-consuming and more fun than creating every tile by hand--we plan to create a visual layout editor to be released to the public.
The actual map
After a layout is selected or generated, the actual RMG takes over. Based on the layout rules, it lays down corridors, rooms, special areas, places all objects, unique items, and all the other stuff. If there are only basic rules set in the layout, it can go wildly random, creating odd-shaped corridors, hard-to access rooms ("socks"), or gigantic open spaces. It is also responsible for the actual placement of the proper sprites, which, in the end, will result in a graphically polished map. A small paramater in the layout called the "map composition" adds even further diversity to maps. Maps can be either built with 2-grids wide "double walls", 1-grid wide "single walls", with extra "pillars" placed in open spaces resulting in more corridors and pathways, or in "board style", which is a generally different map layout where single walls separate rooms made of 4x4 open area chunks--a total twist in terms of usable tactics.
On full base-themed or underground maps (in opposition to "surface" maps, which include base areas and rocky planet surface areas), it's common to have "block walls": room-sized areas left unused by the RMG, now made of wall tiles. These can be also used in the mission to carve holes into for cover, shortcuts, or other uses (beware, aliens can and will also try to reach you by slowly digging through these areas!). Special rooms and areas have fortified walls with increased damage resistance and integrity, harder to punch through for both you and the AI. These rooms can also be locked by a doorlock (can be bypassed manually in a mini-game or via a buyable/craftable gadget) or a safety lock (controlled by switches on the map, and very hard to tear down by force).
That's all for now! Stay tuned and/or ask away at any USC related forums, or send your game-related questions to email@example.com!