aliens

Author Topic: XCOM Inspired Fantasy Game  (Read 170604 times)

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #210 on: March 22, 2020, 03:16:18 am »
Implemented the castle siege map generator. Given the existing framework it is a cakewalk, but still needed additional feature - road from the city properly connecting to the castle entrance. For now there is no gate, since siege units and siege AI are not implemented. So AI will just rush through the opening. There is also a backdoor feature for now implemented as a teleporter, but in future I will likely replace it with a proper tunnel.

Teleporters were a bit tricky implement, since teleportation implies non-euclidean space, so algorithms like A-Star stop working. AI also needs some special handling, and there is a special edge case when some unit already occupies one of the teleporters ends, requiring to decide what happens when somebody teleports inside of it. BTW, that Tomb Rider game I mentioned earlier had some tricky feature called "portals", allowing to create buildings which have more space inside than it appears from the outside. Like in Morrowind and JRPGs, where small buildings have large interiors, but instead seamless. IIRC, Duke Nukem also had that portal feature.

While teleportation is cool, I think also implementing a time travel spell. Basically it would involve saving current game state and allowing jumping back and forth. Even in multiplayer games. Obviously the feature would require solving the so called ontological time paradox, either purging already collected items from the map or from the time traveler. That will have to be a top tier spell with large ingredient cost.


Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #211 on: March 22, 2020, 03:46:45 am »
Recently the original Tomb Rider engine got  reverse-engineered and apparently it worked similarly to maincraft - i.e. with blocks primitives, but supported sloped surfaces. Although devs do use AStar for some reason, despite the game relaying on portals:


Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #212 on: March 22, 2020, 12:16:52 pm »
Recently the original Tomb Rider engine got  reverse-engineered and apparently it worked similarly to maincraft - i.e. with blocks primitives, but supported sloped surfaces. Although devs do use AStar for some reason, despite the game relaying on portals:

But this map look more as grid based than voxel based as minecraft, look closely at places where floor have different height, each box are unalignment if you consider height, something that is impossible in minecraft.

And for AStar, if you do not need pass multiple portals to reach target you could easy patch it by knowing beforehand what portal is needed to find target and run AStar to portal and Astar from portal. Probably important thing is that in TR each point is in same area that you can reach using normal patch or in different areas and need use portal to reach.

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #213 on: March 22, 2020, 10:58:38 pm »
But this map look more as grid based than voxel based as minecraft, look closely at places where floor have different height, each box are unalignment if you consider height, something that is impossible in minecraft.

Yeah. Original Tomb Raiders were grid based, and the characters movement are also grid based. So Tomb Raider and XCOM have a lot in common.

I'm sure you can modify Minecraft engine to support vertical blocks instead of cubes. That is what I did for Spell of Mastery, which originally had only cubic tiles in the early prototype. But for Minecraft that would kill the blocky aesthetics.

Regarding AStar and portals, I doubt they needed full blown AStar in Tomb Raider, since enemy AI is rather primitive. I.e. that bear wont be pursuing player over all the level geometry. Compared to tactical games, where AI must properly use everything player uses.

Then again, early strategy game developers haven't even tried to create a competitive AI. Say both Warcraft and Command & Conquer had AIs with pre-build bases, and such AIs attacked player with waves of increasing strength following pre-made path, wasting resources. So instead of being proper strategies, they were actually tower defense games, since player was encouraged to build towers to fend of suicide waves. That made sense since good AI would be unfun for the player. Imagine XCOM aliens playing competently for once, instead of running randomly like cockroaches around the map. That would have been a totally different game.

Anyway, here is the footage of the level editor CORE used, allowing creating levels quickly and with easy (compared to Quake, or the modern Unreal engine):



Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #214 on: April 06, 2020, 03:57:40 am »
An XCOM-like game obviously needs some artillery unit. I made a cannon sprite. But a cannon all by itself without a cannoneer looks silly. So I used previously scrapped gremlin sprite. Hope it looks passable now.

That gremlin is obviously hard coupled with the cannon. But allowing turrets to be operated by any humanoid can be a nice idea too, albeit a bit hard to implement. Especially for AI. I still plan adding mounts for some humanoids.

BTW, many games like Age of Wonders, Age of Empires and all Warcraft have possessed catapults moving without any service units. Warcraft 2 ones are provably possessed since they have "inorganic" property, meaning life drain doesn't work on them.

On the other hand a few classic games like Z and Fallout Tactics had explicitly manned vehicles and turrets. In Z that was a major feature with many maps featuring a race to capture unmanned vehicles.


« Last Edit: April 06, 2020, 04:43:58 am by Nikita_Sadkov »

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #215 on: April 09, 2020, 05:27:52 pm »
I've decided to rethink the ship sailing mechanics. There are several options
1. When a party visits a city with a shipyard, it can buy/rent a ship. Such ship will be shown like a usual roster unit, but wont be present in battle. It will have an inventory, which could only be accessed while in sea. Such ships can be traded between parties. This system still doesn't accommodate for a ship being bound to some single sea. But it is, well, simple.
2. Warcraft 2/Heroes of Might & Magic system. Like above, but the ship will be left on in the sea, when party disembarks. This system accommodates for several seas. Yet since the world map is randomly generated, it is not that useful and makes AI much harder to implement. Both Warcraft 2 and HOMM games had notoriously bad ship AIs (proper AI requires building a zone connectivity graph). And it resulted in a few crazy twists, like some party ending up landlocked, after its ship gets stolen or sunken. In HoMM games there is a low level spell "Scuttle Boat", which was used to trick and landlocked larger AI armies. I still don't get why one needs magic to damage a ship :D Many HoMM maps explicitly relied that the player will seize a boat from a disembarked AI party, which in some cases got stuck in a loop and failed to disembark (or disembarked at a wrong place), soft locking the whole game.
3. Some games, like Ogre Battle and Warlords, allow parties entering the sea even without a ship, but greatly slow down the movement, unless the party has some flyer or ship like units (i.e. octopus).

So yeah, picking anything here is a trade-off.

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #216 on: April 11, 2020, 10:46:46 pm »
Implemented sailing. This map doesn't really have a need for ships. It is the same old test seed map. But I plan adding several thematic auto-generated maps to the game, each with successive difficulty and tech level increase, so new player wont get overwhelmed from the beginning. One of the levels will be an archipelago with small islands. Now the game framework is literally finished. All important cogs are in place, so the game is playable from start to finish.

Next step would be determining average game length in turns to balance the AI and goals properly. And fixing minor things. Like i.e. when there are not enough mercenaries to defend the plundered city, their place will be taken by citizens, which are very weak units. Sprites for different dungeon types. Something tells me this could be like the other 50% of work. But it is rather simpler work of filling in the missing details.

Oh, and I had to change my name on social media, because the previous Russian name produced some biased attitude towards me, with people expecting me to speak Russian. I've planned to do that for some time, but had the idea to first do that formally in id card. Unfortunately my current status in Ukraine doesn't allow me to change my legal name. Guess changing informal handle first is better than nothing. Anyway, the name Nash is after the American mathematician John Nash, not the anime character. Gold is unrelated to that anime character either. Guess now people will expect me to watch this anime :D


Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #217 on: April 16, 2020, 05:33:31 am »
A little playtesting has shown that my initial idea with castle garrison intercepting city plundering was flawed. Since each city should have scouting range, allowing garrison to react properly. And plunder has little value beside killing city dweller and plundering the wealth, so attacker has little reason to do it, give there are enough strength to start castle siege.

Now defending player can also pay dweller to help defending the castle (which is cheaper than hiring them long term). But if the attacker has previously plundered the city, there will be no such mercenaries.

Anyway, the city can also be plundered by a thief unit, like halfling.

So yeah, there is no special interception mechanics now at all. Guess the game became less XCOM. Although there is an option of breaking out of castle siege, which would be similar to XCOM operatives getting into Skyranger and evacuating into a reserve base.


Offline Rubber Cannonball

  • Colonel
  • ****
  • Posts: 195
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #218 on: April 16, 2020, 08:12:36 am »
The picture in your previous post from about 4 days ago reminds me of the Civilization games.  Typically, cities would automatically spot non stealth units in the surrounding tiles which were free from the fog of war mechanic used in those games.  The Call to Power version also allowed the player to build remote detection structures outside the cities such as watch towers which removed the fog of war from a large area or radar dishes which showed enemy units on the minimap over a much larger area.  There were also sonor buoys which detected ships and non stealth subs iirc in the nearby water tiles.

In your game it might make sense for cities, towns, and castles/fortified structures to autodetect large raiding or siege forces in adjacent tiles.  A halfling thief would be a stealth unit that would have a reasonably high chance of infiltrating a city or village without being detected.  He could be used to steal a key artifact or other high value prize from a castle or slowly bleed off gold from a city over time.  A raiding party if successful could plunder a city viking style.  A large siege force would be capable of capturing a city and then defending it instead of just raiding it.

Another game series I'm reminded of is the Magic Candle series.  In those games, the various cities, towns, castles, and other structures weren't capturable as the player only had a small party of up to 6 adventurers.  Enemy towns could only be entered if someone in the party could cast a disguise spell.   Defenses for towns consisted of roving patrols outside the village that could be evaded if the party could cast a detection spell that would allow the party to see them in nearby tiles on the map or alternatively they could be defeated in combat and thus eliminated.  In the magic candle series for travel over water, ships could be rented by the player's squad or party similar to how taxi service works in real life.  Typically, major coastal towns would have a ship nearby available for rent by the day to allow the party to travel to various islands or to avoid travelling by land around a large bay or inlet.  The player could pay to have the ship wait a few days for the party to return to it, otherwise the ship would return to its origin when the party disembarked.

These are just thoughts of mine that came to mind while reading your posts, Nikita.  They may or may not be useful to you.

Offline Thermite

  • Colonel
  • ****
  • Posts: 146
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #219 on: April 17, 2020, 12:15:56 am »

That's a lot of boots


One thing I don't like: the sprites for the ground make it harder to know what is in front/back.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: XCOM Inspired Fantasy Game
« Reply #220 on: April 17, 2020, 12:39:14 am »
Lovely sprites. Especially the hydra (?).

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #221 on: April 21, 2020, 06:51:03 am »
That's a lot of boots
That is a movement map. Boot icon means that the picked unit will be moving on land. There is also a wing icon, which hints the unit will be moving by air. When unit has to swap places with another unit, there is a swap icon. When unit has to jump down taking fall damage, there is a fall icon. Etc...

Alternative would by highlighting walk-able cells, which is a bit less robust solution, especially if the cell is transparent/invisible - there will be nothing to highlight. Final Fantasy Tactics games instead palce square movement square, but these don't look nice with sloped terrain, and are a bit more scifi-ish.

One thing I don't like: the sprites for the ground make it harder to know what is in front/back.
These are old screenshots.

Finally implemented the world map save/load. For example the save game for the map below would look like https://pastebin.com/ppFerZWH

It is a bit lispy and uses Symta's read/print to parse the save. Still needs some formatting to look nicer since Symta supports less cluttered syntax inside the Lisp-one. Then again, these maps are not really made to be directly user-editable for now, and there will be a proper adventure editor with ability to use a hand drawn map provided by user, instead of the generated one. That way one could quickly import say a Middle Earth map from google image search, setup terrain and make some adventure on it.


Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #222 on: April 24, 2020, 02:21:23 am »
Implemented a few features from Heroes of Might & Magic. Basically party gains movement based on its unit composition. In addition a party composed completed of flyers will traverse any terrain at the same cost. That will make some difference, especially when resource generating buildings get involved. HoMM was all about controlling map structures, yet was for some reason impossible to have flying army of say gargoyles stealing all mines. Even in HoMM4, which got more focus on the party composition and allowed even parties without, well, heroes.

Original XCOM unfortunately had no real notion of world map resources, so base placement made little difference. XCOM Apocalypse instead of resources had corporations supplying equipment. If one was to extend Apocalypse, a brain dead decision would be adding some resource gathering missions outside of the city. Still the game was already pretty massive in its scope, if even it was simulating just a single city.


Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: XCOM Inspired Fantasy Game
« Reply #223 on: April 24, 2020, 05:13:32 pm »
Have you cloned yourself, Nikita?  8)

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #224 on: April 24, 2020, 08:33:34 pm »
Have you cloned yourself, Nikita?  8)
I've changed the name to Nash Gold, since the name "Nikita" created preconceptions and a lot of confusion, like some folks addressing me in Russian, or considering me a girl (Nikita is a female name in the West, because of Elton John song and the Besson movie). And "Nash" is also simpler 1-sillable word. Yet I had the old login info saved by browser, so by accident logged under the old name. Is it possible to lock the old account "Nikita_Sadkov" since it is obsolete?