playMaker

Author Topic: Creating a Card style turn based strategy & Databases  (Read 3510 times)

tal1m0n

  • Guest
Creating a Card style turn based strategy & Databases
« on: July 03, 2013, 06:48:46 PM »
Wonder if it's really necessary.

----------------------------------------------------------------------------------------
(Dear God, sorry for this post being so long. It was late last night, too much caffeine too little sleep.) tldr; Are arrays and FSM's enough for an RPG & turn based style game, or is a SQL/spreadsheet database worth the investment?

I wrote a lot of this for my own sake, to work through the ideas but really what's needed is to get the basic structure in place so after much play testing I can see what will be good and what needs to get thrown out.

----------------------------------------------------------------------------------------

I created some basic old school classic arcade games to get familiar with Playmaker and now I'm finally onto something that may be interesting.

There's been lots of threads asking about including databases in Unity and the response usually suggests that a XML style database is overkill but to me it feels right at home from other game's I've played like Civilization 4 where they keep all the info handy in those spreadsheets.

Here the player to pick cards from a massive collection numbering in the hundreds, all with different states, abilities, mana costs; 3 boards - a "village" where you create city improvements, make your people happy, protect against spies, and most importantly land types that generate mana (like Magic the Gathering.)

Second board is the "World Map"; very large, fog of war revealed as player units explore, random units and events spawn on the map. At the center is the Black forest which acts as a neutral force causing problems for any players that get too close.

3 AI Civ's + 1 Player Civ + 2 neutral camps (Black Forest at center and Otherworld Mist at Borders.) The Neutral's act as ways to deal with the "late game clean up phase" if one faction get's too powerful and victory is obvious(Black Forest) or relies too heavily on combat relatively immoral cheap tactics, ignoraning the lore/character events(Otherworld Mist) The Neutrals influence spreads and becomes a powerful faction of their own that the other players must unite against, and the game stops being about winning at any cost and more about survival if you accidentally set those events in motion.

Overall it will be a lot to keep track of.

I got only as far as receiving the random cards into the players hand. From there I couldn't figure out an efficient way to how to tell the engine, "Is it a Land card? Go here" "A Champion Card - Check to see if player has enough mana then go here onto the game board but only in player zone of control." "A Village upgrade? Check to see if basic building has already been built and resources are available." "Did Hero Die? Remove unit and place in Graveyard. After 6 turns remove card from game."

And so on. Technically these could be made into Global Variables but I would end up with thousands of them because of how they interact with each other.

Once the card is placed on the board it becomes a 3D model avatar with it's own health, equipment, personality traits, and other stuff. I've toyed around with the idea of not having direct control over the units and instead "giving orders", which also removes a lot of the cheesy exploits a human can do against an AI in these style of games. Not to mention it makes traits like "Brave but stupid" "Intelligent" "Perceptive" "Cowardly" "Treacherous" actually be more than just a number.

But anyways!

SQLite has a sweet looking plugin for Playmaker. Probably tonight I'll add it to my library.

Or is there a better way - maybe with arrays?

Why I'm so reluctant to buy the SQLite - I purchased SimpleSQL recently (thinking it had plugins for Unity), but as a artist and not a programer, the "simple" knowledge it requires of C# and SQL is still over my head. I've been studying them for the last 2 days, and I can make variables, loops and whatnot but it's just not enough of an understanding to put this to use. Now I'll need to purchase the other one too. And hopefully it'll get this project moving again.

Here's the generic overworld map that shows some very basic layouts. The tutorials for setting up a isometric mathmatical grid was like 3 hours long of coding that I might understand - perhaps like a year from now, so I just copy and pasted the cards so I can get basic event and movement FSM's in place.
« Last Edit: July 04, 2013, 12:05:53 AM by tal1m0n »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Creating a Card style turn based strategy & Databases
« Reply #1 on: July 04, 2013, 06:41:36 AM »
Hi,

 You will find a lot more raw power in using a database. It's all possible with just arrays, but would require a lot more fiddling, and I would think that it will be quicker for you to pick up SQL queries language than messing with too much boilerplate fsm and logics.

bye,

 Jean