Author Topic: Looking for advice on integrating WB MP with webpage, data tables  (Read 1142 times)

0 Members and 1 Guest are viewing this topic.

nijis

  • Developer
  • *
    • View Profile
    • Flight of the Silawa
  • Faction: Neutral
  • NW
Hi -- I was wondering if anyone out there might be able to put me on the path to learning how to introduce player accounts and persistent stats into a mod, a la Nord Invasion or cRPG. In particular, what languages/database systems would you recommend I use? I'm thinking just JavaScript and SQLite, but my knowledge of dynamic web page design is pretty minimal.

In particular, I am looking to implement...

1) Track of a player's performance in multiplayer battles
2) Track a simple but persistent game world, which would be independent of the M&B engine: ie, provinces, their populations, wealth, etc
3) An application that periodically updates variables linked to each province, based on the outcome of battles
4) A way for WB running on a server to load those provincial variables, and thus determine the parameters of the next game to be played (ie, the map, the factions, balance of bots, etc)

Any pointers would be most welcome!
« Last Edit: January 26, 2012, 02:27:08 PM by nijis »
silawa.wordpress.com, www.arabist.net.

cmpxchg8b

  • Modder++
  • Grandmaster Knight
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #1 on: January 26, 2012, 03:41:13 PM »
JS and SQLite won't be enough, you'll need a server-side scripting language too (unless you were thinking of going server-side Javascript, but that's a bit uncommon). If you're not experienced your best bet is probably PHP and MySQL, mostly because of the amount of tutorials/documentation available on the net.

The rest is pretty much your standard browser game: a database with world and player data, a couple of cron jobs for scripts that need to be run at certain intervals and interface/backend code to display/manage whatever is stored in the database. Communicating with Warband is also easy, you use the send_message_to_url operation from your server to request a page on your website, then according to the page requested and arguments you build a reply that the game will parse (or none, if you just want to send data from the server to the website).

It doesn't really answer your questions in specific, but how you decide to implement those depends entirely on you; there's thousands of ways to do it and no universal one.
Warband Script Enhancer v2.7.1 - additional operations, game scripts and triggers for Warband modders

CTCCoco

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Neutral
  • WB
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #2 on: January 26, 2012, 04:30:02 PM »
You MUST know:

- PHP.

- MySQL.

- How a HTTP Request works.

This should be the system to send and store data in a database: Server request -> PHP -> MySQL | And if you want to receive data from a database |-> Server request -> PHP -> MySQL -> PHP -> server.
« Last Edit: January 26, 2012, 04:36:02 PM by CTCCoco »
Pawn, LUA, PHP, MySQL programmer ( Squirrel coming soon ) ( SA-MP, MTA, IV-MP ). Learning Python (Warband module system) at the moment.


nijis

  • Developer
  • *
    • View Profile
    • Flight of the Silawa
  • Faction: Neutral
  • NW
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #3 on: January 26, 2012, 04:31:51 PM »
Thanks -- that answers my question pretty well, actually. An abundance of tutorials is a pretty good point of recommendation. I'll have a look at what tutorials are available, and probably will have a whole bunch of more specific questions for the community once I've tried them out.
silawa.wordpress.com, www.arabist.net.

Cjkjvfnby

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #4 on: January 26, 2012, 05:09:08 PM »
You MUST know:
- PHP.

Must or must not?

There is many other ways:
Python: Django web framework Python(and any database it supports.  MySQL, Postgres, Sqlite), And some other frameworks.
Javascript: NodeJs but it is not in common use in production.
Ruby: RubynRails.
...
...
...


CTCCoco

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Neutral
  • WB
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #5 on: January 26, 2012, 05:15:04 PM »
You MUST know:
- PHP.

Must or must not?

There is many other ways:
Python: Django web framework Python(and any database it supports.  MySQL, Postgres, Sqlite), And some other frameworks.
Javascript: NodeJs but it is not in common use in production.
Ruby: RubynRails.
...
...
...

I think PHP is the most common and better way. It's the most popular, and if you learn it will be FOR SURE much more usefull than these languages, for many other things.
Pawn, LUA, PHP, MySQL programmer ( Squirrel coming soon ) ( SA-MP, MTA, IV-MP ). Learning Python (Warband module system) at the moment.


Cjkjvfnby

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #6 on: January 26, 2012, 06:06:23 PM »
I think PHP is the most common and better way. It's the most popular, and if you learn it will be FOR SURE much more usefull than these languages, for many other things.

Most popular or in top 10 it does not matter. It will be huge comunity.
I have learned python. I use it for web, for some work tools, for gui applications.  It is embeded in some pograms.  Why you recomended language what can be used only in web?

cmpxchg8b

  • Modder++
  • Grandmaster Knight
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #7 on: January 26, 2012, 06:37:11 PM »
Because he didn't ask what programming language to learn, he asked how to create a simple website and specified that he has little experience.
I don't really like PHP either, but for a beginner and for something small scale I think it's a good choice. Starting with a huge MVC framework like the ones you mention (Django, Ruby on Rails) is "slightly" overkill.
Warband Script Enhancer v2.7.1 - additional operations, game scripts and triggers for Warband modders

CTCCoco

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Neutral
  • WB
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #8 on: January 26, 2012, 07:41:21 PM »
I think PHP is the most common and better way. It's the most popular, and if you learn it will be FOR SURE much more usefull than these languages, for many other things.

Most popular or in top 10 it does not matter. It will be huge comunity.
I have learned python. I use it for web, for some work tools, for gui applications.  It is embeded in some pograms.  Why you recomended language what can be used only in web?

Well, if you are not a master of a language you'll never know what possibilities it have. I'm not a master but I know masters, and I'm not saying python sucks or something like that, PHP is nice for beginners and for professional people, huge community, you'll find job because people pays you for PHP programming, etc.

Python is good as well. Ruby, too. But more complex for a beginner, like cmpxchg8b said (it doesn't mean that they are better than PHP, because like I said PHP have many levels).

It's only my opinion.

Plus, you can't compare PHP without a framework and Ruby On Rails.
« Last Edit: January 26, 2012, 07:55:46 PM by CTCCoco »
Pawn, LUA, PHP, MySQL programmer ( Squirrel coming soon ) ( SA-MP, MTA, IV-MP ). Learning Python (Warband module system) at the moment.


Lav

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
  • MP nick: Lav
  • M&BWB
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #9 on: January 26, 2012, 07:45:55 PM »
Why you recomended language what can be used only in web?
What weird ideas you have about PHP here. :-) It is perfectly usable everywhere you can use Python. And it's documentation is much much better - every time I read official Python docs and see formal declarations from compiler theory in the articles intended for newbies, I feel like strangling Python authors with their own intestines. :evil:

Python, however, has certain advantage over PHP because Warband Module System compiler is written in Python. And better understanding of MS tuples won't hurt, either.

Swyter

  • Sergeant Knight at Arms
  • *
  • »Star Wars Conquest Dev Team Leader
    • View Profile
    • [Mount&Blade Command Database]
  • Faction: Swadian
  • MP nick: Sareth | Swyter
  • M&BWBWF&S
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #10 on: January 26, 2012, 09:42:08 PM »
Wow... a dev?, this is the first time I see a redflag guy over here.
Can you post something related to what are you doing lately within the company, nijis?

Cjkjvfnby

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #11 on: January 26, 2012, 09:44:21 PM »
Why you recomended language what can be used only in web?
What weird ideas you have about PHP here. :-) It is perfectly usable everywhere you can use Python.
Wow!  I have newer met php out of web. Any examples?

Quote
And it's documentation is much much better - every time I read official Python docs and see formal declarations from compiler theory in the articles intended for newbies, I feel like strangling Python authors with their own intestines. :evil:
I never see it in that way.  It look almost clear for me.

Quote
Python, however, has certain advantage over PHP because Warband Module System compiler is written in Python. And better understanding of MS tuples won't hurt, either.
It is bad example of Python code. 

Python is easy. PHP too.
Python has pretty sintax. If you write same thing on PHP and Python. In Python it will be less characters :)
Both has big comunity.

I can continue this hollywar for a long time, but I want to code python before sleep :)

Lav

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
  • MP nick: Lav
  • M&BWB
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #12 on: January 26, 2012, 11:01:39 PM »
Wow!  I have newer met php out of web. Any examples?
Cannot help you with examples - I never really investigated the PHP-GTK world. You'll have to research this one for yourself. For me it's enough to know this thing exists. :-)

Kazzan

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWBNW
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #13 on: January 27, 2012, 12:39:30 AM »
Swyter, hes been doing some modding lately, it seems.
http://forums.taleworlds.com/index.php/topic,199681.0.html

Well, he is also not working at the Taleworlds HQ.
 
Quote
Men hate what they don't understand, and what they hate they will never understand

xenoargh

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Looking for advice on integrating WB MP with webpage, data tables
« Reply #14 on: January 27, 2012, 08:10:10 AM »
I don't think we, er, want to speculate about that stuff, guys. 

We all know how good Taleworlds is about corporate communications; let's just presume that everybody not directly tasked with core engine stuff has some free time right now.  If Yazzy can be two places at once right now that suggests pretty strongly that core engineering is still a long way from complete but it's unfair to speculate about something we don't know anything about.

Anyhow, wish I had anything more useful to contribute to this other than saying that PHP with http requests resulting in activities within MySQL sounds like a solid premise on the tech end.  With several servers integrated into such a schema, I can see it operating a bit like instances in WoW; of course making that into compelling gameplay is a little different than merely getting it working.

I have a bunch of thoughts about the rest of the proposed operation of the project but I don't think I'll say anything here, as we haven't been asked for our opinions about game design issues.