playn

GWT Compiler Error: Missing Interface Methods on Subclass (PlayN HTML)

允我心安 提交于 2019-12-05 06:35:39
Disclaimer: I'm new to GWT/PlayN, so this might be an obvious mistake that I'm making. When I have a basic (starter) PlayN project, my BlahGame class method implements the Game interface, which requires three methods: init , paint , and update . The starter class looks something like: public class BlahGame implements Game { public void init() { ... } public void paint(float alpha) { ... } public void update(float alpha) { ... } } I created a BaseGame class to implement game, like so: public class BaseGame implements Game { public void init() { ... } public void paint(float alpha) { ... }

How do you unit test a PlayN project?

若如初见. 提交于 2019-12-05 04:21:27
问题 I have managed to get basic unit testing working, however when I add a unit test to project-java I get an error of class not found, looking into it it seems when compiling the testing classes, it dosn't copy the main classes from the project-core, does anyone have any idea how to fix this in maven? Edit: To make things more clear, I do know where to place the tests, I have placed in project-java/src/tests However What I mean is it doesnt invlude the clases from project-core/src 回答1: A better

Playn Sample - How can I use Android res Folder as resources directory?

浪子不回头ぞ 提交于 2019-12-04 20:35:13
Story in short: I was trying to make playn-showcase-android fit to any screen size. And came across many problems like we cant use 9-patch images, and if we go for scaling, it blur, scale9 images doesn't stretch well when there is text on it.. Finally I decided to make my showcase-android res/ folder to be default resource folder, at least for the Android version. I have tried to edit playn source, but realized that it takes the resources path from class loader. Is there any thoughts about this? How can I use res/drawable Images for atleast Android version? like in the android specific way..

Force GWT compiler to stop pruning invalid CompilationUnits

给你一囗甜甜゛ 提交于 2019-12-01 22:14:15
问题 I have a project in PlayN that allows me to compile a single java codebase to every platform under the sun; I am building against gwt trunk, which presently allows GWT.create() to be called in pure java implementations. There are some hoops to jump through, namely calling ServerGwtBridge.getInstance().register(String.class, new ClassInstantiator() {...}); for every class to be used by GWT.create(). So, rather than manually code every binding, I setup some annotations on my classes, and made a

Force GWT compiler to stop pruning invalid CompilationUnits

僤鯓⒐⒋嵵緔 提交于 2019-12-01 20:15:22
I have a project in PlayN that allows me to compile a single java codebase to every platform under the sun; I am building against gwt trunk, which presently allows GWT.create() to be called in pure java implementations. There are some hoops to jump through, namely calling ServerGwtBridge.getInstance().register(String.class, new ClassInstantiator() {...}); for every class to be used by GWT.create(). So, rather than manually code every binding, I setup some annotations on my classes, and made a generator that spits out the initialization code needed to register the ClassInstatiators. The

PlayN Font Support

大城市里の小女人 提交于 2019-12-01 10:12:11
What kind of support do the PlayN or supporting libraries (like TriplePlay and others) provide in regards to non-standard fonts -- custom TrueType fonts in particular. You have to register the font differently on each backend that you intend to use, but once the font is registered by name, you can use it like any built-in font by simply calling PlayN.graphics().createFont(name, style, size) . The HTML5 backend registers fonts using @font-face in CSS on the page that loads your game. The Android and Java backends require some code to register the font, and in the iOS backend the font must be

PlayN Font Support

让人想犯罪 __ 提交于 2019-12-01 06:58:17
问题 What kind of support do the PlayN or supporting libraries (like TriplePlay and others) provide in regards to non-standard fonts -- custom TrueType fonts in particular. 回答1: You have to register the font differently on each backend that you intend to use, but once the font is registered by name, you can use it like any built-in font by simply calling PlayN.graphics().createFont(name, style, size) . The HTML5 backend registers fonts using @font-face in CSS on the page that loads your game. The

Build error: missing artifact com.sun:tools:jar:1.6

北慕城南 提交于 2019-11-30 17:48:54
Trying to build PlayN sample projects I get: Missing artifact com.sun:tools:jar:1.6 pom.xml /playn-cute line 6 Maven Dependency Problem On every pom.xml file. How do I resolve it? Edit : I've added the profiles node to the pom.xml , but the error remains. I've checked the tools.jar is actually exists, and it didn't. So I've added tools.jar to lib folder. And still the error remains. The full pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0

How to handle RPCs in client-server PlayN game?

我与影子孤独终老i 提交于 2019-11-29 09:09:40
问题 I'd like to use PlayN to create a client/server card game, e.g. Hearts. While I'm mostly focusing on the HTML5 output, I'd ideally like to be output-platform-agnostic in case I decide to make an Android client in the future. How should I approach the RPC mechanism? These are the options I've thought of: Use JSON for RPCs with get()/post() methods - write a servlet that accepts/returns JSON, and make all versions of client code use that. This seems doable, but I'm concerned about JSON's

Collaboration from PlayN client with server

北城余情 提交于 2019-11-29 08:42:53
I have written a game in PlayN, which has to communicate with a JavaEE-Server with Seam. First of all I only need the game running in HTML5. The current issue is the communication between the PlayN-client and the JavaEE-Server 1) First I tried to communicate over the PlayN.net() interface exchanging information using JSON. Since PlayN is running on port 8888 and the server on 8080 I correctly run into problems with the same-origin-policy. 2) Now I'm looking for a working solution. Which one would you recommend? Do you have other ideas? a) I'm trying to work with RPC as described in How to