Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Sharing custom levels.  (Read 5462 times)
0 Members and 1 Guest are viewing this topic.
Offline LiquidNitrogen
« Posted 2014-03-07 00:15:39 »

Ive started work on porting my tile based puzzle game to java, targeting desktop and android. The game has a built in level editor and I want to work out a system for people to be able to share their custom levels/level-sets. If I set up a website to host the files, perhaps the game could upload/download with FTP. The individual level files are less than 8kb, so they will be easy to quickly transfer.

It would be nice to have a method of users rating the levels on the website and being able to search for particular things, I'm sure thats easy to do in a browser but it would be better to have that functionality built into the game particularly so that it would be simple to get new levels for the android version.

Does anyone have any experience with this idea, or some pointers to useful articles?

-edit: Im using libgdx if thats any help.
Offline Jacob Pickens
« Reply #1 - Posted 2014-03-07 00:19:14 »

I have absolutely no experience with this what so ever, but if you actually get this working, it be bad azz!

Offline ricardo

Senior Devvie

Medals: 2
Projects: 3

« Reply #2 - Posted 2014-03-07 00:52:48 »

You can load your levels from images. I don't know the size of your maps, but even big maps (200 x 200 tiles) can be stored inside one small image (200x200 pixels image = 505 bytes).
Images are easy to share and easy to download. You can also load them inside your android game and save the map information with Shared-preferences (for example).
For computer you can create one folder called "maps" or "levels" and store all images there.

Just my opinion, not sure if this is what you wanted (one way to save/share levels).
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline LiquidNitrogen
« Reply #3 - Posted 2014-03-07 01:04:46 »

You can load your levels from images

I have my levels stored in a plain data file, it stores more complicated information than an image file would allow. What I want to work out is methods of actually sharing those files with other players.
Offline HeroesGraveDev

JGO Kernel

Medals: 382
Projects: 11
Exp: 4 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

« Reply #4 - Posted 2014-03-07 01:36:51 »

I use hybrid.

Image for tile data, text files extra metadata.

Works well for tile-based games.

Offline Grunnt

JGO Kernel

Medals: 143
Projects: 8
Exp: 5 years

Complex != complicated

« Reply #5 - Posted 2014-03-07 07:58:59 »

My first thought is: youre going to build a simple web service. Why not avoid doing many things double and go for a great ready-made implementation of a webserver with REST framework, see for example: or

This web service would then offer a back end (retrieving levels, adding levels to the level repository) that would be both useable by a website (if you like) and from within the game itself, be it android or desktop.

For example a HTTP GET from:
<myserver>/levels/newest     returns the 100 newest level ids (and name, creator etc)     
<myserver>/levels/best                    returns the 100 best level ids etc
<myserver>/levels/56634                 returns a specific level

<myserver>                           would allow adding new levels (youd need checks for security and to avoid spam though)

I dont think FTP will be particularly suitable for this sort of thing, but I'm not too sure. If you know some web service development this would get you going and conform to many best practices quickly. Otherwise it may be a bit of learning to understand how web services and RESTful services work. Good luck!

Offline Phibedy

Senior Devvie

Medals: 9

« Reply #6 - Posted 2014-03-15 16:18:38 »

I would use a php server and put the levels into a database (in my case I would use mysql)  Smiley
Offline Runouw

Innocent Bystander

Exp: 4 years

"Duke Nukem Forever was rushed"

« Reply #7 - Posted 2014-03-15 23:32:17 »

I like to encode levels as text which can be shared on forums. All you have to do is watch out for characters that forums use like '[' or white-space characters. Levels larger than 20kb start to pose a problem though because of the post length limitations.

Pages: [1]
  ignore  |  Print  

EgonOlsen (77 views)
2018-06-10 19:43:48

EgonOlsen (57 views)
2018-06-10 19:43:44

EgonOlsen (77 views)
2018-06-10 19:43:20

DesertCoockie (259 views)
2018-05-13 18:23:11

nelsongames (157 views)
2018-04-24 18:15:36

nelsongames (156 views)
2018-04-24 18:14:32

ivj94 (897 views)
2018-03-24 14:47:39

ivj94 (161 views)
2018-03-24 14:46:31

ivj94 (810 views)
2018-03-24 14:43:53

Solater (174 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!