[REQUEST] CLI Export/Continuous Integration support

Discussion and feedback on Construct 2

Post » Fri Mar 13, 2015 5:32 am

Hey @ashley,

Every couple of months a request comes through to add support for exporting via command line arguments. I'd really like to see this added to the engine since I've been able to do it with pretty much all other game engines I've used(not RPG Maker though). I'd like to throw my thoughts and a few use cases out there.

I was at GDC last week and surprisingly I was one of the few developers representing Construct2 there. I talked to a lot of people about C2 and even got some guy at the ClickTeam booth upset(oops?) by mentioning it. In particular I was inspired by this talk by Brian Provinciano: http://schedule.gdconf.com/session/automated-testing-and-instant-replays-in-retro-city-rampage. I would really like to implement a few of the automated testing methods he demonstrated but currently it's impossible because there is no way to export via command line or from a CI server. It's also a bigger priority for me to try and get this working since I'm in the WiiU dev program now and was able to talk with a number of people at GDC about it, I would hate to not be able to deliver. :/

Here is an example of my use case:
  • I use git/gitlab(a FOSS github.com clone) for version control and Jenkins-CI as my continuous integration and build server.
  • I have all of my C2 games in gitlab currently. On a scheduled or on-demand basis Jenkins would check out a C2 project on one of my Windows server instances
  • (Impossible step)From there Jenkins would invoke C2 and export for web.
  • Afterwards it would then run some automated tests and report back the results. The build would either succeed or fail based on the results.
  • If the build succeeded I could automatically push the export to my web server's protected link so manual QA can begin by myself or alpha testers.
  • I could also have separate downstream builds setup to prepare exports for specific platforms.

I understand that this isn't a turnkey solution(not much in game dev is :p) but without a command line option I can't even begin to work on this.

Alternatively if you don't feel like adding in command line options would be worth your time -especially with C3 in in the beginning stages- I have a secondary suggestion. I've tried working around the lack of command line export options by using AutoIt https://www.autoitscript.com/site/autoit/. It's really hacky, brittle and messy but I got it really close to working. The part where AutoIt fails is on the export dialog page. The reason it fails is there is no way to reliably select the same export platform, especially when platforms are being added or deprecated. This could be solved by adding a search dialog to the export dialog like below:

Image

A search dialog would allow me to have AutoIt narrow the platform by typing the exact name then I could have it always click the export option that's left.

Sorry for writing a book but thanks for listening. Optimally command line exporting would be the best solution but if a search dialog is a quicker win I can work with it. Let me know if anything needs clarified.

Thanks dude!
B
57
S
17
G
7
Posts: 151
Reputation: 7,333

Post » Fri Mar 13, 2015 5:44 am

I wondered if a general use runtime might solve some issues like this.
Image ImageImage
B
172
S
50
G
184
Posts: 8,444
Reputation: 116,107

Post » Fri Mar 13, 2015 6:06 am

Agree with @newt .
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Fri Mar 13, 2015 6:35 am

Hmmm. Could you guys expand on what you're thinking a bit? I think I know what you're going for but I'd rather be sure we're all on the same page.
B
57
S
17
G
7
Posts: 151
Reputation: 7,333

Post » Fri Mar 13, 2015 6:53 am

"command line arguments" is not easy to use for normal user who do not have programing background.

Edit:
Humm... I guess it might be better to have both solutions (text script command line and gui interface) to make programmer or non-programmer happy.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Fri Mar 13, 2015 2:56 pm

A fits all runtime might make it so that all you need is the capx to run a game.
Its not all you would need, and there would be other issues, but it would solve other issues as well.
The biggest con would be that you wouldn't need the editor to export, which is Scirra's bread, and butter.
Plus the runtime would probably be huge.
Image ImageImage
B
172
S
50
G
184
Posts: 8,444
Reputation: 116,107

Post » Sat Mar 14, 2015 5:41 pm

I could see major value in adding that search box for both automation reasons and use of use to the average user. @basspenguin
B
3
Posts: 1
Reputation: 177

Post » Mon Mar 16, 2015 1:16 pm

@Newt Gotcha, I think that sounds useful but unfortunately it sounds like a completely new Scirra product. :/

My intention was to find a happy medium to where it wouldn't take too much time to implement but could get the people who want automation a working solution. I'll obviously create a tutorial and share my AutoIt scripts if(when?) I'm able to get it to work. :)
B
57
S
17
G
7
Posts: 151
Reputation: 7,333

Post » Tue Mar 31, 2015 8:59 pm

@Ashley Any input on potentially adding a search box?

Thanks dude!
B
57
S
17
G
7
Posts: 151
Reputation: 7,333

Post » Mon Apr 06, 2015 8:31 am

Thanks @basspenguin for pointing me to this important post

I myself have 80+ games, for each there are 3 versions (high/low res etc.), I want to export them all, but it takes too many time.
I will be happy to be able to write an external export script to do it all at once.

A command line exporting API will be a great solution for me!
@ashley please take that in consideration.
B
5
S
1
Posts: 5
Reputation: 285

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests