How to use tilemap download as JSON/Load from JSON?

Get help using Construct 2

Post » Sat Sep 26, 2015 11:43 pm

Trying to figure out how these things work. I haven't found anything helpful in the forum and the tiny explanation in the manual is no help at all.
I'm not trying anything to do with the tmx importer, just the built in tilemap object.
Any help would be great!

Thanks
B
32
S
10
G
6
Posts: 259
Reputation: 6,776

Post » Sun Sep 27, 2015 2:32 pm

Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Sun Sep 27, 2015 4:41 pm

thankyou very much! :)
B
32
S
10
G
6
Posts: 259
Reputation: 6,776

Post » Sun Sep 27, 2015 7:44 pm

Just a quick thankyou @korbaach for this and other examples that you post. I am learning a lot from you.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Tue Dec 15, 2015 2:42 pm

Me too, @korbaach

Thank you for all your help.

Is it possible to use this solution to save user information (items/sprites arrangements for example?)
B
74
S
13
G
4
Posts: 1,000
Reputation: 8,041

Post » Tue Dec 15, 2015 4:30 pm

RenatoB wrote:Is it possible to use this solution to save user information (items/sprites arrangements for example?)


Tilemap is this example just one object ..if you have multiple sprites objects (Sprite1,Sprite2...)
check this capx :)

AjaxArrayDictionaryLocalStorageFileChooser.capx

Image

(in example I only save x&y position..but of course..you can save frames, animation,instance variables...)
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Tue Dec 15, 2015 4:48 pm

Awesome!! Thank you! I think that's exactly what I need to create a map editor. I'm looking for a solution that allows the player organize obstacles (sprites) over a map and save this information externally (on server) for another player get it and play. If the map is bad and receive 3 rejections, it will be deleted.
B
74
S
13
G
4
Posts: 1,000
Reputation: 8,041

Post » Mon Dec 21, 2015 9:48 am

@korbaach

A last doubt about this solution: is it possible to append informations instead create a new file? So, when the player loads the set, he can choose by name/id or a random set.

Thanks in advance.
B
74
S
13
G
4
Posts: 1,000
Reputation: 8,041

Post » Mon Dec 28, 2015 6:00 am

First .. I apologize to everyone who reference my old capx...
I will not be able to access to my desktop (C2)..probably for another month.....25.01.2016...
holiday trip :ugeek: ...


Second..
@RenatoB you probably need server side solution...(PHP+MySQL) to share maps between players...
that means...you need Ajax to $Post & $Get Data... from your own server...
So... player need to be online to send or receive custom maps(Json Array Data)...and you need to build your server solution...
On C2 tutorials.. if you search for PHP ,you'll find several tutorials about submit Hi-Score...I think that's a good start

Another important ting...
Always when you think... how to make HTML5 game (C2)..you think... how to make Web Site...
and..any question "How to my game accesses certain user data?" actually is (roughly) question :
"How to my web site accesses certain user data?"
So ..when you make HTML5 game you are actually made Web Site..

I have seen many questions on forum...like..Why my game can't access to some cusom folder and rip pictures to game..or why can't access to text file or camera...

Would any of us really wanted to web site accesses our text,pictures or camera?!..

You accidentally click on ads..you go on [LINK REMOVED - MOD] (please don't click on this link!)
and web site colect all your personal data from comp...

if I remember correctly..in example I use Browser ExecuteJs & FileReader() (The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer..)..
and this is a relatively new permit for HTML5..it is still not allowed that website writes new data on your comp...
I believe that you can bypass this limitation if you use NW.js ..but it means that you have to export game for comp(Win-Mac)
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Mon Jun 13, 2016 10:53 am

@korbaach

I saw your capx and I think you can help me to solve a big problem: I need to save a JSON file on my server for each user that answer some questions during the game in ghe textbox (answer1, answer2,...,answer10) without using PHP/MySQL. I just need to save the JSON file. Is it possible?
B
4
S
2
Posts: 125
Reputation: 850


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], brunopalermo, Nicolas951 and 14 guests