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

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 4613
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: XCOM Inspired Fantasy Game
« Reply #15 on: February 06, 2019, 06:44:02 pm »
Very nice colors and shades.

Offline Nikita_Sadkov

  • Squaddie
  • *
  • Posts: 30
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #16 on: February 06, 2019, 07:12:05 pm »
Cool! But it looks like you put lib directory instead of src or a link to github into the .zip

Edit: ah, now I get it. It's your own runtime and your own lisp. Very cool.
Yeah I'm a big fan of Lisp, so I decided to write game in Lisp. Spell of Mastery is actually my second game. The first one was Warcraft 2 engine implementation in Common Lisp (SBCL). It was fairly complete with working AI and all spells implemented: https://www.youtube.com/watch?v=-k8jkeFfnl0

Offline Nikita_Sadkov

  • Squaddie
  • *
  • Posts: 30
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #17 on: February 12, 2019, 02:02:09 am »
Implemented fire, lightning and explosions burning grass and flammable objects. Also added a bugfixes to the demo at https://nikitasadkov.itch.io/spell-of-mastery-demo

Remaining major features:
1. Collapsing structures. This one require introducing material strengths. Metals can have large overhangs than soil.
2. Water/lava dynamics. Moving water is actually an important tactical feature. Say flooding a cave full of enemies. Or in multiplayer maps player can create bottleneck by flooding trenches. Fantasy setting makes it easy to introduce such feature, because there could be say a flood spell.
3. Passable objects blocking vision, like smoke screen or tall bushes, which could be especially useful to burn down.


Offline Nikita_Sadkov

  • Squaddie
  • *
  • Posts: 30
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #18 on: February 14, 2019, 02:51:13 am »
Ok. Done implementing fog/tall grass blocking vision. Also fixed a ton of bugs. As always, comments and suggestions are welcome.



The Fog of War regeneration mechanics is actually allows some choices with various drawbacks. For example, FOW can be regenerated at the end of players turn, at start of player's turn, both at the start and at the end, or when any unit finishes movement. Deciding how to implement FOG of war, I made a pros/cons table (such tables appear to be a common game design instrument).

End of Turn:
- Pros:
  - Player doesn't see enemy movement in territories he left.
  - Player can still see enemies which killed his units or casted Mist.
  - Player can see all terrain he uncovered during this turn. Makes it easier for player to remember stuff. Especially if player loads the game after few days.
  - AI handles it easily, noticing positions of your units.
  - Intuitive.
- Cons:
  - Effects like Mist wont blocking vision won't be immediately noticeable.

Start of Turn:
- Pros:
  - Effects like mist blocking vision will be immediately noticeable.
- Cons:
  - Player can see enemy movement in territories he left.
  - Player can still see all enemy movement in mist until the start of his turn. That will be just an annoyance.
  - Really hard to make AI handle it.
  - Non-intuitive.

Both Start and End of Turn:
- Pros:
  - Some combined pros of both approaches.
- Cons
  - Really hard to make AI handle it.
  - Non-intuitive.

Each time unit finished its movement:
- Pros:
  - Very intuitive.
  - Spells like Mist immediately take effect.
- Cons:
  - Less tactical depth: player cannot move a scout close to uncover enemy units, then move that scout away and nuke the enemy with some area of effect spell, that would otherwise harm the scout.
  - Computationally intensive on large maps.

Offline Yankes

  • Commander
  • *****
  • Posts: 2040
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #19 on: February 14, 2019, 09:28:03 pm »
Some thoughts about mist and fire. Overall I think its look bit out of place and do not fit good rest of graphic. It look bit too much diffused compared to rest of sprites.
Overall graphic is nice looking pixel art and this effect look like from some 3D game.

Offline Nikita_Sadkov

  • Squaddie
  • *
  • Posts: 30
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #20 on: February 15, 2019, 07:55:13 pm »
Some thoughts about mist and fire. Overall I think its look bit out of place and do not fit good rest of graphic. It look bit too much diffused compared to rest of sprites.
Overall graphic is nice looking pixel art and this effect look like from some 3D game.
There is a number of reasons I decided to use non-pixelart effects.
1. Alpha channel allows to easily show objects inside mist and fire. And blends nicely with any object, as opposed to say dithering. In XCOM artists had to keep flames really small and close to the ground to avoid obscuring units. You just don't get that massive firestorm effect burning trees. Same with mist, which should be the height of a unit to actually block sight, otherwise it will look silly.
2. It is a common practice to use alpha-channel true-color effects in modern pixelart turn-based games, and even in some older, like Age of Wonders (it combines index painted pixelart with pre-rendered graphics), Master of Magic, Magic & Mayhem and Mage Knight Destiny Soldier for GBA.
3. Full color gradients and transparency make special effects stand out.
4. You just cant nicely model mist and fire using pixels. Especially with large sprites. It will have a lot of ugly dithering, and nasty gradient jumps. I also found it much harder to produce good looking pixelart effects.
5. There is a good amount of ready to use true-color stock art effect templates, both free and commercial. Just load them into particle editor and create what you need. In fact, I had to convert a few pixel art effects I took from OpenGameArt into continuous color, because, while the effects were okay, they were looking just wrong with that dithering.
6. I still use pixelart for a few effects, like the magical goblet for bless spell.


Also, there is an indie game called, Waves of Fate, they do use pure pixel art effects in it (down to scary dithering in place of transparency), but it looks okay due to generally non-realistic art style: https://store.steampowered.com/app/467270/Weaves_of_Fate/

Then again, many older pixelart games, like Final Fantasy Tactics, combine everything that works. Although I always thought that FFT's 3d landscape is the ugliest part of the game, after the pre-rendered intro cutscene, which was outsourced to that infamous Russian studio, which made Zelda Phillips CDI games. Still FFT's 3d magic effects were really beautiful, and impossible to achieve with pixelart.
« Last Edit: February 15, 2019, 08:56:44 pm by Nikita_Sadkov »

Offline Yankes

  • Commander
  • *****
  • Posts: 2040
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #21 on: February 16, 2019, 01:40:01 am »
You did not get exactly my point. I fine with transparency and special effects on graphic, some thing I did:

https://openxcom.org/forum/index.php/topic,1532.30.html
https://openxcom.org/forum/index.php/topic,322.msg4504.html#msg4504
https://openxcom.org/forum/index.php/topic,2059.0.html

I once made default fire semi-transparent in some old branch of OpenXcom.

My point was that graphic used for this effect was too much blurred compare to rest of graphic. Transparency can have impact on this but I do not think this main reason.

Offline Nikita_Sadkov

  • Squaddie
  • *
  • Posts: 30
    • View Profile
Re: XCOM Inspired Fantasy Game
« Reply #22 on: February 16, 2019, 05:27:17 pm »
My point was that graphic used for this effect was too much blurred compare to rest of graphic. Transparency can have impact on this but I do not think this main reason.
Well, it is a fog, it is supposed to be blurry and annoying to players. There are a few spells, like tornado to get rid of it.

Also, implemented rain effect, which would reduce sight, extinguish fires and prevent fire spells from being cast at outside locations. I'm unsure how much and when rain should go. Maybe the rain could be that one place where RNG will be allowed? I really want to avoid RNG and make game as fair as chess, but making it rain every 31st turn would look silly. Obviously rain should be controlled by biome, so there will be no rain in the desert, but a lot of rain in rainforest. Should rain spawn mist? How to spawn mist in deterministic way, without RNG? Then again, what do I know about raining? Or maybe making rain into a spell, casting which would change weather?