Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

879400 Posts in 32976 Topics- by 24364 Members - Latest Member: caraag31

May 24, 2013, 02:54:47 AM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Distributing user-created levels
Pages: [1]
Print
Author Topic: Distributing user-created levels  (Read 817 times)
fractilegames
Level 0
**


View Profile WWW Email
« on: April 15, 2012, 12:38:19 AM »

I'm working on a platformer/shooter game, which has built-in level editor. I need to set up some sort of mechanism to allow players easily pass their creations to their friends.

The usual solution would be to have a central server where users can upload/download levels. However, that would require user registration and authentication, which I would like to avoid. It would also need some sort of rating/review system so that the really good levels can be found.

Does anyone have ideas on how I could let players easily share levels with each other without requiring yet another user account? And hopefully with reasonable amount of work for me.

Is there any ready-made solution for the server side? I mean, I could always do it my self using PHP and a database, but that sound quite of lot of work (and maintenance)..
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #1 on: April 15, 2012, 01:25:04 AM »

If levels are small, short strings users can copy paste to each other are the easiest for users to share. After that, images with the level data embedded, there are many image hosting sites users can use. And finally full on files + dropbox, ftp, etc.

No matter what, you'll still need your only server if you want ratings. If you don't like the idea of registration, store unathenticated author metadata in each file, and let them upload without an account. You track levels, rather than users, after all. Some user bases don't really mind the forgability aspect.
Logged
Fallsburg
Level 10
*****


Fear the CircleCat


View Profile WWW
« Reply #2 on: April 15, 2012, 04:19:36 AM »

Here's how I was going to do it.

.png files.  Lossless, small, and perfectly suited to tile based levels (assuming it is tilebased).  And there are practically limitless ways to upload and share pictures online.
Logged

fractilegames
Level 0
**


View Profile WWW Email
« Reply #3 on: April 15, 2012, 05:16:01 AM »

The levels are currently stored as XML files and file sizes are ~30KB on average (2-4KB compressed). Levels are constructed from pre-made blocks, but blocks not all the same size, so storing them as pictures might be tricky.

Here's a screenshot of one level.

Fallsburg: I see how you could easily upload the pictures from the game to any online service, but how did you plan to handle downloading? Do you show a listing of available levels to user in some sort of in-game level browser?
Logged

Sam
Level 3
***



View Profile WWW
« Reply #4 on: April 15, 2012, 06:17:29 AM »

I believe the PNG specification allows for near-arbitrary data to be inserted within the iTXt chunk. So the actual image can be anything at all but it would also carry the XML level data or whatever else you want it to. I'm pretty sure the specification says that the iTXt chunk should be left intact when a PNG is edited, although it would be worth checking that it survives correctly whatever processes free image hosts might use.

There is an example program with source made by St33d that stores text within a PNG file that you may be interested in. I think that uses a tEXt chunk, and I'm not sure what the difference is between the two but I'm sure it's in the specification somewhere!
Logged
Fallsburg
Level 10
*****


Fear the CircleCat


View Profile WWW
« Reply #5 on: April 15, 2012, 06:29:26 PM »

Or, you can store it in a binary format in the image itself.  What are you coding this up in, by the way? 
Logged

Dacke
Level 10
*****


I have never been to Woodstock


View Profile
« Reply #6 on: April 16, 2012, 08:23:12 AM »

Many image hosting sites recode PNG files to JPEG files. If the users share stuff manually this could become a significant problem. If users are to share levels manually with each other, you can just as well give them a compressed xml file to pass around via email or filehosting.
Logged

vegan • socialist • atheist • humanist • liberal • FOSSer
programmer • feminist • animal rights activist • pacifist • teetotaller
fractilegames
Level 0
**


View Profile WWW Email
« Reply #7 on: April 16, 2012, 01:05:15 PM »

The simplest solution is to just instruct users to share the xml files manually via email or IM. Eventually I would like to provide more user-friendly way for users to upload their levels and browse levels uploaded by others, preferably within the game itself.

I will probably go with the "manual sharing" option for now and later try to set up a simple http server for storing XML level files uploaded by users. This way I can also check that uploaded files are actually valid levels before they are shown in listing. I could also later add some sort of rating system for levels as well.

I forgot to mention that for multiplayer levels there's already one way to share user-created levels: When user hosts a game using a custom level that level file is automatically transferred to any clients that connect to the hosted game. The limitation here is that due to network issues (e.g. symmetric NAT case), not everybody can easily host a game.

Fallsburg: I'm coding the game in C++ using Ogre3D engine and bunch of other open source libraries.
« Last Edit: April 16, 2012, 01:12:18 PM by fractilegames » Logged

fractilegames
Level 0
**


View Profile WWW Email
« Reply #8 on: June 20, 2012, 11:43:48 PM »

Now that I thought this again after two months break I think I've come up with better solution using a a simple file server (FTP server with upload hooks or custom server). This is how it would work:

  • User can choose to upload their levels with simple in-game command "share level". File is uploaded to upload directory on file server.
  • File server validates uploaded levels and moves them to download directory.
  • User can download shared levels by entering level name and clicking "download" or by  in-game level browser that lists levels in download directory on server.
  • Levels are automatically deleted from server after fixed time period (a week or so).

Above is the simplest possible solution. It does not allow updating already uploaded level on server (until it has been deleted) or let user delete the shared level. Also, there's very little support for getting proper error messages back to uploader, when level is rejected by server.

If I would go with the custom server option I could do following improvements while still keeping things simple:
  • Level uploader could set a password for uploaded level that would allow him to update or delete that level.
  • In-game level browser could show level metadata (author name, description) to user.
  • As an administrator I could set certain levels on server permanent, so that they would not be automatically deleted.
  • Since the protocol is my own, I could pass all necessary status and error information back to client and show user descriptive error messages.
  • This would allow me to add fancier features over time (ratings, user comments).

Any comments will be appreciated. Have missed something? Could this work? Is there a better way of doing this (while not requiring user authentication and keeping things simple for both users and myself)?
Logged

jotapeh
Level 10
*****



View Profile WWW Email
« Reply #9 on: June 21, 2012, 10:47:03 AM »

I believe the PNG specification allows for near-arbitrary data to be inserted within the iTXt chunk. So the actual image can be anything at all but it would also carry the XML level data or whatever else you want it to. I'm pretty sure the specification says that the iTXt chunk should be left intact when a PNG is edited, although it would be worth checking that it survives correctly whatever processes free image hosts might use.

I did this for an image editing program for kids, except it recorded their drawing replay data.

Many image editing programs, Photoshop included, will strip it out. Sad
Logged

Chromanoid
Level 7
**



View Profile
« Reply #10 on: June 22, 2012, 01:53:21 PM »

maybe a compressed level as base91-string (http://base91.sourceforge.net/) (or even more characters via utf-8?) to copy/paste via instant messengers? use some sort of signing/hashing to ensure that the complete level is pasted.

edit: the text might get too big. maybe you need a really good compression algorithm like the ones they use for demos. http://code4k.blogspot.de/2010/12/crinkler-secrets-4k-intro-executable.html (which links to http://mattmahoney.net/dc/paq.html#paq8 also looks interesting)

edit2: http://eeemo.net/ shows a neat way to visually compress big data with utf-8 (Unicode subscripts and superscripts). the question is which instant messengers have restrictions on this kind of text and in general restrictions on text length.
« Last Edit: June 22, 2012, 02:39:11 PM by Chromanoid » Logged
Graham.
Level 10
*****



View Profile WWW
« Reply #11 on: June 22, 2012, 09:07:51 PM »

Ratings are lame. A better measure is which levels get the most play time, or have the broadest appeal (measured by play time). There are other things you can do too.

I would download some levels in the background while the player plays, then let them try 'em out without having to do anything special. Opening up a special menu, waiting for a download, possibly encountering a boring level.... these are big barriers. Distribution of user-generated content is something that we don't do too well quite yet. It normally feels like a power-user thing to me, like as complex as downloading mods for games... though I guess people do that a lot.

I think about this problem a fair bit. I love user-gen content.

Logged

TheLastBanana
Level 7
**


thelastbanana@hotmail.com
View Profile WWW Email
« Reply #12 on: June 23, 2012, 12:02:56 AM »

I agree with you about ratings being lame. It's a pain in the butt to have to rate everything after you play it. I don't know if playtime is necessarily a better indicator, though.

There are lots of players who play through a level just for the sake of beating it, and others who play it and analyze or take it in as they go. As a result, how long it took them to go through the level (especially in something short like a puzzle or brief level-based action game) would be a poor indicator of how appealing the level actually was. The only way to implement that, really, would be to determine what "type" of player you're dealing with (i.e. how long they usually spend on levels), but that sounds like a lot more trouble than it's worth, and would still be prone to error.

Still, there must be a better way than ratings.

Also, easy-to-use user-generated content is definitely a better way to go than the the typical method of browsing through menus. Time Fcuk had a clever way of doing it: it arranges a few user-generated levels into a set for you to play through. That said, I think it's good to keep the option of manually finding levels to play available, since it encourages people to share their favourite levels with each other instead of having to randomly stumble across them. The "quick play" option should definitely be the most prominent one, though.
Logged

Graham.
Level 10
*****



View Profile WWW
« Reply #13 on: June 23, 2012, 12:26:57 AM »

Yeah, I agree with all that. I was just offering a starting point.

Engagement is a hard thing to measure. It's a big rabbit hole.

You could link all the players together in a giant graph, with distances between nodes representing the likelihood that any given player will "enjoy" a level given another players "enjoys" it. You can make several graphs for each type of "enjoyment" measurement. You could then partition the graph into groups, find players in each group whose level preferences tend to be predictive of other player's level preferences in the same group... and so on. You can do a lot of stuff in there. I think about this too much already.

Simpler ideas.... Scrap playtime, consider how many times a player returns to a level. You could measure 20 different things then compare them against the likelihood that a player plays a level multiple times, giving you an idea of how good of a measurement each of those 20 things are. Ok, maybe that's complicated.

My biggest barrier to user-gen content is the browsing. It is an order of magnitude more work for me to find extra stuff. The older I get the less I care about having to work for my rewards in a game, if that work isn't a part of the experience itself. Dark Souls is amazing. Googling for blogs is not.

Time Fcuk is pretty awesome.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic