User-Created Levels

Does anyone have any idea on how to go about getting user-created levels, as in Trainyard, Helsing’s Fire, etc? Any information of any kind would be helpful :slight_smile:

Thanks!

Caleb [import]uid: 147322 topic_id: 36136 reply_id: 336136[/import]

my first thought would be creating the original levels using xml files.
Then, create some sort of screen where the user can put any object, and then you just take the x and y coordinates, insert them into a new “user created” xml file. You can store that in a database, or just save it locally [import]uid: 130035 topic_id: 36136 reply_id: 143525[/import]

I use Tiled for my levels; saved as .lua files. It wouldn’t be hard to create an editor and save levels as a “copy” of Tiled’s save file type - here I’m wondering more of the “…store that in a database” part of it. How is that done? [import]uid: 147322 topic_id: 36136 reply_id: 143566[/import]

For storing in a database on the device, look at the code exchange at the various database packages that have been built…most notably Graham’s ICE package: http://developer.coronalabs.com/code/ice

Basically, you would use it to store the xml, json, text, etc. that would delineate the level the user created. In your app, you would parse that data out to create the level instead of reading from a file. As an alternative, instead of using a database, you could just write the data out as files.

If you are wanting to store the user created levels to a server for public consumption, I would recommend setting up a mysql database and some server-side scripts (ie: REST-ful API) to store the data and make it easily retrievable. Or, you could use a service like Parse to do that without worrying about the server setup. [import]uid: 92150 topic_id: 36136 reply_id: 143596[/import]

Thanks!

I was thinking of public levels people could create and share - What is “mysql” or “REST-ful API”? And does a “service like Parse” cost a lot?

C [import]uid: 147322 topic_id: 36136 reply_id: 143603[/import]

MySQL - database ( http://www.mysql.com )

REST-ful API - web based API to access database ( http://en.wikipedia.org/wiki/Representational_state_transfer )

Parse - http://www.parse.com

Since you are unfamiliar with MySQL and REST, I would recommend starting with something like Parse. It is fairly straightforward and free to use up to a point. [import]uid: 92150 topic_id: 36136 reply_id: 143604[/import]

my first thought would be creating the original levels using xml files.
Then, create some sort of screen where the user can put any object, and then you just take the x and y coordinates, insert them into a new “user created” xml file. You can store that in a database, or just save it locally [import]uid: 130035 topic_id: 36136 reply_id: 143525[/import]

I use Tiled for my levels; saved as .lua files. It wouldn’t be hard to create an editor and save levels as a “copy” of Tiled’s save file type - here I’m wondering more of the “…store that in a database” part of it. How is that done? [import]uid: 147322 topic_id: 36136 reply_id: 143566[/import]

For storing in a database on the device, look at the code exchange at the various database packages that have been built…most notably Graham’s ICE package: http://developer.coronalabs.com/code/ice

Basically, you would use it to store the xml, json, text, etc. that would delineate the level the user created. In your app, you would parse that data out to create the level instead of reading from a file. As an alternative, instead of using a database, you could just write the data out as files.

If you are wanting to store the user created levels to a server for public consumption, I would recommend setting up a mysql database and some server-side scripts (ie: REST-ful API) to store the data and make it easily retrievable. Or, you could use a service like Parse to do that without worrying about the server setup. [import]uid: 92150 topic_id: 36136 reply_id: 143596[/import]

Thanks!

I was thinking of public levels people could create and share - What is “mysql” or “REST-ful API”? And does a “service like Parse” cost a lot?

C [import]uid: 147322 topic_id: 36136 reply_id: 143603[/import]

MySQL - database ( http://www.mysql.com )

REST-ful API - web based API to access database ( http://en.wikipedia.org/wiki/Representational_state_transfer )

Parse - http://www.parse.com

Since you are unfamiliar with MySQL and REST, I would recommend starting with something like Parse. It is fairly straightforward and free to use up to a point. [import]uid: 92150 topic_id: 36136 reply_id: 143604[/import]

my first thought would be creating the original levels using xml files.
Then, create some sort of screen where the user can put any object, and then you just take the x and y coordinates, insert them into a new “user created” xml file. You can store that in a database, or just save it locally [import]uid: 130035 topic_id: 36136 reply_id: 143525[/import]

I use Tiled for my levels; saved as .lua files. It wouldn’t be hard to create an editor and save levels as a “copy” of Tiled’s save file type - here I’m wondering more of the “…store that in a database” part of it. How is that done? [import]uid: 147322 topic_id: 36136 reply_id: 143566[/import]

For storing in a database on the device, look at the code exchange at the various database packages that have been built…most notably Graham’s ICE package: http://developer.coronalabs.com/code/ice

Basically, you would use it to store the xml, json, text, etc. that would delineate the level the user created. In your app, you would parse that data out to create the level instead of reading from a file. As an alternative, instead of using a database, you could just write the data out as files.

If you are wanting to store the user created levels to a server for public consumption, I would recommend setting up a mysql database and some server-side scripts (ie: REST-ful API) to store the data and make it easily retrievable. Or, you could use a service like Parse to do that without worrying about the server setup. [import]uid: 92150 topic_id: 36136 reply_id: 143596[/import]

Thanks!

I was thinking of public levels people could create and share - What is “mysql” or “REST-ful API”? And does a “service like Parse” cost a lot?

C [import]uid: 147322 topic_id: 36136 reply_id: 143603[/import]

MySQL - database ( http://www.mysql.com )

REST-ful API - web based API to access database ( http://en.wikipedia.org/wiki/Representational_state_transfer )

Parse - http://www.parse.com

Since you are unfamiliar with MySQL and REST, I would recommend starting with something like Parse. It is fairly straightforward and free to use up to a point. [import]uid: 92150 topic_id: 36136 reply_id: 143604[/import]

my first thought would be creating the original levels using xml files.
Then, create some sort of screen where the user can put any object, and then you just take the x and y coordinates, insert them into a new “user created” xml file. You can store that in a database, or just save it locally [import]uid: 130035 topic_id: 36136 reply_id: 143525[/import]

I use Tiled for my levels; saved as .lua files. It wouldn’t be hard to create an editor and save levels as a “copy” of Tiled’s save file type - here I’m wondering more of the “…store that in a database” part of it. How is that done? [import]uid: 147322 topic_id: 36136 reply_id: 143566[/import]

For storing in a database on the device, look at the code exchange at the various database packages that have been built…most notably Graham’s ICE package: http://developer.coronalabs.com/code/ice

Basically, you would use it to store the xml, json, text, etc. that would delineate the level the user created. In your app, you would parse that data out to create the level instead of reading from a file. As an alternative, instead of using a database, you could just write the data out as files.

If you are wanting to store the user created levels to a server for public consumption, I would recommend setting up a mysql database and some server-side scripts (ie: REST-ful API) to store the data and make it easily retrievable. Or, you could use a service like Parse to do that without worrying about the server setup. [import]uid: 92150 topic_id: 36136 reply_id: 143596[/import]

Thanks!

I was thinking of public levels people could create and share - What is “mysql” or “REST-ful API”? And does a “service like Parse” cost a lot?

C [import]uid: 147322 topic_id: 36136 reply_id: 143603[/import]