www.themutepoint.com Forum Index www.themutepoint.com
Leicesters Games Soc Site
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Blood Royale
Goto page 1, 2  Next
 
Post new topic   Reply to topic    www.themutepoint.com Forum Index -> General
View previous topic :: View next topic  
Author Message
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Thu Jan 15, 2015 9:41 pm    Post subject: Blood Royale Reply with quote

It has been posited that Blood Royale may work as an Online game, allowing us to do lots of negotiating of Marriage Contracts in our spare time, and posting our Moves to (e.g.) a Forum, for Moderation, with Turn Reports being published there, and lots of the mechanics being done "behind the scenes".

I've had a brief look at the mechanical rules, and think it can work.
There are several phases to a Turn, that can be broken down into parts requiring interaction/orders, and Automatic sections.

The next stage is to build a system to remove the need to hand-moderate everything.
The one sticking point is the Marriage-contracts, as they are, by necessity, open and free-form, but certain parts (trade agreements, travel-permits) may be able to be put into code. (For one-off games, custom-code may be written ...)

What format do our tech-minded people think would work best, and how automated can it be?

For reference, I have a Domain ( www.everything-is-scenery.co.uk ) that can run wiki, blog, forum, and lots of code (php, sql, and many, many more... Smile ), we have this forum, and I may try to integrate some Android functionality.
The game needs a Map, with King and Prince tokens, Armies (and Navies), resource tokens (on map and stored in Capitol), and some Event markers (Plague, Revolt, Storm ...) with special rules. Plus each player's cash, and not forgetting their Dynasty (Family Tree of Individual Characters).
Obviously, it could all be hand-moderated, but I'm looking for ways to front-load some of the work.

Thoughts?
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Thu Jan 22, 2015 6:15 pm    Post subject: Reply with quote

I'm going to jot a few thoughts here about how to build some code for BR.
It should be easy enough to build a database to keep track of everything, will just need some code to talk to it, and do some calculation/manipulation.

Dynasties:
Each Dynasty is controlled by a different player (Later: "ruling two dynasties").
Each Dynasty has:
Cash
Persons (Family Tree)
Armies
Fleets
Resource Tokens (Produced each turn by some Provinces)

Persons:
Each character will need:
Constitution, Charisma and Strength (Guile for females)
Gender
Date of Birth
Dynasty
Father
Spouse
Location on Map (King and 1st 5 Princes each)
Captured?

Map:
Provinces and Seas.
Provinces need:
Home Dynasty
Current Owner
Resources Produced (5 distinct types, max 1 per province)
Revolution, Famine and/or Storm Event?
Armies/Kings/Princes in province

Seas:
Fleet locations

Which provinces/Seas border each other
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Sat Jan 24, 2015 9:30 pm    Post subject: Reply with quote

Proposed Structure for Game:

Players go to Webpage.
log in to access account.
Account will show:
1) Current status of player's Dynasty, and all public info about other Dynasties (I think all info is public, will check what rules say.)
2) Current Turn Status (What Stage of Turn, who needs to send Orders, Deadline for Orders)

If player needs to Send Orders, there will be an Order Form.
Sent Orders are final. (is it possible to hold "draft" orders?)

Behind-the-scenes Script will be run after all Orders are received/Deadline reached.
Info will be updated
Notifications of Next Orders Needed will be sent.

For the Events/Movement/Combat section, it would be nice to arrange a time for All Players to be at their screens to keep things moving.
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Sun Jan 25, 2015 10:29 pm    Post subject: Reply with quote

So, I have a Domain, with mySQL, phpAdmin available.
I also have my own forums available, but could use The Mute Point. Would it be easier to use the existing Forum, or set up my own Custom one? Would linking the database (e.g. User Log-In) to a Custom Forum be a good idea/possible?

I need to set up the database. this is OK ... sort of ... once I learn a bit more SQL ...

Then I need to link it to webpages for Users to view/enter Turns. This looks like it will be php. Not sure how this is done yet: where to store the php files, how to link them to webpages, and database ...
I've had a very brief look at how to make forms in php, so can build a structure for data entry. (I'd like to have some conditional forms, but not sure on this yet*)
Viewing Data should be easy enough ... either by Dynasty, or by Type (e.g. View all unmarried Women and their age, View all Armies and their locations, View all Marriage Contracts involving Player 2 etc). Run an SQL query through php to build webpage?

Auto-send notifications? Can I get alerts when all Orders are in? Should be able to script Send all players "it is now Turn X, Phase n. Check your Account and send Orders by DEADLINE_DATE" email?

*Conditional Forms:
e.g. Birth Phase: Try for child. Declare gender if successful. Offer more attempts, declaring gender after each attempt. Max 3 attempts. "Stop Now" button.
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Fri Feb 06, 2015 5:11 pm    Post subject: Reply with quote

So, to make this web interface, I will need:
A database.
Some .php files to create pages.
Some back-end processing to enter Orders, send notifications

Pages Needed:
Log in.
Input Orders.
Display Current Turn Status (Orders needed, Deadlines).
Display Game Status (Armies, Provinces, Families).
More Detail pages?
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Sun Feb 08, 2015 6:09 pm    Post subject: Reply with quote

Expanding on database:

Table 1 (People) :
ID
Name
Dynasty
Year of Birth
Gender
Strength (Guile for females)
Constitution
Charisma
Father
Spouse
Location (on map)

Table 2 (Dynasties) :
ID
Dynasty Name
Cash

Table 3 (map) :
ID
Location Name
"Home" Dynasty
Current owner
Resources produced

Table 4 (Armies and Fleets. Possibly resource Tokens) :
ID
Army/Fleet/Resource Name
Land or Sea or Resource?
Location on map
Owner

There will need to be some links between tables, somehow.
Not sure on this part.
Also not sure where to put Marriage Contracts. Possibly in the People table, associated with the Bride (Or Groom, or somehow both?).

Then will need to write lots of php/sql to control the database! Sad

How does this look?
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
dave



Joined: 05 Oct 2003
Posts: 820
Location: Niflheim

PostPosted: Sun Feb 08, 2015 8:19 pm    Post subject: Reply with quote

Not too bad, until you come to the thing that lets most database designers down: normalisation. Which is, in essence, reducing duplications and frigs by designed relationships between tabled properly. The key to normalisation is getting it right: too little and your database will be manky (technical term), too much and you'll introduce efficiencies.

So, you've got a good start; each table follows one concept and includes columns for each valid attribute. What you don't have in the normalised relationship tables.

So, what I would do is, for example, remove father and spouse from the people table and make a new table called relationship with something like:
person1_id
person2_id
relationship (e.g. father, spouse, mother, second cousin)

Only do your relationships one way (e.g. if you have Fred is Jim's father, don't do Jim is Fred's son, as this is the way to getting out of sync) and define your searches to match that (i.e. only search on father).
Back to top
View user's profile Send private message
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Sun Feb 08, 2015 8:29 pm    Post subject: Reply with quote

dave wrote:
... too much and you'll introduce efficiencies ...


Certainly wouldn't want that! Smile

Thanks for the tips.
I'm not sure how to do "relational" tables yet, but will look into it.

I'm not sure the best way to do Parents/Spouse. I need to keep track of the Family Tree, and just need a few links to do this (e.g. the suggested Father and Spouse) to keep it simple. The processing between database and display can sort the rest out!
I presume one could search (query! see, I know the words! Smile ) both for "Who is X Father of" and "Who is X's Father"?
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Mon Feb 09, 2015 2:49 pm    Post subject: Reply with quote

So, for a "Family Links" table, have person1_id, person2_id, relationship.

Enter each person as "created" (born), with a Father link
"Bob England", "Robert England", "Father" (e.g. Robert is Bob's Father)

On Marriage, enter a new line
"Bob England", "Antoinette France", "Spouse" (or "Wife")

SELECT person1_id from FamilyTable WHERE (relationship="Wife") AND (person2_id="Antoinette France") calls Antoinette's Husband ?

SELECT person2_id from FamilyTable WHERE (relationship="Wife") AND (person1_id="Bob England") calls Bob's Wife ?

That should be fine.
Could probably add some error-checking ("Bob is already married! You cannot enter a new Spouse!") but that's for later, and in the processing, not the database! Smile

Minor complications arise if people re-marry (after the death of a loved one). May have to keep track of Mother and Father.
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Wed Feb 18, 2015 5:23 pm    Post subject: Reply with quote

OK, I'm still struggling with the structure for Births.

What I need to do:
Display to player each "Wife" in their Dynasty.

For each Wife:

Check for 1st birth.
(if Baby=TRUE->Define Gender)
Display result.

Ask if they want a 2nd try.
(No = BREAK. End Birth Phase)

Check for 2nd birth
(if Baby=TRUE->Define Gender)
Display result.
record -1 CON this turn.
Ask if they want a 3rd try.
(No = BREAK. End Birth Phase)

Check for 3rd birth
(if Baby=TRUE->Define Gender)
Display result.
record -2 CON this turn.

Move to next Wife. Repeat until all Wifes checked.

Calculate STATS for each baby.
Enter all babies into database, with name, Gender, STATS, Father etc
Record Birth Phase completed.

I am having a heck of a time figuring the structure to use. I'm probably over thinking it, and getting myself all muddled.
I was hoping to have it all done on one page, but I think I might have to spread it all out, meaning I need to pass values all over the place.

Any help/comments gratefully received.
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Wed Feb 18, 2015 5:42 pm    Post subject: Reply with quote

I was hoping to cycle through each Wife, asking about each Birth before moving to the next. Can't get pages to do this yet! I can only seem to get a list, and then I can't cope with all the data-manipulation at once!
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
antiwiggle



Joined: 02 Oct 2003
Posts: 522
Location: Frankenstein's other lab

PostPosted: Thu Feb 19, 2015 12:38 pm    Post subject: Reply with quote

How are you doing it at the moment?

I'd imagine it would be something like this:

foreach($wifelist as $wife) {
// do baby check things for $wife
}

Where $wifelist is an array of wives in your dynasty.

I'm not a PHP programmer so I'm only guessing.
_________________
The trouble with programmers is that you can never tell what a programmer is doing until it's too late.
Back to top
View user's profile Send private message
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Thu Feb 19, 2015 2:44 pm    Post subject: Reply with quote

$result = SELECT loadsofinfo FROM tables
(to find wives)

while ($row=mysql_fetch_array(result) {
do some stuff
}

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

But I can't figure how to make it just list 1 wife, let me do stuff (such as name the child, and say whether I want another), before moving on to the next.
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
antiwiggle



Joined: 02 Oct 2003
Posts: 522
Location: Frankenstein's other lab

PostPosted: Thu Feb 19, 2015 3:06 pm    Post subject: Reply with quote

Well that should work. If you print out the result of $row each time what do you get?

e.g.

Code:

$result = mysql_query("select id, name from wives where dynasty = 'bob'");

while ($row=mysql_fetch_array(result) {
    printf("ROW id %s name %s", $row[0], $row[1]);
}


Though using your SQL of course.
_________________
The trouble with programmers is that you can never tell what a programmer is doing until it's too late.
Back to top
View user's profile Send private message
Mad Dwarf



Joined: 09 Oct 2003
Posts: 1552

PostPosted: Thu Feb 19, 2015 4:12 pm    Post subject: Reply with quote

I get a table of names/info.
EDIT:I get Undefined Offset 0
more edit: I get rows of (correct) data (sort of). I have been using echo $row['name'] to get names, and it works, ... but not in the way i want


But I can't figure how to make an interface that allows a player to work on 1 Wife/Birth at a time.

Its not getting the code wrong, its not knowing how to build the structure.
_________________
Looking for Inspirational Apps?
https://play.google.com/store/apps/developer?id=Mad+Dwarf+Productions
Looking for computer help in Leicestershire?
http://www.thepcwizarduk.com
Looking for Art, Crafts or Gift Ideas?
http://www.thecrystalwizard.co.uk
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.themutepoint.com Forum Index -> General All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group