One slight deviation from the old Clarion application is that I have instituted player pools as a starting point for a tournament. All players for a tournament are entered into a sorted list (player pool) that the tournament template draws from. This allows the generation of the player pool to be independent from the tournament template and can therefore be used to test all sorts of varied starting positions and even seeding patterns.
For smaller tournament formats (8 players or less), every possible player pool combination can be generated and used in sequence to eliminate another possible bias. For 8 players this would be 40320 combinations (8 factorial). If a tournament is larger than 8, you could potentially take the top 8 combinations and interleave other random players to give 16, 32, 64, or 128 player pools. This would give a large control set (~40,000 samples), but at least give a somewhat even spread of higher candidates.Unfortunately it would also eliminate the random chance that the most skilled player meets the second most skilled player in round 1 of a 128 player tournament. Since generating a random player pool will be quite easy, I can also test the difference of these two formats and isolate a specific amount of bias due to potential seeding.
Showing posts with label Design. Show all posts
Showing posts with label Design. Show all posts
Monday, March 28, 2016
TournamentCompare v0.003 - Validating a tournament template
Because the tournament template system is flexible enough to allow all sorts of formats, it is also flexible enough to bring in all sorts of loops, missing players, unlinked matches, etc, so I'll be making up a validator to vet each tournament template before running thousands of tests on an invalid tournament.
Here's the high level pseudocode:
Here's the high level pseudocode:
- Start with the final match and work back along the player entry locations until all matches have been processed into a list (vettedMatchList) and all the players are in another list (competitorList). This also sets the match layer (how deep into the tournament that this match represents)
- Check to make sure that all TournamentTemplateMatches for this TournamentTemplate have been accounted for.
- Check to make sure that all competitors have an entry into the tournament
- Build a list (noExitMatchList) for each match that 2nd place continues in the tournament.This is combined with the match layer to evaluate final exit position for 2nd placegetters that do NOT continue.
- Mark the tournament as valid and update the database with match layers & exit positions.
Monday, August 24, 2015
TournamentCompare v0.002 - Enumerated Types in data first MVC
After tinkering with the controllers and views, I decided to look into a way to display the enumerated types used to set where the players were previously before this match. Ideally I wanted a radio control (as I had in Clarion), but the formatting eluded me for a super clean and simple implementation without losing data first design. In the end it turned out to be easier as a byte-stored enumerated type that can then be edited as a droplist.
Because each match could be pointing back to another match or another round (I'm assuming that subtournament aggregators can be handled by the round template with no rounds), I needed a concrete way of storing which type it was. Setting the PreviousType to "Match"would also mean that the PreviousMatchID is now valid, whereas if "Round"was the previous type then the PreviousRoundID would be valid.
Because I want to continually bring in database changes, I was keen to find a way that left the enumeration types already bound. I'd initially added the types in as another model, but found out later that you can add them directly into the model designer of the database with a right click > add > enum or by adding it to the enum types in the model browser. You can then change the fields to the new enumerated type. Doing this way it maintains the enum inside the database design (and scope) and also doesn't drop the assignment of the enum when the database is reloaded.
The display fields handled the enum perfectly, but the editing fields treated it like a string. There was some additional code to manually change the @html.EditorFor() to a @Html.EnumDropDownFor(), but I really wanted to be able to regenerate the controllers and views for any data first changes, so eventually settled on adding a html helper to overload the EditorFor() when an enum is detected.
Tournament Templates
One of the main parts of the program is to be able to put together any tournament format and then be able to run through thousands of tests to see the inherent bias of the tournament type. The tournament templates to be tested would then need to be anything from single elim, round robin, double elim, swiss, world cup rounds into single elim, etc. To achieve this, each tournament template would be a combination of TournamentTemplateMatches where each match accepts the 2 entering players from either the original player pool at the start of the tournament, another match previously held (Eg: single elim final match accepts the winners from the semifinals matches), a round robin subtournament, or an aggregator of previous scores to create a subtournament pool of ranked players.Because each match could be pointing back to another match or another round (I'm assuming that subtournament aggregators can be handled by the round template with no rounds), I needed a concrete way of storing which type it was. Setting the PreviousType to "Match"would also mean that the PreviousMatchID is now valid, whereas if "Round"was the previous type then the PreviousRoundID would be valid.
Enumerated Types in data first MVC
Ideally I'd like to see in the database the type listed so that the data is a bit more human readable, but after investigation it seems that C# prefers integers or Bytes as the underlying enumerator value. I'd debated changing them to integers, but decided to use bytes instead (Tinyint in SQL) so that they appear as a different type in not to be confused with an ID. Changing the database wasn't too hard after manually changing the data to conform, then updating the field type in the designer.Because I want to continually bring in database changes, I was keen to find a way that left the enumeration types already bound. I'd initially added the types in as another model, but found out later that you can add them directly into the model designer of the database with a right click > add > enum or by adding it to the enum types in the model browser. You can then change the fields to the new enumerated type. Doing this way it maintains the enum inside the database design (and scope) and also doesn't drop the assignment of the enum when the database is reloaded.
The display fields handled the enum perfectly, but the editing fields treated it like a string. There was some additional code to manually change the @html.EditorFor() to a @Html.EnumDropDownFor(), but I really wanted to be able to regenerate the controllers and views for any data first changes, so eventually settled on adding a html helper to overload the EditorFor() when an enum is detected.
Posted byVRBones
at7:47 PM
0 comments
Labels:Design,MVC,Programming,SQL,Tournament,TournamentCompare
Friday, August 21, 2015
TournamentCompare 0.001
I've been weighing up what programming project to work on for a while. I had Factor Friends as the front runner, but the move to a facebook friends variant didn't pan out as facebook now only allows access to friends of friends to only those who have installed / run your application. In some ways it is sad that the original concept cannot be done, but at least it wasn't made completely redundant if I had finished it before the changed the API.
On to TournamentCompare. I have been meaning to return to the Designing a Tournament series of articles for a while and it's really at the stage where I need some actual stats to pull together some comparisons. I had written a tournament analysis program back in 2006 to do some of the bias analysis, but since then I'd lost the Clarion development environment and couldn't continue modifying it for non-perfect play. So, a total rewrite is in order and hopefully make it web based and accessible for others to vet and build their own tournament types.
After a bit of digging it seems that another MVC application should be pretty easy, but use bootstrap to help with the presentation and graphs. Even though code first EF design seems to be more prevalent these days, I'm still a stickler for getting the data right so I've stuck with data first design.
Starting off the app in Visual Studio 2013 was pretty easy following this data first tutorial, although I'd created the MVC app first before creating the database. VS 2013 now has the ability to immediately add a SQL database right into the MVC project and create / modify tables and data right from within Visual Studio. I'm impressed! Within 1/2 hr I had the first TournamentTemplate tables done and looked like getting the others completed was just a matter of time. Went back to the tutorial to build up the entity framework for the starting tables, but unfortunately a VS crash took out the project connectors. Since it was so early I dumped and recreated the project with only the database making its way into the new project. EF done. Checked a quick update of the DB to make sure the EF would also update, and it looks pretty good so far.
On to TournamentCompare. I have been meaning to return to the Designing a Tournament series of articles for a while and it's really at the stage where I need some actual stats to pull together some comparisons. I had written a tournament analysis program back in 2006 to do some of the bias analysis, but since then I'd lost the Clarion development environment and couldn't continue modifying it for non-perfect play. So, a total rewrite is in order and hopefully make it web based and accessible for others to vet and build their own tournament types.
After a bit of digging it seems that another MVC application should be pretty easy, but use bootstrap to help with the presentation and graphs. Even though code first EF design seems to be more prevalent these days, I'm still a stickler for getting the data right so I've stuck with data first design.
Starting off the app in Visual Studio 2013 was pretty easy following this data first tutorial, although I'd created the MVC app first before creating the database. VS 2013 now has the ability to immediately add a SQL database right into the MVC project and create / modify tables and data right from within Visual Studio. I'm impressed! Within 1/2 hr I had the first TournamentTemplate tables done and looked like getting the others completed was just a matter of time. Went back to the tutorial to build up the entity framework for the starting tables, but unfortunately a VS crash took out the project connectors. Since it was so early I dumped and recreated the project with only the database making its way into the new project. EF done. Checked a quick update of the DB to make sure the EF would also update, and it looks pretty good so far.
Posted byVRBones
at11:40 AM
0 comments
Labels:Clarion,Design,MVC,Programming,SQL,Tournament,TournamentCompare,Web Design
Thursday, February 27, 2014
First the Worst play mat v2
Turned out the card sizes were too small, so I redesigned the "My card / Your card" space into a single round space (as it makes not difference who plays the card). This gave a little room up the top to add rules and a scoring pad. I like the idea of an aggregate score to be seen in one place by everyone, but I'll see how this goes.
Tuesday, October 01, 2013
Calculation of win percentages
This article is part of a series on designing a tournament:
Part 1 - Designing a Tournament
Part 2 - A grading system
Part 3 - Calculation of Win Percentages (this article)
One holdup in determining a grade for different tournament system is to settle on an algorithm to give consistent win percentages that scale with the difference in true skill of the competitors. Initially I had used a 100% win ratio to the higher ranked player for determining the inherent bias in a tournament system so that the result could be clear of as many other biases as possible, however this precludes tournaments that attempted to add more games to a match for bias reduction. Without some chance for the lower ranked player to overcome a higher ranked player (even a slim chance) there would be no need to play best of 3 matches, best of 5 matches and the like for the better player to prove their worth.
Ideally I'd like to come up with a system that gives a win chance similar to a standard deviation bell curve or some sort of sigmoid function that granted ever higher win chances the greater the skill difference was between players. As it turns out, the bell curve presented as a cumulative chance for success also appears as a sigmoid. Also, the idea of having ranks of importance to also determine the relative skill differences appeals as the difference between 2nd & 5th should be far more significant than the difference between 32nd and 35th. Even though there may not be a bell curve of skill displayed at the tournament, it would be prudent to assume that we have the top end of the bell curve in attendance.
After a couple of attempts at mapping the ranks of importance onto units of standard deviation, another mathematical nicety presented itself: The inverse ratio of each player's true skill produces the same ratio between ranks: 2:1. Eg: 2nd in true skill play 4th in true skill (1 rank apart) gives 4:2 => 2:1. 8th plays 16th (1 rank apart) gives 16:8 => 2:1. 2nd plays against 8th (2 ranks apart) gives 8:2 => 4:1. 4th plays 16th (2 ranks apart) gives 16:4 => 4:1.
This inverse ratio means a difference of one rank has 66% chance to win over their opponent, a difference of 2 ranks gives 75% chance to win, 3 ranks gives 88.5% chance, etc. Not quite as steep as the standard deviation steps, but follows along the same shape as cumulative chance for success. This should fit quite nicely for now.
Part 1 - Designing a Tournament
Part 2 - A grading system
Part 3 - Calculation of Win Percentages (this article)
One holdup in determining a grade for different tournament system is to settle on an algorithm to give consistent win percentages that scale with the difference in true skill of the competitors. Initially I had used a 100% win ratio to the higher ranked player for determining the inherent bias in a tournament system so that the result could be clear of as many other biases as possible, however this precludes tournaments that attempted to add more games to a match for bias reduction. Without some chance for the lower ranked player to overcome a higher ranked player (even a slim chance) there would be no need to play best of 3 matches, best of 5 matches and the like for the better player to prove their worth.
Ideally I'd like to come up with a system that gives a win chance similar to a standard deviation bell curve or some sort of sigmoid function that granted ever higher win chances the greater the skill difference was between players. As it turns out, the bell curve presented as a cumulative chance for success also appears as a sigmoid. Also, the idea of having ranks of importance to also determine the relative skill differences appeals as the difference between 2nd & 5th should be far more significant than the difference between 32nd and 35th. Even though there may not be a bell curve of skill displayed at the tournament, it would be prudent to assume that we have the top end of the bell curve in attendance.
After a couple of attempts at mapping the ranks of importance onto units of standard deviation, another mathematical nicety presented itself: The inverse ratio of each player's true skill produces the same ratio between ranks: 2:1. Eg: 2nd in true skill play 4th in true skill (1 rank apart) gives 4:2 => 2:1. 8th plays 16th (1 rank apart) gives 16:8 => 2:1. 2nd plays against 8th (2 ranks apart) gives 8:2 => 4:1. 4th plays 16th (2 ranks apart) gives 16:4 => 4:1.
This inverse ratio means a difference of one rank has 66% chance to win over their opponent, a difference of 2 ranks gives 75% chance to win, 3 ranks gives 88.5% chance, etc. Not quite as steep as the standard deviation steps, but follows along the same shape as cumulative chance for success. This should fit quite nicely for now.
Tuesday, November 06, 2012
Notoriously Databased v0.40
After a couple more discussions, I'm happy enough to include a notoriety limit as an end game scenario. The implementation was relatively straightforward to include a notoriety limit and a check to see if any player has been over the limit in successive turns. Also decided to limit the submission of turns once there has been a winner as it's not that hard to reset the "completed" game if there is a consensus to play further. This also adds to the finality of the game as all that is left is to read the story produced.
Now that it's a game in its own right, the next step will be to break out the game creation into its own form, and then lock off the admin tab completely. There shouldn't be any need for people to get into the admin tab once the game gets going.
Now that it's a game in its own right, the next step will be to break out the game creation into its own form, and then lock off the admin tab completely. There shouldn't be any need for people to get into the admin tab once the game gets going.
Sunday, November 04, 2012
Notoriously Databased v0.32
Another playthrough of NotoriouslyDB with Grieg and Sandy revealed yet another handful of bugs, but all were relegated to the bin by the time the night was out. I've even come up with an endgame of sorts that should fit in well with the style of game that it is.
Each game will have a notoriety limit placed on it. Once somone passes this limit, they are eligible to win the next turn if they are not wiped and remain above the limit. Hopefully this should give people time to react against the current leader when they first break the win limit, but will become harder and harder to keep them (and eventually others) from winning.
From the playthrough tonight I'd expect a limit of 30-50 to be adequate as by then it feels like you have mastery over the village and can ramp up in power fairly easily. Lower limits will be more for advanced players as it will require more management to cram both the middle -> late phase transition and maneuvering for the end game into the same timeframe.
If it survives a couple more thought experiments, it should be relatively easy to implement and even automate.
Bounties are quite simple. Place a treasure amount against another player and that increases their notoriety by that amount next turn. The bounty is public, so that other can see not only who has the bounty, but who placed it too. I've been contemplating having a way to hide who placed it, but that will most likely be rolled into the Raid disguise update in the future. At least the variables are in place on the batabase to support it when the time comes.
- Fixed attacks on other players
- Fixed defense with both elites and minions
- Fixed multiple player attacks on other players
- Added notoriety list to CharacterSubmission to see other player's notoriety. (This will be to make the game more, well, gamey, and give better feedback for the endgame)
There is still an issue with fortifications. I'm leaning toward an increasing scale of costs as 5 treasure seems fine at the start, but too little at the end.
End Game
I've tried to come up with a couple of viable endgame scenarios, but most either bred a deflated finish when one person pulled ahead in the power curve, or could be colluded a little too easily for my liking. The current endgame looks at sustained notoriety.Each game will have a notoriety limit placed on it. Once somone passes this limit, they are eligible to win the next turn if they are not wiped and remain above the limit. Hopefully this should give people time to react against the current leader when they first break the win limit, but will become harder and harder to keep them (and eventually others) from winning.
From the playthrough tonight I'd expect a limit of 30-50 to be adequate as by then it feels like you have mastery over the village and can ramp up in power fairly easily. Lower limits will be more for advanced players as it will require more management to cram both the middle -> late phase transition and maneuvering for the end game into the same timeframe.
If it survives a couple more thought experiments, it should be relatively easy to implement and even automate.
Bounties
Another feature that made it into this revision was bounties. After a discussion with Andrew regarding the relative merits of the current system ("So, is it fun?"), it seemed that the game has become more than the testbed for high level play that I thought it would be. If the game were to be played in its own right, there needed to be another avenue to use treasure, especially when you know you are about to be wiped. I enjoyed having wipes "educate" people regarding the fleeting value of money compared to the real currency of space, but with bounties in place it feels like there is more of a multiplayer component, even if it's a "Hey! what was that for!" yelled out from the other side of the room.Bounties are quite simple. Place a treasure amount against another player and that increases their notoriety by that amount next turn. The bounty is public, so that other can see not only who has the bounty, but who placed it too. I've been contemplating having a way to hide who placed it, but that will most likely be rolled into the Raid disguise update in the future. At least the variables are in place on the batabase to support it when the time comes.
Changelog
- Added bounties.- Fixed attacks on other players
- Fixed defense with both elites and minions
- Fixed multiple player attacks on other players
- Added notoriety list to CharacterSubmission to see other player's notoriety. (This will be to make the game more, well, gamey, and give better feedback for the endgame)
There is still an issue with fortifications. I'm leaning toward an increasing scale of costs as 5 treasure seems fine at the start, but too little at the end.
Tuesday, July 10, 2012
Notorious Monetisation
Random thoughts on ways to monetise a Notorious server as we drove home from Mackay. I'm not a fan of secondary economies, but this might be a way to set one up with a clear distinction between in-game and out-of-game interactions.
"The Club"
As the players are ethereal beings ‘competing’ for notoriety in the game world, there exists a number of services for these beings to interact with directly through the ether. Most of these services revolve around trading information. For now I’ll call this “The Club”
"The Club"
As the players are ethereal beings ‘competing’ for notoriety in the game world, there exists a number of services for these beings to interact with directly through the ether. Most of these services revolve around trading information. For now I’ll call this “The Club”
- Provide
access to a gem: The club has people scouring the world looking for suitable
gems to link to. For a fee they will provide the location of an unlinked gem.
Price is dependent on both maximum power of the gem and the closest city size
and current dungeon layout. Possible selling methods:
o
Auction system with random gems being placed on
there with a price. 15% value to AH for player-listed gems.
o
New gems generated in clumps on the frontier
zones, with some generated in more settled locations for people to advance to.
o
Offer a static price to ‘locate’ a new gem. ~$1
for a village level gem to ~$5 for a capital gem
.
- Player
power graphs: For a very small cost, players can see power graphs of other
players. It should indicate long & short term notoriety. From this players should
be able to deduce the best time to attack that player. Inactive players should
have a fairly regular graph. Active players should show advancement in fits
& spurts.
- Player
dungeon layout/minions. For a small fee, players can look up the last known
dungeon layout of the target player with possible minion information.
- Possible
black market for minions. Include minions that are already linked with gems.
This service provides access to the gem and possibly free teleportation to the
home stone. Minions bought this way may or may not know of the existence of the
ethereals. New gem keepers can be picked up this way.
o
Player auctions – additional 15% added to them
o
Football manager contract system opening payment
goes to either the originating player or the “Club” if newly generated. Once
the initial price is agreed upon it allows access to talk directly to the
minion to negotiate. Once the 1st negotiation for a minion has been
set, give 5 mins for competitive bids.
o
Possible alternative is that once a price is
settled upon with the original owner, they give access to the minion’s gem for
a non-refundable fee
o
Look at introducing a ‘trade band’ that has a
gem inside it specifically for talking to minions to set up contracts. Original
owners would then pick up a trade band from The Guild and place on minion. All
discussions and memories are then accessible through the new band. The Guild can
then use these to monitor the trade, set up filters of likely candidates to
accept a trade, and give independent information regarding the minion to the
buyer.
Multiple dungeons
An auction house would potentially mean having multiple gems
for the player to link to. Look into whether only 1 is active with an interface
to select the next active gem or have multiple gems active at the same time.
- If multiples active want so it is beneficial to have gems
in better places.
- ways to mitigate gem spamming. If pay a power maintenance
cost to link to a gem, maint cost increases by the amt of gems linked to. Eg: an inactive
gem 5 power, 1st gem 50 power, 2nd gem 100, 3rd
150, etc.
- potentially have 1st home gem link for free. Look
into a base amt of power for characters
Skills
Players may have the opportunity to tailor their character toward a certain playstyle:
Players may have the opportunity to tailor their character toward a certain playstyle:
- To
mitigate the multiple home gem links cost
- Mitigate
multiple gem links to monsters
- Decrease
costs of scanning
- Decrease
hiding/masking costs
- Raise
base power
Information tracking
Use roguelike monster info (observed weapons / damage / HP etc) for what they know about your minions. This will be
used in knowledge discovery for the “Club”.
Resurrection
If creatures are resurrected at the home stone with nothing
on them, how do they maintain the gem for communication?
- Make
the equipment they are carrying when bound be brought back too.
o
This would be the same as WoW / EVE and expected
of the NPCs In the city. Problem with this will be NPC heroes would not bring anything into the dungeon to drop.
- Make
equipment that has gems attached also returnable.
o
This would give the minions and NPCs a reason to
desire gemmed items.
o
Requires the Ethereal to pay an additional fee
to link to gemmed items? Maybe a link for returning purposes is not as strong
as a link for communication.
o
Look into linking gemmed items to the minion /
NPC. This way any binding of the minion / character will also include the cost
of the items.
o
If an item can be returned to a home stone, what
would happen if another Ethereal managed to establish a link to the item? Could
they return it to their own dungeon?
o
Gems allow access to sentient thoughts, so there
would be nothing to link to in the items themselves. Maybe a cost to return the
item itself is cheaper.
o
Once a link is established with a mind, maybe
other close gems can be added to the link for a minimal cost to strengthen the
link (allow more power). New items linked this way don’t add to the total gem
linking increases, but have an independent power cost escalation. Eg 50 power
for original link, 5 power for secondary, 10 for tertiary, 20, 40, 80. Items
linked this way must be strong enough in their own right to support the link.
Running a City
- Have
a high amount of NPC Heroes linking to your home stone.
o
Require a different build, with attributes
heavily focused on new minion link reduction to cope with the amount coming
through. Possibly too much for more than one stone’s worth.
o
Access to NPCs, but virtually no power left to
manipulate them.
- Charge a service fee for the resurrection
power that you will need to use to pull them back. This will typically be
through a front man, quite possibly a reputable person established in the city,
or a gemkeeper working undercover.
- Use
access to NPC heroes to sell dungeon layout / minions back to “The Guild”
o
Offer NPC heroes an in-game reward for
information regarding layouts / minions / etc.
o
Offer NPC heroes information on layouts for a
fee (miniature version of “The Guild”)
- Use
access to Heroes to sell their links to the club for people wishing to raid
targets
o
Make up bounties for certain dungeons with
potential upfront payment, confirmed wipe payment and loot division options.
- Act
like the “Adventurer’s Guild”
o
Branding all services as part of a corporate
entity provides all players that run individual sites to share the power.
o
New Adventurer’s guilds can be set up in the
city by paying for a large enough gem to be moved into place (and secured, they
are rather expensive in the game world too. Wouldn’t want anyone walking away
with your home base.
o
Run by exclusive members of “The Guild”
- Power
mainly generated from “good” thoughts about the owner. “Good” thoughts ½ as
effective as fear thoughts and reputation harder to maintain. Also less amount of population concerned about the service (adventurers) compared to the impact of character actions (whole city/village)
o
Good rep mutually exclusive to bad rep. linear linked scale.
Friday, June 22, 2012
Notoriously Databased v0.21
Now that the tables and relationships were mapped out on paper, I then put them into a fresh database. Pretty easy after finding out some autoincrement foibles in the previous testing. 8 tables in all:
Users will have Characters inside each Game. The Characters will have CharacterSubmissions for each turn in what to do with their dungeon, which, once processed, is stored as the DungeonState. The Game will also revolve around a single village, that has VillageStates stored for each Turn.
(Almost elemental facts, but meh ...)
Generating the App
Next step was to create the new MVC3 C# app. There were a number of steps that I needed memory jogging on, but I finally got the app set up with the database brought in by adding an ADO.NET Entity Data Model class to the Models directory.
Account Control
The standard template came with ASP users and login hooked into a separate db, and not having to recreate login scripts and password obsfucation seemed like a good thing so I set about attempting to integrate it. Since the final version will be hosted online in AppHarbor using only one database, it seemed logical to bring all the ASP database tables into my own db and possibly link into the User table.
After some research it turns out that placing relationships onto the aspnet_user table is a bad thing in the long run, so I left the original tables as they were and added another field to handle linking to the unique ID. Hopefully I'll be able to link them together using API calls once the whole thing gets going. Creating the aspnet_ tables was relatively easy with aspnet_regsql , and apparently there's a lot more stored procedures that I would have missed if I tried to bring it over from the generated db file.
Once the db's had been merged, the next thing was to get the models to be merged. After a little bit of frustration, it seemed that the AccountModels didn't like accessing the aspnet files under the entity data model, so it was easier in the end to leave the connection string as a separate connection adressing the db with a simple SqlClient. The future problem will be that once I move it all to AppHarbor, it will only migrate one of the connection strings internally, so I'll have to manually update the ConnectionString to permenently point to the online db. Shouldn't be too much of a drama as there's not going to be much separation between production and testing.
Adding Controllers
User accounts complete! Adding controllers for the new tables worked relatively well once I figured out that the Data context class it was after was the complete NotoriousEntities class. Since I had added and removed it a couple of times, I had to restart VS 2010 to get it to pick it up. I'd heard that I should be able to refresh the database if it changed (because dropping the entity model and recreating is a pain) and once you double-click on the edmx file you can 'Update Model from Database..' from the NotoriousModel. Tested and working MUCH better.
Moving to AppHarbor.
I followed the general instructions to set up the new application, but finding the git info still needed a visit to the knowledge base. After previous tests with local git, I'd settled on integrating it into VS 2010. Right click on the entire project in the project tree enabled me to start up a local git instance, then update it either with the Git Pending Changes addon, or straight to Git Bash. The shell will eventually be more useful, as once the remote git is set up I'll be constantly running the update and push commands. Update is nicer in the addon, but I can't see a push.
AppHarbor with SQL.
It was easy to pick the free SQL shared server, but finding the details of the server to manually connect once again seemed harder than I remembered. There some new configuation variables that indicated a different method for connecting, but I finally found the options I needed by going to the SQL server. The connection string is going to be the main one to the entity model, and because of that it also needed the resource metadata to complete the connection string rewrite. After looking at the output, I pinched the ConnectionString data for the server itself and placed it over the account model connection. Seems to be working, but getting errors. Doh! no tables!
Once connected using SQL Server Management studio, the next task was to get all of the tables across. From the local database I could run a 'Generate Scripts..' task and point to all the tables. Hopefully the aspnet tables will be fine coming across as I'm pretty sure I won't be able to run aspnet_regsql over on the server.
Databases look good, but running the app looks like there's still issues. No stored procedures. Looks like I can output generation instruction for all stored procedures as a script in itself, and with a bit of massaging I got it to work. Now I need a schema :/.
Looks like I can get all the elements from generating scripts, so back to square one. Generating the complete database brings in too much database specific changes, so I tried picking all the items instead. Some ALTER ROLE scripts were ging to fail, but the rest seemed Ok so I merged them and manually added the role members using the GUI.
Still having issues with the schema, stating that it's an older, incompatible version; a task for another day ...
EDIT: After a bit of Googling, it seems that the schema was fine, just aspnet requires some data to validate against. A quick merge of aspnet data files and it's all working. Now to build an integrated admin panel for manipulating the game data directly...
Users will have Characters inside each Game. The Characters will have CharacterSubmissions for each turn in what to do with their dungeon, which, once processed, is stored as the DungeonState. The Game will also revolve around a single village, that has VillageStates stored for each Turn.
(Almost elemental facts, but meh ...)
Generating the App
Next step was to create the new MVC3 C# app. There were a number of steps that I needed memory jogging on, but I finally got the app set up with the database brought in by adding an ADO.NET Entity Data Model class to the Models directory.
Account Control
The standard template came with ASP users and login hooked into a separate db, and not having to recreate login scripts and password obsfucation seemed like a good thing so I set about attempting to integrate it. Since the final version will be hosted online in AppHarbor using only one database, it seemed logical to bring all the ASP database tables into my own db and possibly link into the User table.
After some research it turns out that placing relationships onto the aspnet_user table is a bad thing in the long run, so I left the original tables as they were and added another field to handle linking to the unique ID. Hopefully I'll be able to link them together using API calls once the whole thing gets going. Creating the aspnet_ tables was relatively easy with aspnet_regsql , and apparently there's a lot more stored procedures that I would have missed if I tried to bring it over from the generated db file.
Once the db's had been merged, the next thing was to get the models to be merged. After a little bit of frustration, it seemed that the AccountModels didn't like accessing the aspnet files under the entity data model, so it was easier in the end to leave the connection string as a separate connection adressing the db with a simple SqlClient. The future problem will be that once I move it all to AppHarbor, it will only migrate one of the connection strings internally, so I'll have to manually update the ConnectionString to permenently point to the online db. Shouldn't be too much of a drama as there's not going to be much separation between production and testing.
Adding Controllers
User accounts complete! Adding controllers for the new tables worked relatively well once I figured out that the Data context class it was after was the complete NotoriousEntities class. Since I had added and removed it a couple of times, I had to restart VS 2010 to get it to pick it up. I'd heard that I should be able to refresh the database if it changed (because dropping the entity model and recreating is a pain) and once you double-click on the edmx file you can 'Update Model from Database..' from the NotoriousModel. Tested and working MUCH better.
Moving to AppHarbor.
I followed the general instructions to set up the new application, but finding the git info still needed a visit to the knowledge base. After previous tests with local git, I'd settled on integrating it into VS 2010. Right click on the entire project in the project tree enabled me to start up a local git instance, then update it either with the Git Pending Changes addon, or straight to Git Bash. The shell will eventually be more useful, as once the remote git is set up I'll be constantly running the update and push commands. Update is nicer in the addon, but I can't see a push.
AppHarbor with SQL.
It was easy to pick the free SQL shared server, but finding the details of the server to manually connect once again seemed harder than I remembered. There some new configuation variables that indicated a different method for connecting, but I finally found the options I needed by going to the SQL server. The connection string is going to be the main one to the entity model, and because of that it also needed the resource metadata to complete the connection string rewrite. After looking at the output, I pinched the ConnectionString data for the server itself and placed it over the account model connection. Seems to be working, but getting errors. Doh! no tables!
Once connected using SQL Server Management studio, the next task was to get all of the tables across. From the local database I could run a 'Generate Scripts..' task and point to all the tables. Hopefully the aspnet tables will be fine coming across as I'm pretty sure I won't be able to run aspnet_regsql over on the server.
Databases look good, but running the app looks like there's still issues. No stored procedures. Looks like I can output generation instruction for all stored procedures as a script in itself, and with a bit of massaging I got it to work. Now I need a schema :/.
Looks like I can get all the elements from generating scripts, so back to square one. Generating the complete database brings in too much database specific changes, so I tried picking all the items instead. Some ALTER ROLE scripts were ging to fail, but the rest seemed Ok so I merged them and manually added the role members using the GUI.
Still having issues with the schema, stating that it's an older, incompatible version; a task for another day ...
EDIT: After a bit of Googling, it seems that the schema was fine, just aspnet requires some data to validate against. A quick merge of aspnet data files and it's all working. Now to build an integrated admin panel for manipulating the game data directly...
Friday, June 08, 2012
Notoriously Databased v0.2
After discussing with Andrew the benifits of MVC3 and AppHarbor, I was finally convinced that it was the way to go for the next step of developing Notorious. Hopefully it will allow a little more freedom in testing as I'll be able to fully automate the process and serve it up as a web app rather than Google Doc forms. Been a pretty long journey to get all the setup in place:
- Looks like I'll need MVC3, EntityFramework, and AppHarbor testing
- MVC3 needed Visual Studio 2010 sp1. (250Mb)
- Downloaded Windows Platform Installer to speed up the process. It was able to get most, but not entity Framework.
- Tested MVC3 apps locally.
- Downloaded GIT and merged local app to cloud
- Needed to move data over to SQL, so downloaded 2012 SQL Management studio (600Mb)
- Needs Windows 7 sp1, so it and another ~100 windows updates later ..
- Management studio didn't seem to work by itself, so decided to move to 2012 express as well (200Mb)
- Installed and running, and apparently management studio 2012 now magically works.
- Played around with developing tables, and then merging them into MVC using entity frameworks. Lots of guidance by tutorials as this was not obvious. Eventual model first approach seems pretty slick rather than building LINQ.
- Merged to cloud and then needed to figure out cloud connection. I could see the db fine in Management studio using the given user / pass, but couldn't connect to it using the app. finally figured out that it's rewriting the connection string itself. All I needed to do was to provide an alias to the model's connection string and also the resource metadata. 5 hours :/.
- Looked at merging the data in case I neded to to that later on, but couldn't get a nice, simple way to do it across servers (I'm pretty sure the apharbour user doesn't have the right privelages for most options)
- Ready to go!
3 days to get into a position to develop, and possibly 20 hours. Most of that was waiting for downloads, so maybe 8 hours in watching tutorials and testing stuff.
With all the tucked away, I spent 1/2 hr designing the table layout for the new NotoriouslyDatabased app. After building the guts of it on Google Docs, it's going to be pretty easy to convert the logic, but the file layout changes might mean a different approach is possible.
- Looks like I'll need MVC3, EntityFramework, and AppHarbor testing
- MVC3 needed Visual Studio 2010 sp1. (250Mb)
- Downloaded Windows Platform Installer to speed up the process. It was able to get most, but not entity Framework.
- Tested MVC3 apps locally.
- Downloaded GIT and merged local app to cloud
- Needed to move data over to SQL, so downloaded 2012 SQL Management studio (600Mb)
- Needs Windows 7 sp1, so it and another ~100 windows updates later ..
- Management studio didn't seem to work by itself, so decided to move to 2012 express as well (200Mb)
- Installed and running, and apparently management studio 2012 now magically works.
- Played around with developing tables, and then merging them into MVC using entity frameworks. Lots of guidance by tutorials as this was not obvious. Eventual model first approach seems pretty slick rather than building LINQ.
- Merged to cloud and then needed to figure out cloud connection. I could see the db fine in Management studio using the given user / pass, but couldn't connect to it using the app. finally figured out that it's rewriting the connection string itself. All I needed to do was to provide an alias to the model's connection string and also the resource metadata. 5 hours :/.
- Looked at merging the data in case I neded to to that later on, but couldn't get a nice, simple way to do it across servers (I'm pretty sure the apharbour user doesn't have the right privelages for most options)
- Ready to go!
3 days to get into a position to develop, and possibly 20 hours. Most of that was waiting for downloads, so maybe 8 hours in watching tutorials and testing stuff.
With all the tucked away, I spent 1/2 hr designing the table layout for the new NotoriouslyDatabased app. After building the guts of it on Google Docs, it's going to be pretty easy to convert the logic, but the file layout changes might mean a different approach is possible.
Thursday, March 29, 2012
Choose your own Adventure
Matt Hintze delivered an interesting TEDxUF talk titled "Choose your own Adventure" as a way for online education to teach the same content in multiple different ways. This seems to be very close to my thoughts on the future of education, but another roundabout way of getting there. Student's personality and learning styles would certainly come into the decision making process of which method / teacher to learn from. But I hadn't considered making it overtly part of the process by giving a minute snippet to see whether the student likes the style presented. Yet more good ammunition for the recommendation engine to process.
Could learning style and teacher presentation style also be captured by data analysis? You could map the student onto other students who have successfully completed the learning activity by comparing their learning landscape up to that point. Close matches can be used as trailblazers to recommend certain exit paths, with an indication of likely successes or failures along that path. Adding a student's goal into the mix could also help the system target high success paths leading from the current activity to the goal. Would learning styles and teaching styles be captured in data like that? I don't mind the idea of a 1 minute preview, apart from it being still too long for someone to make an effective decision between potentially hundreads of options. Maybe the recommendation engine gives them a default that they can opt out of by watching the teaser video?
Friday, March 23, 2012
Open content
A very interesting talk on moving beyond textbooks to open content. This fits in very well with my ideas on virtual education and highlights an important part of the puzzle: the curriculum needs to be solid and dependable.Since we have just moved to a national curriculumm, I would like to think that this is an almost ideal time for something like this to be adapted to the australian primary and secondary education system. Initially I was thinking this could be open repositories for moodle, but it looks like a wiki with links to anthing is a better way to go.
Monday, January 02, 2012
Creative 15
New year's resolution: spend the first 15 minutes of every day doing something creative.
While teaching I noticed that I was needing to go to bed earlier and earlier each day; an odd occurrence as I'm usually craving for more night time and can usually get by with 4-5 hours sleep. By the end I was taking a power nap straight after work before tea to keep some sort of regular pattern in my day.
There have been other times when I've used power naps to solve problems. If I'm stuck on a difficult Programming problem, I'd take a 15 minute nap and almost always wake up with the correct solution.
While writing assignments for Uni it felt like what I need to start writing is a good sleep. I had put this down to my finely honed procrastination skills, but maybe there's more to it?
Teaching has been far more creative than I'd expected. Even fully prepared lessons seem to go awry and require to to think on your feet to get the topic covered another way, and most of my lessons weren't as prepared as I'd have liked. It seems that I can easily function in a logical and analytical manner on hardly any sleep, but to be creative I need a good sleep.
To test this theory, I'm planning on spending the first 15 minutes of each day on something creative. Drawing, building, writing, blogging, coding, designing, singing, playing. Something. Hopefully 15 minutes at the start of the day won't take out too much from the craving to catch up with what's going on in the world, and maybe even make enough time to get some ideas down.
First creative15 was to get the blogger app for the iPad so that I could quickly write if that's what I wanted to do. Turns out 15 minutes is out to about 45 by now, but I'm Ok with that too.
Here's a picture done on the iPad in procreate when testing the concept. It's not finished, but I'm happy with the result and it felt good to draw again.
While teaching I noticed that I was needing to go to bed earlier and earlier each day; an odd occurrence as I'm usually craving for more night time and can usually get by with 4-5 hours sleep. By the end I was taking a power nap straight after work before tea to keep some sort of regular pattern in my day.
There have been other times when I've used power naps to solve problems. If I'm stuck on a difficult Programming problem, I'd take a 15 minute nap and almost always wake up with the correct solution.
While writing assignments for Uni it felt like what I need to start writing is a good sleep. I had put this down to my finely honed procrastination skills, but maybe there's more to it?
Teaching has been far more creative than I'd expected. Even fully prepared lessons seem to go awry and require to to think on your feet to get the topic covered another way, and most of my lessons weren't as prepared as I'd have liked. It seems that I can easily function in a logical and analytical manner on hardly any sleep, but to be creative I need a good sleep.
To test this theory, I'm planning on spending the first 15 minutes of each day on something creative. Drawing, building, writing, blogging, coding, designing, singing, playing. Something. Hopefully 15 minutes at the start of the day won't take out too much from the craving to catch up with what's going on in the world, and maybe even make enough time to get some ideas down.
First creative15 was to get the blogger app for the iPad so that I could quickly write if that's what I wanted to do. Turns out 15 minutes is out to about 45 by now, but I'm Ok with that too.
Here's a picture done on the iPad in procreate when testing the concept. It's not finished, but I'm happy with the result and it felt good to draw again.
![]() |
| Hmmm, colours on the iPad screen seem different. Oh well .. |
Friday, December 30, 2011
Notoriously Databased
Over the holidays I've been building a google spreadsheet along with some forms to play a light version of Notorious. A play-by-email if you will. The game is intentionally stripped down as far as I can go while still retaining the higher design elements to test whether there is still any 'fun' or 'game' there. If there is, remove more. If there isn't, add some back in.
Notoriously Databased
Dungeon stats
At the start of each round, your dungeon is essentially a couple of stats:
Notoriety: How much the town fears you. Expect an attack each turn at a level based on this number.
Treasure: The amount of gold / equipment / tradeable stuff you have in your dungeon
Dungeon size: The amount of space dug out so far.
- Minion living space: Amount of space dedicated to housing minions
- Prisoner Space: Amount of space dedicated to housing townsfolk to help dig. Prisons can hold 10 prisoners per space.
- Fortification space: Amount of space for traps / secret doors / dungeon layout.
Total defense: Total defense = Dungeon security + Minion security
- Dungeon Security: Provides additional defense, as well as maintaining this amount of gold if a wipe occurs.
- Minion Security: Total amount of security offered by elites and normal minions.
Minion Defenders: Amount of minions allocated to defence.
Minion Elites: Elites are 2x more effective at fighting (Defending / raiding)
Minion Diggers / Builders: Amount of minions allocated to expanding your dungeon size.
Prisoners: Amount of captured townsfolk currently expanding your dungeon size.
Actions
Each turn a player assigns these actions to their dungeon:
Order digging: Amount of minions ordered to dig instead of defend
Raid town for treasure / prisoners: Choose the amount of minions to send on the raid and the amount of treasure / prisoners to go after. Monsters on a raid will not be in your dungeon next turn. If successful, returns the amount of treasure / prisoners requested. Can choose to disguise as another player to give them the notoriety instead. Raid success is calculated by the amount of town security compared to the amount of monsters sent. The town's prosperity will indicate how deep into the town they will need to go to get the required resources.
Raid another dungeon for treasure / prisoners: Choose the amount of monsters to send on the raid. They will not be in your dungeon next turn. Note that dungeon raids happen AFTER heroes have softened them up.
Ransom prisoners: You will receive 1 treasure per prisoner ransomed and reduce notoriety.
Increase fortifications: Requires 1 space and 5 treasure
Equip Minion: Requires 1 treasure per minion converted to an elite. Elites fight 2 times better and are last to be killed.
Hide Hide this many elites. Implemented as raiding 'no-one'. They just spend time away from the dungeon when you expect a wipe.
End of Turn resolution order
Hidden minions / treasure are set aside
Raiding parties are set aside
Ransom prisoners - Remove prisoner.
Convert minion to elite
Assign minion diggers
Increase fortifications - Remove money
Raid town - Add ALL player town raids together to calc total desired resources
Raid town - Calc defense per treasure and per villiager
Raid town - Assign defense to each player's raid and kill off raiders per defense. If they have minions remaining, raid is successful
Raid town - Successful raids either set (disguised) player notoriety to amount stolen, or increases notoriety by 1 if already higher
Hero Attack - Heroes (elite) of fighting skill equal to player's notoriety attacks. Player with highest notoriety has 1.5x notoriety heroes attack.
Hero Attack - Hero kills off an amount of minions equal to their fighting skill. If any heroes remain, wipe.
Hero Attack - If no heroes remain, add treasure to dungeon per hero (= 1/2 fighting power = 1/2 notoriety)
Raid dungeon - Add ALL player dungeon raids against that player together. If greater than the dungeon defense, wipe.
Raid dungeon - If multiple players attacking, highest army kills others and takes all spoils.
Raid dungeon - Successful raids remove all gold & prisoners
Amount of space is increased by remaining (diggers + prisoners) / 10
Increase fortifications - Assign fortification space if not wiped
Ransom prisoners - Add gold, reduce notoriety
Successful raids return
Hidden minions / treasure return
Fill remaining space with minions (or remove minions if space smaller)
Allocate 1 notoriety to each player that an adventurer didn't return from.
If all actions gain no notoriety for the player, and they have been wiped by the town, reset notoriety to 0.
Town report - Build a notoriety list
Town report - Add all actions against the town
Player report - Collate all actions that the player knows about
Notoriously Databased
Dungeon stats
At the start of each round, your dungeon is essentially a couple of stats:
Notoriety: How much the town fears you. Expect an attack each turn at a level based on this number.
Treasure: The amount of gold / equipment / tradeable stuff you have in your dungeon
Dungeon size: The amount of space dug out so far.
- Minion living space: Amount of space dedicated to housing minions
- Prisoner Space: Amount of space dedicated to housing townsfolk to help dig. Prisons can hold 10 prisoners per space.
- Fortification space: Amount of space for traps / secret doors / dungeon layout.
Total defense: Total defense = Dungeon security + Minion security
- Dungeon Security: Provides additional defense, as well as maintaining this amount of gold if a wipe occurs.
- Minion Security: Total amount of security offered by elites and normal minions.
Minion Defenders: Amount of minions allocated to defence.
Minion Elites: Elites are 2x more effective at fighting (Defending / raiding)
Minion Diggers / Builders: Amount of minions allocated to expanding your dungeon size.
Prisoners: Amount of captured townsfolk currently expanding your dungeon size.
Actions
Each turn a player assigns these actions to their dungeon:
Order digging: Amount of minions ordered to dig instead of defend
Raid town for treasure / prisoners: Choose the amount of minions to send on the raid and the amount of treasure / prisoners to go after. Monsters on a raid will not be in your dungeon next turn. If successful, returns the amount of treasure / prisoners requested. Can choose to disguise as another player to give them the notoriety instead. Raid success is calculated by the amount of town security compared to the amount of monsters sent. The town's prosperity will indicate how deep into the town they will need to go to get the required resources.
Raid another dungeon for treasure / prisoners: Choose the amount of monsters to send on the raid. They will not be in your dungeon next turn. Note that dungeon raids happen AFTER heroes have softened them up.
Ransom prisoners: You will receive 1 treasure per prisoner ransomed and reduce notoriety.
Increase fortifications: Requires 1 space and 5 treasure
Equip Minion: Requires 1 treasure per minion converted to an elite. Elites fight 2 times better and are last to be killed.
Hide Hide this many elites. Implemented as raiding 'no-one'. They just spend time away from the dungeon when you expect a wipe.
End of Turn resolution order
Hidden minions / treasure are set aside
Raiding parties are set aside
Ransom prisoners - Remove prisoner.
Convert minion to elite
Assign minion diggers
Increase fortifications - Remove money
Raid town - Add ALL player town raids together to calc total desired resources
Raid town - Calc defense per treasure and per villiager
Raid town - Assign defense to each player's raid and kill off raiders per defense. If they have minions remaining, raid is successful
Raid town - Successful raids either set (disguised) player notoriety to amount stolen, or increases notoriety by 1 if already higher
Hero Attack - Heroes (elite) of fighting skill equal to player's notoriety attacks. Player with highest notoriety has 1.5x notoriety heroes attack.
Hero Attack - Hero kills off an amount of minions equal to their fighting skill. If any heroes remain, wipe.
Hero Attack - If no heroes remain, add treasure to dungeon per hero (= 1/2 fighting power = 1/2 notoriety)
Raid dungeon - Add ALL player dungeon raids against that player together. If greater than the dungeon defense, wipe.
Raid dungeon - If multiple players attacking, highest army kills others and takes all spoils.
Raid dungeon - Successful raids remove all gold & prisoners
Amount of space is increased by remaining (diggers + prisoners) / 10
Increase fortifications - Assign fortification space if not wiped
Ransom prisoners - Add gold, reduce notoriety
Successful raids return
Hidden minions / treasure return
Fill remaining space with minions (or remove minions if space smaller)
Allocate 1 notoriety to each player that an adventurer didn't return from.
If all actions gain no notoriety for the player, and they have been wiped by the town, reset notoriety to 0.
Town report - Build a notoriety list
Town report - Add all actions against the town
Player report - Collate all actions that the player knows about
Friday, September 23, 2011
First the worst ... (Card Game)
[ A game of getting big, but not too big ]
This is a card game developed to test a high level game mechanic for the upcoming Notorious computer game. First play-through seemed to generate the desired reaction from players with many strategies in play, so it was good enough to be released in its own right.
Concept
A game is divided into 5 rounds, after which all but the top player’s points are counted toward your final score. Each round you may play a card either in front of you to increase your game score, or in front of another player to increase their score. Cards may be either face up or face down, however any card played face up generates a bonus point for the player that it is in front of for each round that the face up card is in play . These bonus points are counted no matter who has the top score for the game.
Materials
Players: 3-7+ players.
Cards: 1 card deck is sufficient for up to 7 players, 2 card decks can be combined if more players wish to play.
Space: Typical arrangement would be players sitting around a table. A dinner setting space per player is sufficient. A playmat is available to help organise card placement, but isn't mandatory.
Rules
1. A match is divided into 5 games, where each game consists of 5 rounds of play.
3. Nominate a starting lead-off player (or randomly choose using a card draw).
2. The lead-off player shuffles and deals 7 cards to each player.
4. The the lead-off player may play one card either in front of them or in front of any other player. The card may also be played either face up or face down.
5. Play continues clockwise for each player to play their single card per round (either in front of them or in front of another, either face up or face down).
6. Once all 5 rounds are complete, count up bonus points and game score (see scoring).
7. Highest game score is reduced to 0 and they are the lead-off player for the next game.
8. Winner is the person with the highest aggregate final score after 5 rounds.
Scoring
1. After the 5th round has finished, count up any bonus points first by tallying how many rounds each face up card has been in front of you and add them to your match total.
3. If you have the highest points for the round, you are disqualified and score 0 points. Everyone else adds their points to their match total.
4. If there is a tie for the highest points in the round, both players involved in the tie can place an additional card onto their opponent’s score as a tie breaker. If it still remains a tie, play your final card onto your opponent. If there still remains a tie, continue to draw cards from the undealt pack and place on your opponent’s score until there is an eventual winner. This additional score is also counted in the match total for the eventual 2nd place getter.
5. Calculate and announce your new match point totals while the new game is being dealt.
4. The winner is the aggregate match point leader after 5 rounds.
Play Mat: To aid tracking of bonus points, you may wish to create a play mat by drawing 5 boxes in order on a piece of paper and labelling them from 1 to 5 for each round. Play your cards into the box for that round, even if it is on someone else’s mat. Make sure that each face-up card’s value remains visible, and that the number of face down cards is known.
This is a card game developed to test a high level game mechanic for the upcoming Notorious computer game. First play-through seemed to generate the desired reaction from players with many strategies in play, so it was good enough to be released in its own right.
Concept
A game is divided into 5 rounds, after which all but the top player’s points are counted toward your final score. Each round you may play a card either in front of you to increase your game score, or in front of another player to increase their score. Cards may be either face up or face down, however any card played face up generates a bonus point for the player that it is in front of for each round that the face up card is in play . These bonus points are counted no matter who has the top score for the game.
Materials
Players: 3-7+ players.
Cards: 1 card deck is sufficient for up to 7 players, 2 card decks can be combined if more players wish to play.
Space: Typical arrangement would be players sitting around a table. A dinner setting space per player is sufficient. A playmat is available to help organise card placement, but isn't mandatory.
Rules
1. A match is divided into 5 games, where each game consists of 5 rounds of play.
3. Nominate a starting lead-off player (or randomly choose using a card draw).
2. The lead-off player shuffles and deals 7 cards to each player.
4. The the lead-off player may play one card either in front of them or in front of any other player. The card may also be played either face up or face down.
5. Play continues clockwise for each player to play their single card per round (either in front of them or in front of another, either face up or face down).
6. Once all 5 rounds are complete, count up bonus points and game score (see scoring).
7. Highest game score is reduced to 0 and they are the lead-off player for the next game.
8. Winner is the person with the highest aggregate final score after 5 rounds.
Scoring
1. After the 5th round has finished, count up any bonus points first by tallying how many rounds each face up card has been in front of you and add them to your match total.
Eg: A card playing face up in the 1st round will have been in 5 rounds, so scores 5 bonus points, whereas a card played in the 4th round will have only been in 2 rounds, scoring 2 points. As a total, having a face up card played in front of you on rounds 1,2 and 4 would gain 5,4 and 2 points respectively, tallying to a total of 11 bonus points for the round.2. Flip over any face down cards and tally up the total face value of cards in front of you. Picture cards count as 10 and aces count as 1.
3. If you have the highest points for the round, you are disqualified and score 0 points. Everyone else adds their points to their match total.
4. If there is a tie for the highest points in the round, both players involved in the tie can place an additional card onto their opponent’s score as a tie breaker. If it still remains a tie, play your final card onto your opponent. If there still remains a tie, continue to draw cards from the undealt pack and place on your opponent’s score until there is an eventual winner. This additional score is also counted in the match total for the eventual 2nd place getter.
5. Calculate and announce your new match point totals while the new game is being dealt.
4. The winner is the aggregate match point leader after 5 rounds.
Play Mat: To aid tracking of bonus points, you may wish to create a play mat by drawing 5 boxes in order on a piece of paper and labelling them from 1 to 5 for each round. Play your cards into the box for that round, even if it is on someone else’s mat. Make sure that each face-up card’s value remains visible, and that the number of face down cards is known.
Wednesday, July 20, 2011
Exerting Control
One of the key facets of Notorious will be the ability to exert control over the various NPCs in the game. This could be mercenaries hired to guard your dungeon, or to dig it out, or even heroes attempting to raid someone else's dungeon. Here's the new section on how I plan to have the player influence their actions.
Exert control
- Mercenaries and heroes wearing focus amulets can be controlled, or grant vision, communication, etc. by applying your power through the linked focus gem.
- Gem size allows a maximum amount of power to be channeled through to it. Overloading the power level of a gem increases the chance of destroying the gem.
- Spell power modified by the distance to the home stone. Travelling through rock increases power cost, so that there is a risk / reward for exposing your home stone for greater power, or hiding it for greater security (especially from unlinking). Power investment set at time of change, so there is a benefit to bringing the mercenary close to your home stone before setting up their new default behaviour.
- Linked gem spells
Vision: grants vision from the gem’s location. Flat fee, relatively inexpensive so that it can work on heroes a long way away exploring other dungeons.
Communication: Talk directly to the mind of the person/monster holding it. Flat fee, relatively inexpensive so that primary minion and informants can use it to carry out most menu interactions (checking prices, buying selling, rumours, etc). Raises suspicion if used on heroes.
Control: Attempt to influence the bearer to take a certain action. Power required is variable and competes with the bearer’s own priorities. Needs linking into the AI system to give options of (go to location, attack, capture, flee, search, rest, dig, build, give, take, etc). Control is either sustained until the player removes the power investment (default), or placed as a once-off so that the power is immediately returned once the specified action is completed.
Cloaking: Attempt to hide the presence of a gem from attuned people / players. Variable power required and competes with the opponent’s detection power.
Mimic: Attempt to make it appear that someone else is linked to the gem.
- General spells
Link to gem: Create a link to a gem to allow powers to operate through it. Maintaining a link to a gem increases exponentially depending on how many other gems you have linked to. Should be possible for beginning players to have 2-4, medium players to have 6-8 and end game players to have up to 10.
Detection: Attempt to detect gems in your vicinity. Competes with cloaking (ground may also cloak gems). May choose a level to be used constantly which will add detection of other players attempting to scout / raid your dungeon.
Trace link: Attempt to find out who has a link to to a gem. Competes with Mimic power level to reveal all players / mimics currently linked.
Artificial Intelligence
Exerting control will be dependent on modifying the behaviour of the Mercenaries under your control, so it will be fairly important to design an AI system that is robust enough to allow independent emergent behaviour, but make sense enough that players can interact with the system in a meaningful way.
Actions and Needs
Each NPC will have a list of needs that change over time (the need for happiness, riches, sleep, food, chaos, etc). These needs will lead to actions fulfilling that need such as sleeping, fighting, etc. Each action that the AI can make is given a weighting depending on the expected need reduction that the action will take, then organised into a priority list of highest to lowest need reduction. The highest action is the one that is executed until the need is satisfied enough that the action is no longer the highest (plus an additional ‘resistance to change’ amount to keep them from always swapping from one task to the next and losing time on travelling).
Exerting Control
The player can interact with the Actions by placing more or less emphasis on that action by spending power points. This can be used to raise non-desirable actions (such as digging) into top priority, or to remove NPC actions that are not contributing to the player’s expectations (such as relaxing). Since the actions are given inputs from the need system there will be no way to completely stop a mandatory action (such as sleeping or eating) but they can be suppressed so that other action can take precedence for longer periods.
Needs
This is a list of needs and a brief description of how they will be expected to change over time.
Sleep - ramps up on an exponential scale
Eat - Ramps up on an exponential scale
Chaos - Slowly increases over time depending on their desire for chaos.
Safety - Usually 0. Increases when enemy is in sight, and ramps up depending on their assessment of a battle. Should be maxxed if they think the next round will kill them.
Happiness:
Actions
This is a list of actions and the needs that they fulfil
Eat - Attempts to go to home or designated dining hall and eats. Should drop hunger to 0 in a couple of turns.
Sleep - Returns home or to a designated barracks and sleeps. Should drop need for sleep AFTER waking (~5 turns?), so if they are sleeping they will still be unsatisfied if another action takes priority (an attack occurs threatening safety)
Guard location - Attempt to go to a location and remain alert. Generates unhappiness depending on desire for guarding. Player needs to exert control for this action to be considered. Elevates attack options once location is reached. Can also be used to suppress prisoners if guarding an prison area.
Patrol between locations - Attempt to walk between multiple locations and remain alert. Generates unhappiness depending on desire for guarding. Player needs to exert control for this action to be considered. Can also be used to suppress prisoners if guarding an prison area.
Defend Home - Return home and guard. Increases priority if enemy in home. Increases priority if personal safety is at risk. Increases priority depending on mercenary wealth. Decreases happiness depending on desire for guarding, but not as much as guarding location (1/4?)
Attack Character - Attacks the designated character. Can be elevated into priority by sighting someone when guarding, or to a lesser extent sighting an enemy when doing another task. Use aggression attribute? Decreases Chaos need. Increases safety need (indirectly proportionally to aggression?)
This action will be replaced by modes of attack such as:
Hide for Ambush at location - Move to location and wait for adjacent enemy before initiating an attack. Generates unhappiness depending on desire for guarding/ambush.
Flee - Generic flee action that will attempt to run away from the source of the damage. May lead to mercenary getting caught or corralled into a corner. Increases priority with Safety need and escalates so that it should be top priority if they perceive that they will die next turn. Reduces with reduction in safety concerns (no-one hitting them last turn, no-one in sight, health above 50%, etc.)
Flee to location - Uses flee mechanic, but has a specific location that they will attempt to get to rather than simply going away from the battle. Will usually be lower than Flee itself, but offers the player a way to exert control over where the mercenary should retreat to. A* to location needed as a weight against this action, especially if it takes them through the battle. I’d anticipate that building small hides and a fairly large sustained investment into this action will keep most mercenaries alive, even through wipes.
Go to location - Basic movement. Most actions will incorporate this action into their own, so this one is specifically designed for players to dictate a location change (say, going to the throne room for further instructions). Most likely used as a once-off power placement. Little to no interaction from needs. Possibly generate unhappiness at same rate as transporting goods.
Dig Nearest - Assign character to continually dig out designated areas. Decreases happiness depending on desire for mining. Player needs to exert control for this action to be considered. Digging skill increases digging speed.
Dig Location - Assign character to dig out a specific location rather than digging any designated area. Decreases happiness depending on desire for mining. Player needs to exert control for this action to be considered. Digging skill increases digging speed.
Mine nearest Gold - Phase 2 of digging that separates extracting gold from deposits rather than simply digging anything. Designated area produces a large quantity of gold before disappearing rather than being mined out quickly like any other rock. Digging skill increases quantity of gold mined.
Mine Gold at location - As above, but with a specific location designated.
Extract nearest Gems - Phase 2 of digging that separates extracting gems, rather than simply digging anything. Designated area will eventually produce a large gem capable of channeling power, along with potential minor gems for throwaway use (on heroes). Digging skill increases chance that gems retain their maximum size.
Extract Gems at location - As above, but with a specific location designated.
Build Wall - Construct a wall following the designated tiles. Need to also remove ownership of tile, or reduce their potential to provide happiness. Decreases happiness depending on desire for building. Player needs to exert control for this action to be considered.
Build Trap - Construct a trap at specified location. Need to reduce the potential of the tile to provide happiness to owner. Decreases happiness depending on desire for building. Player needs to exert control for this action to be considered. Trap skill increases the level of the trap set (to compare against hero detection / disarming skill)
Manufacture item X - Phase 2. Construct an item using materials. Priority increases with availability of resources and desire to construct. Decreases happiness depending on desire for manufacture. Some mercenary types (or captured blacksmiths) may spontaneously attempt this, but will be predominantly player driven.
Transport item to location - Move an item from its current position to another. Most likely triggered by heroes dropping loot. Can be used by player to reorganise gems and equipment use. Decreases happiness depending on desire for transporting.
Relax - Returns to home and slowly generates happiness. More or less a default action for unhappy mercenaries. More than likely this one will be reduced, or other actions that gain happiness increased for more efficient happiness management.
Raid village - Should have a number of options under this one for each type of raid (raid for items / money, Capture prisoners, Cause chaos). Priority changed by chaos, security, unhappiness. Successful raids reduce chaos and increase happiness.
Capture character - Make into prisoner. Can be used against raiding heroes, or against town.
Raid dungeon - Send them out against another player.
Pick a fight - Increases with Chaos and presence of opposing factions.
Revolt - Severe unhappiness for an extended duration. Usually means that space / money / items are not sufficient to keep the character under control. Will attempt to leave the dungeon. May also be used for prisoners who feel that potentially dying on their way to the front door is better than continuing on.
Get Payment - Go to vault and attempt to extract any outstanding payment. Priority increases with unhappiness. Successful payment increases happiness by an amount dependent on the character’s current wealth. Failure to retrieve payment decreases happiness further, but also dampens this type of happiness gathering for a moderate period so that they may try other avenues of gaining happiness (like relaxing)
Take ownership of location - Increases the space owned by the character. This may be available under severe unhappiness, but will be mainly used by the player to increase the happiness regeneration flowing from the character’s increased levels, or increased wealth.
Take ownership of item - Marks the item as now belonging to the character. Triggered by loot drops when %loot contracts are used. Can also be used to forcibly transfer someone else’s item to this creature, with appropriate anger from victim. Can be used by the player to give new weapons or gems from the vault.
Give ownership of location to character - Remove ownership of space and transfer it to another character. Creature competing the transfer will be angry on the loss of space, but not as angry as if it’s been taken from him. Very unlikely to be triggered naturally, but gives a way for the player to adjust their mercenary structure.
Give ownership of item to character - As above, but utilising item in the creature’s posession.
Sign new contract - Demand a new contract be signed. Priority increased through consistent unhappiness or multiple gains of levels. One step before revolting, and possibly linked to an email out to the player. Can also be triggered by the player to negotiate different payment methods (most likely with a once-off power payment)
(Mainly) Hero Specific:
Exert control
- Mercenaries and heroes wearing focus amulets can be controlled, or grant vision, communication, etc. by applying your power through the linked focus gem.
- Gem size allows a maximum amount of power to be channeled through to it. Overloading the power level of a gem increases the chance of destroying the gem.
- Spell power modified by the distance to the home stone. Travelling through rock increases power cost, so that there is a risk / reward for exposing your home stone for greater power, or hiding it for greater security (especially from unlinking). Power investment set at time of change, so there is a benefit to bringing the mercenary close to your home stone before setting up their new default behaviour.
- Linked gem spells
Vision: grants vision from the gem’s location. Flat fee, relatively inexpensive so that it can work on heroes a long way away exploring other dungeons.
Communication: Talk directly to the mind of the person/monster holding it. Flat fee, relatively inexpensive so that primary minion and informants can use it to carry out most menu interactions (checking prices, buying selling, rumours, etc). Raises suspicion if used on heroes.
Control: Attempt to influence the bearer to take a certain action. Power required is variable and competes with the bearer’s own priorities. Needs linking into the AI system to give options of (go to location, attack, capture, flee, search, rest, dig, build, give, take, etc). Control is either sustained until the player removes the power investment (default), or placed as a once-off so that the power is immediately returned once the specified action is completed.
Cloaking: Attempt to hide the presence of a gem from attuned people / players. Variable power required and competes with the opponent’s detection power.
Mimic: Attempt to make it appear that someone else is linked to the gem.
- General spells
Link to gem: Create a link to a gem to allow powers to operate through it. Maintaining a link to a gem increases exponentially depending on how many other gems you have linked to. Should be possible for beginning players to have 2-4, medium players to have 6-8 and end game players to have up to 10.
Detection: Attempt to detect gems in your vicinity. Competes with cloaking (ground may also cloak gems). May choose a level to be used constantly which will add detection of other players attempting to scout / raid your dungeon.
Trace link: Attempt to find out who has a link to to a gem. Competes with Mimic power level to reveal all players / mimics currently linked.
Artificial Intelligence
Exerting control will be dependent on modifying the behaviour of the Mercenaries under your control, so it will be fairly important to design an AI system that is robust enough to allow independent emergent behaviour, but make sense enough that players can interact with the system in a meaningful way.
Actions and Needs
Each NPC will have a list of needs that change over time (the need for happiness, riches, sleep, food, chaos, etc). These needs will lead to actions fulfilling that need such as sleeping, fighting, etc. Each action that the AI can make is given a weighting depending on the expected need reduction that the action will take, then organised into a priority list of highest to lowest need reduction. The highest action is the one that is executed until the need is satisfied enough that the action is no longer the highest (plus an additional ‘resistance to change’ amount to keep them from always swapping from one task to the next and losing time on travelling).
Exerting Control
The player can interact with the Actions by placing more or less emphasis on that action by spending power points. This can be used to raise non-desirable actions (such as digging) into top priority, or to remove NPC actions that are not contributing to the player’s expectations (such as relaxing). Since the actions are given inputs from the need system there will be no way to completely stop a mandatory action (such as sleeping or eating) but they can be suppressed so that other action can take precedence for longer periods.
Needs
This is a list of needs and a brief description of how they will be expected to change over time.
Sleep - ramps up on an exponential scale
Eat - Ramps up on an exponential scale
Chaos - Slowly increases over time depending on their desire for chaos.
Safety - Usually 0. Increases when enemy is in sight, and ramps up depending on their assessment of a battle. Should be maxxed if they think the next round will kill them.
Happiness:
- Owning space gives a set amount of happiness per hour depending on the mercenary’s desire for space.
- Owning items gives a set amount of happiness per hour depending on the mercenary’s desire for that type of item. May be too complex an interface for little reward. Might simply make a ‘desirable item’ shortlist akin to dwarf fortress preferences and mainly include useable weapons.
- Increasing Riches gives a one-time boost to happiness depending on the desire for riches. This may be triggered by getting %loot from kills, or by regular negotiated payments. Happiness gain indirectly proportional to their current wealth.
- Doing Work drops happiness depending on their desire for the task done (Guarding, Digging, Building, Set traps, etc)
- Faction likes/dislikes can influence happiness when they see mercenaries or heroes of an opposing faction. Can be used to introduce incompatible mercenary mixes such as dark dwarves and dark elves, Ors and goblins, etc, or encourage hiring similar types of mercenaries (or keep them VERY separated)
Actions
This is a list of actions and the needs that they fulfil
Eat - Attempts to go to home or designated dining hall and eats. Should drop hunger to 0 in a couple of turns.
Sleep - Returns home or to a designated barracks and sleeps. Should drop need for sleep AFTER waking (~5 turns?), so if they are sleeping they will still be unsatisfied if another action takes priority (an attack occurs threatening safety)
Guard location - Attempt to go to a location and remain alert. Generates unhappiness depending on desire for guarding. Player needs to exert control for this action to be considered. Elevates attack options once location is reached. Can also be used to suppress prisoners if guarding an prison area.
Patrol between locations - Attempt to walk between multiple locations and remain alert. Generates unhappiness depending on desire for guarding. Player needs to exert control for this action to be considered. Can also be used to suppress prisoners if guarding an prison area.
Defend Home - Return home and guard. Increases priority if enemy in home. Increases priority if personal safety is at risk. Increases priority depending on mercenary wealth. Decreases happiness depending on desire for guarding, but not as much as guarding location (1/4?)
Attack Character - Attacks the designated character. Can be elevated into priority by sighting someone when guarding, or to a lesser extent sighting an enemy when doing another task. Use aggression attribute? Decreases Chaos need. Increases safety need (indirectly proportionally to aggression?)
This action will be replaced by modes of attack such as:
- Attack character with melee weapons
- Attack character with ranged weapons
- Attack character with ability X
Hide for Ambush at location - Move to location and wait for adjacent enemy before initiating an attack. Generates unhappiness depending on desire for guarding/ambush.
Flee - Generic flee action that will attempt to run away from the source of the damage. May lead to mercenary getting caught or corralled into a corner. Increases priority with Safety need and escalates so that it should be top priority if they perceive that they will die next turn. Reduces with reduction in safety concerns (no-one hitting them last turn, no-one in sight, health above 50%, etc.)
Flee to location - Uses flee mechanic, but has a specific location that they will attempt to get to rather than simply going away from the battle. Will usually be lower than Flee itself, but offers the player a way to exert control over where the mercenary should retreat to. A* to location needed as a weight against this action, especially if it takes them through the battle. I’d anticipate that building small hides and a fairly large sustained investment into this action will keep most mercenaries alive, even through wipes.
Go to location - Basic movement. Most actions will incorporate this action into their own, so this one is specifically designed for players to dictate a location change (say, going to the throne room for further instructions). Most likely used as a once-off power placement. Little to no interaction from needs. Possibly generate unhappiness at same rate as transporting goods.
Dig Nearest - Assign character to continually dig out designated areas. Decreases happiness depending on desire for mining. Player needs to exert control for this action to be considered. Digging skill increases digging speed.
Dig Location - Assign character to dig out a specific location rather than digging any designated area. Decreases happiness depending on desire for mining. Player needs to exert control for this action to be considered. Digging skill increases digging speed.
Mine nearest Gold - Phase 2 of digging that separates extracting gold from deposits rather than simply digging anything. Designated area produces a large quantity of gold before disappearing rather than being mined out quickly like any other rock. Digging skill increases quantity of gold mined.
Mine Gold at location - As above, but with a specific location designated.
Extract nearest Gems - Phase 2 of digging that separates extracting gems, rather than simply digging anything. Designated area will eventually produce a large gem capable of channeling power, along with potential minor gems for throwaway use (on heroes). Digging skill increases chance that gems retain their maximum size.
Extract Gems at location - As above, but with a specific location designated.
Build Wall - Construct a wall following the designated tiles. Need to also remove ownership of tile, or reduce their potential to provide happiness. Decreases happiness depending on desire for building. Player needs to exert control for this action to be considered.
Build Trap - Construct a trap at specified location. Need to reduce the potential of the tile to provide happiness to owner. Decreases happiness depending on desire for building. Player needs to exert control for this action to be considered. Trap skill increases the level of the trap set (to compare against hero detection / disarming skill)
Manufacture item X - Phase 2. Construct an item using materials. Priority increases with availability of resources and desire to construct. Decreases happiness depending on desire for manufacture. Some mercenary types (or captured blacksmiths) may spontaneously attempt this, but will be predominantly player driven.
Transport item to location - Move an item from its current position to another. Most likely triggered by heroes dropping loot. Can be used by player to reorganise gems and equipment use. Decreases happiness depending on desire for transporting.
Relax - Returns to home and slowly generates happiness. More or less a default action for unhappy mercenaries. More than likely this one will be reduced, or other actions that gain happiness increased for more efficient happiness management.
Raid village - Should have a number of options under this one for each type of raid (raid for items / money, Capture prisoners, Cause chaos). Priority changed by chaos, security, unhappiness. Successful raids reduce chaos and increase happiness.
Capture character - Make into prisoner. Can be used against raiding heroes, or against town.
Raid dungeon - Send them out against another player.
Pick a fight - Increases with Chaos and presence of opposing factions.
Revolt - Severe unhappiness for an extended duration. Usually means that space / money / items are not sufficient to keep the character under control. Will attempt to leave the dungeon. May also be used for prisoners who feel that potentially dying on their way to the front door is better than continuing on.
Get Payment - Go to vault and attempt to extract any outstanding payment. Priority increases with unhappiness. Successful payment increases happiness by an amount dependent on the character’s current wealth. Failure to retrieve payment decreases happiness further, but also dampens this type of happiness gathering for a moderate period so that they may try other avenues of gaining happiness (like relaxing)
Take ownership of location - Increases the space owned by the character. This may be available under severe unhappiness, but will be mainly used by the player to increase the happiness regeneration flowing from the character’s increased levels, or increased wealth.
Take ownership of item - Marks the item as now belonging to the character. Triggered by loot drops when %loot contracts are used. Can also be used to forcibly transfer someone else’s item to this creature, with appropriate anger from victim. Can be used by the player to give new weapons or gems from the vault.
Give ownership of location to character - Remove ownership of space and transfer it to another character. Creature competing the transfer will be angry on the loss of space, but not as angry as if it’s been taken from him. Very unlikely to be triggered naturally, but gives a way for the player to adjust their mercenary structure.
Give ownership of item to character - As above, but utilising item in the creature’s posession.
Sign new contract - Demand a new contract be signed. Priority increased through consistent unhappiness or multiple gains of levels. One step before revolting, and possibly linked to an email out to the player. Can also be triggered by the player to negotiate different payment methods (most likely with a once-off power payment)
(Mainly) Hero Specific:
- Escort Prisoner - Attempt to move with the prisoner to the entrance. If they make it they are credited with rescuing that prisoner.
- Disarm Trap - Apply disarming skill to any detected trap. Priority increases significantly when a trap is near and known. Ramps up with expectation of successful disarming.
- Search for secret doors / traps - Apply searching skill rather than moving on quickly. Priority increased with searching skill and hero aggressiveness.
Monday, July 11, 2011
A Notorious Holiday (Pt 2)
After fleshing out the design document with all the new ideas, it was time to start looking into coding. My first port of call was the ToME engine as it had a promising glimpse of a realtime roguelike example module. Unfortunately the module didn't work out of the box, but finally a forum post cleared up the issue.
Spent a couple of hours setting up the dev environment and compiling the ToME source code, only to find out that the vast majority (if not all) of the module can be handled exclusively by the LUA module documents. First impressions of the system are great as it was pretty easy plugging in a bit of code from the ToME module and getting it working. I did have some issues trying to debug certain errors, but once I realised all output was going to the log file and not to the console, it made it a lot more straightforward to see what needed to be imported to get a certain piece of code working.
The development path is pretty much set for either the full game or along way into the prototyping phase with the wealth of extras that T-engine4 gives me.
Projected development:
- Recompile T-engine - Done, although not needed
- Set up a new module based off the realtime example - Done. 30 mins
- Bring in new entities that are on the player's side - Done. 4h. Pinched the summoning code. Bit messy as it used the party system that was non-existent in the example module. Lots of new code brought in that may or may not help.
- Bring in the party system - Done. 2h. After revisiting the ToME module it seems like the party system might work well for flipping control between the mercs on your side. I'm not sure whether I'll need the party display though.
- Have vision from all minions. 3h. 80%. Worked in the first 1/2 hr, but now it seems inconsistent. Hopefully it's only an incorrect assumption about the caching, but I've seen enough to know that it's definitely possible.
- Spawn in a hero and move it toward the player. Hopefully the minions are able to react and fend off the hero. Will need to open up state-based AI transitions.
- AI code to move hero toward arbitrary location.
- AI code to make hero explore.
- Build governor AI to swap between AI states depending on priorities.
- AI code to make hero retreat.
- Allow minions to retreat to arbitrary point
- Create a digging AI task for minions.
- Allow player to influence minion priorities.
- Build power system for player
- Tidy up minion influence interface to make it viable for realtime play. Goto X, stop, Fight, Flee, dig, transport.
- Create standard dungeon layout with initial home stone placement and initial Gemkeeper minion.
- Limit movement and appearance of player to home stone.
- Build Gem Detection spell
- Build Gem Linking spell
- Build Vision spell
- Build Communication spell
- Build Exert control spell (interface onto merc AI priorities?)
- Create 10-20 mercs and test.
- Build Merc selection interface
- Integrate merc happiness system into AI priorities
- Designation of ownership
- Designation of rooms (vault / prison / throneroom / retreats)
- Collect hourly payments from vault
- Design village raids
- Design rumour system
- Design village (?). allow swapping of interfaces to see village raids
- Design notoriety boards
- Design merchant
- Design Black market
- Link notoriety to power gain.
- Create more heroes / Mercs and play-balance notoriety.
- Release version 0.1
Spent a couple of hours setting up the dev environment and compiling the ToME source code, only to find out that the vast majority (if not all) of the module can be handled exclusively by the LUA module documents. First impressions of the system are great as it was pretty easy plugging in a bit of code from the ToME module and getting it working. I did have some issues trying to debug certain errors, but once I realised all output was going to the log file and not to the console, it made it a lot more straightforward to see what needed to be imported to get a certain piece of code working.
The development path is pretty much set for either the full game or along way into the prototyping phase with the wealth of extras that T-engine4 gives me.
Projected development:
- Recompile T-engine - Done, although not needed
- Set up a new module based off the realtime example - Done. 30 mins
- Bring in new entities that are on the player's side - Done. 4h. Pinched the summoning code. Bit messy as it used the party system that was non-existent in the example module. Lots of new code brought in that may or may not help.
- Bring in the party system - Done. 2h. After revisiting the ToME module it seems like the party system might work well for flipping control between the mercs on your side. I'm not sure whether I'll need the party display though.
- Have vision from all minions. 3h. 80%. Worked in the first 1/2 hr, but now it seems inconsistent. Hopefully it's only an incorrect assumption about the caching, but I've seen enough to know that it's definitely possible.
- Spawn in a hero and move it toward the player. Hopefully the minions are able to react and fend off the hero. Will need to open up state-based AI transitions.
- AI code to move hero toward arbitrary location.
- AI code to make hero explore.
- Build governor AI to swap between AI states depending on priorities.
- AI code to make hero retreat.
- Allow minions to retreat to arbitrary point
- Create a digging AI task for minions.
- Allow player to influence minion priorities.
- Build power system for player
- Tidy up minion influence interface to make it viable for realtime play. Goto X, stop, Fight, Flee, dig, transport.
- Create standard dungeon layout with initial home stone placement and initial Gemkeeper minion.
- Limit movement and appearance of player to home stone.
- Build Gem Detection spell
- Build Gem Linking spell
- Build Vision spell
- Build Communication spell
- Build Exert control spell (interface onto merc AI priorities?)
- Create 10-20 mercs and test.
- Build Merc selection interface
- Integrate merc happiness system into AI priorities
- Designation of ownership
- Designation of rooms (vault / prison / throneroom / retreats)
- Collect hourly payments from vault
- Design village raids
- Design rumour system
- Design village (?). allow swapping of interfaces to see village raids
- Design notoriety boards
- Design merchant
- Design Black market
- Link notoriety to power gain.
- Create more heroes / Mercs and play-balance notoriety.
- Release version 0.1
Thursday, July 07, 2011
A Notorious Holiday
The semester break has been great, especially after finding out I had 3 weeks off instead of 2. I know I'll need about a week to get things organised for next semester, and we'd already organised a week up in Mackay, so the additional week has meant extra time for Notorious design and possibly programming. I've already spent about 3 days going over the design with anyone that will listen, and have discovered a couple of critical pieces to smooth out the concept into a logical, cohesive environment. I've also moved the majority of the documentation into a google document for easier layout control, but will attempt to log the design progress here too.
Focus gems
I'd been flitting around with the idea of using some sort of amulets or the like to utilize the powers of the player, or possibly direct spells, but it was all a bit up in the air. Making the decision to move to exclusively gem-based spells have tidied up a lot of loose ends. Now the players are effectively ethereal beings (more work on that yet) that use gems to focus their power. They have a 'home stone' (a large gem located somewhere in the dungeon) that they primarily link to, and then can manipulate other gems in their immediate vicinity. Base spells are available to discover gems and link to them, then linked gems can have vision, communication or control over the bearer. Limiting the amount of focus gems allows players to make interesting choices in terms of utilising them for scouting, more minions, infiltration, etc.
Having the home stone instead of the actual player allows a logical way of keeping the player safe through dungeon wipes, but also allows high level play to include unlinking the player from their dungeon effectively starting them again (depending on their latent power).
Gemkeepers
The Gemkeepers are a Hidden Society that knows somewhat of the player's ability to link to gems. They believe that by helping these beings, they too may be able to claim power over the world. Gemkeepers actively seek out gems large enough to be linked to and attempt to prepare the gem to be linked. Contrary to the Gemkeeper’s beliefs, the gems do not need any special preparation for linking, but the existence of the Gemkeepers does make it easier to get started in your notorious career.
Acolyte Gemkeepers have no master, and scour the countryside looking for a suitable gem. Once located (using Gem Detection spell at power level similar to their level), they dig out a corridor to the gem and, while they are waiting for a presence to appear, they keep digging out more and more of a throne room around the gem as well as a place for themselves to live. They also make themselves known to the local town or village using a secret identity to hide their real aim of being here. Acolytes spend as much of their time as possible in the throne room, hoping to be the first one that the presence links to. For this to occur, Acolytes carry a quite precious gem (or possibly several) with them to make the linking process easier.
The number of Acolytes are significantly higher than the number of Linked Ones (full members of the Gemkeeper Society who have successfully been linked to an Ethereal Being) and it may take a lifetime for an Acolyte to become linked, if ever. Acolytes learn from the Linked Ones about what generally goes on once linked in somewhat vague terms. It is common knowledge within the society that a gem of a certain size and quality is needed to host a presence, that they will then use the main gem (home stone) to link with other gems, and that the presence can then communicate to and influence creatures holding those gems.
If an Ethereal Being links to an uncovered gem (new players automatically find uncovered gems), they will often see the Acolyte Gemkeeper in the throne room, calling out ‘Link to me master!’, ‘Speak to me!’, ‘Let me be your right hand man!’.
Focus gems
I'd been flitting around with the idea of using some sort of amulets or the like to utilize the powers of the player, or possibly direct spells, but it was all a bit up in the air. Making the decision to move to exclusively gem-based spells have tidied up a lot of loose ends. Now the players are effectively ethereal beings (more work on that yet) that use gems to focus their power. They have a 'home stone' (a large gem located somewhere in the dungeon) that they primarily link to, and then can manipulate other gems in their immediate vicinity. Base spells are available to discover gems and link to them, then linked gems can have vision, communication or control over the bearer. Limiting the amount of focus gems allows players to make interesting choices in terms of utilising them for scouting, more minions, infiltration, etc.
Having the home stone instead of the actual player allows a logical way of keeping the player safe through dungeon wipes, but also allows high level play to include unlinking the player from their dungeon effectively starting them again (depending on their latent power).
Gemkeepers
The Gemkeepers are a Hidden Society that knows somewhat of the player's ability to link to gems. They believe that by helping these beings, they too may be able to claim power over the world. Gemkeepers actively seek out gems large enough to be linked to and attempt to prepare the gem to be linked. Contrary to the Gemkeeper’s beliefs, the gems do not need any special preparation for linking, but the existence of the Gemkeepers does make it easier to get started in your notorious career.
Acolyte Gemkeepers have no master, and scour the countryside looking for a suitable gem. Once located (using Gem Detection spell at power level similar to their level), they dig out a corridor to the gem and, while they are waiting for a presence to appear, they keep digging out more and more of a throne room around the gem as well as a place for themselves to live. They also make themselves known to the local town or village using a secret identity to hide their real aim of being here. Acolytes spend as much of their time as possible in the throne room, hoping to be the first one that the presence links to. For this to occur, Acolytes carry a quite precious gem (or possibly several) with them to make the linking process easier.
The number of Acolytes are significantly higher than the number of Linked Ones (full members of the Gemkeeper Society who have successfully been linked to an Ethereal Being) and it may take a lifetime for an Acolyte to become linked, if ever. Acolytes learn from the Linked Ones about what generally goes on once linked in somewhat vague terms. It is common knowledge within the society that a gem of a certain size and quality is needed to host a presence, that they will then use the main gem (home stone) to link with other gems, and that the presence can then communicate to and influence creatures holding those gems.
If an Ethereal Being links to an uncovered gem (new players automatically find uncovered gems), they will often see the Acolyte Gemkeeper in the throne room, calling out ‘Link to me master!’, ‘Speak to me!’, ‘Let me be your right hand man!’.
Monday, December 06, 2010
Notorious
Concept
A game where you build dungeons, raid the locals, and fend off heroes to become the most notorious in the land.
Facebook implementation:
The problem with most new games is that they either follow the social obligation path of Farmville or the energy-as-limitation with artificial missions akin to Mafia wars. I want to design a game where the interaction between players is a little more meaningful, and the interaction with the game is not as artificially limiting.
Even though the digging out of dungeons and conducting of raids takes time, the planning is freely available at any time, as well as the interaction with other dungeons through heroes and the rumour system. Matters still need to be addressed as things may not go to plan on the raids, diggers may strike unknown obstacles (monster pits / gold veins), or new areas need to be designated once dug out. There should be enough activity for new players and invested players to be able to play as long as they like, but players seeking only small doses of fun can still plan out a fair way into the future, and also have many things to do when returning from a period of time away.
Most monster contracts and built areas are designed to be replenished over time, so the dungeon will settle about a certain level of notoriety if left alone for an extended period. Heroes will attempt the dungeon at somewhat regular intervals (~1/2 hr?), and non-returning heroes will raise the notoriety of the dungeon, which in turn inspires higher level heroes to attempt the dungeon. Once a high enough hero comes through to wipe out all the monsters and take most of the gold / equipment away, the notoriety drops so that minor heroes will attempt it next time.
Things to do
Build a Dungeon
Conduct Raids
Hire Mercenaries
Buy / Sell Equipment
Ransom Prisoners
Bribe Heroes
Listen to Rumours / Spread Rumours
Replay events
View Highscores
Build Dungeon
- Pick starting location (allow restart / multiple dungeons?)
- Designate areas to be mined out
- Designate a room (Storage / bedroom / training room / patrol room / eating / vault)
- Start with dirt around entrance, but get into different types of stone further in, with gold / gem seams / caves / ravines / streams. Stone needs mining equipment and a lot more time to get through. Gold seams could take a long time to go through, so they provide a steady source of income
Conduct Raids
- Capture prisoners. Designate prison areas. If area contains digging designations, prisoners will also dig. Each prisoner has a name / occupation and a bounty that is used for notoriety
- Target equipment / gold
- Spreading chaos. Raises Notoriety. Increases happiness for chaos creatures.
- present 3 targets with easy / medium / hard options. Give percentage chance for success, appproximate time to get there and approximate rewards.
Hire Mercenaries
- Set up contract with goblin camp to provide up to 5 goblins at 1 per hr for a wage of 5 gold per hr each.
- Contract with a Troll for modest lodgings and 40% of all loot found
- Mercs will take wage from whatever drops, or through trips to the vault. No payment angers mercs, granting greater autonomy to take their payment through other means.
- If mercenaries level up while in base, you can attempt to offer them individual contracts
- Provide a choice of 3-5 contracts at the "villians'r'us" trader. Go between for nefarious rulers of the world
- Make names and random stats for mercs. Light hearted like Majesty.
Buy / Sell Equipment
- Purchase goods through middle man
- Sell manufactured items and old items from heroes to black market
Ransom Prisoners
- Negotiate through ransom broker
- Ransom for prisoners continues to rise from their base level (set by profession/level), giving bigger rewards, more notoriety, but also more incentive for heroes.
Bribe Heroes
- Pay minimal cost to cast spell of seeing on hero so that you can observe what someone's dungeon setup is like.
- Can organise a more tougher hero than the dungeon warrants if you pay the difference. This should allow even level 1-2 players to see what a level 20 dungeon is like from both the hero and dungeon creators perspective. Negotiate deal to split profits for upfront cost.
- Cast spell of control to give player the choices the hero would have automatically made. (Move to grid coord / fight / search / free prisoner)
Listen to Rumours / Spread Rumours
- Find out what townsfolk have to say about your dungeon. Multiple perspectives available to hear different variants, plus a general consensus of notoriety.
- Choose rumours by dungeon (player) / monster / town / hero / prisoner / rumour type
- Heroes use the rumour system to pick their next targets.
- Information leaks through public interaction of your dungeon with the town, as well as returning heroes.
- Spread rumours allows the player to either agree or disagree with certain rumours (through a conversation with townsfolk, with chance of them believing) or make their own rumours up. Allows the user to control the notoriety of their dungeon (and other people's dungeons) and tailor the types and level of heroes that attempt to take on their dungeon.
Replay events
- review events hapening in your dungeon since you were away
- sort by time / level of importance / characters involved / room involved
View Highscores
- sort by highest level of hero killed (main criteria) / current notoriety /notoriety change / rumoured wealth / rumoured size
A game where you build dungeons, raid the locals, and fend off heroes to become the most notorious in the land.
Facebook implementation:
The problem with most new games is that they either follow the social obligation path of Farmville or the energy-as-limitation with artificial missions akin to Mafia wars. I want to design a game where the interaction between players is a little more meaningful, and the interaction with the game is not as artificially limiting.
Even though the digging out of dungeons and conducting of raids takes time, the planning is freely available at any time, as well as the interaction with other dungeons through heroes and the rumour system. Matters still need to be addressed as things may not go to plan on the raids, diggers may strike unknown obstacles (monster pits / gold veins), or new areas need to be designated once dug out. There should be enough activity for new players and invested players to be able to play as long as they like, but players seeking only small doses of fun can still plan out a fair way into the future, and also have many things to do when returning from a period of time away.
Most monster contracts and built areas are designed to be replenished over time, so the dungeon will settle about a certain level of notoriety if left alone for an extended period. Heroes will attempt the dungeon at somewhat regular intervals (~1/2 hr?), and non-returning heroes will raise the notoriety of the dungeon, which in turn inspires higher level heroes to attempt the dungeon. Once a high enough hero comes through to wipe out all the monsters and take most of the gold / equipment away, the notoriety drops so that minor heroes will attempt it next time.
Things to do
Build a Dungeon
Conduct Raids
Hire Mercenaries
Buy / Sell Equipment
Ransom Prisoners
Bribe Heroes
Listen to Rumours / Spread Rumours
Replay events
View Highscores
Build Dungeon
- Pick starting location (allow restart / multiple dungeons?)
- Designate areas to be mined out
- Designate a room (Storage / bedroom / training room / patrol room / eating / vault)
- Start with dirt around entrance, but get into different types of stone further in, with gold / gem seams / caves / ravines / streams. Stone needs mining equipment and a lot more time to get through. Gold seams could take a long time to go through, so they provide a steady source of income
Conduct Raids
- Capture prisoners. Designate prison areas. If area contains digging designations, prisoners will also dig. Each prisoner has a name / occupation and a bounty that is used for notoriety
- Target equipment / gold
- Spreading chaos. Raises Notoriety. Increases happiness for chaos creatures.
- present 3 targets with easy / medium / hard options. Give percentage chance for success, appproximate time to get there and approximate rewards.
Hire Mercenaries
- Set up contract with goblin camp to provide up to 5 goblins at 1 per hr for a wage of 5 gold per hr each.
- Contract with a Troll for modest lodgings and 40% of all loot found
- Mercs will take wage from whatever drops, or through trips to the vault. No payment angers mercs, granting greater autonomy to take their payment through other means.
- If mercenaries level up while in base, you can attempt to offer them individual contracts
- Provide a choice of 3-5 contracts at the "villians'r'us" trader. Go between for nefarious rulers of the world
- Make names and random stats for mercs. Light hearted like Majesty.
Buy / Sell Equipment
- Purchase goods through middle man
- Sell manufactured items and old items from heroes to black market
Ransom Prisoners
- Negotiate through ransom broker
- Ransom for prisoners continues to rise from their base level (set by profession/level), giving bigger rewards, more notoriety, but also more incentive for heroes.
Bribe Heroes
- Pay minimal cost to cast spell of seeing on hero so that you can observe what someone's dungeon setup is like.
- Can organise a more tougher hero than the dungeon warrants if you pay the difference. This should allow even level 1-2 players to see what a level 20 dungeon is like from both the hero and dungeon creators perspective. Negotiate deal to split profits for upfront cost.
- Cast spell of control to give player the choices the hero would have automatically made. (Move to grid coord / fight / search / free prisoner)
Listen to Rumours / Spread Rumours
- Find out what townsfolk have to say about your dungeon. Multiple perspectives available to hear different variants, plus a general consensus of notoriety.
- Choose rumours by dungeon (player) / monster / town / hero / prisoner / rumour type
- Heroes use the rumour system to pick their next targets.
- Information leaks through public interaction of your dungeon with the town, as well as returning heroes.
- Spread rumours allows the player to either agree or disagree with certain rumours (through a conversation with townsfolk, with chance of them believing) or make their own rumours up. Allows the user to control the notoriety of their dungeon (and other people's dungeons) and tailor the types and level of heroes that attempt to take on their dungeon.
Replay events
- review events hapening in your dungeon since you were away
- sort by time / level of importance / characters involved / room involved
View Highscores
- sort by highest level of hero killed (main criteria) / current notoriety /notoriety change / rumoured wealth / rumoured size
Subscribe to:
Posts (Atom)



