Assistance with adding an expansion to an existing project

Game development with Board Game Arena Studio
User avatar
kermitfrog
Posts: 15
Joined: 04 May 2018, 04:39

Assistance with adding an expansion to an existing project

Post by kermitfrog »

Greetings Devs,

I want to add an expansion to Innovation, but I am having difficulty determining the proper course of action. I am not a developer of the game nor am I familiar with BGA's infrastructure. I tried creating an example project and copying content over from the Innovation project, but that is causing many errors when I try to start a game.

Really what I want is the ability to create a "feature branch" or "sandbox" where I can experiment with the existing game framework and add features to it over time before merging it back into the "head" when the features are added. Does such capability exist in BGA?

I should note that I am really new to PHP, JS, and CSS so this will be a learning experience for me, hence why I don't want to muck with the "master" branch. I have many years of software development experience, but these languages are new to me (which should be fun).

Any suggestions are welcome.
User avatar
kermitfrog
Posts: 15
Joined: 04 May 2018, 04:39

Re: Assistance with adding an expansion to an existing project

Post by kermitfrog »

By the way, the error I'm seeing is this:

Unexpected error: Wrong formatted data from BGA gameserver 1 (method: createGame):
Warning: require_once(/var/www/tournoi/include/Innocities.inc.php): failed to open stream: No such file or directory in /var/tournoi/release/tournoi-180518-1949-gs/www/index.php on line 74

Fatal error: require_once(): Failed opening required '/var/www/tournoi/include/Innocities.inc.php' (include_path='/var/tournoi/release/tournoi-180518-1949-gs/www/lib/google-api-php-client/src:.:/usr/share/php') in /var/tournoi/release/tournoi-180518-1949-gs/www/index.php on line 74

It looks like something is missing on the server side, but I don't know what to make of it otherwise.
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Assistance with adding an expansion to an existing project

Post by Een »

Hi!

To clone a project, the following should work:
- create a new project with a different name (innocities in your case?)
- copy the files from the project to the new project
- rename all the files by replacing innovation by innocities
- inside the files, replace all occurrences of "Innovation" and "innovation" by "Innocities" and "innocites"

From the error message, I would say that you didn't do step 3 or that you replaced "innovation" by "Innocities" (case mismatch) somewhere in the files.

Have fun with your project! :)
User avatar
Victoria_La
Posts: 619
Joined: 28 December 2015, 20:55

Re: Assistance with adding an expansion to an existing project

Post by Victoria_La »

I also created a script available in sharedcode project to do the renaming which can be called in command line if you have php command line installed.
https://github.com/elaskavaia/bga-share ... rename.php

Example on how to call it in command line if you project name is "heartsmyproject"
php7.0 git/bga-sharedcode/tools/bgaprojectrename.php remote/hearts/ remote/heartsmyproject/
User avatar
Victoria_La
Posts: 619
Joined: 28 December 2015, 20:55

Re: Assistance with adding an expansion to an existing project

Post by Victoria_La »

And I would not recommend to start with "brain surgery" project if you new to medicine...
kermitfrog wrote: I should note that I am really new to PHP, JS, and CSS so this will be a learning experience for me, hence why I don't want to muck with the "master" branch. I have many years of software development experience, but these languages are new to me (which should be fun).

Any suggestions are welcome.
Start with tutorial as recommended by our docs...
User avatar
kermitfrog
Posts: 15
Joined: 04 May 2018, 04:39

Re: Assistance with adding an expansion to an existing project

Post by kermitfrog »

Thank you for the tips! I will try the renaming trick and see what comes of it.

In the future, having a "feature branch" option in the revision control part of the site would be helpful.

Regarding starting with "brain surgery", I know it would probably be better to start with something simpler, but I need to work on something I care about and know thoroughly, otherwise I won't get anywhere. The languages seem simple enough. CSS will probably be the most difficult to work with, but we will see.
vincentt
Posts: 247
Joined: 01 September 2017, 17:25

Re: Assistance with adding an expansion to an existing project

Post by vincentt »

Hi,

Did you contact the initial dev of the game? Maybe he is thinking of implementing it or he could give you pointers.

Vincent
User avatar
kermitfrog
Posts: 15
Joined: 04 May 2018, 04:39

Re: Assistance with adding an expansion to an existing project

Post by kermitfrog »

He posted on the main forums that he wasn't planning on implementing any of the expansions. I asked him for assistance, but haven't heard back yet.
User avatar
Woodruff
Posts: 412
Joined: 08 March 2014, 00:53

Re: Assistance with adding an expansion to an existing project

Post by Woodruff »

Hi,

I do not usually read the threads on the main forum. I just went there once and answered a few questions. That's why I did not see your message in the first place, I apologize.
I have indeed no intention to develop expansions because I think it's too big for me, considering my involvment in the first part of the project. So I don't mind; if you are willing to continue the adventure, that's great! I'd like to see some expansions playable on BGA.

As you may expect, I can't describe all the functions of my code, it would be time consuming. I'd be rather glad to answer your questions after you study the code it yourself, on specific points. The structure is applied on the BGA framework so I will advise you to know how that framework works precisely (and maybe through other simpler games) before trying to understand the logic of more complexes ones. In it current state, the game has still some minor translation problems but otherwise it seems bug free (there is also some portability problems for mobile versions but I don't care, we suspect that's a lack of comptability with some mobile browsers).

Before you start, you should get in touch with the publisher of the game. His name is Chris Cieslik, mail: angelkurisu@gmail.com. Before adding any expansion, he expects the graphics of teh game to be upgraded to the last version (aka Deluxe version), so these newest graphics for the base games matches those of the expansions. You can fetch these new graphics here: http://asmadigames.com/Proofread/.
So, you have recreate the sprites, integrate the translated texts on the cards nicely (fronts and backs of the cards) and extract the new layout of the resource icons.

After that, I agree that Cities is a good expansions to start with. It is less known though, Echoes is the most interesting expansion to continue with I think, because it adds the most depth in the game mechanisms.

Good luck :)

Tcheby
User avatar
kermitfrog
Posts: 15
Joined: 04 May 2018, 04:39

Re: Assistance with adding an expansion to an existing project

Post by kermitfrog »

Tcheby,

Thank you for the response.

I contacted Chris and he agreed to pass on the art in a better form. I've tried a few online resources to convert the PDF to JPG/PNG, but they have not worked out. If you have any suggestions, please let me know. I tried the recommended BGA PDF converter, but the files provided by Chris are too large.

I picked Cities because it is the simplest expansion for a number of reasons:
1. No forecast, fading, decrees, inspire, compel, etc.
2. Simple inter-card interactions (no second hand triggering events like in Figures)
3. All of the behaviors are encoded into the symbols present on the card itself. There is no text to interpret.
4. Even the special achievements are really easy. Three of them happen on a meld action and the other two only happen on a tuck.

Endorsing will be complicated and potentially invasive, but the biggest effort will be to make the UI aware of the other expansions (displaying cards in piles, different card backs, etc.) and making sure the base game doesn't break when a new expansion is present. The bonus point mechanism will need to be created and the extra bonus achievements (flag, fountain) will need to be displayed somehow as well.

Echoes will be #2 (that's my fav), but I need to understand how the code works first.

If I have questions, where should I direct them? I'm currently stuck on the proper way to update the "createZone" function in the JS to include another set of age piles. The data is present on the server side...it just needs to display them.
Post Reply

Return to “Developers”