a network of distributed indies

Any community contributions to libgdx go here! Some may get included in the core API when permission is granted.

a network of distributed indies

Postby syl » Sat Mar 12, 2011 11:41 am

Hello,

as Mario suggested, i put the idea on the forum.

So, why not promote other libGDX games ? Let say you already have a market link like that market://search?q=pub:my_awesome_big_company (pub stands for publisher) why not also setting a link to other libGDX prods like that market://search?q=libGDX (so here it's a common keyword search)

so, then we just have to mention about libGDX in our games description, and we'll promote libGDX !

Some are interested ? Webmasters commonly do this with banners exchange !


Of course, we could also try something more complex, like managing a sort of plugin that would come as java code to include in our games to promote the other games.
I was thinking about a typical page that would come up, giving random links directly to games, let say 2-3 games in a page with a description AND IMAGES of course.

Do someone knows if it's possible to fetch market data ?

edit : oh, and i could give the server-part if web hosting is involved :)
syl
 
Posts: 212
Joined: Mon Nov 01, 2010 10:25 pm
Location: Bordeaux, France

Re: a network of distributed indies

Postby Obli » Sat Mar 12, 2011 12:01 pm

I totally agree that this is an awesome idea !

I was thinking about something similar, a kind of web-ring for apps. Those who wish to apply would be listed in the registered apps, and the counter-part would be to include a link to the app-ring in each registered app. A server-side web hosting would be the best solution: it wouldn't need a heavy load capability and we would be able to fetch any kind of data.
Obli
 
Posts: 616
Joined: Mon Jan 10, 2011 6:18 pm
Location: Bordeaux, France

Re: a network of distributed indies

Postby syl » Sat Mar 12, 2011 12:26 pm

yeah that sounds good :D
syl
 
Posts: 212
Joined: Mon Nov 01, 2010 10:25 pm
Location: Bordeaux, France

Re: a network of distributed indies

Postby mzechner » Sat Mar 12, 2011 1:16 pm

I like the idea, altough i think it should be more app centric and less about promoting libgdx itself. It would be nice to have something that you can plugin to your app which will allow people to browse through a list of other apps that use libgdx, but more in terms of promoting more games than promoting libgdx.

My proposal would be:

- a site to register your game with and upload a logo/banner/image to
- a simple API that lets you fetch a list of games plus their images to display in your game
- a simple API that also draws this list for your in a standardized way. This should be optional if people wish to implement the list rendering themselves.

A click on an item in the games list would open up the market directly.

I lack the time to implement this, so that's just a few thoughts i have on the matter. If someone picks this up and implements it it could be awesome :)

The main benefit would be for people to share the user base of other games. And we wouldn't need to go through a publisher like Hyperbees (which are awesome, but take away from your income).
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: a network of distributed indies

Postby BurningHand » Sat Mar 12, 2011 4:28 pm

I bet Google App Engine would be a great no cost to low cost option for something like this.
IRC: nexsoftware / mobidevelop; GitHub: MobiDevelop;
BurningHand
 
Posts: 2812
Joined: Mon Oct 25, 2010 4:35 am

Re: a network of distributed indies

Postby syl » Sat Mar 12, 2011 6:02 pm

ok, i quickly began to do some things, but i have no more time today. I will continue tomorrow. And i would like to know if i'm going good direction.


So there is a xml-rpc PHP server side (i gone with that because i thinked it's evolutive) :

Code: Select all
<?

// method to register with XML-RPC server
function obtain_a_random_game_func($method_name, $params, $app_data) {
        return "well this is it, we'll say image URI and a text description";
}

// we create a server and sets a handle for the server in the variable $xmlrpc_server
$xmlrpc_server = xmlrpc_server_create();

// we register the method, mapping the methodName from client to function on server
xmlrpc_server_register_method($xmlrpc_server, "obtain_a_random_game", "obtain_a_random_game_func");

// we take POST data ($HTTP_RAW_POST_DATA does not work with some php.ini settings), we strip slashes (to deal with possible magic_quotes)
$request_xml = stripslashes(file_get_contents('php://input'));

// we call the method wanted by the XML CLIENT
$response = xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');

// we print the response for the client to read.
print $response;

// free the resource
xmlrpc_server_destroy($xmlrpc_server);

?>



http://www.love-android.net/libGDX-ring/

the code of the form for the moment :
Code: Select all
<?

// this is the page where we register a new game

// we should take the openID for example

$header = "<html><head><title>libGDX apps-ring to promote games</title></head><body>";
$footer = "</body></html>";

$plain = "<div style='background:green;margin:15 15 15 15;'><div style='padding:15 15 15 15;'>hello there !<br />

you can here upload a photo and a text to promote your libGDX game !<br /><br />

<form method=\"post\" action=\"index.php\" enctype=\"multipart/form-data\">

  <label for=\"image\">Image for your game (JPG, PNG ou GIF | max. 150 Ko) :</label><br />
  <input type=\"file\" name=\"image\" id=\"image\" /><br /><br />

  <label for=\"title\">Title of the game (max. 50 chars) :</label><br />
  <input type=\"text\" name=\"title\" value=\"Title of game\" id=\"title\" /><br /><br />

  <label for=\"description\">Description of the game (max. 255 chars) :</label><br />
  <textarea name=\"description\" id=\"description\"></textarea><br />

  <input type=\"submit\" name=\"submit\" value=\"Submit\" />
</form>

</div></div>";

echo $header.$plain.$footer;

?>


It's not able to upload anything for the moment.

what do you think about it ?

Of course design is just trashy for the moment :lol:



the java client side code :

Code: Select all
package com.syl.test43;

import java.net.*;
import java.io.*;

public class Xml_Rpc {

   public final String SERVER = "http://www.love-android.net/libGDX-ring/request.php";
   private final String chars_encoding = "UTF-8";

   public void request(String input, String server) {
      if (server == "")
         server = SERVER;

      try {
         URL u = new URL(server);
         URLConnection uc = u.openConnection();
         HttpURLConnection connection = (HttpURLConnection) uc;
         connection.setDoOutput(true);
         connection.setDoInput(true);
         connection.setRequestMethod("POST");
         OutputStreamWriter wout = new OutputStreamWriter(connection.getOutputStream(), chars_encoding);

         wout.write("<?xml version=\"1.0\"  encoding=\"" + chars_encoding + "\" ?>\r\n");
         wout.write("<methodCall><methodName>obtain_a_random_game</methodName>\r\n");
         wout.write("  <params>\r\n");
         wout.write("    <param>\r\n");
         wout.write("      <value><string>" + input + "</string></value>\r\n");
         wout.write("    </param>\r\n");
         wout.write("  </params>\r\n");
         wout.write("</methodCall>\r\n");

         wout.flush();
         //wout.close();

         InputStream in = connection.getInputStream();
         int c;
         while ((c = in.read()) != -1) System.out.write(c);
         in.close();

      }
      catch (IOException e) {
         System.err.println(e);
      }

   }

}


this is just a xml-rpc client code, we need to add a GL page dropping the randomly choosen games.

So :

* there is an unused argument concept (so can be extended) because it's xml-rpc
* we need a GL page done with libgdx (easy to do a basic one)
* i miss also the authentication ! (openID ??)

Please give ideas !


edit : ha post number fourty two :ugeek:
syl
 
Posts: 212
Joined: Mon Nov 01, 2010 10:25 pm
Location: Bordeaux, France

Re: a network of distributed indies

Postby mzechner » Sat Mar 12, 2011 6:24 pm

Registration site needs authentification as you pointed out. The clients shouldn't need to authenticate, they just fetch a random list of games.

The screenshots/images/logos should have a specific size or at least a size that can be easily handled by OpenGL (power of two with a texture region maybe?)

Other than that it's a good quick hack :)
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: a network of distributed indies

Postby syl » Mon Mar 14, 2011 12:02 pm

i made some progress on the php-side, now i'm trying to fetch the image from a libgdx powered app.
I get the image as a string (i could get it as binary), but i'm trying to find a way to directly draw it (without storing it in a file, if this is possible) as a TextureRegion.
syl
 
Posts: 212
Joined: Mon Nov 01, 2010 10:25 pm
Location: Bordeaux, France

Re: a network of distributed indies

Postby Mercury » Mon Mar 14, 2011 1:51 pm

This is awesome idea. It's nice to promote and be promoted by felow libgdx developers :)
Mercury
 
Posts: 27
Joined: Sat Oct 23, 2010 10:03 am
Location: Serbia and Montenegro, Budva

Re: a network of distributed indies

Postby mzechner » Mon Mar 14, 2011 2:47 pm

Syl, just send the image as plain binary content in it's original encoding, create a FileHandle derived class that implements read() and returns a ByteArrayInputStream to the binary content you fetched from the site. That FileHandle you can then passed to new Texture() or new Pixmap().
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Next

Return to Libgdx Contributions

Who is online

Users browsing this forum: No registered users and 1 guest