# Help with my own Game

**URL:** <https://discourse.processing.org/t/help-with-my-own-game/26320>\
**Category:** Processing for Android\
**Created:** [December 16, 2020, 10:55pm UTC](https://discourse.processing.org/t/help-with-my-own-game/26320 "2020-12-16T22:55:58Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Rogo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rogo/32/12349_2.png) [@Rogo](https://discourse.processing.org/u/Rogo)\
**Post date:** [December 19, 2020, 10:10pm UTC](https://discourse.processing.org/t/help-with-my-own-game/26320/21 "2020-12-19T22:10:30Z")

</div>

Okay i try it 🤪

---

<div class="post-metadata">

**Author:** ![Rogo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rogo/32/12349_2.png) [@Rogo](https://discourse.processing.org/u/Rogo)\
**Post date:** [December 20, 2020, 1:00pm UTC](https://discourse.processing.org/t/help-with-my-own-game/26320/22 "2020-12-20T13:00:18Z")

</div>

```auto
float spieler_x;
float spieler_y = 200;
float rx = width/5;
float ry = 500;
float rw = 100;
float rh = 100;
float linksX = 50;
float linksY = 500;
float linksW = 100;
float linksH = 100;
float jumpX = 1250;
float jumpY = 500;
float jumpW = 100;
float jumpH = 100;
void setup() {
  orientation(LANDSCAPE);
  background(0);
  stroke(0);
  noFill();
}
void draw() {
  fill(#FFFFFF);
  rect(spieler_x, spieler_y, 50, 50, 2);
  rect(rx, ry, rw, rh, 5);
  rect(jumpX, jumpY, jumpW, jumpH, 5);
  rect(linksX, linksY, linksW, linksH, 5);
  fill(255);
  if (mousePressed) {
    if(mouseX>rx && mouseX <rx+rw && mouseY>ry && mouseY <ry+rh) {
      fill(#818181);
      rect(rx, ry, rw, rh, 5);
        if (spieler_x < 1400) {
          spieler_x++;
      }
    }
    if (mouseX>linksX && mouseX <linksX+linksW && mouseY>linksY && mouseY <linksY+linksH) {
      fill(#818181);
      rect(linksX, linksY, linksW, linksH, 5);
      if (spieler_x > 5) {
        spieler_x--;
      }
    }
    if(mouseX>jumpX && mouseX <jumpX+jumpW && mouseY>jumpY && mouseY <jumpY+jumpH) {
      fill(#818181);
      rect(jumpX, jumpY, jumpW, jumpH, 5);
      redraw();
      spieler_y--;
    }
  }
  fullScreen();
}

```

I’m overwhelmed with it, I don’t know how it works🙄

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [December 20, 2020, 4:26pm UTC](https://discourse.processing.org/t/help-with-my-own-game/26320/23 "2020-12-20T16:26:28Z")

</div>

The concept isn’t that difficult. Let’s say you have a phone with a screen resolution of 600 by 900 pixels, and you make a sketch and draw a button at location rect(300, 450, bw, bh).  
The button will then in the middle of the screen. Now you send your app to a friend whose phone has a resolution of 1200 by 1900 pixels. The button will appear on the top left of his screen. So therefore in an Android sketch, you need to write rect(width/2, height/2);

---

<div class="post-metadata">

**Author:** ![Rogo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rogo/32/12349_2.png) [@Rogo](https://discourse.processing.org/u/Rogo)\
**Post date:** [December 20, 2020, 4:51pm UTC](https://discourse.processing.org/t/help-with-my-own-game/26320/24 "2020-12-20T16:51:10Z")

</div>

is there a video in German? ☹

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [December 20, 2020, 5:10pm UTC](https://discourse.processing.org/t/help-with-my-own-game/26320/25 "2020-12-20T17:10:53Z")

</div>

You can switch on subtitles on youtube in the settings button; some of them have the german translation I just tried videos Daniel Shiffman [here](https://thecodingtrain.com/Courses/learning-processing/). For the rest, I always use google translator. Whole text pages can be translated at once.

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [December 20, 2020, 5:34pm UTC](https://discourse.processing.org/t/help-with-my-own-game/26320/26 "2020-12-20T17:34:28Z")

</div>

Install [this Chrome extension](https://chrome.google.com/webstore/detail/google-translate/aapbdbdomjkkjkaonfhkkikfgjllcleb?hl=en) and then you click on the icon and chose translate page.  
[This](https://happycoding.io/tutorials/processing/) is a really good website to translate and learn from.

---

<div class="post-metadata">

**Author:** ![Rogo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rogo/32/12349_2.png) [@Rogo](https://discourse.processing.org/u/Rogo)\
**Post date:** [December 20, 2020, 10:56pm UTC](https://discourse.processing.org/t/help-with-my-own-game/26320/27 "2020-12-20T22:56:35Z")

</div>

Thank you 😌 😌 😌 😌 😌 😌 😌

[Previous page](https://discourse.processing.org/t/help-with-my-own-game/26320.md?page=1)
