Bang!

Show us your completed creations made in Construct 2

Post » Sun May 06, 2012 9:24 am

Hi i like the nice and simple way of making levels. I have been toying with a platformer idea for a while and may use a similar style for allowing users to create their own levels. Keep us updated if you come up with a decent way to save and use the user generated content.
B
25
S
7
G
5
Posts: 185
Reputation: 5,056

Post » Mon May 07, 2012 10:51 pm

Here's the update! With a helpful suggestion from R0J0hound to work around a schoolboy error on my part- I now have the facility to both load and save the layouts via JSON.

At the moment it's a simple 2 dimensional array, but if I can get it working correctly, there's no reason a 3rd can't be added, and perhaps using a string instead of a number, can assign several properties at once to the different blocks.

Ideally I'd love for the editor to open the url of the game and launch it, but that may be a bit ahead of me as it'll mean sending variables via POST or saving via AJAX, neither of which I've achieved as yet.

Here's a shot of a successfully loaded layout in the editor.



At the moment the "save" button simply triggers a new tab/window with a download link (default Construct 2 Array JSON save behaviour) , which can then be opened in notepad, and pasted back into the text box offered on clicking the "load" button.

I have a couple of problems to work through, if anyone has any suggestions.

1: The textbox, once triggered, keeps focus even after clicking elsewhere on the canvas, meaning the backspace key to clear the layout n edit view no longer works, as the textbox is capturing keystrokes.

Is there a way to turn off focus for a text box, or should I instead destroy it and create it each time?

2: Can anyone remember the plugin for saving out cropped .png images from contsruct? My ultimate plan is to allow users to save a name + thumbnail image to be loaded at runtime from a second CSV/JSON file listing the user created designs.



Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Sat Oct 26, 2013 1:16 am

Ultra monster bump. After several hours replacing the old mipey spritefont with the official scirra one, I can finally get it on the arcade.



Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Previous

Return to Completed Creations

Who is online

Users browsing this forum: Allen T and 4 guests