Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 1612 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 Member


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 »

Quote
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: 253
Projects: 11
Exp: 2 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 Wizard


Medals: 68
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:
http://restx.io/ or http://restlet.org/.

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:
1  
2  
3  
<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


HTTP POST to:
1  
<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 Member


Medals: 8



« 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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

UprightPath (1 views)
2014-09-20 20:08:14

BurntPizza (26 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (70 views)
2014-09-10 13:57:51

TehJavaDev (95 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56

mitcheeb (70 views)
2014-09-08 06:06:29

BurntPizza (52 views)
2014-09-07 01:13:42

Longarmx (39 views)
2014-09-07 01:12:14

Longarmx (45 views)
2014-09-07 01:11:22
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!