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

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #90 on: September 23, 2019, 10:53:17 pm »
For now roads will automatically dig caves through hills and place bridges over rivers. That is stupid and it produces a lot of tunnels, but should be fine for playtesting. I will replace it with something more fun in future.

« Last Edit: September 23, 2019, 10:59:31 pm by Nikita_Sadkov »

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #91 on: September 27, 2019, 03:49:12 pm »
Randomly generating rock deposits appears to be a non-trivial problem. For now I just use a hack:

Offline N7Kopper

  • Captain
  • ***
  • Posts: 59
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #92 on: September 27, 2019, 05:10:19 pm »
Dude, you are insane in the best way possible.

If only you considered dice rolls... ;)

I'm reminded of Zone of the Enders: Fist of Mars actually. A little-known GBA tactical RPG (no grinding, similar to most Fire Emblems) that was an interquel to the fast-paced mecha fighting ZoE 1 and 2. To bridge the gap between it and the other two games, it actually had a feature that let you remove all the RNG from the game in favour of skill-based hits, crits, and dodges. The stats still mattered, though - the difficulty of landing or avoiding hits was based on what the hit chance would have been if you were playing in Luck Mode. There was even a feature that let you increase your damage output by decreasing your accuracy and evasion, letting you blow through overlevelled enemies if you mastered the mechanics of hits and dodges.

If it were up to me, I would personally mix this sort of design with Paper Mario's Action Command system, letting you actively contest the AI/other player to try to land hits and crits, with the advantage being given based on what the odds would have been if it was just random. RNG is great for immersing yourself in the feel of playing as a commander or tactician, but if you want the player to feel as if s/he's controlling an entire party of units, not just ordering them about, less RNG is better for that.

Background Story 1:
The Great King [KingName] the [First, Second, Third] of [Dynasty Name] has hired you and several other warlords to protect the kingdom from increasing monster attacks and investigate their cause.

Background Story 2:
The ruthless tyrant rules this land, taxing poor people to no end. Can you put an end to his rule? Beware of king's still loyal generals.

Background Story 3:
The king of this land has died, leaving no heirs. Now it is up to local warlords to fight for the throne. You're one of these warlords.
If you go with 2 or something similar, I vote for an optional evil campaign. The gaming world is starved for good evil campaigns.

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #93 on: October 01, 2019, 12:19:46 am »
I'm reminded of Zone of the Enders: Fist of Mars actually. A little-known GBA tactical RPG (no grinding, similar to most Fire Emblems) that was an interquel to the fast-paced mecha fighting ZoE 1 and 2.
Looks cool. Thanks for hinting at. Also, GBA had actual XCOM-like game from Gollop, called Rebelstar. It was heavily stripped down to make accessible for younger audience and play nicely with GBA hardware, but still has destructible terrain.


If you go with 2 or something similar, I vote for an optional evil campaign. The gaming world is starved for good evil campaigns.
I decided to mix it all. The king has died and there is now a succession war, between different sides, with an impostor capturing the throne and taxing population. That scenario allows for the most freedom and any number of sides. I've also abandoned the idea of linking player character to be a wizard, so now player can promote any unit into a leader and have any number of leaders.

The development took some really wild turns. Initially the game was just a Chess clone with some modifications, like Sokoban block moving, but then I found that small maps are very limited, so I abandoned the Chess like mechanics, adding HP, but retaining the no RNG paradigm. Then I found that my engine is a bit inflexible, it would be had to impossible to implement proper cutscenes and more complex animations, so I turned the engine into realtime RTS one, with turn-based limitations just added on top. For a short time I played with idea of making a dwarf fortress/dungeon keeper like game, adding room building and cave excavation (the imp character was originally used for that), even some initial resource gathering, but I found it boring and overused, so I kept it turn-based, but retained the terraforming part, because I believe it is cool to chop down trees and make a raft to cross the river, if player has no flight or water walking spell, or any magician at all, or to dig a tunnel under a prison to free prisoners. Anyway, now I have clear idea how it all should combine into a solid game.

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #94 on: October 02, 2019, 01:10:39 am »
Ok. Time to place some quest locations inside these auto-generated maps. Guess I will need some special generator for castles and cities, but for now pre-made XCOM style parts should be good enough.


Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #95 on: October 04, 2019, 02:06:13 am »
Another important part of map generation is the player's entry point and the initial unit placement. Should it be connect by road to all important areas or maybe letting player building his own road? Guess I should indicate on the world map, where there are roads and where there is wilderness, and the player will be required some magic, construction workers, flyers or swimmers to reach his/her destination.

One of the inspiration for my game is that old DOS Spellcraft game ( https://www.mobygames.com/game/dos/spellcraft-aspects-of-valor ), which indeed required player to be prepared to traverse the map. In a nutshell, Spellcraft is the Gollop's Lords of Chaos, but in real time, very similar to Magic & Mayhem. Guess they actually cloned it.

In XCOM it was assumed that player isn't obliged to have flying suits, but I clearly remember that during my first ever XCOM terror mission I destroyed a ladder in that island house, and there was no way to get onto the upper floor, where the last alien was hiding. So yeah, ability to build ladders could be the difference between winning or losing :D


Offline Hashirama015

  • Sergeant
  • **
  • Posts: 25
  • Omnia Mors Est Infideles
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #96 on: October 04, 2019, 06:39:03 am »
Looks neat. Anyways I have  a question, will it be something like mount and blade where you travel the world  map or will the geoscape be totally removed?

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #97 on: October 06, 2019, 02:12:23 am »
Looks neat. Anyways I have  a question, will it be something like mount and blade where you travel the world  map or will the geoscape be totally removed?
There is a random world map generator. But no globe - just a 2d maps with several islands, which player can visit using ship. The world map movement is also turn-based, compared to XCOM. As usual, player explores world map, completes quests, which are randomly generated, as well as quest sites. There are also several cities, including port cities, where player can rent a ship.

World map is divide into sites, which, while randomly generated, remain constant during single playthrough. I.e. if there is a multiplayer match, defending player could pre-explore the map, having that advantage against attacker.

Between cities there is some trade, and player can rob caravans. That is exactly the part I'm currently working on in site generator - ambushes. For now it is just an encircled ambush. Victory condition is simple: defeat all enemy leaders. To retreat, defending player will have to move all his/her leaders towards the edge of the map. Given that the game centers around magic, there is an alternative victory condition for most maps: activate some percent of magic nodes, required to cast the Spell of Mastery. Obviously that needs player to have some wizard alive. But compared to enemy leaders, nodes are revealed on minimap. So if enemy leaders cast invisibility or go into defense, another player could just activate the nodes, as part of endgame. That should eliminate infamous "find that last alien" problem of XCOM.


Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #98 on: October 07, 2019, 09:38:41 pm »
Recently one guy (the creator of Cube World) conceived similar idea to mine about replacing experience by auto-generated relics:
https://www.youtube.com/watch?v=wAm3sFRqJLI

Wow! I thought my idea is unique :( well, at least his game is real-time and more minecrafteish (read legend of Zelda based). Also, the fans who funded his kickstarter got really angry that he totally redesigned everything since the alpha, so there is a huge drama. Good thing I have no fans, funders or any responsibilities :D

And Cube World also has circular rivers, which flow upwards, due to how perlin noise works: https://youtu.be/Oko9vr5WpS4?t=908

Circular rivers is the symbol of our time!

« Last Edit: October 07, 2019, 11:27:40 pm by Nikita_Sadkov »

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #99 on: October 08, 2019, 11:41:19 pm »
With a few more lines of code, we can now have parts with arbitrary outlines, compared to square 10x10 cells XCOM map segments. Obviously it employs the same fractal generator code used to generate the world map :D

Here is a party placement around campfire in the wilderness:

« Last Edit: October 08, 2019, 11:43:48 pm by Nikita_Sadkov »

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #100 on: October 09, 2019, 06:25:49 pm »
Enemy Infestation - the closest one gets to a real-time XCOM. While it looks like a Commandos clone with aliens, it is not. Compared to XCOM, each unit in EI has explicit specialization, there are numerous interactive map objects (XCOM had only doors and lifts). The weapons are almost all unorthodox: fire extinguisher, shrinking ray, zapper gun, etc... but the aliens design is one of the most uninspiring ever, and that is in a game about aliens.

« Last Edit: October 09, 2019, 06:31:38 pm by Nikita_Sadkov »

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #101 on: October 11, 2019, 01:41:02 pm »
Didn't know that but all Diablo games use the same map generation algorithm as XCOM and Spelunky, so the layout is a bit predictable and exploited by speedrunners:
https://www.boristhebrave.com/2019/07/14/dungeon-generation-in-diablo-1/
https://www.diablowiki.net/Randomization#Map_Generation_and_Size
https://www.youtube.com/watch?v=eZ7nqNgzjTI
« Last Edit: October 11, 2019, 01:53:27 pm by Nikita_Sadkov »

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #102 on: October 14, 2019, 09:16:14 pm »
New games already began using AI approaches to generate contents. Most popular of these appears to be wavefunction collapse algorithm:
https://robertheaton.com/2018/12/17/wavefunction-collapse-algorithm/

It is very similar to markov chains and the limitations of markov chains. Dungeons generated with it are not much better than texts generated by markov chain. But it could be useful for generate inherently random patterns, like animal fur color texture. Although biologists would likely correct me that animal fur color is not truly random, but a result of some complex gene expression in action, but then again, nothing is truly random.

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #103 on: October 18, 2019, 02:34:47 am »
Came with a simple dungeon generation algorithm. It is relatively flexible and can fill in any stencil constrained area. Should be good enough for now

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #104 on: October 18, 2019, 08:47:14 pm »
Currently my code generates dungeons of hierarchical topology. Such dungeons are a bit boring: enemy can't  surprise you by approaching from behind. Basically they would feel too safe. Regarding loops in dungeons: naturally human made buildings usually have hierarchical topology, so we actually need a good excuse to introduce loops: say have both stairs and a lift to reach higher floor: that  way if player secured the 1st floor, but have chosen stairs to reach 2nd floor, aliens could use lift to descend to the first floor left unsecured.

Badly placed loops stand out in the architecture. Diablo had a lot of them, but they usually created passable loops, appearing more like alternative way to reach the room. Then again, Diablo's dungeon is a cursed ruined cathedral. But, for example, Chocobo Dungeon generator produces some really nasty out of place loops, which would likely annoy player. Here a path splits before both forks entering the same room: