Skip to content
Browse files

new screens

media
  • Loading branch information...
1 parent 5d5b67b commit e61f9c11bf99959bdf2af2adaea0da4dc40acaaf @vcarluer committed May 5, 2012
View
BIN bin/data/blacktranslayer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN bin/data/ga.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN bin/data/gamers associate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN bin/data/help.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN bin/data/title.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/blacktranslayer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/blacktranslayer.xcf
Binary file not shown.
View
BIN gimp/fond.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/fond.xcf
Binary file not shown.
View
BIN gimp/fondgame.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/fondgame.xcf
Binary file not shown.
View
BIN gimp/ga.xcf
Binary file not shown.
View
BIN gimp/help.xcf
Binary file not shown.
View
BIN gimp/icon.xcf
Binary file not shown.
View
BIN gimp/medias/icon_128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
16 gimp/medias/manifest.json
@@ -0,0 +1,16 @@
+{
+ "name": "Tiny Galaxy",
+ "description": "Arcade action game in a tiny galaxy. Help Green to survive in this wild tiny galaxy, beware the meteor!",
+ "version": "1.0.0.0",
+ "icons": {
+ "128": "icon_128.png"
+ },
+ "app": {
+ "urls": [
+ "http://vcarluer.github.com/tinygalaxy/"
+ ],
+ "launch": {
+ "web_url": "http://vcarluer.github.com/tinygalaxy/"
+ }
+ }
+}
View
BIN gimp/medias/promotional_440x280.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/medias/tinygalaxy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/screens/blacktranslayer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/screens/ga.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/screens/help.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN gimp/screens/title.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/data/blacktranslayer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/data/ga.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/data/gamers associate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/data/help.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/data/title.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 src/org/devince/tinyworld/Assets.java
@@ -47,6 +47,8 @@
public static final String DATA_SUNBACK_PNG = "data/sunback.png";
public static final String DATA_TITLE_PNG = "data/title.png";
public static final String DATA_HUD_PNG = "data/hud.png";
+ public static final String DATA_BLACK_TRANS = "data/blacktranslayer.png";
+ public static final String DATA_LOGO = "data/ga.png";
private static Map<String, Sound> sounds = new HashMap<String, Sound>();
private static Map<String, Texture> textures = new HashMap<String, Texture>();
@@ -89,6 +91,8 @@ public static void load() {
textures.put(DATA_SUNBACK_PNG, createTexture(DATA_SUNBACK_PNG));
textures.put(DATA_TITLE_PNG, createTexture(DATA_TITLE_PNG));
textures.put(DATA_HUD_PNG, createTexture(DATA_HUD_PNG));
+ textures.put(DATA_BLACK_TRANS, createTexture(DATA_BLACK_TRANS));
+ textures.put(DATA_LOGO, createTexture(DATA_LOGO));
}
private static Sound createSound(String path) {
View
5 src/org/devince/tinyworld/TinyWorld.java
@@ -485,6 +485,7 @@ public int getBonusesCount() {
public void start() {
this.gameStarted = true;
+ TinyWorld.get().setPause(false);
this.setScreen(this.gameScreen);
}
@@ -547,4 +548,8 @@ public String getKillString() {
return kill;
}
+
+ public void setPause(boolean isPause) {
+ this.paused = isPause;
+ }
}
View
18 src/org/devince/tinyworld/items/Player.java
@@ -18,7 +18,7 @@
import com.badlogic.gdx.scenes.scene2d.actions.Sequence;
public class Player extends GameItem implements IHurtable {
- private final static float EPSILON = 0.05f;
+ private final static float EPSILON = 0.01f;
protected static final int RIGHT = 1;
protected static final int LEFT = -1;
private static final int NONE = 0;
@@ -168,7 +168,7 @@ public void act(float delta) {
this.createBlock(currentAround);
}
- if (bottom != null) {
+ if (this.isPlayer && bottom != null) {
boolean full = false;
if (this.existsAndIsEnabled(Galaxy.LEFT) &&
this.existsAndIsEnabled(Galaxy.TOP) &&
@@ -193,11 +193,6 @@ public void act(float delta) {
}
if (this.isInvincible()) {
- if (!this.invincibleMusicStarted) {
- TinyWorld.get().pauseMusic();
- this.sndInvincible.play();
- this.invincibleMusicStarted = true;
- }
this.invincibleElapsed += delta;
if (!this.invincibleActionDone && this.invincibleElapsed > INVINCIBLE_TIME - 1f) {
FadeOut fo = FadeOut.$(0.1f);
@@ -377,6 +372,10 @@ protected float getMaxVelocity() {
max += 0.1f;
}
+ if (this.isInvincible) {
+ max *= 1.33f;
+ }
+
return max;
}
@@ -757,6 +756,11 @@ public void startInvincible() {
this.setInvincible(true);
this.invincibleElapsed = 0f;
this.sprite.setTexture(this.invTexture);
+ TinyWorld.get().pauseMusic();
+ this.sndInvincible.stop();
+ this.sndInvincible.play();
+ this.invincibleMusicStarted = true;
+ this.invincibleActionDone = false;
}
public boolean isPlayer() {
View
1 src/org/devince/tinyworld/items/ShootGenerator.java
@@ -17,7 +17,6 @@ public ShootGenerator() {
public ShootGenerator(GameItem target) {
super(target);
this.shootDelta = this.getShootDelta();
- this.shootElapsed = 100;
}
private float getShootDelta() {
View
9 src/org/devince/tinyworld/screens/GameScreen.java
@@ -12,6 +12,7 @@
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.graphics.Color;
+import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
@@ -36,6 +37,7 @@
private Sprite invincible;
private Vector2 scorePos;
private Vector2 lifePos;
+ private Texture transBlack;
private Stage stage;
@@ -66,7 +68,9 @@ public GameScreen() {
this.invincible.setPosition(x, y);
this.lifePos = new Vector2(xLbl, yLbl);
- this.stage = new Stage(TinyWorld.WIDTH, TinyWorld.HEIGHT, false, this.batch);
+ this.stage = new Stage(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false, this.batch);
+
+ this.transBlack = Assets.getTexture("data/blacktranslayer.png");
}
@Override
@@ -92,9 +96,10 @@ public void pause() {
public void render(float delta) {
this.batch.begin();
if (TinyWorld.get().isGameOver()) {
+ this.batch.draw(this.transBlack, 50, 50, Gdx.graphics.getWidth() - 100, Gdx.graphics.getHeight() - 100);
cumDelta += delta;
if (cumDelta > 1f) {
- fontGO.draw(this.batch, "PRESS ANY KEY", 50, Gdx.graphics.getHeight() / 2f - 75f);
+ font.draw(this.batch, "PRESS ANY KEY", 50, Gdx.graphics.getHeight() / 2f - 150f);
if (Gdx.input.isKeyPressed(Keys.ANY_KEY) || Gdx.input.justTouched()) {
this.cumDelta = 0;
this.sndSelect.play();
View
27 src/org/devince/tinyworld/screens/Help.java
@@ -15,40 +15,45 @@
private SpriteBatch batch;
private Sprite sprite;
private Sound sndSelect;
- private float cumDelta;
+ private boolean keyPressed;
public Help() {
this.batch = new SpriteBatch();
- this.sprite = new Sprite(new TextureRegion(Assets.getTexture("data/help.png"), 0, 0, 800, 600));
- this.sprite.setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
+ this.sprite = new Sprite(new TextureRegion(Assets.getTexture("data/help.png"), 0, 0, 700, 500));
+ this.sprite.setSize(Gdx.graphics.getWidth() - 100, Gdx.graphics.getHeight() - 100);
+ this.sprite.setPosition(50, 50);
this.sndSelect = Assets.getSound("data/select.wav");
+
+ if (Gdx.input.isKeyPressed(Keys.ANY_KEY) || Gdx.input.justTouched()) {
+ this.keyPressed = true;
+ } else {
+ this.keyPressed = false;
+ }
}
@Override
public void render(float delta) {
this.batch.begin();
-
this.sprite.draw(this.batch);
this.batch.end();
- cumDelta += delta;
- if (cumDelta > 1f) {
- if (Gdx.input.isKeyPressed(Keys.ANY_KEY) || Gdx.input.justTouched()) {
+ if (Gdx.input.isKeyPressed(Keys.ANY_KEY) || Gdx.input.justTouched()) {
+ if (!this.keyPressed) {
this.sndSelect.play();
TinyWorld.get().start();
+ this.keyPressed = true;
}
+ } else {
+ this.keyPressed = false;
}
-
}
@Override
public void resize(int width, int height) {
- // TODO Auto-generated method stub
}
@Override
public void show() {
- // TODO Auto-generated method stub
-
+ TinyWorld.get().setPause(true);
}
@Override
View
6 src/org/devince/tinyworld/screens/OnScreenController.java
@@ -17,8 +17,8 @@
public static final int PADDING = 26;
public static final int PADDINGMID = PADDING / 2;
public static final int X_RIGHT = X_LEFT + PADDING + CONTROL_SIZE + PADDING;
- public static final int X_CREATE = TinyWorld.WIDTH - CONTROL_SIZE - SCREEN_PADDING;
- public static final int Y_POS = (int) (TinyWorld.HEIGHT - CONTROL_SIZE /2f - SCREEN_PADDING);
+ public static final int X_CREATE = Gdx.graphics.getWidth() - CONTROL_SIZE - SCREEN_PADDING;
+ public static final int Y_POS = (int) (Gdx.graphics.getHeight() - CONTROL_SIZE /2f - SCREEN_PADDING);
public static final int Y_BOTTOM = (int) (Y_POS - CONTROL_SIZE /2f);
public static final int X_POS = (int) (X_CREATE + CONTROL_SIZE / 2f);
TextureRegion left;
@@ -42,7 +42,7 @@ private void loadAssets () {
}
public void render (SpriteBatch batch) {
- //if (Gdx.app.getType() != ApplicationType.Android) return;
+ if (Gdx.app.getType() != ApplicationType.Android) return;
batch.draw(left, SCREEN_PADDING + (4 * 8), SCREEN_PADDING + (4 * 8), 4, 4, 8, 8, 8, 8, 90f, false);
batch.draw(right, X_LEFT + PADDING + (4 * 8), SCREEN_PADDING + (4 * 8), 4, 4, 8, 8, 8, 8, -90f, false);
batch.draw(bridgeControl, X_POS, SCREEN_PADDING + (4 * 8), 4, 4, 8, 8, 8, 8, 0f, false);
View
34 src/org/devince/tinyworld/screens/Title.java
@@ -7,6 +7,7 @@
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.audio.Sound;
+import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
@@ -15,21 +16,48 @@
private SpriteBatch batch;
private Sprite sprite;
private Sound sndSelect;
+ private Sprite ga;
+ private static float TIME_GA = 3f;
+ private float timeElapsed;
+ private boolean keyPressed;
public Title() {
this.batch = new SpriteBatch();
this.sprite = new Sprite(new TextureRegion(Assets.getTexture("data/title.png"), 0, 0, 800, 600));
this.sprite.setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
this.sndSelect = Assets.getSound("data/select.wav");
+ this.ga =new Sprite(new TextureRegion(Assets.getTexture(Assets.DATA_LOGO), 0, 0, 667, 640));
+ this.ga.setSize(667 * 0.85f, 640 * 0.85f);
+ this.ga.setPosition(Gdx.graphics.getWidth() / 2f - this.ga.getWidth() / 2f, Gdx.graphics.getHeight() / 2f - this.ga.getHeight() / 2f);
+ this.keyPressed = false;
}
@Override
public void render(float delta) {
+ this.timeElapsed += delta;
this.batch.begin();
- this.sprite.draw(this.batch);
+ if (this.timeElapsed < TIME_GA) {
+ Gdx.gl.glClearColor(1, 1, 1, 1);
+ Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
+ this.ga.draw(this.batch);
+ } else {
+ this.sprite.draw(this.batch);
+ }
+
this.batch.end();
+
if (Gdx.input.isKeyPressed(Keys.ANY_KEY) || Gdx.input.justTouched()) {
- this.sndSelect.play();
- TinyWorld.get().showHelp();
+ if (!this.keyPressed) {
+ this.keyPressed = true;
+ if (this.timeElapsed < TIME_GA) {
+ this.timeElapsed = TIME_GA;
+ } else {
+ this.sndSelect.play();
+ TinyWorld.get().start();
+ TinyWorld.get().showHelp();
+ }
+ }
+ } else {
+ this.keyPressed = false;
}
}

0 comments on commit e61f9c1

Please sign in to comment.
Something went wrong with that request. Please try again.