Questions tagged [playn]

PlayN is an open-source, cross-platform game development framework that provides a single Java API that can be used to generate HTML5, Android, iOS, and desktop Java/applet clients.

PlayN is an open-source, cross-platform game development framework created by Google engineers and supported by an active community. It provides a single Java API that can be used to generate HTML5 (via GWT), iOS (via IKVM and MonoTouch), Android, and desktop Java clients.

291 questions
0
votes
1 answer

why playn creates only one permutation

While compiling java to javascript the gwt creates in default 6 permutations with optimized javascript for the different browsers (chrome, firefox, opera, safari, ie, webkit). doing the same with playn it creates only one permutation. But why and…
Rock Solid
  • 91
  • 1
  • 4
0
votes
1 answer

How to add listener to a GroupLayer in playn?

I have used Pointer.Listener and Mouse.Listener with ImageLayer and it worked. But when I use Pointer.Listener to a GroupLayer, It doesnt listens the clicks or touches. How can I do this? I am using the following code. myGroupLayer.addListener(new…
Rockcollins
  • 418
  • 5
  • 15
0
votes
1 answer

PlayN.Net returning empty String in HTML

I can't understand the problem im having with PlayN.net. Maybe it's trivial, but since im new to web based stuff, I'm kinda stuck, so I hope someone here can enlighten me :) My problem: I would like to acess a servlet from my game, it works, but…
Andrei
  • 38
  • 2
0
votes
1 answer

In PlayN, is there a cross-platform method for formatting decimals?

How can I format a decimal value (e.g. 1.29854) so that it produces a string rounded to 2 decimal places (1.30)? I'm lost because GWT doesn't support the native Java number formatting classes and I can't find any PlayN support for number…
klenwell
  • 6,978
  • 4
  • 45
  • 84
0
votes
1 answer

Playn - is it possible to deploy on Apache server?

I understand that it's a GWT, but if it compiles to Javascript, can the generated html module compile to such a packaging that I can just deploy it on Apache, assuming I don't have any backend communications?
Stephane Grenier
  • 15,527
  • 38
  • 117
  • 192
0
votes
2 answers

Maven omits for jar conflict with older version

I'm new to maven. My gwt-compatible project uses PlayN, which has a dependency on Google Guava r09: com.google.guava guava r09 (The project isn't GWT…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
0
votes
1 answer

how to capture an imagelayer click using playn?

I created an image and added to the imagelayer as I get the click event with this picture? Using the pointer it returns only the value of x and y that was clicked. I want to identify which was clicked on the image, as I do that?
Greg
  • 1
  • 1
0
votes
1 answer

Pixel level graphics in PlayN

I want to do pixel level graphics on a PlayN game whose main target is HTML5. However, PlayN's Canvas object does not provide access to the CanvasPixelArray class, or the putImageData and getImageData functions. I'm worried that using drawPoint…
funkybro
  • 8,432
  • 6
  • 39
  • 52
0
votes
1 answer

With PlayN framework, how can I include unit tests in my project?

Right now I've been maintaining a second sandbox project where I test concepts and work through roadblocks. But this is not very efficient as I end up having to duplicate a lot of code and am unable to maintain a durable set of regression tests for…
klenwell
  • 6,978
  • 4
  • 45
  • 84
0
votes
1 answer

How do I cleanup correctly in playn

I'm running my PlayN-game in the browser. In my task manager I see how the memory of google chrome or firefox is getting bigger and bigger up to 512 MB. The probable reason is that I don't clean up and destroy all my elements that I use in playn. I…
user1141785
  • 431
  • 7
  • 21
0
votes
1 answer

In the HTML version of PlayN, why does the following JSON-handling code throw an exception?

I'm trying to figure out if this is a bug within HtmlJson.java or in my implementation. I just upgraded to PlayN version 1.2. My code attempts to load a Json.Object into a Json.Writer. This works in the Java version. This is the code below. The…
klenwell
  • 6,978
  • 4
  • 45
  • 84
0
votes
1 answer

In PlayN, how do I use the Storage interface to persist data?

I'm looking for a code example that demonstrates practical real-world usage of the Storage interface. I'm especially interested in HTML5 implementation. I've just started working on my own proof-of-concept, so I'll post that if no better answers…
klenwell
  • 6,978
  • 4
  • 45
  • 84
0
votes
1 answer

PlayN GWT/HTML, keeps insisting module must be (re)compiled

I created a new PlayN project from the 1.2 archetype using the command line given in the GettingStarted wiki page. I then imported this Maven Project into Eclipse, just bringing in the core, java, and html modules. If I right-click the Java project,…
Paul Gestwicki
  • 1,610
  • 1
  • 15
  • 18
0
votes
1 answer

Why net().get on success return empty string

This is with playn. I use this, only to try how it works: net().get("http://google.com", new Callback() { @Override public void onSuccess(String result) { drawResult(result); } @Override public void…
0
votes
2 answers

How to get the width of an image in playn with HTML5 before rendering?

In the pure Java version, calling width() or height() on Image or on ImageLayer works. But with HTML5 backend I get zero if I call it too early. Image image = assets().getImage("images/myimage.png"); ImageLayer layer =…
fredstroup
  • 60
  • 8
1 2 3
19
20