Shandalar Clone
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Shandalar Clone
by DennisBergkamp » 20 Jul 2010, 05:38
I think I've managed to produce some kind of memory leak already
Weird stuff happens whenever I walk around on the map, setVisible(false) and dispose() on the map JFrame and open the Forge game part. The game runs a bit slower than normal (I guess because the map part is still taking up some resources, even though it's basically suspended), but then once the match is done, the map part gets reopened and within making a few steps with the hero sprite, everything slows down horribly. Does anyone know if there's a good way to track down this memory leak?

Weird stuff happens whenever I walk around on the map, setVisible(false) and dispose() on the map JFrame and open the Forge game part. The game runs a bit slower than normal (I guess because the map part is still taking up some resources, even though it's basically suspended), but then once the match is done, the map part gets reopened and within making a few steps with the hero sprite, everything slows down horribly. Does anyone know if there's a good way to track down this memory leak?
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Shandalar Clone
by Marek14 » 20 Jul 2010, 07:13
Well, I always wanted a Shandalar where I would encounter the actual creatures from Magic, and not just "creatures one-removed". The problem always was that you'd either have to build a deck for each one or have a sophisticated random deck generator that could build theme decks and so.
I posted some of my ideas in the "Third Quest" thread (ages of Magic etc).
First of all, the terrain. I don't think it's a big stretch to have terrain types corresponding to Magic. So if we start with the Unlimited model, we'd have Plains, Island, Swamp, Mountain and Forest squares, plus the dual squares (Tundra/Underground Sea/Badlands/Taiga/Savannah + Scrubland/Bayou/Tropical Island/Volcanic Island/Plateau). They should generally form clusters. Normal Islands in particular will be represented by not only islands but also seas and rivers.
Another terrain type would be "Void". Void can't be entered. It is beyond the edge of the map (unless it wraps, which it might do in some worlds), and it also appears when a terrain square is destroyed. In that case, destroyed squares will slowly regenerate, mostly by replicating the neighbours, but with a possibility of a surprising terrain change.
Basically, the terrain would determine the type of encounter. Encounter would be determined like this:
1. Select a creature at random
2. Find the percentage for the creature. If it's 0, go back to 1.
3. If a random roll satisfies the percentage, the creature appears, otherwise go back to 1.
The percentage would be 100% if you're on the terrain corresponding to the creature's color, 50% if you are on a square next to such a terrain, 25% if you are two squares away, and 0% otherwise. Colorless creatures always get 100%. Multicolored creatures get separate percentages for each color, which are then multiplied (for gold cards) or probabilistically added (for hybrids). Marisi's Twinclaws and friends needs a bit more complicated formula, but it should be clear. Reaper King, Transguild Courier and Kobolds are treated as colorless.
Some cards in your collection can be "burned" or "expended" to have some effect. For example, by burning Armageddon, you can destroy 3*3 area of the map, replacing it with Void. Burning Divination will add two random cards to your collection.
Thinking of creatures, I came up with some basic rules for their decks:
1. The starting life total is 10 times the creature's CMC. (10 minimum)
2. The creature plays 30*CMC cards in the deck (30 minimum, to make milling harder even for bigger creatures). However, instead of a 4-card limit, it has limit of 2*CMC (minimum of 2). If the creature has a theme, the same theme is in the deck (for example, Goblin King would obviously play a Goblin deck, Steel Overseer would play a deck with lots of artifact creatures, Nemesis of Reason would have a mill deck etc.). On the other hand, non-themed creatures like Goblin Piker can simply have a totally random deck.
3. The poison limit of a creature is half of its life total. So a 50-life creature will only die with 25 poison counters instead of 10.
4. The creature always plays the maximum allowed number of copies of its own card, and it always starts with at least one of those cards in its hand.
5. The colors a creature plays reflect itself. Usually, a creature plays a deck of its colors, but there's lots of exceptions:
Colorless creatures get a color assigned randomly so they could have spells (unless they already have a color theme, like Cobalt Golem or Tangle Golem).
If a creature requires some other colors to work at the maximum efficiency, it gets them, but not in such amount as their main color(s). For example, a Thunderscape Battlemage will play a red deck with some black and green in it. Matca Rioters will play a predominantly green deck with some presence of all four other colors. Scarred Puma will have either black or green in its deck.
For some creatures, their "main" color will be actually a minor color in the deck. Stormscape Familiar would play a deck that is predominantly white (or black, but the card won't work any better if you play both), and only has a small blue presence to support the Familiar itself. Goham Djinn will play a deck of random color with only a minimum of black to support itself.
The basic rule is to play the minimum number of colors that will still allow the creature to function as it's supposed to.
6. The rarity of a creature affects the composition of deck (rarer creature have better decks) and also the encounter rate. Uncommon creatures get extra 50% percentage, rare creatures extra 25%.
7. Apart from creatures it would be also possible to encounter a planeswalker. They could be in the same list as creatures, but since there are so many more creatures than planeswalkers, they would appear very infrequently. Planeswalkers always have 100% percentage (plus rarity modifier), they are not limited by terrain.
8. Creatures might have special rules. For example, when you fight Grave Titan, you have to fight two Zombies first (generic black decks, life total transfer to next fight) before tackling the Titan itself.
9. Defeating a creature will get you a small stash of cards which will always include at least one card of that particular creature. Normally, the size of stash is <the creature card> + (CMC of creature (at least 1))*(3 for uncommon, 5 for rare). So, defeating a common creature with CMC 1 will give you just 1 additional card, while defeating a Shivan Dragon (rare with CMC 6) will give you 30 extra cards in addition to Shivan Dragon card itself. Creatures won't give out rewards of higher rarity than their own. Some creatures get special rewards, for example Hoarding Dragon will always give you a completely random artifact as an extra).
10. Being defeated will cause you to lose the same amount of randomly chosen cards as you would have won! (depends also on chosen difficulty level)
11. Some abilities have common effects:
Flying -- if you obtain flying (for example by burning up Jump or Flight), only creatures with flying or reach can attack you for a given time (Creatures like Geyser Glider can attack you under 50% extra percentage).
Horsemanship -- if you obtain it, only creatures with horsemanship will attack you.
Landwalk -- if you have landwalk, you are completely free from random encounters, as long as you are in the appropriate terrain.
Unblockability -- no random encounters, period.
Protection -- you can't be attacked by creatures matching the protection requirement.
Shadow -- you can be attacked only by creatures with shadow (and things like Heartwood Dryad). However, you need to have shadow in order to be attacked by shadow creatures.
Fear -- only black and artifact creatures will attack you.
etc.
A square might contain a town or dungeon. Towns and dungeons are not special terrain types (though this might be more complicated with lands that represent buildings and dwellings like City of Brass, An-Havva Township or Gargoyle Castle).
In towns, Shandalar-style, are markets and quest-givers.
Markets: Allows you to buy or sell cards for money. There could be a "gamble" option (buying a booster of unknown cards). The wares on market depend on town's location. For example, it will only sell land cards for lands that are close to the town.
Quests: Basic types of quests would be:
1. Give the quest-giver a particular card or a card from a certain group (black sorcery, card with "Time" in its name, etc.)
2. Defeat a particular creature in the vicinity of the town.
3. Defeat a menace - a rare creature that will appear on the map after you get this quest. You are told what creature is this.
4. Defeat a swarm - a group of common creatures you have to defeat one after one. Your life total transfers between fights (maybe poison counters as well).
Dungeons
Dungeons are basically a series of floors. On each floor you encounter some enemies (life total transfers between fights). No common creatures appear in the dungeons. Every floor is composed of several terrain-appropriate uncommon creatures followed by the rare boss. (N-th floor has N uncommons plus boss).
In a dungeon, you don't get rewards for beating individual opponents, apart from their own cards (and some special bonuses). Instead you get a stash of appropriate uncommon and rare cards that increases in size with floor. Dungeons on a basic land have 3 floors, on a common land 5, uncommon 10 and rare 20.
The uncommon stash could be 6 cards per floor and the rare stash 2 cards per floor.
Do you like any of these ideas?
I posted some of my ideas in the "Third Quest" thread (ages of Magic etc).
First of all, the terrain. I don't think it's a big stretch to have terrain types corresponding to Magic. So if we start with the Unlimited model, we'd have Plains, Island, Swamp, Mountain and Forest squares, plus the dual squares (Tundra/Underground Sea/Badlands/Taiga/Savannah + Scrubland/Bayou/Tropical Island/Volcanic Island/Plateau). They should generally form clusters. Normal Islands in particular will be represented by not only islands but also seas and rivers.
Another terrain type would be "Void". Void can't be entered. It is beyond the edge of the map (unless it wraps, which it might do in some worlds), and it also appears when a terrain square is destroyed. In that case, destroyed squares will slowly regenerate, mostly by replicating the neighbours, but with a possibility of a surprising terrain change.
Basically, the terrain would determine the type of encounter. Encounter would be determined like this:
1. Select a creature at random
2. Find the percentage for the creature. If it's 0, go back to 1.
3. If a random roll satisfies the percentage, the creature appears, otherwise go back to 1.
The percentage would be 100% if you're on the terrain corresponding to the creature's color, 50% if you are on a square next to such a terrain, 25% if you are two squares away, and 0% otherwise. Colorless creatures always get 100%. Multicolored creatures get separate percentages for each color, which are then multiplied (for gold cards) or probabilistically added (for hybrids). Marisi's Twinclaws and friends needs a bit more complicated formula, but it should be clear. Reaper King, Transguild Courier and Kobolds are treated as colorless.
Some cards in your collection can be "burned" or "expended" to have some effect. For example, by burning Armageddon, you can destroy 3*3 area of the map, replacing it with Void. Burning Divination will add two random cards to your collection.
Thinking of creatures, I came up with some basic rules for their decks:
1. The starting life total is 10 times the creature's CMC. (10 minimum)
2. The creature plays 30*CMC cards in the deck (30 minimum, to make milling harder even for bigger creatures). However, instead of a 4-card limit, it has limit of 2*CMC (minimum of 2). If the creature has a theme, the same theme is in the deck (for example, Goblin King would obviously play a Goblin deck, Steel Overseer would play a deck with lots of artifact creatures, Nemesis of Reason would have a mill deck etc.). On the other hand, non-themed creatures like Goblin Piker can simply have a totally random deck.
3. The poison limit of a creature is half of its life total. So a 50-life creature will only die with 25 poison counters instead of 10.
4. The creature always plays the maximum allowed number of copies of its own card, and it always starts with at least one of those cards in its hand.
5. The colors a creature plays reflect itself. Usually, a creature plays a deck of its colors, but there's lots of exceptions:
Colorless creatures get a color assigned randomly so they could have spells (unless they already have a color theme, like Cobalt Golem or Tangle Golem).
If a creature requires some other colors to work at the maximum efficiency, it gets them, but not in such amount as their main color(s). For example, a Thunderscape Battlemage will play a red deck with some black and green in it. Matca Rioters will play a predominantly green deck with some presence of all four other colors. Scarred Puma will have either black or green in its deck.
For some creatures, their "main" color will be actually a minor color in the deck. Stormscape Familiar would play a deck that is predominantly white (or black, but the card won't work any better if you play both), and only has a small blue presence to support the Familiar itself. Goham Djinn will play a deck of random color with only a minimum of black to support itself.
The basic rule is to play the minimum number of colors that will still allow the creature to function as it's supposed to.
6. The rarity of a creature affects the composition of deck (rarer creature have better decks) and also the encounter rate. Uncommon creatures get extra 50% percentage, rare creatures extra 25%.
7. Apart from creatures it would be also possible to encounter a planeswalker. They could be in the same list as creatures, but since there are so many more creatures than planeswalkers, they would appear very infrequently. Planeswalkers always have 100% percentage (plus rarity modifier), they are not limited by terrain.
8. Creatures might have special rules. For example, when you fight Grave Titan, you have to fight two Zombies first (generic black decks, life total transfer to next fight) before tackling the Titan itself.
9. Defeating a creature will get you a small stash of cards which will always include at least one card of that particular creature. Normally, the size of stash is <the creature card> + (CMC of creature (at least 1))*(3 for uncommon, 5 for rare). So, defeating a common creature with CMC 1 will give you just 1 additional card, while defeating a Shivan Dragon (rare with CMC 6) will give you 30 extra cards in addition to Shivan Dragon card itself. Creatures won't give out rewards of higher rarity than their own. Some creatures get special rewards, for example Hoarding Dragon will always give you a completely random artifact as an extra).
10. Being defeated will cause you to lose the same amount of randomly chosen cards as you would have won! (depends also on chosen difficulty level)
11. Some abilities have common effects:
Flying -- if you obtain flying (for example by burning up Jump or Flight), only creatures with flying or reach can attack you for a given time (Creatures like Geyser Glider can attack you under 50% extra percentage).
Horsemanship -- if you obtain it, only creatures with horsemanship will attack you.
Landwalk -- if you have landwalk, you are completely free from random encounters, as long as you are in the appropriate terrain.
Unblockability -- no random encounters, period.
Protection -- you can't be attacked by creatures matching the protection requirement.
Shadow -- you can be attacked only by creatures with shadow (and things like Heartwood Dryad). However, you need to have shadow in order to be attacked by shadow creatures.
Fear -- only black and artifact creatures will attack you.
etc.
A square might contain a town or dungeon. Towns and dungeons are not special terrain types (though this might be more complicated with lands that represent buildings and dwellings like City of Brass, An-Havva Township or Gargoyle Castle).
In towns, Shandalar-style, are markets and quest-givers.
Markets: Allows you to buy or sell cards for money. There could be a "gamble" option (buying a booster of unknown cards). The wares on market depend on town's location. For example, it will only sell land cards for lands that are close to the town.
Quests: Basic types of quests would be:
1. Give the quest-giver a particular card or a card from a certain group (black sorcery, card with "Time" in its name, etc.)
2. Defeat a particular creature in the vicinity of the town.
3. Defeat a menace - a rare creature that will appear on the map after you get this quest. You are told what creature is this.
4. Defeat a swarm - a group of common creatures you have to defeat one after one. Your life total transfers between fights (maybe poison counters as well).
Dungeons
Dungeons are basically a series of floors. On each floor you encounter some enemies (life total transfers between fights). No common creatures appear in the dungeons. Every floor is composed of several terrain-appropriate uncommon creatures followed by the rare boss. (N-th floor has N uncommons plus boss).
In a dungeon, you don't get rewards for beating individual opponents, apart from their own cards (and some special bonuses). Instead you get a stash of appropriate uncommon and rare cards that increases in size with floor. Dungeons on a basic land have 3 floors, on a common land 5, uncommon 10 and rare 20.
The uncommon stash could be 6 cards per floor and the rare stash 2 cards per floor.
Do you like any of these ideas?

Re: Shandalar Clone
by zaroblan » 20 Jul 2010, 07:37
This is an awesome idea!
I still play Shandalar often (using a Virtual PC running Windows 95 on my Windows 7 box).
I will be watching the progress intently!!!
I still play Shandalar often (using a Virtual PC running Windows 95 on my Windows 7 box).
I will be watching the progress intently!!!

- zaroblan
- Posts: 59
- Joined: 22 May 2009, 11:36
- Has thanked: 0 time
- Been thanked: 0 time
Re: Shandalar Clone
by Rob Cashwalker » 20 Jul 2010, 14:26
I'm liking the idea of random decks for random creatures. It makes the original random deck functionality meaningful in the quest mode.
Using actual creatures from Magic itself is a novel idea. I think Marek's numbers are way too high though.
Random Encounter creature selection- CMC of 1 - 7.
Random float from 0 to 1.0.
0.00000 - .035714: CMC 7
.035715 - .107142: CMC 6
.107143 - .214284: CMC 5
.214285 - .357140: CMC 4
.357141 - .535710: CMC 3
.535711 - .749995: CMC 2
.749995 - 1.00000: CMC 1
Starting life- I don't know what the actual average CMC of all creatures is, but let's say it's 4. 5 x 4 = 20. Does anyone really want to play against the AI for 40 life? I don't, not for the average random encounter. Now if there's an Enormous Baloth in a random encounter, then 5 x 7 = 35, which seems reasonable... big creature, long game. Likewise, if you encounter Goblin Mountaineer, a short game is all it should take anyway.
EDIT - The average converted mana cost of all cards in Forge is 3.
Deck size- Again, using CMC of 4, 15 x 4 = 60 cards. Enormous Baloth's deck will be 105 cards, plenty difficult to mill. I grant you, Goblin Mountaineer's deck of 15 cards isn't too scary, but let's face it, he can't carry a big deck in his loin-cloth.
Deck construction- Random deck of only the colors of the encountered creature.
Themes are a bit difficult to randomly generate without giving the engine a lot of extra information about themes and combos to generate the deck.
Multicolored creatures get multicolored decks of course.
Colorless creatures could be assigned two allied colors at random.
If and ONLY if there is another mana symbol of any kind in the creature's card text, should it be included at a proportional rate. (this goes for mono colored creatures too)
Only Basic lands - no dual lands or artifact mana sources should chosen.
Rarity should be taken into account, ie: 15% rare cards, 35% uncommon, and 50% common.
Starting game state- The creature starts in play, no haste.
If it dies, it is re-spawned at the beginning of its next turn, no haste.
Wins- Single games only. Winning the encounter nets you EITHER (randomly) {starting_life} credits or 2 x {cmc} random cards from its deck.
Loss- same possibilities, but negative.
Card-burning- I don't think it's worth adding in all those alternative uses for cards and alternative bonuses for defeating any given random creature.
Markets- Instead of not selling Islands from a market in the Plains, the market should sell it at a premium of 2 x {degrees of separation on the color wheel}. For example, and Island town market sells Islands at current market value, sells Plains and Swamps at 2x market value and Mountains at 4x market value. Same thing goes for off-color cards. Want to sell your Shivan Dragon for the most profit? Trek your way from the Mountains to the Islands... if you make it....
Dungeons - Meh... how about tournaments? When I was thinking of actual Earth maps, like NYC.. I was thinking it could be cool if the quest included simulated PTQ's or other high-stakes tournaments... that way NYC was just one location, and you would have to make your way to Philadelphia PA, then to Roanoke VA, etc. Along the way popping into card shops to play an FNM or other random encounters....
But a fantasy-style tournament could work too.
When in town, a tournament may be advertised. The first-place prize should be at least 200 credits. Scale the value up as the player gains levels. An entrance fee of 10% should be charged to get in.
4 Matches (best 2 out of 3) will be played against otherwise-normal random encounters. Maybe only CMC of 3+. Win the match, get the usual credits or cards for that win.
Lose any match, lose the tournament.
Our current quest decks can be re-purposed and assigned to appropriate Legendary creatures. Maybe, just maybe, they could start in play too. Any creature that has a purpose-built deck assigned to it should be taken out of the pool for random encounters. OR random encounters only with non-Legendary....
Using actual creatures from Magic itself is a novel idea. I think Marek's numbers are way too high though.
Random Encounter creature selection- CMC of 1 - 7.
Random float from 0 to 1.0.
0.00000 - .035714: CMC 7
.035715 - .107142: CMC 6
.107143 - .214284: CMC 5
.214285 - .357140: CMC 4
.357141 - .535710: CMC 3
.535711 - .749995: CMC 2
.749995 - 1.00000: CMC 1
Starting life- I don't know what the actual average CMC of all creatures is, but let's say it's 4. 5 x 4 = 20. Does anyone really want to play against the AI for 40 life? I don't, not for the average random encounter. Now if there's an Enormous Baloth in a random encounter, then 5 x 7 = 35, which seems reasonable... big creature, long game. Likewise, if you encounter Goblin Mountaineer, a short game is all it should take anyway.
EDIT - The average converted mana cost of all cards in Forge is 3.
Deck size- Again, using CMC of 4, 15 x 4 = 60 cards. Enormous Baloth's deck will be 105 cards, plenty difficult to mill. I grant you, Goblin Mountaineer's deck of 15 cards isn't too scary, but let's face it, he can't carry a big deck in his loin-cloth.
Deck construction- Random deck of only the colors of the encountered creature.
Themes are a bit difficult to randomly generate without giving the engine a lot of extra information about themes and combos to generate the deck.
Multicolored creatures get multicolored decks of course.
Colorless creatures could be assigned two allied colors at random.
If and ONLY if there is another mana symbol of any kind in the creature's card text, should it be included at a proportional rate. (this goes for mono colored creatures too)
Only Basic lands - no dual lands or artifact mana sources should chosen.
Rarity should be taken into account, ie: 15% rare cards, 35% uncommon, and 50% common.
Starting game state- The creature starts in play, no haste.
If it dies, it is re-spawned at the beginning of its next turn, no haste.
Wins- Single games only. Winning the encounter nets you EITHER (randomly) {starting_life} credits or 2 x {cmc} random cards from its deck.
Loss- same possibilities, but negative.
Card-burning- I don't think it's worth adding in all those alternative uses for cards and alternative bonuses for defeating any given random creature.
Markets- Instead of not selling Islands from a market in the Plains, the market should sell it at a premium of 2 x {degrees of separation on the color wheel}. For example, and Island town market sells Islands at current market value, sells Plains and Swamps at 2x market value and Mountains at 4x market value. Same thing goes for off-color cards. Want to sell your Shivan Dragon for the most profit? Trek your way from the Mountains to the Islands... if you make it....
Dungeons - Meh... how about tournaments? When I was thinking of actual Earth maps, like NYC.. I was thinking it could be cool if the quest included simulated PTQ's or other high-stakes tournaments... that way NYC was just one location, and you would have to make your way to Philadelphia PA, then to Roanoke VA, etc. Along the way popping into card shops to play an FNM or other random encounters....
But a fantasy-style tournament could work too.
When in town, a tournament may be advertised. The first-place prize should be at least 200 credits. Scale the value up as the player gains levels. An entrance fee of 10% should be charged to get in.
4 Matches (best 2 out of 3) will be played against otherwise-normal random encounters. Maybe only CMC of 3+. Win the match, get the usual credits or cards for that win.
Lose any match, lose the tournament.
Our current quest decks can be re-purposed and assigned to appropriate Legendary creatures. Maybe, just maybe, they could start in play too. Any creature that has a purpose-built deck assigned to it should be taken out of the pool for random encounters. OR random encounters only with non-Legendary....
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Shandalar Clone
by friarsol » 20 Jul 2010, 15:39
The progression of life totals doesn't seem right with x10. If minimum deck size is 40, you might just run out of steam before you are able to knock out 40 life, let alone 70.
Shandalar did a scalable life system.
So if you were playing on Easy, minimum life would be 4. On Very Hard, minimum life would be 10. I think 10 as a general minimum life is fine. Our starting decks are probably better than anything I've ever gotten in Shandalar. Then the creatures ramped from there.
IIRC, starting life totals (on very hard) for enemies were 10, 12, 14, 16, 18, 20, 22. Can't remember if it goes higher than that. Your life total started at 10 and you had to do quests to get it higher (not just pay money).
So maybe we can go minimum life is 10. Add 3-4 life for each "level" after the first. So this would make a "level 7" creature 28-34 starting life. This also makes a level 4, 19-22. This is similar to Rob's suggestion, but I think it fits better.
We could also manage the theme idea by having partially built "subdecks" that are built off of. So every level 1 goblin you fight will have the same subdeck (maybe 30 cards or so) and then the other 30 would be randomly generated in the appropriate colors. This would allow the theme to still fit, but the deck to be something new and interesting each time. There's probably a good way to limit which cards actually get used.
"Starting game state- The creature starts in play, no haste.
If it dies, it is re-spawned at the beginning of its next turn, no haste."
Erg. I don't like the idea of respawning it like that. The AI isn't smart enough to break that, but if it's returning directly to play every turn, it could just keep chump blocking at no actual cost.
Shandalar did a scalable life system.
So if you were playing on Easy, minimum life would be 4. On Very Hard, minimum life would be 10. I think 10 as a general minimum life is fine. Our starting decks are probably better than anything I've ever gotten in Shandalar. Then the creatures ramped from there.
IIRC, starting life totals (on very hard) for enemies were 10, 12, 14, 16, 18, 20, 22. Can't remember if it goes higher than that. Your life total started at 10 and you had to do quests to get it higher (not just pay money).
So maybe we can go minimum life is 10. Add 3-4 life for each "level" after the first. So this would make a "level 7" creature 28-34 starting life. This also makes a level 4, 19-22. This is similar to Rob's suggestion, but I think it fits better.
We could also manage the theme idea by having partially built "subdecks" that are built off of. So every level 1 goblin you fight will have the same subdeck (maybe 30 cards or so) and then the other 30 would be randomly generated in the appropriate colors. This would allow the theme to still fit, but the deck to be something new and interesting each time. There's probably a good way to limit which cards actually get used.
"Starting game state- The creature starts in play, no haste.
If it dies, it is re-spawned at the beginning of its next turn, no haste."
Erg. I don't like the idea of respawning it like that. The AI isn't smart enough to break that, but if it's returning directly to play every turn, it could just keep chump blocking at no actual cost.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Shandalar Clone
by Marek14 » 20 Jul 2010, 15:53
First of all, the numbers are all pulled out of... somewhere without testing. They were meant only as an example.
As for limiting additional colors to mana symbols, I'm not sure if that's wise. I mean, what about things like Bloodhall Ooze? No mana symbols, yet it's clearly not something that should play a monocolored deck.
I think that the problem with themed decks and so on might be resolved by simply allowing both random and preconstructed decks. If we think that Master of Etherium should have an artifact-heavy deck instead of a normal blue random one, then we simply won't add Master of Etherium as a possible opponent until someone actually builds the deck for him.
I was thinking about starting with the creature on the battlefield, the problem is that not all of them are suitable.
Some creatures won't survive on the battlefield by themselves, or would start way too weak, like Dakkon Blackblade. Fair enough, you have auto-revival. Some creatures, though, will die every time (Force of Savagery or X-cost creatures... and what about Phage?). Though X-cost creatures might be resolved by increasing the X by 1 in every incarnation...
Some creatures would, on the other hand, be overly strong. Any Eldrazi Titan, even a lowly Ulamog's Crusher, would be extremely hard to beat unless you got rid of it right away -- and I don't think the matches should be about that much luck. With the card in hand from the beginning, it will be somewhat fair.
I was also thinking of tribal challenges... I built a list of files for various creature types that show all creatures of that type separated by CMC, it was meant to be a tournament-style where you face off against random creature with CMC 1, then 2, then 3... et cetera. Each would have some evocative name... For example the Ooze challenge would have seven matches:
Round 1: Bloodhall Ooze, Mwonvuli Ooze or Primordial Ooze
Round 2: Consumptive Goo (only possible opponent)
Round 3: Earthen Goo, Gluttonous Slime, Manaplasm or Necroplasm
Round 4: Chaotic Goo
Round 5: Acidic Slime, Bioplasm, Mephitic Ooze or Mitotic Slime
Round 6: Experiment Kraj
Round 7 - boss: Ancient Ooze
The most expensive creature in every type is usually something truly special... except for the Human challenge where the final boss would be a toss-up between Scornful Egotist and Gigantomancer.
Markets: I'd say that the enemy cards would be probably bought and sold not in normal shop but on Black Market... especially in white towns
And black markets are expensive. Eventually, there might be rogues there who will play with you for ante 
As for limiting additional colors to mana symbols, I'm not sure if that's wise. I mean, what about things like Bloodhall Ooze? No mana symbols, yet it's clearly not something that should play a monocolored deck.
I think that the problem with themed decks and so on might be resolved by simply allowing both random and preconstructed decks. If we think that Master of Etherium should have an artifact-heavy deck instead of a normal blue random one, then we simply won't add Master of Etherium as a possible opponent until someone actually builds the deck for him.
I was thinking about starting with the creature on the battlefield, the problem is that not all of them are suitable.
Some creatures won't survive on the battlefield by themselves, or would start way too weak, like Dakkon Blackblade. Fair enough, you have auto-revival. Some creatures, though, will die every time (Force of Savagery or X-cost creatures... and what about Phage?). Though X-cost creatures might be resolved by increasing the X by 1 in every incarnation...
Some creatures would, on the other hand, be overly strong. Any Eldrazi Titan, even a lowly Ulamog's Crusher, would be extremely hard to beat unless you got rid of it right away -- and I don't think the matches should be about that much luck. With the card in hand from the beginning, it will be somewhat fair.
I was also thinking of tribal challenges... I built a list of files for various creature types that show all creatures of that type separated by CMC, it was meant to be a tournament-style where you face off against random creature with CMC 1, then 2, then 3... et cetera. Each would have some evocative name... For example the Ooze challenge would have seven matches:
Round 1: Bloodhall Ooze, Mwonvuli Ooze or Primordial Ooze
Round 2: Consumptive Goo (only possible opponent)
Round 3: Earthen Goo, Gluttonous Slime, Manaplasm or Necroplasm
Round 4: Chaotic Goo
Round 5: Acidic Slime, Bioplasm, Mephitic Ooze or Mitotic Slime
Round 6: Experiment Kraj
Round 7 - boss: Ancient Ooze
The most expensive creature in every type is usually something truly special... except for the Human challenge where the final boss would be a toss-up between Scornful Egotist and Gigantomancer.
Markets: I'd say that the enemy cards would be probably bought and sold not in normal shop but on Black Market... especially in white towns


Re: Shandalar Clone
by DennisBergkamp » 20 Jul 2010, 16:01
These are all awesome ideas! Some of them might be a bit tricky to implement though... but I like the idea of playing against random creature cards.
Anyway, I'll comment more on this later, when I have time.
As for the performance hit, I've been running some tests and I'm not sure what's going on. If I run the map alone, I can run around for half an hour (random encounters disabled) and there won't be a problem. Forge runs fine on itself also. Then, as soon as play a game from the map, the game will crash and burn in a matter of seconds. Am I loading too many classes?
Anyway, I'll comment more on this later, when I have time.
As for the performance hit, I've been running some tests and I'm not sure what's going on. If I run the map alone, I can run around for half an hour (random encounters disabled) and there won't be a problem. Forge runs fine on itself also. Then, as soon as play a game from the map, the game will crash and burn in a matter of seconds. Am I loading too many classes?
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Shandalar Clone
by Rob Cashwalker » 20 Jul 2010, 16:32
What's the pixel size of the map? I'm pretty sure that no matter what format and size the picture is on disk, once it's loaded into memory, it becomes a data structure that is full 24 bit RGB(Alpha?)
You may have to work out a scheme, where the "continent" image is divided into much smaller images. (think Legend of Zelda for NES 8-bit) These images can be loaded and unloaded more like the card images are.
Slightly related - did anyone read about the Eternities Map format for Planechase? The Planes are laid out in a NSWE pattern. When you planeswalk, you can choose which direction you want to go (NSWE).
You may have to work out a scheme, where the "continent" image is divided into much smaller images. (think Legend of Zelda for NES 8-bit) These images can be loaded and unloaded more like the card images are.
Slightly related - did anyone read about the Eternities Map format for Planechase? The Planes are laid out in a NSWE pattern. When you planeswalk, you can choose which direction you want to go (NSWE).
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Shandalar Clone
by DennisBergkamp » 20 Jul 2010, 17:07
It's a 2250x3000 gif, which should "only" take up 27 megs in memory if my calculations are correct (assuming it's actually 32 bit).
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Shandalar Clone
by Rob Cashwalker » 20 Jul 2010, 17:09
Pfft... only 27 megs...
Yeah, I think that's a good portion of your problem.
Yeah, I think that's a good portion of your problem.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Shandalar Clone
by DennisBergkamp » 20 Jul 2010, 17:26
Is 27 megs that much? It's a good chunk I guess... I'll test it with a smaller map, perhaps I do have to tile this whole thing.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Shandalar Clone
by Rob Cashwalker » 20 Jul 2010, 17:59
I don't think it's so much the raw size of it, as much as it is in how Java manages things. It's probably very similar to how it sometimes chokes on the HQ pictures.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Shandalar Clone
by friarsol » 20 Jul 2010, 20:09
Consider splitting up the map into zones/buckets (maybe 20x20 squares or something) and only loading in zones when you are within 1 zone distance, and unloading zones when further than 2 zones away.
This way you don't have the full map always in memory and you can drop things in and out as necessary. This would also allow you to create any monsters in an area when that zone is loaded on the map. This would be using a graph structure to determine all that fun extra stuff.
You would start with 9 zones loaded. Starting zone and 1 in each cardinal directions. Then when you move 1 zone in any direction 6 zones will load in that are bordering the current zone. Any time you move zones, check all the "near" zones, and load any that aren't already loaded. Then check the distance each loaded zone is to the activeZone, loading out any that are "far".
This way you don't have the full map always in memory and you can drop things in and out as necessary. This would also allow you to create any monsters in an area when that zone is loaded on the map. This would be using a graph structure to determine all that fun extra stuff.
You would start with 9 zones loaded. Starting zone and 1 in each cardinal directions. Then when you move 1 zone in any direction 6 zones will load in that are bordering the current zone. Any time you move zones, check all the "near" zones, and load any that aren't already loaded. Then check the distance each loaded zone is to the activeZone, loading out any that are "far".
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Shandalar Clone
by DennisBergkamp » 20 Jul 2010, 20:47
I did shrink the image a bit, to see if it makes a difference, and yes, it definitely does.
Although 27 megs was an exaggeration, the image is only 8 bits, which I think amounts to almost 7 megabytes.
Friarisol, this sounds like a good way to do it... I'll see if I can get something like that working.
Although 27 megs was an exaggeration, the image is only 8 bits, which I think amounts to almost 7 megabytes.
Friarisol, this sounds like a good way to do it... I'll see if I can get something like that working.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 23 guests