libgdx / libgdx-demo-superjumper Goto Github PK
View Code? Open in Web Editor NEWLibgdx demo - super jumper
Libgdx demo - super jumper
Hey. I just cloned this project and faced with below error:
Error:Execution failed for task ':android:compileDebugAidl'.
> java.lang.IllegalStateException: aidl is missing
I'm using Android studio 2.1.1.
I must launch it as soon as possible So please give me a help.
Is-- isn't that a good thing? Are you human?
Originally posted by @Frosty-J in libgdx/libgdx#6916 (comment)
"robovmVersion":"2.1.0" ,gradle build could not fin robovm-rt, robovm-cocoatouch.
I change the code like this:
compile "org.robovm:robovm-rt:1.8.0"
compile "org.robovm:robovm-cocoatouch:1.8.0"
then gradle build success.
WebGL/Browser link leads to https://libgdx.badlogicgames.com/ci/demos/superjumper/
There is no game there.
I have collect 5 class HelpScreen1->HelpScreen5 in class HelpScreen
I wish this code i may be useful for you.
public class HelpScreen extends ScreenAdapter {
SuperJumper game;
OrthographicCamera guiCam;
Rectangle nextBounds;
Vector3 touchPoint;
String files[] = new String[]{"data/help1.png","data/help2.png","data/help3.png","data/help4.png","data/help5.png"};
Texture[] helpImages = new Texture[5];
TextureRegion[] helpRegions = new TextureRegion[5];
int current;
public HelpScreen(SuperJumper game) {
// TODO Auto-generated constructor stub
this.game = game;
guiCam = new OrthographicCamera();
guiCam.setToOrtho(false, 320, 480);
nextBounds = new Rectangle(320 - 64, 0, 64, 64);
touchPoint = new Vector3();
for(int i = 0; i < 5; i++){
helpImages[i] = Assets.loadTexture(files[i]);
helpRegions[i] = new TextureRegion(helpImages[i],0,0,320,480);
}
current = 0;
}
public void update(){
if (Gdx.input.justTouched()){
guiCam.unproject(touchPoint.set(Gdx.input.getX(),Gdx.input.getY(),0));
if (nextBounds.contains(touchPoint.x, touchPoint.y)) {
Assets.playSound(Assets.clickSound);
current ++;
if ( current == 4){
current = 0;
game.setScreen(new MainMenuScreen(game));
}
}
}
}
public void draw(){
GL20 gl = Gdx.gl;
gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
guiCam.update();
game.batcher.setProjectionMatrix(guiCam.combined);
game.batcher.disableBlending();
game.batcher.begin();
game.batcher.draw(helpRegions[current], 0, 0);
game.batcher.end();
game.batcher.enableBlending();
game.batcher.begin();
game.batcher.draw(Assets.arrow, 320, 0, -64,64);
game.batcher.end();
}
@Override
public void render(float delta) {
// TODO Auto-generated method stub
super.render(delta);
update();
draw();
}
@Override
public void dispose() {
// TODO Auto-generated method stub
super.dispose();
for(int i = 0; i < 5; i ++){
helpImages[i].dispose();
}
}
}
What's the license covering this project?
If nothing is specified, then it legally defaults to "all rights reserved".
Which means nothing useful can be done with it.
In case it should still be decided, what about using
It would align it with what LibGDX uses. Basically,
int fileIndex;
public HelpScreen (SuperJumper game,int fileIndex) {
this.game = game;
this.fileIndex=fileIndex;
guiCam = new OrthographicCamera();
guiCam.setToOrtho(false, 320, 480);
nextBounds = new Rectangle(320 - 64, 0, 64, 64);
touchPoint = new Vector3();
helpImage = Assets.loadTexture("data/help"+fileIndex+".png");
helpRegion = new TextureRegion(helpImage, 0, 0, 320, 480);
}
public void update () {
if (Gdx.input.justTouched()) {
guiCam.unproject(touchPoint.set(Gdx.input.getX(), Gdx.input.getY(), 0));
if (nextBounds.contains(touchPoint.x, touchPoint.y)) {
Assets.playSound(Assets.clickSound);
if(fileIndex==5){
game.setScreen(new MainMenuScreen(game));
}
else{
game.setScreen(new HelpScreen(game,++fileIndex));
}
}
}
}
As stated in the LibGdx Wiki, AssetManager is the recommended way to load the assets. Then why not use it in this project as well?
This code is really low quallity. Few commits could make it usable
This game looks cool. May I?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.