View Full Version : Creating a birthright web play
Dyark
04-05-2010, 02:24 PM
I am creating a birthright web play (using php and mysql) but it would be better if i use flash xml (i don't know that language, anybody wants to help ??
rjurikwinds
04-05-2010, 06:02 PM
So I'm game... but same as you: I'm more familiar with php/mysql.
I had done something basic with flash but it ended up being a huge slow file. I'm sure it's possible, but it's not something I've been exposed to enough.
Instead I went the Ajax/javascript way.
There are some javascript libraries that can help simulate "flash-like" actions.
- jquery
- Yahoo's YUI
This can help with things like moving pieces on a jpg map, and using events to start actions.
The down side is that it's doesn't always react in exactly the same way with every browser. My first task on www.rjurikwinds.com was to create a movable map, and that "kinda" works but on the web if things aren't perfect they are bound to be left by the way-side...
Dyark
04-06-2010, 03:28 AM
This is what my map looks like right now, it is not dynamic yet, i am trying to find and easy way to filled the map with dynamic data with xml (create the xml file with php and mysql) The feel i am looking for is about the same as gorgon alliance map and object.
So if you know somebody or you know some website with good tutorial, that would be easy.
Dyark
04-06-2010, 03:29 AM
forgot to include the link :)
http://www.drouincourtois.com/Dungeon/Birthright/Map_vide.php
Arjan
04-06-2010, 04:06 AM
i actually made a map a-la gorgons alliance in the latest flash version, which also has the z axis to make maps etc look 3d...
everything is working fine, but the difficult part i dont get right are the coordinates.. somehow flash adjusts certain coordinates (inner vs outer etc etc dont ask me exactly)
so my objects didnt hold position when zooming in or moving the map.
i dont know if i posted the flashfile a while ago, but ill be home in 1 month again.
Does anybody know how some of the RL maps are done? The level of detail grows as you zoom in, and the quality of the map doesn't fade.
Example, for Dyark's map: When you are zoomed out, you can see names of the regions, if you zoom in on a region, you can see domains (they are not there already, they appear on a certain zoom level), etc.. where on the maximum zoom level you can see whatever there is to see. When you move along the map, it draws the details not in the current frame instead of just having been zoomed in on the whole continent.
Yes, like google maps.
It seems to me that some of those maps actually zoom in on .png or .jpg files, on certain levels. Let's say 8 pics for first level of detail or continent view, another 8 for region view, another 8 for subregion view, another 8 for domain view. So, yes, that would be a lot of images. :)
And when you are on the same level, you move along the map between images on the same level.
LOL, I sound like a total newb.
Dyark
04-09-2010, 01:39 PM
Rey it would be easy easier if I had a vector map (this is not the case right now :( )
if somebody made the map with cc3 or illustrator as vector i would try to have a better view of it.
Arjan
04-09-2010, 02:36 PM
Rey it would be easy easier if I had a vector map (this is not the case right now :( )
if somebody made the map with cc3 or illustrator as vector i would try to have a better view of it.
here you go :-)
Map in CC3 format made by Brian Sofen
http://www.birthright.net/forums/downloads.php?do=file&id=111
Dyark
04-09-2010, 07:42 PM
Well looks like i can't make a cc3 file into and eps file :(
anybody can make it ?
rjurikwinds
04-09-2010, 09:31 PM
So, the guys that did Birmail had all the province mapped out in x y coordinates.
I imported the data they had in their java into mysql format for the Rjurik area, and from there you can use php GD library functions to "draw" provinces using standard image handling functions.
Email me at "charles at dupindesaintcyr dot com" and I can give you a backup of my "provinces" table, as well as a php class I used to "color province areas based on province control" -- you have to explode the coordinates and put them into an array in order to run a imagefilledpolygon() function.
The table also has the province's center x and y so that you can place the province name, flags or counters...
I know it's a bit heavy in terms of math: you can't be scared of geometry, but give it a few hours and this can save you days of "re-drawing" when province control moves from one person to the other...
Dyark
04-09-2010, 09:39 PM
So, the guys that did Birmail had all the province mapped out in x y coordinates.
I imported the data they had in their java into mysql format for the Rjurik area, and from there you can use php GD library functions to "draw" provinces using standard image handling functions.
Email me at "charles at dupindesaintcyr dot com" and I can give you a backup of my "provinces" table, as well as a php class I used to "color province areas based on province control" -- you have to explode the coordinates and put them into an array in order to run a imagefilledpolygon() function.
The table also has the province's center x and y so that you can place the province name, flags or counters...
I know it's a bit heavy in terms of math: you can't be scared of geometry, but give it a few hours and this can save you days of "re-drawing" when province control moves from one person to the other...
I just sent you an email :D
Arjan
04-10-2010, 02:36 AM
i already have those GD calculations for the birmail maps, made years ago..
ill see if i can find them with ftp, they should be somewhere on the BRnet
server
if not you have to wait 3 weeks
arjan
Mirviriam
04-16-2010, 07:41 AM
I had a series of objects setup in PHP files to handle what basically handled inputting new provinces, domains, holdings. I was going to release it, but I lost heart when the server I was on rolled back after 3 days of typing the damned things from my hardcopy plans.
If you wanted to throw a web version of birMail together, I have been planning one together a year or two back & would be willing to work on something. I don't do any graphics myself. There's nothing to say that the php/sql can't play nice with almost any other technology out there...
rjurikwinds
04-16-2010, 06:59 PM
So another library I have been playing with in order to show a "game map" is called "OpenLayers" -- it's javascript based and it allows you zoom in/out "à la google maps" -- you can then code additional "Layers" that go on top so that you could for example show troops, holdings, borders etc...
Here is an example that I worked with to just have the map working:
http://rjurikwinds.com/bw_map.php
My thought on this one was to show "tokens" to represent holding levels and use that as the overall map -- the idea there would be to give the players "some" idea of holding levels but not reveal too much -- trying to simulate what "normal people" would know (an not necessarily if the holding level is a 3 or 4!
On the back end OpenLayers allows you to show the information on the map based on an xml or straight vector-like information...
This means that PHP on the back end can show different information for every logged-in user; and my next step then is to figure out what to show to whom...
rjurikwinds
04-19-2010, 11:53 AM
If you wanted to throw a web version of birMail together, I have been planning one together a year or two back & would be willing to work on something. I don't do any graphics myself. There's nothing to say that the php/sql can't play nice with almost any other technology out there...
So Arjan had a similar plan, but as many of us have relatively little time to put a full site together it needs to become a virtual colaboration project: He had tasked me with figuring character creation and I am well a year into it And I am relatively close but it's not complete...
You can try my Rjurik 2nd Ed by going here (you first need a user)
http://rjurikwinds.com/register.php?op=validated
once you created a regent you should see your province in the game map
http://rjurikwinds.com/bw_map.php
Thelandrin
04-19-2010, 01:34 PM
Hjolvar, who is currently hosting my game (Empire's Twilight), is soon to move to a new site, which he says has a better server and can host multiple games at once. Maybe that's worth looking into.
Mirviriam
04-19-2010, 06:52 PM
So Arjan had a similar plan, but as many of us have relatively little time to put a full site together it needs to become a virtual colaboration project: He had tasked me with figuring character creation and I am well a year into it And I am relatively close but it's not complete...
You can try my Rjurik 2nd Ed by going here (you first need a user)
http://rjurikwinds.com/register.php?op=validated
once you created a regent you should see your province in the game map
http://rjurikwinds.com/bw_map.php
Where's his thread? I love the map and layers :)
I was on here awhile back & posted for ideas, just never saw the link for a collaberation. Let me know.
rjurikwinds
04-19-2010, 08:33 PM
Where's his thread?
Who's thread? Arjan? He must have started a thread somewhere, but I think we had talked on the sidelines about starting a Birmail replacement in PHP/mysql.
I love the map and layers :)
Thanks, glad you like it -- it's only a start and as with many hobbies it's slow to progress...
I was on here awhile back & posted for ideas, just never saw the link for a collaberation. Let me know.
I took out the "forum" on my site because I felt it better to have that on BR.net - We'd need to see if Arjan has the stomack for a big push for development: I know it might sound doable, but it is a big task and I WORSHIP the guys who put Birmail together;
Arjan
04-20-2010, 05:42 PM
Who's thread? Arjan? He must have started a thread somewhere, but I think we had talked on the sidelines about starting a Birmail replacement in PHP/mysql.
I took out the "forum" on my site because I felt it better to have that on BR.net - We'd need to see if Arjan has the stomack for a big push for development: I know it might sound doable, but it is a big task and I WORSHIP the guys who put Birmail together;
uff there should be quite a few threads about this we made over the years.. i have been trying to set this up for about 6 years now.. as well as i have a bunch of stuff already made.
i will be back home in 10 days after living in peru for 4 months, ill see what i can gather together from my PC at home..
about a year ago we had another try for this, and i created a social group back then for the whole development part... unfort due lack of time nothing actually happened.
but lets take the discussion there for future reference, or easy to find everything about it.
the social group can be found here: http://www.birthright.net/forums/group.php?groupid=3
the forum belonging to the group here: http://www.birthright.net/forums/legacy-kings-f31.html
arjan
Dyark
04-20-2010, 07:36 PM
So Arjan had a similar plan, but as many of us have relatively little time to put a full site together it needs to become a virtual collaboration project: He had tasked me with figuring character creation and I am well a year into it And I am relatively close but it's not complete...
You can try my Rjurik 2nd Ed by going here (you first need a user)
http://rjurikwinds.com/register.php?op=validated
once you created a regent you should see your province in the game map
http://rjurikwinds.com/bw_map.php
I must say your map is really great
(sorry was away for an addiction call assassin creed 2)
I think this is what i am looking for, you did sent me the script which is perfect, i will get on to it.
PS how do you guys handle the actions phases, do you do it manually or automatically ??
Vicente
04-20-2010, 08:11 PM
I've been doing some progress on my own .NET version of this, but I'm a desktop guy, not a web developer, so my idea was to make a WPF/WinForms client and make it communicate with a server for the turns (much like VGA Planets or Dominions).
I'm fixing bugs and trying to make a mockup of a domain of the "Empire Twilight" PBEM, but no idea how long it will take, I have been doing this on small breaks from my jobs for the last year, but it's hard to get a constant number of hours for this every week :(
Dyark
04-20-2010, 08:23 PM
i know the problem, i have a job, i girlfriend and a baby so time is kinda short, but i am giving it 2 to 3 hours a week if possible.
web form is easier with php and a database (mysql), i exported all the data from birdmail (many thanks for it's creation) and i modify it with what I want.
My problem is with map, but I think i just receive the solution, so i got to play with the map and code a little bite and see what happen.
I already coded the GB, RP and random event for all domains, also the expense (by 2e edition rule) exempt for building (bridge, seaport etc.)
JakobLiar
04-20-2010, 10:04 PM
I've got to say that all this really looks awesome. Lemme know when its up and running. Unfortunately I'm no IT guy.
Dyark
04-20-2010, 11:15 PM
This is the test page right now (i have not finish yet)
http://www.deismaar.com
log is user
password user
Vicente
04-21-2010, 09:36 AM
Very nice, you have a good deal of work done :)
Dyark
04-21-2010, 08:31 PM
Guys i want to know how you handle the action when you play (exemple agitate, i would start with what number from the 3e edition ? i am thinking of DC10 + non allies & substract allies from the DC : Province level 5, law mine 5, guild level 5 enemy, temple 5 neutral, source 2 enemy the dc would start at 10+5(province)-5(law)+5(guild)+0(temple)+2(source) for 17
what do you think ?
AndrewTall
04-21-2010, 08:50 PM
There are arguments for and against province mods themselves, but I'd add modifiers for province morale (rebellious provinces are tough to do anything in), floating modifiers for random events (terrible storms, +5 DC on all actions). And of course, there is RP spend and character mods.
I would also consider whether or not you want source temples to be able to interact with populous realms, and whether or not you want to limit modifers by holding type - so law could modify any populous holding type, but temples cannot affect guilds for example, or only gain 1/2 effect.
Dyark
04-21-2010, 09:03 PM
There are arguments for and against province mods themselves, but I'd add modifiers for province morale (rebellious provinces are tough to do anything in), floating modifiers for random events (terrible storms, +5 DC on all actions). And of course, there is RP spend and character mods.
I would also consider whether or not you want source temples to be able to interact with populous realms, and whether or not you want to limit modifers by holding type - so law could modify any populous holding type, but temples cannot affect guilds for example, or only gain 1/2 effect.
I was just referring to the starting DC (the RP modifier for the regents involve is after), but you have some nice argument for morale, the random events is handle by season already for all roll that affect the zone of the event (I use a special table that handle random event, penalty to GB/RP/roll per regent & province). The only one i think who does not belong there is the source, the rest affect the general morale of the province (temple & faith in a multiple god setting) and guild (employment or banditry).
By the way thanks for the tips, it helps. :D
JakobLiar
04-21-2010, 11:56 PM
I saw the website and it was awesome!
Mirviriam
05-07-2010, 11:00 AM
I try not to use the allies' holdings in the check, because then to be fair you need to query the sql again to see if the enemy has any allies in the area too.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.