aliens

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

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #225 on: April 25, 2020, 03:58:35 am »
Ok. Implemented crystal resource together with mines. Crystals can also be purchased at cities with harbor and marketplace. Now all advanced building and units cost crystals. Crystals also have specials property that they are sold at very low price, while purchased at high price to prevent player from using them as a huge source of income. Same decision was done in HoMM. You wont notice all the thought put into the game design, unless you try to design a game yourself. In fact, initially I had no plan to include second resource beside gold, but apparently it is very important to have a very rare resource to create some conflict from the early stage, as well as to tie the production of high tier units to the map exploration and control. Blizzard games, like Starcraft, also have 2nd resource - gas, but they used it for different purposes. Warcraft games have lumber resource, which is basically unlimited, but takes some time to harvest. I don't completely understand the design logic behind it, but apparently it is to slow down the tech level progress, while still allowing creating units inside the achieved tech level.


Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #226 on: April 27, 2020, 01:47:41 am »
At last spent some time writing music (instead of placeholders) starting with a proper game over theme:
https://soundcloud.com/nash_gold/spell-of-mastery-game-over-theme

Sorry for the ducks - they are for watermarking purposes, since some people are known to steal and reuse random stuff from soundcloud without giving credit.

I'm not really a musician, so I will keep it minimalistic and mostly ambient. I.e. most tracks will actually be duck tracks.
« Last Edit: April 27, 2020, 01:59:32 am by NashGold »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #227 on: April 27, 2020, 08:44:20 pm »
Depending on usage, someone can anyway use it ;P

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #228 on: April 29, 2020, 05:08:11 am »
Implemented castle and palisade gates. For now they work like usual units, so no special siege equipment is required.

There was once a Master of Magic clone game, called Age of Wonders, and it too had castle gates, while the only one way of damaging them was battering ram, which was really slow, especially when you move it from the other side of the map. Had you got a misfortune losing it, the battle was basically lost. It was annoying to say the least. Age of Wonders sequels completely removed that mechanics. Original Master of Magic had no city gates at all, but there was that firewall spell, which damaged enemy units entering the city. Then there was this British Stronghold game, built completely around castle sieges. Surprisingly they allowed any unit do damage walls, given enough time. There was also a fantasy version of the Stronghold game, with flying units, but they really rushed it and it ended up being garbage.

In my cases there are also engineering units, like the imp, which builds ladders and digs tunnels. Guess siege units, like cannons, do additional damage against the gates and walls.

Also, I have cleaned up the UI a bit, moving time and resource indicators into the panel right side. Now there are basically two buttons: end turn and leave map. Player can leave at any moment, without losing any unit that is not surrounded by enemy and has full movement. Obviously leaving castle a siege map leads to the loss of the city.

« Last Edit: April 29, 2020, 05:11:39 am by NashGold »

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #229 on: May 04, 2020, 08:26:39 pm »
Had to rethink how movement points work. Originally I had just `AP` stat associated with each unit. It got replenished with `full_AP` each turn. Then I have dropped the random to hit chance completely. That required introducing additionally `atk` state for each unit capable of attack. Atk basically mean how many AP unit can invest into defeating targets defense. Now some units are immobile, some or all the time. With simple units like destructive castle gates I can just set AP to 0, since gates are passive. But what about the stationary ballista turret, castle defender gets? It needs to have AP to invest into attack. Any any AP means the turret will be moving. That sucks, since I dont want player to move the turret.

Now I can add immobile, and some special kludge to prevent such immobile units from moving, but that wont solve the case with a turret mounted on top of a giant turtle. Giant turtle moves slowly, but the turret should still have a few shots per turn. That can be solved with mounting the turret as a separate unit from the turtle carrying it, but what about the gates with some active security system shooting intruders?

Given these shortcomings I have to introduce a hierarchical AP system. At the start of the turn units gets basic AP (based of stamina), which are then allocated in various sub-systems, like movement and attack. Alternatively one can use a disjoint system system, where all parts get their own AP meter, but living organisms usually have single energy source and single brain, while the time spent on movement or equipping some item is the time not spent to defeating opponents defense. So hierarchical dependency seems like a natural choice. In a real-time strategy you can probably incorporate it with your entity component system, but I have just hardcoded everything for now.

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #230 on: May 06, 2020, 01:27:41 am »
Added ballista turret for castle sieges.

Now the question is: should different weapon and armor types be implemented to make units a bit more different? Original XCOM games actually differentiated between explosion and piercing damage, as well as fire and laser damage. In addition units had full 3d armor directions, so units, like tanks, could be highly armored from sides, but still have a vulnerable belly. Other XCOM units had armor only in front of them, so any hit to the back or to the side were fatal. I currently have all units being vulnerable from behind and from sides.

Additional question: should armor reduce damage or just difficulty to hit?


Regarding castle sieges, they have remade Stronghold game once again, and it is even bigger mess of bugs.
https://www.youtube.com/watch?v=dg27Bvn4ElA
Firefly has beaten Blizzard to its game. Maps are even smaller. AI is non-existing. Comical Rowan Atkinson style characters are gone. And even from the graphical standpoint, shadows move separately from units, castle walls have a missing floor texture, while terrain looks like it came from some early 2000 3d RTS. Unfortunately Age of Empires now has no competition.

« Last Edit: May 06, 2020, 01:46:42 am by NashGold »

Offline Rubber Cannonball

  • Colonel
  • ****
  • Posts: 195
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #231 on: May 06, 2020, 05:05:27 am »
Additional question: should armor reduce damage or just difficulty to hit?

Generally, many games treat armor as primarily reducing damage.  Better armor usually doesn't make opponents miss more but instead lessens the effects of the blows received.  Although, bulky or heavy armor may make it easier to be hit.  Special armor with magical attributes such as invisibility or displacement can make it harder to be hit.

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #232 on: May 06, 2020, 12:50:26 pm »
Generally, many games treat armor as primarily reducing damage.  Better armor usually doesn't make opponents miss more but instead lessens the effects of the blows received.
That doesn't always make sense. Say two knights wear plate mails and armed with short swords. Now one knight hits his opponent with a slash. A slash will get deflected by plates or by shield, and wont do much damage (beside maybe forced the opponent to backstep), unless he hits with the handle and to the head, resulting in some concussion damage. Now if that knight manages to get the sword between the armor plates, that will do the damage, and could be fatal. Same with a warhammer - it will do concussion damage, disregarding the armor.

In modern setting we have bullets and explosions. Bullets do piercing damage, if target has no armor, and concussion damage if target has bulletproof vest (i.e. a bullet can break you bone if shot into the vest from close proximity). Explosion is a pressure wave, which can break and send flying all kinds of objects, so there can be all kinds of damage, in addition to heat.

Offline Rubber Cannonball

  • Colonel
  • ****
  • Posts: 195
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #233 on: May 07, 2020, 05:31:19 am »
I guess it depends on how complex a combat system you wish to make.  I was assuming hits that did 0 damage were still considered hits instead of misses.  OpenXcom seems to have a good combat system but perhaps there are some things you would like to do differently.  Maybe a hard hitting blow should always do some damage even against strong armor.  Or maybe a percentage of the damage blocked by armor gets converted to stun.  Maybe weapons should be a combination of damage types.  For example a grenade would do both blast damage and the shrapnel would do piercing damage.  Or a rifle bullet would be 80% pierce and 20% concussive while an arrow would be 50% pierce and 50% cutting.  This system could handle sandbags that can stop bullets but allow arrows to penetrate them and grenades that demolish them.  IIRC, the bullet arrow sandbag thing has to do with arrows having more momentum even though bullets have more kinetic energy.

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #234 on: May 07, 2020, 05:34:51 pm »
I guess it depends on how complex a combat system you wish to make.  I was assuming hits that did 0 damage were still considered hits instead of misses.  OpenXcom seems to have a good combat system but perhaps there are some things you would like to do differently.  Maybe a hard hitting blow should always do some damage even against strong armor.  Or maybe a percentage of the damage blocked by armor gets converted to stun.  Maybe weapons should be a combination of damage types.  For example a grenade would do both blast damage and the shrapnel would do piercing damage.  Or a rifle bullet would be 80% pierce and 20% concussive while an arrow would be 50% pierce and 50% cutting.  This system could handle sandbags that can stop bullets but allow arrows to penetrate them and grenades that demolish them.  IIRC, the bullet arrow sandbag thing has to do with arrows having more momentum even though bullets have more kinetic energy.

I think more robust idea would be simulating the underlying physics. But that wont be a game, since there would be no nice percentages and play will never know how exactly the explosion will behave. With more complex like stuff like sword fight, simulating physics would be very hard. Although one game, Exanima, tries to do that somewhat believable.

A few games, like Stracraft don't have to-hit system at all. Armor just reduces the raw damage. Although there are still different kinds of damage, so say flame throwers are very efficient against zerlings. Although Starcraft has an exception with Protoss units, which have regenerating energy shields. To damage them, you need to first remove the shield, so they are immune to several forms of opponent micromanaging, since a single hit will do nothing. But if you flank them, the shields will go down fast.


Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #235 on: May 07, 2020, 10:47:16 pm »
Still trying to come up with the soundtrack direction (Again with ducks for watermarking):
https://soundcloud.com/nash_gold/spell-of-mastery-tambourine-loop

Unfortunately this style can appear a bit too serious for a turn-based indie pixelart game. I had thoughts about more upbeat approach with a trumpets, but it was sounding just too annoying. Also couldn't find any good tambourine sample. Those coming with sf2 fonts sound like ass.

Offline NancyGold

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #236 on: May 09, 2020, 02:34:30 am »
To generate a mine dungeon, I will adapt the same city generator, but instead of streets there will be railroads and instead of buildings - caves

The city generator indeed needs to be extended since as of now it properly handles only overworld.

Crystal mine dungeon is like a requirement now, since there is now the crystal resource and all mines are obviously well guarded. Otherwise there is no justification of such crystals being a rare resource. Still have no name for the crystals, so they are just blue crystals.

« Last Edit: May 09, 2020, 02:36:57 am by NashGold »

Offline Thermite

  • Colonel
  • ****
  • Posts: 146
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #237 on: May 09, 2020, 09:36:44 pm »
Hey, Nash, I have been thinking of making a XCom inspired game too, but never worked with graphics much, do you have any tips on how to draw things on the C family language? Preferably C++ and C#?

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #238 on: May 09, 2020, 09:39:32 pm »
If you don't want to use an engine, SDL2 for c++, don't know about c#. If you are fine with using an engine, Unity for c# and unreal for c++

Offline Thermite

  • Colonel
  • ****
  • Posts: 146
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #239 on: May 09, 2020, 11:27:39 pm »
If you don't want to use an engine, SDL2 for c++, don't know about c#. If you are fine with using an engine, Unity for c# and unreal for c++

I was thinking of doing all the work, engine included...
Will look into SDL2.
Thanks luv.