Read/Write to disk

Discussion and feedback on Construct 2

Post » Tue Aug 28, 2012 8:36 pm

I would really, really like not only full file I/O, but also the ability to preview as an EXE instead of through a web browser like with construct classic - one click and an exe appears running on the screen. Reasons for this in order of importance, least to highest:

File size - Not as much of an issue these days, but it seems a waste especially with needing 3 copies of each sound file in each backup of a game. However, it leads into...

Saving times - true, saving as a project is faster, but even with a small game it can start to take a bit of a disconcertingly long time when imagining how much longer it would take to save a big game.

Previewing times - while I haven't tested it yet, I'm concerned that at some point when working on a larger game it's going to start impacting preview times as well, as happened with construct classic. I realize C2 is written far, far more efficiently, but regardless that can be a lot of data to move around all at once and if some of it could be loaded at runtime when it's needed via actions instead it would make it much smoother.

Updating files - if we want to update a piece of music, we have to go through the process of importing and replacing it each time. If we could have it load from disk, all we need to do is overwrite the file.

Some people want to make EXE-only games - it would be very, very nice to preview directly via the output method they're going to use - no having to wonder if the game is going to work differently via the EXE exporter (bugs in awesomium or such, etc). A lot of bugs are found when testing other stuff in the preview - having to do a whole extra round of testing specifically for the export would be extremely inconvienent, especially for large games like an RPG!

Webstorage issues - as browsers have limits of 2.5 or 5 MB for webstorage, that means if you want to use more than that you have to start resorting to swapping stuff in and out of webstorage to disk using clumsy save/load file from disk dialogs every time you want to swap between them, you have to keep track of which is which, and hope that is the dizzying process of making a game you don't accidentally save as the wrong file name and overwrite the wrong file or some such.

Or then, what about on the user's side, if your save files simply need more than 2.5/5 MB, like if you include a level editor that the user can use? What then? Even with using EXE, there are simply no options other than asking the user where to save the file, then to load it later, both via a windows dialog box. Users aren't going to like that, it's not a smooth experience at all.

What's worse, is when previewing via a browser, that's 2.5/5 MB shared for ALL games made with construct 2! Want to make multiple games that use a lot of data at once? Gotta swap webstorages every time.

The full file I/O would really need preview as EXE to work well, though. Otherwise, you'd have to export to EXE each time to preview, which would be infuriating!

If we had both preview as EXE and full file I/O, that would solve these problems completely and be a great working experience. Please, please add both to C2!Arima2012-08-28 20:50:11
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Tue Aug 28, 2012 10:01 pm

@Arima Great points, especially about the shared 2.5/5 MB limit.
I keenly believe that C2 should work as a game maker for HTML5 games for the web, as well as a full-fledged one for desktop applications. If its going to be able to export .EXE files, it should work as a full experience of making a desktop game, including testing. It shouldn't just feel like a wrapper, but an option to work on a desktop game from the start to finish.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Tue Aug 28, 2012 10:06 pm

I feel bad asking for more on the EXE side of things at all... I spent so long asking for an EXE wrapper in the first place, I just feel plain ungrateful to be unsatisfied.

But Arima's right, on all counts... This features would be really great to have.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Tue Aug 28, 2012 10:15 pm

[QUOTE=Arima]ability to preview as an EXE instead of through a web browser like with construct classic - one click and an exe appears running on the screen.[/QUOTE]

Yes, that is a "must have" feature. As I wrote in this post here running a game from an *.exe and from browser are two different things.
It's just a simple example but it's impossible to test it, cause in the browser that game is unplayable. So to test my game I have to export it to exe every time and it's only possible now, after releasing r100. I had to abandon that project before because I could not test it properly.

And it only a small, simple game - not even small just few tiles and sprites moving across the screen, and it takes about 5-8 seconds to export it.

Now imagine all that big projects, with xx numbers of layouts, xxx numbers of sprites, tilebg, audio etc. to export every time when you want to preview it.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Aug 29, 2012 12:28 am

In theory, previewing in Chrome should be identical to previewing in Awesomium, since they use the same engine. I'd prefer not to add a preview option for EXE if it basically works the same as the Chrome browser. I would also prefer to avoid adding full file I/O options which are not portable, i.e. only work in Awesomium. Browsers are beginning to understand files with various file system APIs appearing in browsers. I think it would be far better to come up with a cross-platform file I/O system which works transparently with both Awesomium and browsers which support file systems. However, that means not using the traditional file I/O, so I'm not sure what that would look like. It probably means unlimited file I/O, but in a sandbox (where the user can only choose files previously saved to the sandbox). This will be looked in to, but I don't have any immediate plans...

[QUOTE=Arima]File size - Not as much of an issue these days, but it seems a waste especially with needing 3 copies of each sound file in each backup of a game.[/QUOTE]
Not sure why this is a reason for EXE preview. Only .oggs are exported with Awesomium since it can read them.

[quote]Saving times - true, saving as a project is faster, but even with a small game it can start to take a bit of a disconcertingly long time when imagining how much longer it would take to save a big game.[/quote]
Not sure what you mean here, do you mean save times in C2? Why would a new preview option affect this?

[quote]Previewing times[/quote]
Preview times for an EXE are likely to be the same as previewing in Chrome. Classic was slow because it would build a new data file for each preview, as if exporting. C2 now points the browser to the existing project files without copying anything, so even large projects should be fast. I don't see an EXE previewer improving on this.

[quote]Updating files - if we want to update a piece of music, we have to go through the process of importing and replacing it each time. If we could have it load from disk, all we need to do is overwrite the file.[/quote]
If you save your project as a folder, don't you get this already?

[quote]Some people want to make EXE-only games - it would be very, very nice to preview directly via the output method they're going to use - no having to wonder if the game is going to work differently via the EXE exporter (bugs in awesomium or such, etc). A lot of bugs are found when testing other stuff in the preview - having to do a whole extra round of testing specifically for the export would be extremely inconvienent, especially for large games like an RPG![/quote]
I admit this is probably the best reason for making an EXE previewer. But if we can get it working nearly identically to Chrome, I still think that's a better solution. Hopefully the EXE exporter can literally be Chrome in its own window.

[quote]Webstorage issues - as browsers have limits of 2.5 or 5 MB for webstorage...[/quote]
This is only because browsers operate on the open web. The limit can be removed in Awesomium. I'll check if this is done already or if we need to do something.

[quote]What's worse, is when previewing via a browser, that's 2.5/5 MB shared for ALL games made with construct 2![/quote]
The limit, if any, is per-game. However it is most likely any limit can be removed anyway.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Wed Aug 29, 2012 2:45 am

[QUOTE=Ashley]I think it would be far better to come up with a cross-platform file I/O system which works transparently with both Awesomium and browsers which support file systems. However, that means not using the traditional file I/O, so I'm not sure what that would look like. It probably means unlimited file I/O, but in a sandbox (where the user can only choose files previously saved to the sandbox).[/quote]

It sounds good, but I'm concerned with transferring the files in the sandbox into and out of the browser. It's not an elegant process having to use a windows dialog box to do it. What if I have a lot of files there that I want saved to a folder to reimport into C2's files section later? Would I have to save each one individually every time they get updated? Or would it instead work to basically "ship" the game WITH the sandbox to the user? If that's the case, then that would solve a lot of the reasons I wanted file I/O.

[QUOTE=Ashley][QUOTE=Arima]File size - Not as much of an issue these days, but it seems a waste especially with needing 3 copies of each sound file in each backup of a game.[/QUOTE]
Not sure why this is a reason for EXE preview. Only .oggs are exported with Awesomium since it can read them.[/quote]

It was more a reason for file I/O - what you mentioned above about the sandbox would fix it though (and it wasn't much of an issue anyway).

[QUOTE=Ashley][quote]Saving times - true, saving as a project is faster, but even with a small game it can start to take a bit of a disconcertingly long time when imagining how much longer it would take to save a big game.[/quote]
Not sure what you mean here, do you mean save times in C2? Why would a new preview option affect this?[/quote]

I was thinking the file I/O would affect it, because then c2's editor wouldn't have to do anything with the files when saving since they wouldn't be kept in the project, but on second thought, if you coded C2 so that if a file wasn't modified it doesn't get rewritten when saving, I guess that wouldn't happen.

[QUOTE=Ashley][quote]Previewing times[/quote]
Preview times for an EXE are likely to be the same as previewing in Chrome. Classic was slow because it would build a new data file for each preview, as if exporting. C2 now points the browser to the existing project files without copying anything, so even large projects should be fast. I don't see an EXE previewer improving on this.[/quote]

I was thinking that the browser itself could potentially take quite a while loading everything at the start. However, with how you described how it works, as long as the eventual option for loading objects/layouts can read things from disk as they're needed rather than all at once at the start, I guess that's a non-issue as well.

[QUOTE=Ashley][quote]Updating files - if we want to update a piece of music, we have to go through the process of importing and replacing it each time. If we could have it load from disk, all we need to do is overwrite the file.[/quote]
If you save your project as a folder, don't you get this already?[/quote]

*Facepalm* - yeah. Forgot about that.

[QUOTE=Ashley][quote]Some people want to make EXE-only games - it would be very, very nice to preview directly via the output method they're going to use - no having to wonder if the game is going to work differently via the EXE exporter (bugs in awesomium or such, etc). A lot of bugs are found when testing other stuff in the preview - having to do a whole extra round of testing specifically for the export would be extremely inconvienent, especially for large games like an RPG![/quote]
I admit this is probably the best reason for making an EXE previewer. But if we can get it working nearly identically to Chrome, I still think that's a better solution. Hopefully the EXE exporter can literally be Chrome in its own window.[/quote]

I have to disagree here. I still think it's important to preview the game as it will be delivered, as well as a complex game could potentially expose previously unknown bugs. Also, I just feel... uncomfortable with the idea of shipping a game that I didn't test thoroughly in its shipped form.

[QUOTE=Ashley][quote]What's worse, is when previewing via a browser, that's 2.5/5 MB shared for ALL games made with construct 2![/quote]
The limit, if any, is per-game. However it is most likely any limit can be removed anyway.[/QUOTE]

Per game if it's EXE, sure, but with web browsers it seems that the webstorage for all C2 games that I'm developing show up in the same keys list under resources in chrome - which implies they're sharing the same 2.5/5 MB limit. Is that incorrect?

[QUOTE=Ashley][quote]Webstorage issues - as browsers have limits of 2.5 or 5 MB for webstorage...[/quote]
This is only because browsers operate on the open web. The limit can be removed in Awesomium. I'll check if this is done already or if we need to do something.[/quote]

That would be fantastic, but it still runs into the problem:

[QUOTE=Ashley]I'd prefer not to add a preview option for EXE if it basically works the same as the Chrome browser.[/quote]

...that it doesn't work the same if EXE has no limit to webstorage and browsers do. Most of the benefits of unlimited webstorage are for while developing the game, rather than after export.

I understand your reluctance to add EXE-only features, and if sandbox you mentioned was implemented and especially the limit for webstorage was removed, I guess I'm okay with no direct to disk file I/O as it won't limit us that much, but I still strongly feel the need for previewing as EXE for the webstorage limit reason alone, and also I still think it's important to preview a game as it will be played. Would it be difficult to add it as a feature? Because I think a lot of people would use and appreciate it.Arima2012-08-29 02:57:38
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: DTernes and 4 guests